]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
d3b3ac65af87e1dfbc49e8a9af71ef5cb64890a0
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.590 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20141204.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tests         suppress build/install with test-programs
713   --without-curses-h      install curses.h as ncurses.h only
714   --with-pkg-config{=path} enable/disable use of pkg-config
715   --with-pkg-config-libdir=XXX use given directory for installing pc-files
716   --enable-pc-files       generate and install .pc files for pkg-config
717   --with-pc-suffix        suffixes pc-files
718   --enable-mixed-case     tic should assume mixed-case filenames
719   --with-install-prefix   prefixes actual install-location ($DESTDIR)
720 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
721   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
722   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
723   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
724   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
725   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
726   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
727 Options to Specify the Libraries Built/Used:
728   --disable-libtool-version  enable to use libtool's incompatible naming scheme
729   --with-libtool          generate libraries with libtool
730   --with-shared           generate shared-libraries
731   --with-normal           generate normal-libraries (default)
732   --with-debug            generate debug-libraries (default)
733   --with-profile          generate profile-libraries
734   --with-cxx-shared       generate C++ shared-libraries
735   --with-lib-prefix       override library-prefix
736   --with-termlib          generate separate terminfo library
737   --with-ticlib           generate separate tic library
738   --with-gpm              use Alessandro Rubini's GPM library
739   --without-dlsym         do not use dlsym() to load GPM dynamically
740   --with-sysmouse         use sysmouse (FreeBSD console)
741   --enable-rpath          use rpath option when generating shared libraries
742   --disable-relink        relink shared libraries during install
743   --with-shlib-version=X  Specify rel or abi version for shared libs
744   --with-libtool-opts=XXX specify additional libtool options
745   --with-export-syms=XXX  limit exported symbols using libtool
746   --with-versioned-syms=X markup versioned symbols using ld
747   --disable-lib-suffixes  disable library suffixes
748   --disable-rpath-hack    don't add rpath options for additional libraries
749 Fine-Tuning Your Configuration:
750   --disable-overwrite     leave out the link to -lcurses
751   --disable-database      do not use terminfo, only fallbacks/termcap
752   --with-database=XXX     specify terminfo source to install
753   --with-hashed-db        specify hashed-database library
754   --with-fallbacks=XXX    specify list of fallback terminal descriptions
755   --without-xterm-new     specify if xterm terminfo should be old version
756   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
757   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
758   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
759   --disable-big-core      assume machine has little memory
760   --disable-big-strings   assume compiler has only standard-size strings
761   --enable-termcap        compile in termcap fallback support
762   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
763   --enable-getcap         fast termcap load, no xrefs to terminfo
764   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
765   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
766   --disable-root-environ  restrict environment when running as root
767   --enable-symlinks       make tic use symbolic links not hard links
768   --enable-broken_linker  compile with broken-linker support code
769   --enable-bsdpad         recognize BSD-style prefix padding
770   --enable-widec          compile with wide-char/UTF-8 code
771   --disable-lp64          allow chtype to be long (ignore _LP64)
772   --disable-largefile     omit support for large files
773   --disable-tparm-varargs compile tparm() without varargs interface
774   --disable-tic-depends   link tic library without explicit dependency on ncurses library
775   --with-bool=TYPE        override fallback type of bool variable
776   --with-caps=alt         compile with alternate Caps file
777   --with-chtype=TYPE      override type of chtype
778   --with-ospeed=TYPE      override type of ospeed variable
779   --with-mmask-t=TYPE     override type of mmask_t
780   --with-ccharw-max=XXX   override size CCHARW_MAX
781   --with-tparm-arg=TYPE   override parameter type of tparm
782   --with-rcs-ids          compile-in RCS identifiers
783 Options to Specify How Manpages are Installed:
784   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
785                           optionally formatted/catonly, e.g., gzip,formatted
786   --with-manpage-renames  specify manpage-renaming
787   --with-manpage-aliases  specify manpage-aliases using .so
788   --with-manpage-symlinks specify manpage-aliases using symlinks
789   --with-manpage-tbl      specify manpage processing with tbl
790 Extensions:
791   --disable-ext-funcs     disable function-extensions
792   --enable-sp-funcs       enable experimental SCREEN-extensions
793   --enable-term-driver    enable experimental terminal-driver
794   --enable-const          compile with extra/non-standard const
795   --enable-ext-colors     compile for 256-color support
796   --enable-ext-mouse      compile for extended mouse-encoding
797   --enable-no-padding     compile with $NCURSES_NO_PADDING code
798   --enable-signed-char    compile using signed Boolean's in term.h
799   --enable-sigwinch       compile with SIGWINCH handler
800   --enable-tcap-names     compile with user-definable terminal capabilities
801 Development Code:
802   --without-develop       disable development options
803   --enable-hard-tabs      compile with hard-tabs code
804   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
805 Experimental Code:
806   --disable-assumed-color do not assume anything about default-colors
807   --disable-hashmap       compile without hashmap scrolling-optimization
808   --enable-colorfgbg      compile-in experimental $COLORFGBG code
809   --enable-interop        compile-in experimental interop bindings
810   --with-pthread          use POSIX thread library
811   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
812   --enable-weak-symbols   enable weak-symbols for pthreads
813   --enable-reentrant      compile with experimental reentrant code
814   --with-wrap-prefix=XXX  override prefix used for public variables
815   --enable-safe-sprintf   compile with experimental safe-sprintf code
816   --disable-scroll-hints  compile without scroll-hints code
817   --enable-wgetch-events  compile with experimental wgetch-events code
818 Testing/development Options:
819   --disable-echo          do not display "compiling" commands
820   --enable-warnings       build: turn on GCC compiler warnings
821   --enable-string-hacks   work around bogus compiler/loader warnings
822   --enable-assertions     test: turn on generation of assertion code
823   --with-dmalloc          test: use Gray Watson's dmalloc library
824   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
825   --with-valgrind         test: use valgrind
826   --disable-leaks         test: free permanent memory, analyze leaks
827   --enable-expanded       test: generate functions for certain macros
828   --disable-macros        test: use functions rather than macros
829   --with-trace            test: add trace() function to all models of ncurses
830   --disable-gnat-projects test: disable GNAT projects even if usable
831 Ada95 Binding Options:
832   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
833   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
834   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
835   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
836
837 Some influential environment variables:
838   CC          C compiler command
839   CFLAGS      C compiler flags
840   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
841               nonstandard directory <lib dir>
842   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
843               headers in a nonstandard directory <include dir>
844   CPP         C preprocessor
845   CXX         C++ compiler command
846   CXXFLAGS    C++ compiler flags
847   CXXCPP      C++ preprocessor
848
849 Use these variables to override the choices made by `configure' or to help
850 it to find libraries and programs with nonstandard names/locations.
851
852 EOF
853 fi
854
855 if test "$ac_init_help" = "recursive"; then
856   # If there are subdirs, report their specific --help.
857   ac_popdir=`pwd`
858   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
859     cd $ac_subdir
860     # A "../" for each directory in /$ac_subdir.
861     ac_dots=`echo $ac_subdir |
862              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
863
864     case $srcdir in
865     .) # No --srcdir option.  We are building in place.
866       ac_sub_srcdir=$srcdir ;;
867     [\\/]* | ?:[\\/]* ) # Absolute path.
868       ac_sub_srcdir=$srcdir/$ac_subdir ;;
869     *) # Relative path.
870       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
871     esac
872
873     # Check for guested configure; otherwise get Cygnus style configure.
874     if test -f $ac_sub_srcdir/configure.gnu; then
875       echo
876       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
877     elif test -f $ac_sub_srcdir/configure; then
878       echo
879       $SHELL $ac_sub_srcdir/configure  --help=recursive
880     elif test -f $ac_sub_srcdir/configure.ac ||
881            test -f $ac_sub_srcdir/configure.in; then
882       echo
883       $ac_configure --help
884     else
885       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
886     fi
887     cd $ac_popdir
888   done
889 fi
890
891 test -n "$ac_init_help" && exit 0
892 if $ac_init_version; then
893   cat <<\EOF
894
895 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
896 Free Software Foundation, Inc.
897 This configure script is free software; the Free Software Foundation
898 gives unlimited permission to copy, distribute and modify it.
899 EOF
900   exit 0
901 fi
902 exec 5>config.log
903 cat >&5 <<EOF
904 This file contains any messages produced by compilers while
905 running configure, to aid debugging if configure makes a mistake.
906
907 It was created by $as_me, which was
908 generated by GNU Autoconf 2.52.20141204.  Invocation command line was
909
910   $ $0 $@
911
912 EOF
913 {
914 cat <<_ASUNAME
915 ## ---------- ##
916 ## Platform.  ##
917 ## ---------- ##
918
919 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
920 uname -m = `(uname -m) 2>/dev/null || echo unknown`
921 uname -r = `(uname -r) 2>/dev/null || echo unknown`
922 uname -s = `(uname -s) 2>/dev/null || echo unknown`
923 uname -v = `(uname -v) 2>/dev/null || echo unknown`
924
925 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
926 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
927
928 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
929 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
930 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
931 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
932 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
933 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
934 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
935
936 PATH = $PATH
937
938 _ASUNAME
939 } >&5
940
941 cat >&5 <<EOF
942 ## ------------ ##
943 ## Core tests.  ##
944 ## ------------ ##
945
946 EOF
947
948 # Keep a trace of the command line.
949 # Strip out --no-create and --no-recursion so they do not pile up.
950 # Also quote any args containing shell meta-characters.
951 ac_configure_args=
952 ac_sep=
953 for ac_arg
954 do
955   case $ac_arg in
956   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
957   | --no-cr | --no-c) ;;
958   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
959   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
960   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
961     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
962     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
963     ac_sep=" " ;;
964   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
965      ac_sep=" " ;;
966   esac
967   # Get rid of the leading space.
968 done
969
970 # When interrupted or exit'd, cleanup temporary files, and complete
971 # config.log.  We remove comments because anyway the quotes in there
972 # would cause problems or look ugly.
973 trap 'exit_status=$?
974   # Save into config.log some information that might help in debugging.
975   echo >&5
976   echo "## ----------------- ##" >&5
977   echo "## Cache variables.  ##" >&5
978   echo "## ----------------- ##" >&5
979   echo >&5
980   # The following way of writing the cache mishandles newlines in values,
981 {
982   (set) 2>&1 |
983     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
984     *ac_space=\ *)
985       sed -n \
986         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
987           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
988       ;;
989     *)
990       sed -n \
991         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
992       ;;
993     esac;
994 } >&5
995   sed "/^$/d" confdefs.h >conftest.log
996   if test -s conftest.log; then
997     echo >&5
998     echo "## ------------ ##" >&5
999     echo "## confdefs.h.  ##" >&5
1000     echo "## ------------ ##" >&5
1001     echo >&5
1002     cat conftest.log >&5
1003   fi
1004   (echo; echo) >&5
1005   test "$ac_signal" != 0 &&
1006     echo "$as_me: caught signal $ac_signal" >&5
1007   echo "$as_me: exit $exit_status" >&5
1008   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1009     exit $exit_status
1010      ' 0
1011 for ac_signal in 1 2 13 15; do
1012   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1013 done
1014 ac_signal=0
1015
1016 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1017 rm -rf conftest* confdefs.h
1018 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1019 echo >confdefs.h
1020
1021 # Let the site file select an alternate cache file if it wants to.
1022 # Prefer explicitly selected file to automatically selected ones.
1023 if test -z "$CONFIG_SITE"; then
1024   if test "x$prefix" != xNONE; then
1025     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1026   else
1027     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1028   fi
1029 fi
1030 for ac_site_file in $CONFIG_SITE; do
1031   if test -r "$ac_site_file"; then
1032     { echo "$as_me:1032: loading site script $ac_site_file" >&5
1033 echo "$as_me: loading site script $ac_site_file" >&6;}
1034     cat "$ac_site_file" >&5
1035     . "$ac_site_file"
1036   fi
1037 done
1038
1039 if test -r "$cache_file"; then
1040   # Some versions of bash will fail to source /dev/null (special
1041   # files actually), so we avoid doing that.
1042   if test -f "$cache_file"; then
1043     { echo "$as_me:1043: loading cache $cache_file" >&5
1044 echo "$as_me: loading cache $cache_file" >&6;}
1045     case $cache_file in
1046       [\\/]* | ?:[\\/]* ) . $cache_file;;
1047       *)                      . ./$cache_file;;
1048     esac
1049   fi
1050 else
1051   { echo "$as_me:1051: creating cache $cache_file" >&5
1052 echo "$as_me: creating cache $cache_file" >&6;}
1053   >$cache_file
1054 fi
1055
1056 # Check that the precious variables saved in the cache have kept the same
1057 # value.
1058 ac_cache_corrupted=false
1059 for ac_var in `(set) 2>&1 |
1060                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1061   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1062   eval ac_new_set=\$ac_env_${ac_var}_set
1063   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1064   eval ac_new_val="\$ac_env_${ac_var}_value"
1065   case $ac_old_set,$ac_new_set in
1066     set,)
1067       { echo "$as_me:1067: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1068 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1069       ac_cache_corrupted=: ;;
1070     ,set)
1071       { echo "$as_me:1071: error: \`$ac_var' was not set in the previous run" >&5
1072 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1073       ac_cache_corrupted=: ;;
1074     ,);;
1075     *)
1076       if test "x$ac_old_val" != "x$ac_new_val"; then
1077         { echo "$as_me:1077: error: \`$ac_var' has changed since the previous run:" >&5
1078 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1079         { echo "$as_me:1079:   former value:  $ac_old_val" >&5
1080 echo "$as_me:   former value:  $ac_old_val" >&2;}
1081         { echo "$as_me:1081:   current value: $ac_new_val" >&5
1082 echo "$as_me:   current value: $ac_new_val" >&2;}
1083         ac_cache_corrupted=:
1084       fi;;
1085   esac
1086   # Pass precious variables to config.status.  It doesn't matter if
1087   # we pass some twice (in addition to the command line arguments).
1088   if test "$ac_new_set" = set; then
1089     case $ac_new_val in
1090     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1091       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1092       ac_configure_args="$ac_configure_args '$ac_arg'"
1093       ;;
1094     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1095        ;;
1096     esac
1097   fi
1098 done
1099 if $ac_cache_corrupted; then
1100   { echo "$as_me:1100: error: changes in the environment can compromise the build" >&5
1101 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1102   { { echo "$as_me:1102: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1103 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1104    { (exit 1); exit 1; }; }
1105 fi
1106
1107 ac_ext=c
1108 ac_cpp='$CPP $CPPFLAGS'
1109 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1110 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1111 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1112 ac_main_return=return
1113
1114 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1115   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1116                    ECHO_T='     ' ;;
1117   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1118   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1119 esac
1120 echo "#! $SHELL" >conftest.sh
1121 echo  "exit 0"   >>conftest.sh
1122 chmod +x conftest.sh
1123 if { (echo "$as_me:1123: PATH=\".;.\"; conftest.sh") >&5
1124   (PATH=".;."; conftest.sh) 2>&5
1125   ac_status=$?
1126   echo "$as_me:1126: \$? = $ac_status" >&5
1127   (exit $ac_status); }; then
1128   ac_path_separator=';'
1129 else
1130   ac_path_separator=:
1131 fi
1132 PATH_SEPARATOR="$ac_path_separator"
1133 rm -f conftest.sh
1134
1135 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1136
1137 top_builddir=`pwd`
1138
1139 echo "$as_me:1139: checking for egrep" >&5
1140 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1141 if test "${ac_cv_prog_egrep+set}" = set; then
1142   echo $ECHO_N "(cached) $ECHO_C" >&6
1143 else
1144   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1145     then ac_cv_prog_egrep='grep -E'
1146     else ac_cv_prog_egrep='egrep'
1147     fi
1148 fi
1149 echo "$as_me:1149: result: $ac_cv_prog_egrep" >&5
1150 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1151  EGREP=$ac_cv_prog_egrep
1152
1153 test -z "$EGREP" && { { echo "$as_me:1153: error: No egrep program found" >&5
1154 echo "$as_me: error: No egrep program found" >&2;}
1155    { (exit 1); exit 1; }; }
1156
1157 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1158 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1159 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1160 cf_cv_abi_version=${NCURSES_MAJOR}
1161 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1162 cf_cv_timestamp=`date`
1163 echo "$as_me:1163: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1164 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1165
1166 if test -f $srcdir/VERSION ; then
1167         echo "$as_me:1167: checking for package version" >&5
1168 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1169
1170         # if there are not enough fields, cut returns the last one...
1171         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1172         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1173         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1174
1175         # this is how CF_BUNDLED_INTL uses $VERSION:
1176         VERSION="$cf_field1"
1177
1178         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1179         test -z "$VERSION_MAJOR" && { { echo "$as_me:1179: error: missing major-version" >&5
1180 echo "$as_me: error: missing major-version" >&2;}
1181    { (exit 1); exit 1; }; }
1182
1183         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1184         test -z "$VERSION_MINOR" && { { echo "$as_me:1184: error: missing minor-version" >&5
1185 echo "$as_me: error: missing minor-version" >&2;}
1186    { (exit 1); exit 1; }; }
1187
1188         echo "$as_me:1188: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1189 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1190
1191         echo "$as_me:1191: checking for package patch date" >&5
1192 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1193         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1194         case .$VERSION_PATCH in
1195         .)
1196                 { { echo "$as_me:1196: error: missing patch-date $VERSION_PATCH" >&5
1197 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1198    { (exit 1); exit 1; }; }
1199                 ;;
1200         .[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1201                 ;;
1202         *)
1203                 { { echo "$as_me:1203: error: illegal patch-date $VERSION_PATCH" >&5
1204 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1205    { (exit 1); exit 1; }; }
1206                 ;;
1207         esac
1208         echo "$as_me:1208: result: $VERSION_PATCH" >&5
1209 echo "${ECHO_T}$VERSION_PATCH" >&6
1210 else
1211         { { echo "$as_me:1211: error: did not find $srcdir/VERSION" >&5
1212 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1213    { (exit 1); exit 1; }; }
1214 fi
1215
1216 # show the actual data that we have for versions:
1217 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1218
1219 echo "${as_me:-configure}:1219: testing ABI VERSION $VERSION ..." 1>&5
1220
1221 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1222
1223 echo "${as_me:-configure}:1223: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1224
1225 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1226
1227 echo "${as_me:-configure}:1227: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1228
1229 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1230
1231 echo "${as_me:-configure}:1231: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1232
1233         cf_PACKAGE=NCURSES
1234         PACKAGE=ncurses
1235
1236 cat >>confdefs.h <<EOF
1237 #define PACKAGE "$PACKAGE"
1238 EOF
1239
1240 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1241
1242         cat >>confdefs.h <<EOF
1243 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1244 EOF
1245
1246         cat >>confdefs.h <<EOF
1247 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1248 EOF
1249
1250 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1251
1252 # Check whether --with-rel-version or --without-rel-version was given.
1253 if test "${with_rel_version+set}" = set; then
1254   withval="$with_rel_version"
1255   { echo "$as_me:1255: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1256 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1257  cf_cv_rel_version=$withval
1258 fi;
1259
1260  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1261  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1262
1263 if test -n "$NCURSES_MAJOR" ; then
1264   case $NCURSES_MAJOR in #(vi
1265   [0-9]*) #(vi
1266         ;;
1267   *)
1268         { { echo "$as_me:1268: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1269 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1270    { (exit 1); exit 1; }; }
1271         ;;
1272   esac
1273 else
1274   { { echo "$as_me:1274: error: Release major-version value is empty" >&5
1275 echo "$as_me: error: Release major-version value is empty" >&2;}
1276    { (exit 1); exit 1; }; }
1277 fi
1278
1279 if test -n "$NCURSES_MINOR" ; then
1280   case $NCURSES_MINOR in #(vi
1281   [0-9]*) #(vi
1282         ;;
1283   *)
1284         { { echo "$as_me:1284: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1285 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1286    { (exit 1); exit 1; }; }
1287         ;;
1288   esac
1289 else
1290   { { echo "$as_me:1290: error: Release minor-version value is empty" >&5
1291 echo "$as_me: error: Release minor-version value is empty" >&2;}
1292    { (exit 1); exit 1; }; }
1293 fi
1294
1295 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1296
1297 # Check whether --with-abi-version or --without-abi-version was given.
1298 if test "${with_abi_version+set}" = set; then
1299   withval="$with_abi_version"
1300   { echo "$as_me:1300: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1301 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1302  cf_cv_abi_version=$withval
1303 fi;
1304
1305 if test -n "$cf_cv_abi_version" ; then
1306   case $cf_cv_abi_version in #(vi
1307   [0-9]*) #(vi
1308         ;;
1309   *)
1310         { { echo "$as_me:1310: error: ABI version is not a number: $cf_cv_abi_version" >&5
1311 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1312    { (exit 1); exit 1; }; }
1313         ;;
1314   esac
1315 else
1316   { { echo "$as_me:1316: error: ABI version value is empty" >&5
1317 echo "$as_me: error: ABI version value is empty" >&2;}
1318    { (exit 1); exit 1; }; }
1319 fi
1320
1321 ac_aux_dir=
1322 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1323   if test -f $ac_dir/install-sh; then
1324     ac_aux_dir=$ac_dir
1325     ac_install_sh="$ac_aux_dir/install-sh -c"
1326     break
1327   elif test -f $ac_dir/install.sh; then
1328     ac_aux_dir=$ac_dir
1329     ac_install_sh="$ac_aux_dir/install.sh -c"
1330     break
1331   elif test -f $ac_dir/shtool; then
1332     ac_aux_dir=$ac_dir
1333     ac_install_sh="$ac_aux_dir/shtool install -c"
1334     break
1335   fi
1336 done
1337 if test -z "$ac_aux_dir"; then
1338   { { echo "$as_me:1338: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1339 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1340    { (exit 1); exit 1; }; }
1341 fi
1342 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1343 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1344 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1345
1346 # Make sure we can run config.sub.
1347 $ac_config_sub sun4 >/dev/null 2>&1 ||
1348   { { echo "$as_me:1348: error: cannot run $ac_config_sub" >&5
1349 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1350    { (exit 1); exit 1; }; }
1351
1352 echo "$as_me:1352: checking build system type" >&5
1353 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1354 if test "${ac_cv_build+set}" = set; then
1355   echo $ECHO_N "(cached) $ECHO_C" >&6
1356 else
1357   ac_cv_build_alias=$build_alias
1358 test -z "$ac_cv_build_alias" &&
1359   ac_cv_build_alias=`$ac_config_guess`
1360 test -z "$ac_cv_build_alias" &&
1361   { { echo "$as_me:1361: error: cannot guess build type; you must specify one" >&5
1362 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1363    { (exit 1); exit 1; }; }
1364 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1365   { { echo "$as_me:1365: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1366 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1367    { (exit 1); exit 1; }; }
1368
1369 fi
1370 echo "$as_me:1370: result: $ac_cv_build" >&5
1371 echo "${ECHO_T}$ac_cv_build" >&6
1372 build=$ac_cv_build
1373 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1374 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1375 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1376
1377 echo "$as_me:1377: checking host system type" >&5
1378 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1379 if test "${ac_cv_host+set}" = set; then
1380   echo $ECHO_N "(cached) $ECHO_C" >&6
1381 else
1382   ac_cv_host_alias=$host_alias
1383 test -z "$ac_cv_host_alias" &&
1384   ac_cv_host_alias=$ac_cv_build_alias
1385 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1386   { { echo "$as_me:1386: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1387 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1388    { (exit 1); exit 1; }; }
1389
1390 fi
1391 echo "$as_me:1391: result: $ac_cv_host" >&5
1392 echo "${ECHO_T}$ac_cv_host" >&6
1393 host=$ac_cv_host
1394 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1395 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1396 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1397
1398 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1399         echo "$as_me:1399: checking target system type" >&5
1400 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1401 if test "${ac_cv_target+set}" = set; then
1402   echo $ECHO_N "(cached) $ECHO_C" >&6
1403 else
1404   ac_cv_target_alias=$target_alias
1405 test "x$ac_cv_target_alias" = "x" &&
1406   ac_cv_target_alias=$ac_cv_host_alias
1407 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1408   { { echo "$as_me:1408: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1409 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1410    { (exit 1); exit 1; }; }
1411
1412 fi
1413 echo "$as_me:1413: result: $ac_cv_target" >&5
1414 echo "${ECHO_T}$ac_cv_target" >&6
1415 target=$ac_cv_target
1416 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1417 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1418 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1419
1420 # The aliases save the names the user supplied, while $host etc.
1421 # will get canonicalized.
1422 test -n "$target_alias" &&
1423   test "$program_prefix$program_suffix$program_transform_name" = \
1424     NONENONEs,x,x, &&
1425   program_prefix=${target_alias}-
1426         system_name="$host_os"
1427 else
1428         system_name="`(uname -s -r) 2>/dev/null`"
1429         if test -z "$system_name" ; then
1430                 system_name="`(hostname) 2>/dev/null`"
1431         fi
1432 fi
1433 test -n "$system_name" &&
1434 cat >>confdefs.h <<EOF
1435 #define SYSTEM_NAME "$system_name"
1436 EOF
1437
1438 if test "${cf_cv_system_name+set}" = set; then
1439   echo $ECHO_N "(cached) $ECHO_C" >&6
1440 else
1441   cf_cv_system_name="$system_name"
1442 fi
1443
1444 test -z "$system_name" && system_name="$cf_cv_system_name"
1445 test -n "$cf_cv_system_name" && echo "$as_me:1445: result: Configuring for $cf_cv_system_name" >&5
1446 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1447
1448 if test ".$system_name" != ".$cf_cv_system_name" ; then
1449         echo "$as_me:1449: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1450 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1451         { { echo "$as_me:1451: error: \"Please remove config.cache and try again.\"" >&5
1452 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1453    { (exit 1); exit 1; }; }
1454 fi
1455
1456 # Check whether --with-system-type or --without-system-type was given.
1457 if test "${with_system_type+set}" = set; then
1458   withval="$with_system_type"
1459   { echo "$as_me:1459: WARNING: overriding system type to $withval" >&5
1460 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1461         cf_cv_system_name=$withval
1462         host_os=$withval
1463
1464 fi;
1465
1466 ###     Save the given $CFLAGS to allow user-override.
1467 cf_user_CFLAGS="$CFLAGS"
1468
1469 ###     Default install-location
1470
1471 echo "$as_me:1471: checking for prefix" >&5
1472 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1473 if test "x$prefix" = "xNONE" ; then
1474         case "$cf_cv_system_name" in
1475                 # non-vendor systems don't have a conflict
1476         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1477                 prefix=/usr
1478                 ;;
1479         *)      prefix=$ac_default_prefix
1480                 ;;
1481         esac
1482 fi
1483 echo "$as_me:1483: result: $prefix" >&5
1484 echo "${ECHO_T}$prefix" >&6
1485
1486 if test "x$prefix" = "xNONE" ; then
1487 echo "$as_me:1487: checking for default include-directory" >&5
1488 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1489 test -n "$verbose" && echo 1>&6
1490 for cf_symbol in \
1491         $includedir \
1492         $includedir/ncurses \
1493         $prefix/include \
1494         $prefix/include/ncurses \
1495         /usr/local/include \
1496         /usr/local/include/ncurses \
1497         /usr/include \
1498         /usr/include/ncurses
1499 do
1500         cf_dir=`eval echo $cf_symbol`
1501         if test -f $cf_dir/curses.h ; then
1502         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1503                 includedir="$cf_symbol"
1504                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1505                 break
1506         fi
1507         fi
1508         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1509 done
1510 echo "$as_me:1510: result: $includedir" >&5
1511 echo "${ECHO_T}$includedir" >&6
1512 fi
1513
1514 ###     Checks for programs.
1515
1516 # Check whether --with-ada or --without-ada was given.
1517 if test "${with_ada+set}" = set; then
1518   withval="$with_ada"
1519   cf_with_ada=$withval
1520 else
1521   cf_with_ada=yes
1522 fi;
1523 if test "x$cf_with_ada" = xyes
1524 then
1525         cf_PROG_CC="gnatgcc gcc cc"
1526 else
1527         cf_PROG_CC="gcc cc"
1528 fi
1529
1530 ac_ext=c
1531 ac_cpp='$CPP $CPPFLAGS'
1532 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1533 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1534 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1535 ac_main_return=return
1536 if test -n "$ac_tool_prefix"; then
1537   for ac_prog in $cf_PROG_CC
1538   do
1539     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1540 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1541 echo "$as_me:1541: checking for $ac_word" >&5
1542 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1543 if test "${ac_cv_prog_CC+set}" = set; then
1544   echo $ECHO_N "(cached) $ECHO_C" >&6
1545 else
1546   if test -n "$CC"; then
1547   ac_cv_prog_CC="$CC" # Let the user override the test.
1548 else
1549   ac_save_IFS=$IFS; IFS=$ac_path_separator
1550 ac_dummy="$PATH"
1551 for ac_dir in $ac_dummy; do
1552   IFS=$ac_save_IFS
1553   test -z "$ac_dir" && ac_dir=.
1554   $as_executable_p "$ac_dir/$ac_word" || continue
1555 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1556 echo "$as_me:1556: found $ac_dir/$ac_word" >&5
1557 break
1558 done
1559
1560 fi
1561 fi
1562 CC=$ac_cv_prog_CC
1563 if test -n "$CC"; then
1564   echo "$as_me:1564: result: $CC" >&5
1565 echo "${ECHO_T}$CC" >&6
1566 else
1567   echo "$as_me:1567: result: no" >&5
1568 echo "${ECHO_T}no" >&6
1569 fi
1570
1571     test -n "$CC" && break
1572   done
1573 fi
1574 if test -z "$CC"; then
1575   ac_ct_CC=$CC
1576   for ac_prog in $cf_PROG_CC
1577 do
1578   # Extract the first word of "$ac_prog", so it can be a program name with args.
1579 set dummy $ac_prog; ac_word=$2
1580 echo "$as_me:1580: checking for $ac_word" >&5
1581 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1582 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1583   echo $ECHO_N "(cached) $ECHO_C" >&6
1584 else
1585   if test -n "$ac_ct_CC"; then
1586   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1587 else
1588   ac_save_IFS=$IFS; IFS=$ac_path_separator
1589 ac_dummy="$PATH"
1590 for ac_dir in $ac_dummy; do
1591   IFS=$ac_save_IFS
1592   test -z "$ac_dir" && ac_dir=.
1593   $as_executable_p "$ac_dir/$ac_word" || continue
1594 ac_cv_prog_ac_ct_CC="$ac_prog"
1595 echo "$as_me:1595: found $ac_dir/$ac_word" >&5
1596 break
1597 done
1598
1599 fi
1600 fi
1601 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1602 if test -n "$ac_ct_CC"; then
1603   echo "$as_me:1603: result: $ac_ct_CC" >&5
1604 echo "${ECHO_T}$ac_ct_CC" >&6
1605 else
1606   echo "$as_me:1606: result: no" >&5
1607 echo "${ECHO_T}no" >&6
1608 fi
1609
1610   test -n "$ac_ct_CC" && break
1611 done
1612
1613   CC=$ac_ct_CC
1614 fi
1615
1616 test -z "$CC" && { { echo "$as_me:1616: error: no acceptable cc found in \$PATH" >&5
1617 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1618    { (exit 1); exit 1; }; }
1619
1620 # Provide some information about the compiler.
1621 echo "$as_me:1621:" \
1622      "checking for C compiler version" >&5
1623 ac_compiler=`set X $ac_compile; echo $2`
1624 { (eval echo "$as_me:1624: \"$ac_compiler --version </dev/null >&5\"") >&5
1625   (eval $ac_compiler --version </dev/null >&5) 2>&5
1626   ac_status=$?
1627   echo "$as_me:1627: \$? = $ac_status" >&5
1628   (exit $ac_status); }
1629 { (eval echo "$as_me:1629: \"$ac_compiler -v </dev/null >&5\"") >&5
1630   (eval $ac_compiler -v </dev/null >&5) 2>&5
1631   ac_status=$?
1632   echo "$as_me:1632: \$? = $ac_status" >&5
1633   (exit $ac_status); }
1634 { (eval echo "$as_me:1634: \"$ac_compiler -V </dev/null >&5\"") >&5
1635   (eval $ac_compiler -V </dev/null >&5) 2>&5
1636   ac_status=$?
1637   echo "$as_me:1637: \$? = $ac_status" >&5
1638   (exit $ac_status); }
1639
1640 cat >conftest.$ac_ext <<_ACEOF
1641 #line 1641 "configure"
1642 #include "confdefs.h"
1643
1644 int
1645 main ()
1646 {
1647
1648   ;
1649   return 0;
1650 }
1651 _ACEOF
1652 ac_clean_files_save=$ac_clean_files
1653 ac_clean_files="$ac_clean_files a.out a.exe"
1654 # Try to create an executable without -o first, disregard a.out.
1655 # It will help us diagnose broken compilers, and finding out an intuition
1656 # of exeext.
1657 echo "$as_me:1657: checking for C compiler default output" >&5
1658 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1659 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1660 if { (eval echo "$as_me:1660: \"$ac_link_default\"") >&5
1661   (eval $ac_link_default) 2>&5
1662   ac_status=$?
1663   echo "$as_me:1663: \$? = $ac_status" >&5
1664   (exit $ac_status); }; then
1665   # Find the output, starting from the most likely.  This scheme is
1666 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1667 # resort.
1668 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1669                 ls a.out conftest 2>/dev/null;
1670                 ls a.* conftest.* 2>/dev/null`; do
1671   case $ac_file in
1672     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1673     a.out ) # We found the default executable, but exeext='' is most
1674             # certainly right.
1675             break;;
1676     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1677           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1678           export ac_cv_exeext
1679           break;;
1680     * ) break;;
1681   esac
1682 done
1683 else
1684   echo "$as_me: failed program was:" >&5
1685 cat conftest.$ac_ext >&5
1686 { { echo "$as_me:1686: error: C compiler cannot create executables" >&5
1687 echo "$as_me: error: C compiler cannot create executables" >&2;}
1688    { (exit 77); exit 77; }; }
1689 fi
1690
1691 ac_exeext=$ac_cv_exeext
1692 echo "$as_me:1692: result: $ac_file" >&5
1693 echo "${ECHO_T}$ac_file" >&6
1694
1695 # Check the compiler produces executables we can run.  If not, either
1696 # the compiler is broken, or we cross compile.
1697 echo "$as_me:1697: checking whether the C compiler works" >&5
1698 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1699 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1700 # If not cross compiling, check that we can run a simple program.
1701 if test "$cross_compiling" != yes; then
1702   if { ac_try='./$ac_file'
1703   { (eval echo "$as_me:1703: \"$ac_try\"") >&5
1704   (eval $ac_try) 2>&5
1705   ac_status=$?
1706   echo "$as_me:1706: \$? = $ac_status" >&5
1707   (exit $ac_status); }; }; then
1708     cross_compiling=no
1709   else
1710     if test "$cross_compiling" = maybe; then
1711         cross_compiling=yes
1712     else
1713         { { echo "$as_me:1713: error: cannot run C compiled programs.
1714 If you meant to cross compile, use \`--host'." >&5
1715 echo "$as_me: error: cannot run C compiled programs.
1716 If you meant to cross compile, use \`--host'." >&2;}
1717    { (exit 1); exit 1; }; }
1718     fi
1719   fi
1720 fi
1721 echo "$as_me:1721: result: yes" >&5
1722 echo "${ECHO_T}yes" >&6
1723
1724 rm -f a.out a.exe conftest$ac_cv_exeext
1725 ac_clean_files=$ac_clean_files_save
1726 # Check the compiler produces executables we can run.  If not, either
1727 # the compiler is broken, or we cross compile.
1728 echo "$as_me:1728: checking whether we are cross compiling" >&5
1729 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1730 echo "$as_me:1730: result: $cross_compiling" >&5
1731 echo "${ECHO_T}$cross_compiling" >&6
1732
1733 echo "$as_me:1733: checking for executable suffix" >&5
1734 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1735 if { (eval echo "$as_me:1735: \"$ac_link\"") >&5
1736   (eval $ac_link) 2>&5
1737   ac_status=$?
1738   echo "$as_me:1738: \$? = $ac_status" >&5
1739   (exit $ac_status); }; then
1740   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1741 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1742 # work properly (i.e., refer to `conftest.exe'), while it won't with
1743 # `rm'.
1744 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1745   case $ac_file in
1746     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1747     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1748           export ac_cv_exeext
1749           break;;
1750     * ) break;;
1751   esac
1752 done
1753 else
1754   { { echo "$as_me:1754: error: cannot compute EXEEXT: cannot compile and link" >&5
1755 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1756    { (exit 1); exit 1; }; }
1757 fi
1758
1759 rm -f conftest$ac_cv_exeext
1760 echo "$as_me:1760: result: $ac_cv_exeext" >&5
1761 echo "${ECHO_T}$ac_cv_exeext" >&6
1762
1763 rm -f conftest.$ac_ext
1764 EXEEXT=$ac_cv_exeext
1765 ac_exeext=$EXEEXT
1766 echo "$as_me:1766: checking for object suffix" >&5
1767 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1768 if test "${ac_cv_objext+set}" = set; then
1769   echo $ECHO_N "(cached) $ECHO_C" >&6
1770 else
1771   cat >conftest.$ac_ext <<_ACEOF
1772 #line 1772 "configure"
1773 #include "confdefs.h"
1774
1775 int
1776 main ()
1777 {
1778
1779   ;
1780   return 0;
1781 }
1782 _ACEOF
1783 rm -f conftest.o conftest.obj
1784 if { (eval echo "$as_me:1784: \"$ac_compile\"") >&5
1785   (eval $ac_compile) 2>&5
1786   ac_status=$?
1787   echo "$as_me:1787: \$? = $ac_status" >&5
1788   (exit $ac_status); }; then
1789   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1790   case $ac_file in
1791     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1792     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1793        break;;
1794   esac
1795 done
1796 else
1797   echo "$as_me: failed program was:" >&5
1798 cat conftest.$ac_ext >&5
1799 { { echo "$as_me:1799: error: cannot compute OBJEXT: cannot compile" >&5
1800 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1801    { (exit 1); exit 1; }; }
1802 fi
1803
1804 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1805 fi
1806 echo "$as_me:1806: result: $ac_cv_objext" >&5
1807 echo "${ECHO_T}$ac_cv_objext" >&6
1808 OBJEXT=$ac_cv_objext
1809 ac_objext=$OBJEXT
1810 echo "$as_me:1810: checking whether we are using the GNU C compiler" >&5
1811 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1812 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1813   echo $ECHO_N "(cached) $ECHO_C" >&6
1814 else
1815   cat >conftest.$ac_ext <<_ACEOF
1816 #line 1816 "configure"
1817 #include "confdefs.h"
1818
1819 int
1820 main ()
1821 {
1822 #ifndef __GNUC__
1823        choke me
1824 #endif
1825
1826   ;
1827   return 0;
1828 }
1829 _ACEOF
1830 rm -f conftest.$ac_objext
1831 if { (eval echo "$as_me:1831: \"$ac_compile\"") >&5
1832   (eval $ac_compile) 2>&5
1833   ac_status=$?
1834   echo "$as_me:1834: \$? = $ac_status" >&5
1835   (exit $ac_status); } &&
1836          { ac_try='test -s conftest.$ac_objext'
1837   { (eval echo "$as_me:1837: \"$ac_try\"") >&5
1838   (eval $ac_try) 2>&5
1839   ac_status=$?
1840   echo "$as_me:1840: \$? = $ac_status" >&5
1841   (exit $ac_status); }; }; then
1842   ac_compiler_gnu=yes
1843 else
1844   echo "$as_me: failed program was:" >&5
1845 cat conftest.$ac_ext >&5
1846 ac_compiler_gnu=no
1847 fi
1848 rm -f conftest.$ac_objext conftest.$ac_ext
1849 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1850
1851 fi
1852 echo "$as_me:1852: result: $ac_cv_c_compiler_gnu" >&5
1853 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1854 GCC=`test $ac_compiler_gnu = yes && echo yes`
1855 ac_test_CFLAGS=${CFLAGS+set}
1856 ac_save_CFLAGS=$CFLAGS
1857 CFLAGS="-g"
1858 echo "$as_me:1858: checking whether $CC accepts -g" >&5
1859 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1860 if test "${ac_cv_prog_cc_g+set}" = set; then
1861   echo $ECHO_N "(cached) $ECHO_C" >&6
1862 else
1863   cat >conftest.$ac_ext <<_ACEOF
1864 #line 1864 "configure"
1865 #include "confdefs.h"
1866
1867 int
1868 main ()
1869 {
1870
1871   ;
1872   return 0;
1873 }
1874 _ACEOF
1875 rm -f conftest.$ac_objext
1876 if { (eval echo "$as_me:1876: \"$ac_compile\"") >&5
1877   (eval $ac_compile) 2>&5
1878   ac_status=$?
1879   echo "$as_me:1879: \$? = $ac_status" >&5
1880   (exit $ac_status); } &&
1881          { ac_try='test -s conftest.$ac_objext'
1882   { (eval echo "$as_me:1882: \"$ac_try\"") >&5
1883   (eval $ac_try) 2>&5
1884   ac_status=$?
1885   echo "$as_me:1885: \$? = $ac_status" >&5
1886   (exit $ac_status); }; }; then
1887   ac_cv_prog_cc_g=yes
1888 else
1889   echo "$as_me: failed program was:" >&5
1890 cat conftest.$ac_ext >&5
1891 ac_cv_prog_cc_g=no
1892 fi
1893 rm -f conftest.$ac_objext conftest.$ac_ext
1894 fi
1895 echo "$as_me:1895: result: $ac_cv_prog_cc_g" >&5
1896 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1897 if test "$ac_test_CFLAGS" = set; then
1898   CFLAGS=$ac_save_CFLAGS
1899 elif test $ac_cv_prog_cc_g = yes; then
1900   if test "$GCC" = yes; then
1901     CFLAGS="-g -O2"
1902   else
1903     CFLAGS="-g"
1904   fi
1905 else
1906   if test "$GCC" = yes; then
1907     CFLAGS="-O2"
1908   else
1909     CFLAGS=
1910   fi
1911 fi
1912 # Some people use a C++ compiler to compile C.  Since we use `exit',
1913 # in C++ we need to declare it.  In case someone uses the same compiler
1914 # for both compiling C and C++ we need to have the C++ compiler decide
1915 # the declaration of exit, since it's the most demanding environment.
1916 cat >conftest.$ac_ext <<_ACEOF
1917 #ifndef __cplusplus
1918   choke me
1919 #endif
1920 _ACEOF
1921 rm -f conftest.$ac_objext
1922 if { (eval echo "$as_me:1922: \"$ac_compile\"") >&5
1923   (eval $ac_compile) 2>&5
1924   ac_status=$?
1925   echo "$as_me:1925: \$? = $ac_status" >&5
1926   (exit $ac_status); } &&
1927          { ac_try='test -s conftest.$ac_objext'
1928   { (eval echo "$as_me:1928: \"$ac_try\"") >&5
1929   (eval $ac_try) 2>&5
1930   ac_status=$?
1931   echo "$as_me:1931: \$? = $ac_status" >&5
1932   (exit $ac_status); }; }; then
1933   for ac_declaration in \
1934    ''\
1935    '#include <stdlib.h>' \
1936    'extern "C" void std::exit (int) throw (); using std::exit;' \
1937    'extern "C" void std::exit (int); using std::exit;' \
1938    'extern "C" void exit (int) throw ();' \
1939    'extern "C" void exit (int);' \
1940    'void exit (int);'
1941 do
1942   cat >conftest.$ac_ext <<_ACEOF
1943 #line 1943 "configure"
1944 #include "confdefs.h"
1945 #include <stdlib.h>
1946 $ac_declaration
1947 int
1948 main ()
1949 {
1950 exit (42);
1951   ;
1952   return 0;
1953 }
1954 _ACEOF
1955 rm -f conftest.$ac_objext
1956 if { (eval echo "$as_me:1956: \"$ac_compile\"") >&5
1957   (eval $ac_compile) 2>&5
1958   ac_status=$?
1959   echo "$as_me:1959: \$? = $ac_status" >&5
1960   (exit $ac_status); } &&
1961          { ac_try='test -s conftest.$ac_objext'
1962   { (eval echo "$as_me:1962: \"$ac_try\"") >&5
1963   (eval $ac_try) 2>&5
1964   ac_status=$?
1965   echo "$as_me:1965: \$? = $ac_status" >&5
1966   (exit $ac_status); }; }; then
1967   :
1968 else
1969   echo "$as_me: failed program was:" >&5
1970 cat conftest.$ac_ext >&5
1971 continue
1972 fi
1973 rm -f conftest.$ac_objext conftest.$ac_ext
1974   cat >conftest.$ac_ext <<_ACEOF
1975 #line 1975 "configure"
1976 #include "confdefs.h"
1977 $ac_declaration
1978 int
1979 main ()
1980 {
1981 exit (42);
1982   ;
1983   return 0;
1984 }
1985 _ACEOF
1986 rm -f conftest.$ac_objext
1987 if { (eval echo "$as_me:1987: \"$ac_compile\"") >&5
1988   (eval $ac_compile) 2>&5
1989   ac_status=$?
1990   echo "$as_me:1990: \$? = $ac_status" >&5
1991   (exit $ac_status); } &&
1992          { ac_try='test -s conftest.$ac_objext'
1993   { (eval echo "$as_me:1993: \"$ac_try\"") >&5
1994   (eval $ac_try) 2>&5
1995   ac_status=$?
1996   echo "$as_me:1996: \$? = $ac_status" >&5
1997   (exit $ac_status); }; }; then
1998   break
1999 else
2000   echo "$as_me: failed program was:" >&5
2001 cat conftest.$ac_ext >&5
2002 fi
2003 rm -f conftest.$ac_objext conftest.$ac_ext
2004 done
2005 rm -rf conftest*
2006 if test -n "$ac_declaration"; then
2007   echo '#ifdef __cplusplus' >>confdefs.h
2008   echo $ac_declaration      >>confdefs.h
2009   echo '#endif'             >>confdefs.h
2010 fi
2011
2012 else
2013   echo "$as_me: failed program was:" >&5
2014 cat conftest.$ac_ext >&5
2015 fi
2016 rm -f conftest.$ac_objext conftest.$ac_ext
2017 ac_ext=c
2018 ac_cpp='$CPP $CPPFLAGS'
2019 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2020 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2021 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2022 ac_main_return=return
2023
2024 GCC_VERSION=none
2025 if test "$GCC" = yes ; then
2026         echo "$as_me:2026: checking version of $CC" >&5
2027 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2028         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2029         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2030         echo "$as_me:2030: result: $GCC_VERSION" >&5
2031 echo "${ECHO_T}$GCC_VERSION" >&6
2032 fi
2033
2034 echo "$as_me:2034: checking for $CC option to accept ANSI C" >&5
2035 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2036 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2037   echo $ECHO_N "(cached) $ECHO_C" >&6
2038 else
2039   ac_cv_prog_cc_stdc=no
2040 ac_save_CC=$CC
2041 cat >conftest.$ac_ext <<_ACEOF
2042 #line 2042 "configure"
2043 #include "confdefs.h"
2044 #include <stdarg.h>
2045 #include <stdio.h>
2046 #include <sys/types.h>
2047 #include <sys/stat.h>
2048 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2049 struct buf { int x; };
2050 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2051 static char *e (p, i)
2052      char **p;
2053      int i;
2054 {
2055   return p[i];
2056 }
2057 static char *f (char * (*g) (char **, int), char **p, ...)
2058 {
2059   char *s;
2060   va_list v;
2061   va_start (v,p);
2062   s = g (p, va_arg (v,int));
2063   va_end (v);
2064   return s;
2065 }
2066 int test (int i, double x);
2067 struct s1 {int (*f) (int a);};
2068 struct s2 {int (*f) (double a);};
2069 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2070 int argc;
2071 char **argv;
2072 int
2073 main ()
2074 {
2075 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2076   ;
2077   return 0;
2078 }
2079 _ACEOF
2080 # Don't try gcc -ansi; that turns off useful extensions and
2081 # breaks some systems' header files.
2082 # AIX                   -qlanglvl=ansi
2083 # Ultrix and OSF/1      -std1
2084 # HP-UX 10.20 and later -Ae
2085 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2086 # SVR4                  -Xc -D__EXTENSIONS__
2087 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2088 do
2089   CC="$ac_save_CC $ac_arg"
2090   rm -f conftest.$ac_objext
2091 if { (eval echo "$as_me:2091: \"$ac_compile\"") >&5
2092   (eval $ac_compile) 2>&5
2093   ac_status=$?
2094   echo "$as_me:2094: \$? = $ac_status" >&5
2095   (exit $ac_status); } &&
2096          { ac_try='test -s conftest.$ac_objext'
2097   { (eval echo "$as_me:2097: \"$ac_try\"") >&5
2098   (eval $ac_try) 2>&5
2099   ac_status=$?
2100   echo "$as_me:2100: \$? = $ac_status" >&5
2101   (exit $ac_status); }; }; then
2102   ac_cv_prog_cc_stdc=$ac_arg
2103 break
2104 else
2105   echo "$as_me: failed program was:" >&5
2106 cat conftest.$ac_ext >&5
2107 fi
2108 rm -f conftest.$ac_objext
2109 done
2110 rm -f conftest.$ac_ext conftest.$ac_objext
2111 CC=$ac_save_CC
2112
2113 fi
2114
2115 case "x$ac_cv_prog_cc_stdc" in
2116   x|xno)
2117     echo "$as_me:2117: result: none needed" >&5
2118 echo "${ECHO_T}none needed" >&6 ;;
2119   *)
2120     echo "$as_me:2120: result: $ac_cv_prog_cc_stdc" >&5
2121 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2122     CC="$CC $ac_cv_prog_cc_stdc" ;;
2123 esac
2124
2125 # This should have been defined by AC_PROG_CC
2126 : ${CC:=cc}
2127
2128 echo "$as_me:2128: checking \$CC variable" >&5
2129 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2130 case "$CC" in #(vi
2131 *[\ \   ]-[IUD]*)
2132         echo "$as_me:2132: result: broken" >&5
2133 echo "${ECHO_T}broken" >&6
2134         { echo "$as_me:2134: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2135 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2136         # humor him...
2137         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2138         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2139
2140 cf_fix_cppflags=no
2141 cf_new_cflags=
2142 cf_new_cppflags=
2143 cf_new_extra_cppflags=
2144
2145 for cf_add_cflags in $cf_flags
2146 do
2147 case $cf_fix_cppflags in
2148 no)
2149         case $cf_add_cflags in #(vi
2150         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2151                 case $cf_add_cflags in
2152                 -D*)
2153                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2154
2155                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2156                                 && test -z "${cf_tst_cflags}" \
2157                                 && cf_fix_cppflags=yes
2158
2159                         if test $cf_fix_cppflags = yes ; then
2160                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2161                                 continue
2162                         elif test "${cf_tst_cflags}" = "\"'" ; then
2163                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2164                                 continue
2165                         fi
2166                         ;;
2167                 esac
2168                 case "$CPPFLAGS" in
2169                 *$cf_add_cflags) #(vi
2170                         ;;
2171                 *) #(vi
2172                         case $cf_add_cflags in #(vi
2173                         -D*)
2174                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2175
2176 CPPFLAGS=`echo "$CPPFLAGS" | \
2177         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2178                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2179
2180                                 ;;
2181                         esac
2182                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2183                         ;;
2184                 esac
2185                 ;;
2186         *)
2187                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2188                 ;;
2189         esac
2190         ;;
2191 yes)
2192         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2193
2194         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2195
2196         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2197                 && test -z "${cf_tst_cflags}" \
2198                 && cf_fix_cppflags=no
2199         ;;
2200 esac
2201 done
2202
2203 if test -n "$cf_new_cflags" ; then
2204
2205         CFLAGS="$CFLAGS $cf_new_cflags"
2206 fi
2207
2208 if test -n "$cf_new_cppflags" ; then
2209
2210         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2211 fi
2212
2213 if test -n "$cf_new_extra_cppflags" ; then
2214
2215         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2216 fi
2217
2218         ;;
2219 *)
2220         echo "$as_me:2220: result: ok" >&5
2221 echo "${ECHO_T}ok" >&6
2222         ;;
2223 esac
2224
2225 ac_ext=c
2226 ac_cpp='$CPP $CPPFLAGS'
2227 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2228 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2229 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2230 ac_main_return=return
2231 echo "$as_me:2231: checking how to run the C preprocessor" >&5
2232 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2233 # On Suns, sometimes $CPP names a directory.
2234 if test -n "$CPP" && test -d "$CPP"; then
2235   CPP=
2236 fi
2237 if test -z "$CPP"; then
2238   if test "${ac_cv_prog_CPP+set}" = set; then
2239   echo $ECHO_N "(cached) $ECHO_C" >&6
2240 else
2241       # Double quotes because CPP needs to be expanded
2242     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2243     do
2244       ac_preproc_ok=false
2245 for ac_c_preproc_warn_flag in '' yes
2246 do
2247   # Use a header file that comes with gcc, so configuring glibc
2248   # with a fresh cross-compiler works.
2249   # On the NeXT, cc -E runs the code through the compiler's parser,
2250   # not just through cpp. "Syntax error" is here to catch this case.
2251   cat >conftest.$ac_ext <<_ACEOF
2252 #line 2252 "configure"
2253 #include "confdefs.h"
2254 #include <assert.h>
2255                      Syntax error
2256 _ACEOF
2257 if { (eval echo "$as_me:2257: \"$ac_cpp conftest.$ac_ext\"") >&5
2258   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2259   ac_status=$?
2260   egrep -v '^ *\+' conftest.er1 >conftest.err
2261   rm -f conftest.er1
2262   cat conftest.err >&5
2263   echo "$as_me:2263: \$? = $ac_status" >&5
2264   (exit $ac_status); } >/dev/null; then
2265   if test -s conftest.err; then
2266     ac_cpp_err=$ac_c_preproc_warn_flag
2267   else
2268     ac_cpp_err=
2269   fi
2270 else
2271   ac_cpp_err=yes
2272 fi
2273 if test -z "$ac_cpp_err"; then
2274   :
2275 else
2276   echo "$as_me: failed program was:" >&5
2277   cat conftest.$ac_ext >&5
2278   # Broken: fails on valid input.
2279 continue
2280 fi
2281 rm -f conftest.err conftest.$ac_ext
2282
2283   # OK, works on sane cases.  Now check whether non-existent headers
2284   # can be detected and how.
2285   cat >conftest.$ac_ext <<_ACEOF
2286 #line 2286 "configure"
2287 #include "confdefs.h"
2288 #include <ac_nonexistent.h>
2289 _ACEOF
2290 if { (eval echo "$as_me:2290: \"$ac_cpp conftest.$ac_ext\"") >&5
2291   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2292   ac_status=$?
2293   egrep -v '^ *\+' conftest.er1 >conftest.err
2294   rm -f conftest.er1
2295   cat conftest.err >&5
2296   echo "$as_me:2296: \$? = $ac_status" >&5
2297   (exit $ac_status); } >/dev/null; then
2298   if test -s conftest.err; then
2299     ac_cpp_err=$ac_c_preproc_warn_flag
2300   else
2301     ac_cpp_err=
2302   fi
2303 else
2304   ac_cpp_err=yes
2305 fi
2306 if test -z "$ac_cpp_err"; then
2307   # Broken: success on invalid input.
2308 continue
2309 else
2310   echo "$as_me: failed program was:" >&5
2311   cat conftest.$ac_ext >&5
2312   # Passes both tests.
2313 ac_preproc_ok=:
2314 break
2315 fi
2316 rm -f conftest.err conftest.$ac_ext
2317
2318 done
2319 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2320 rm -f conftest.err conftest.$ac_ext
2321 if $ac_preproc_ok; then
2322   break
2323 fi
2324
2325     done
2326     ac_cv_prog_CPP=$CPP
2327
2328 fi
2329   CPP=$ac_cv_prog_CPP
2330 else
2331   ac_cv_prog_CPP=$CPP
2332 fi
2333 echo "$as_me:2333: result: $CPP" >&5
2334 echo "${ECHO_T}$CPP" >&6
2335 ac_preproc_ok=false
2336 for ac_c_preproc_warn_flag in '' yes
2337 do
2338   # Use a header file that comes with gcc, so configuring glibc
2339   # with a fresh cross-compiler works.
2340   # On the NeXT, cc -E runs the code through the compiler's parser,
2341   # not just through cpp. "Syntax error" is here to catch this case.
2342   cat >conftest.$ac_ext <<_ACEOF
2343 #line 2343 "configure"
2344 #include "confdefs.h"
2345 #include <assert.h>
2346                      Syntax error
2347 _ACEOF
2348 if { (eval echo "$as_me:2348: \"$ac_cpp conftest.$ac_ext\"") >&5
2349   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2350   ac_status=$?
2351   egrep -v '^ *\+' conftest.er1 >conftest.err
2352   rm -f conftest.er1
2353   cat conftest.err >&5
2354   echo "$as_me:2354: \$? = $ac_status" >&5
2355   (exit $ac_status); } >/dev/null; then
2356   if test -s conftest.err; then
2357     ac_cpp_err=$ac_c_preproc_warn_flag
2358   else
2359     ac_cpp_err=
2360   fi
2361 else
2362   ac_cpp_err=yes
2363 fi
2364 if test -z "$ac_cpp_err"; then
2365   :
2366 else
2367   echo "$as_me: failed program was:" >&5
2368   cat conftest.$ac_ext >&5
2369   # Broken: fails on valid input.
2370 continue
2371 fi
2372 rm -f conftest.err conftest.$ac_ext
2373
2374   # OK, works on sane cases.  Now check whether non-existent headers
2375   # can be detected and how.
2376   cat >conftest.$ac_ext <<_ACEOF
2377 #line 2377 "configure"
2378 #include "confdefs.h"
2379 #include <ac_nonexistent.h>
2380 _ACEOF
2381 if { (eval echo "$as_me:2381: \"$ac_cpp conftest.$ac_ext\"") >&5
2382   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2383   ac_status=$?
2384   egrep -v '^ *\+' conftest.er1 >conftest.err
2385   rm -f conftest.er1
2386   cat conftest.err >&5
2387   echo "$as_me:2387: \$? = $ac_status" >&5
2388   (exit $ac_status); } >/dev/null; then
2389   if test -s conftest.err; then
2390     ac_cpp_err=$ac_c_preproc_warn_flag
2391   else
2392     ac_cpp_err=
2393   fi
2394 else
2395   ac_cpp_err=yes
2396 fi
2397 if test -z "$ac_cpp_err"; then
2398   # Broken: success on invalid input.
2399 continue
2400 else
2401   echo "$as_me: failed program was:" >&5
2402   cat conftest.$ac_ext >&5
2403   # Passes both tests.
2404 ac_preproc_ok=:
2405 break
2406 fi
2407 rm -f conftest.err conftest.$ac_ext
2408
2409 done
2410 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2411 rm -f conftest.err conftest.$ac_ext
2412 if $ac_preproc_ok; then
2413   :
2414 else
2415   { { echo "$as_me:2415: error: C preprocessor \"$CPP\" fails sanity check" >&5
2416 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2417    { (exit 1); exit 1; }; }
2418 fi
2419
2420 ac_ext=c
2421 ac_cpp='$CPP $CPPFLAGS'
2422 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2423 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2424 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2425 ac_main_return=return
2426
2427 if test $ac_cv_c_compiler_gnu = yes; then
2428     echo "$as_me:2428: checking whether $CC needs -traditional" >&5
2429 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2430 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2431   echo $ECHO_N "(cached) $ECHO_C" >&6
2432 else
2433     ac_pattern="Autoconf.*'x'"
2434   cat >conftest.$ac_ext <<_ACEOF
2435 #line 2435 "configure"
2436 #include "confdefs.h"
2437 #include <sgtty.h>
2438 int Autoconf = TIOCGETP;
2439 _ACEOF
2440 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2441   egrep "$ac_pattern" >/dev/null 2>&1; then
2442   ac_cv_prog_gcc_traditional=yes
2443 else
2444   ac_cv_prog_gcc_traditional=no
2445 fi
2446 rm -rf conftest*
2447
2448   if test $ac_cv_prog_gcc_traditional = no; then
2449     cat >conftest.$ac_ext <<_ACEOF
2450 #line 2450 "configure"
2451 #include "confdefs.h"
2452 #include <termio.h>
2453 int Autoconf = TCGETA;
2454 _ACEOF
2455 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2456   egrep "$ac_pattern" >/dev/null 2>&1; then
2457   ac_cv_prog_gcc_traditional=yes
2458 fi
2459 rm -rf conftest*
2460
2461   fi
2462 fi
2463 echo "$as_me:2463: result: $ac_cv_prog_gcc_traditional" >&5
2464 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2465   if test $ac_cv_prog_gcc_traditional = yes; then
2466     CC="$CC -traditional"
2467   fi
2468 fi
2469
2470 echo "$as_me:2470: checking whether $CC understands -c and -o together" >&5
2471 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2472 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2473   echo $ECHO_N "(cached) $ECHO_C" >&6
2474 else
2475
2476 cat > conftest.$ac_ext <<CF_EOF
2477 #include <stdio.h>
2478 int main()
2479 {
2480         ${cf_cv_main_return:-return}(0);
2481 }
2482 CF_EOF
2483 # We do the test twice because some compilers refuse to overwrite an
2484 # existing .o file with -o, though they will create one.
2485 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2486 if { (eval echo "$as_me:2486: \"$ac_try\"") >&5
2487   (eval $ac_try) 2>&5
2488   ac_status=$?
2489   echo "$as_me:2489: \$? = $ac_status" >&5
2490   (exit $ac_status); } &&
2491   test -f conftest2.$ac_objext && { (eval echo "$as_me:2491: \"$ac_try\"") >&5
2492   (eval $ac_try) 2>&5
2493   ac_status=$?
2494   echo "$as_me:2494: \$? = $ac_status" >&5
2495   (exit $ac_status); };
2496 then
2497   eval cf_cv_prog_CC_c_o=yes
2498 else
2499   eval cf_cv_prog_CC_c_o=no
2500 fi
2501 rm -rf conftest*
2502
2503 fi
2504 if test $cf_cv_prog_CC_c_o = yes; then
2505   echo "$as_me:2505: result: yes" >&5
2506 echo "${ECHO_T}yes" >&6
2507 else
2508   echo "$as_me:2508: result: no" >&5
2509 echo "${ECHO_T}no" >&6
2510 fi
2511
2512 if test "$cross_compiling" = yes ; then
2513   LDCONFIG=:
2514 else
2515 case "$cf_cv_system_name" in #(vi
2516 dragonfly*|mirbsd*|freebsd*) #(vi
2517   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2518   ;;
2519 *) LDPATH=$PATH:/sbin:/usr/sbin
2520   # Extract the first word of "ldconfig", so it can be a program name with args.
2521 set dummy ldconfig; ac_word=$2
2522 echo "$as_me:2522: checking for $ac_word" >&5
2523 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2524 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2525   echo $ECHO_N "(cached) $ECHO_C" >&6
2526 else
2527   case $LDCONFIG in
2528   [\\/]* | ?:[\\/]*)
2529   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2530   ;;
2531   *)
2532   ac_save_IFS=$IFS; IFS=$ac_path_separator
2533 ac_dummy="$LDPATH"
2534 for ac_dir in $ac_dummy; do
2535   IFS=$ac_save_IFS
2536   test -z "$ac_dir" && ac_dir=.
2537   if $as_executable_p "$ac_dir/$ac_word"; then
2538    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2539    echo "$as_me:2539: found $ac_dir/$ac_word" >&5
2540    break
2541 fi
2542 done
2543
2544   ;;
2545 esac
2546 fi
2547 LDCONFIG=$ac_cv_path_LDCONFIG
2548
2549 if test -n "$LDCONFIG"; then
2550   echo "$as_me:2550: result: $LDCONFIG" >&5
2551 echo "${ECHO_T}$LDCONFIG" >&6
2552 else
2553   echo "$as_me:2553: result: no" >&5
2554 echo "${ECHO_T}no" >&6
2555 fi
2556
2557   ;;
2558 esac
2559 fi
2560
2561 echo "$as_me:2561: checking if you want to ensure bool is consistent with C++" >&5
2562 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2563
2564 # Check whether --with-cxx or --without-cxx was given.
2565 if test "${with_cxx+set}" = set; then
2566   withval="$with_cxx"
2567   cf_with_cxx=$withval
2568 else
2569   cf_with_cxx=yes
2570 fi;
2571 echo "$as_me:2571: result: $cf_with_cxx" >&5
2572 echo "${ECHO_T}$cf_with_cxx" >&6
2573 if test "X$cf_with_cxx" = Xno ; then
2574         CXX=""
2575         GXX=""
2576 else
2577         # with autoconf 2.13, we can change the error to a warning:
2578                 ac_ext=cc
2579 ac_cpp='$CXXCPP $CPPFLAGS'
2580 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2581 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2582 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2583 ac_main_return=return
2584 if test -n "$ac_tool_prefix"; then
2585   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2586   do
2587     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2588 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2589 echo "$as_me:2589: checking for $ac_word" >&5
2590 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2591 if test "${ac_cv_prog_CXX+set}" = set; then
2592   echo $ECHO_N "(cached) $ECHO_C" >&6
2593 else
2594   if test -n "$CXX"; then
2595   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2596 else
2597   ac_save_IFS=$IFS; IFS=$ac_path_separator
2598 ac_dummy="$PATH"
2599 for ac_dir in $ac_dummy; do
2600   IFS=$ac_save_IFS
2601   test -z "$ac_dir" && ac_dir=.
2602   $as_executable_p "$ac_dir/$ac_word" || continue
2603 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2604 echo "$as_me:2604: found $ac_dir/$ac_word" >&5
2605 break
2606 done
2607
2608 fi
2609 fi
2610 CXX=$ac_cv_prog_CXX
2611 if test -n "$CXX"; then
2612   echo "$as_me:2612: result: $CXX" >&5
2613 echo "${ECHO_T}$CXX" >&6
2614 else
2615   echo "$as_me:2615: result: no" >&5
2616 echo "${ECHO_T}no" >&6
2617 fi
2618
2619     test -n "$CXX" && break
2620   done
2621 fi
2622 if test -z "$CXX"; then
2623   ac_ct_CXX=$CXX
2624   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2625 do
2626   # Extract the first word of "$ac_prog", so it can be a program name with args.
2627 set dummy $ac_prog; ac_word=$2
2628 echo "$as_me:2628: checking for $ac_word" >&5
2629 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2630 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2631   echo $ECHO_N "(cached) $ECHO_C" >&6
2632 else
2633   if test -n "$ac_ct_CXX"; then
2634   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2635 else
2636   ac_save_IFS=$IFS; IFS=$ac_path_separator
2637 ac_dummy="$PATH"
2638 for ac_dir in $ac_dummy; do
2639   IFS=$ac_save_IFS
2640   test -z "$ac_dir" && ac_dir=.
2641   $as_executable_p "$ac_dir/$ac_word" || continue
2642 ac_cv_prog_ac_ct_CXX="$ac_prog"
2643 echo "$as_me:2643: found $ac_dir/$ac_word" >&5
2644 break
2645 done
2646
2647 fi
2648 fi
2649 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2650 if test -n "$ac_ct_CXX"; then
2651   echo "$as_me:2651: result: $ac_ct_CXX" >&5
2652 echo "${ECHO_T}$ac_ct_CXX" >&6
2653 else
2654   echo "$as_me:2654: result: no" >&5
2655 echo "${ECHO_T}no" >&6
2656 fi
2657
2658   test -n "$ac_ct_CXX" && break
2659 done
2660 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2661
2662   CXX=$ac_ct_CXX
2663 fi
2664
2665 # Provide some information about the compiler.
2666 echo "$as_me:2666:" \
2667      "checking for C++ compiler version" >&5
2668 ac_compiler=`set X $ac_compile; echo $2`
2669 { (eval echo "$as_me:2669: \"$ac_compiler --version </dev/null >&5\"") >&5
2670   (eval $ac_compiler --version </dev/null >&5) 2>&5
2671   ac_status=$?
2672   echo "$as_me:2672: \$? = $ac_status" >&5
2673   (exit $ac_status); }
2674 { (eval echo "$as_me:2674: \"$ac_compiler -v </dev/null >&5\"") >&5
2675   (eval $ac_compiler -v </dev/null >&5) 2>&5
2676   ac_status=$?
2677   echo "$as_me:2677: \$? = $ac_status" >&5
2678   (exit $ac_status); }
2679 { (eval echo "$as_me:2679: \"$ac_compiler -V </dev/null >&5\"") >&5
2680   (eval $ac_compiler -V </dev/null >&5) 2>&5
2681   ac_status=$?
2682   echo "$as_me:2682: \$? = $ac_status" >&5
2683   (exit $ac_status); }
2684
2685 echo "$as_me:2685: checking whether we are using the GNU C++ compiler" >&5
2686 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2687 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2688   echo $ECHO_N "(cached) $ECHO_C" >&6
2689 else
2690   cat >conftest.$ac_ext <<_ACEOF
2691 #line 2691 "configure"
2692 #include "confdefs.h"
2693
2694 int
2695 main ()
2696 {
2697 #ifndef __GNUC__
2698        choke me
2699 #endif
2700
2701   ;
2702   return 0;
2703 }
2704 _ACEOF
2705 rm -f conftest.$ac_objext
2706 if { (eval echo "$as_me:2706: \"$ac_compile\"") >&5
2707   (eval $ac_compile) 2>&5
2708   ac_status=$?
2709   echo "$as_me:2709: \$? = $ac_status" >&5
2710   (exit $ac_status); } &&
2711          { ac_try='test -s conftest.$ac_objext'
2712   { (eval echo "$as_me:2712: \"$ac_try\"") >&5
2713   (eval $ac_try) 2>&5
2714   ac_status=$?
2715   echo "$as_me:2715: \$? = $ac_status" >&5
2716   (exit $ac_status); }; }; then
2717   ac_compiler_gnu=yes
2718 else
2719   echo "$as_me: failed program was:" >&5
2720 cat conftest.$ac_ext >&5
2721 ac_compiler_gnu=no
2722 fi
2723 rm -f conftest.$ac_objext conftest.$ac_ext
2724 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2725
2726 fi
2727 echo "$as_me:2727: result: $ac_cv_cxx_compiler_gnu" >&5
2728 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2729 GXX=`test $ac_compiler_gnu = yes && echo yes`
2730 ac_test_CXXFLAGS=${CXXFLAGS+set}
2731 ac_save_CXXFLAGS=$CXXFLAGS
2732 CXXFLAGS="-g"
2733 echo "$as_me:2733: checking whether $CXX accepts -g" >&5
2734 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2735 if test "${ac_cv_prog_cxx_g+set}" = set; then
2736   echo $ECHO_N "(cached) $ECHO_C" >&6
2737 else
2738   cat >conftest.$ac_ext <<_ACEOF
2739 #line 2739 "configure"
2740 #include "confdefs.h"
2741
2742 int
2743 main ()
2744 {
2745
2746   ;
2747   return 0;
2748 }
2749 _ACEOF
2750 rm -f conftest.$ac_objext
2751 if { (eval echo "$as_me:2751: \"$ac_compile\"") >&5
2752   (eval $ac_compile) 2>&5
2753   ac_status=$?
2754   echo "$as_me:2754: \$? = $ac_status" >&5
2755   (exit $ac_status); } &&
2756          { ac_try='test -s conftest.$ac_objext'
2757   { (eval echo "$as_me:2757: \"$ac_try\"") >&5
2758   (eval $ac_try) 2>&5
2759   ac_status=$?
2760   echo "$as_me:2760: \$? = $ac_status" >&5
2761   (exit $ac_status); }; }; then
2762   ac_cv_prog_cxx_g=yes
2763 else
2764   echo "$as_me: failed program was:" >&5
2765 cat conftest.$ac_ext >&5
2766 ac_cv_prog_cxx_g=no
2767 fi
2768 rm -f conftest.$ac_objext conftest.$ac_ext
2769 fi
2770 echo "$as_me:2770: result: $ac_cv_prog_cxx_g" >&5
2771 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2772 if test "$ac_test_CXXFLAGS" = set; then
2773   CXXFLAGS=$ac_save_CXXFLAGS
2774 elif test $ac_cv_prog_cxx_g = yes; then
2775   if test "$GXX" = yes; then
2776     CXXFLAGS="-g -O2"
2777   else
2778     CXXFLAGS="-g"
2779   fi
2780 else
2781   if test "$GXX" = yes; then
2782     CXXFLAGS="-O2"
2783   else
2784     CXXFLAGS=
2785   fi
2786 fi
2787 for ac_declaration in \
2788    ''\
2789    '#include <stdlib.h>' \
2790    'extern "C" void std::exit (int) throw (); using std::exit;' \
2791    'extern "C" void std::exit (int); using std::exit;' \
2792    'extern "C" void exit (int) throw ();' \
2793    'extern "C" void exit (int);' \
2794    'void exit (int);'
2795 do
2796   cat >conftest.$ac_ext <<_ACEOF
2797 #line 2797 "configure"
2798 #include "confdefs.h"
2799 #include <stdlib.h>
2800 $ac_declaration
2801 int
2802 main ()
2803 {
2804 exit (42);
2805   ;
2806   return 0;
2807 }
2808 _ACEOF
2809 rm -f conftest.$ac_objext
2810 if { (eval echo "$as_me:2810: \"$ac_compile\"") >&5
2811   (eval $ac_compile) 2>&5
2812   ac_status=$?
2813   echo "$as_me:2813: \$? = $ac_status" >&5
2814   (exit $ac_status); } &&
2815          { ac_try='test -s conftest.$ac_objext'
2816   { (eval echo "$as_me:2816: \"$ac_try\"") >&5
2817   (eval $ac_try) 2>&5
2818   ac_status=$?
2819   echo "$as_me:2819: \$? = $ac_status" >&5
2820   (exit $ac_status); }; }; then
2821   :
2822 else
2823   echo "$as_me: failed program was:" >&5
2824 cat conftest.$ac_ext >&5
2825 continue
2826 fi
2827 rm -f conftest.$ac_objext conftest.$ac_ext
2828   cat >conftest.$ac_ext <<_ACEOF
2829 #line 2829 "configure"
2830 #include "confdefs.h"
2831 $ac_declaration
2832 int
2833 main ()
2834 {
2835 exit (42);
2836   ;
2837   return 0;
2838 }
2839 _ACEOF
2840 rm -f conftest.$ac_objext
2841 if { (eval echo "$as_me:2841: \"$ac_compile\"") >&5
2842   (eval $ac_compile) 2>&5
2843   ac_status=$?
2844   echo "$as_me:2844: \$? = $ac_status" >&5
2845   (exit $ac_status); } &&
2846          { ac_try='test -s conftest.$ac_objext'
2847   { (eval echo "$as_me:2847: \"$ac_try\"") >&5
2848   (eval $ac_try) 2>&5
2849   ac_status=$?
2850   echo "$as_me:2850: \$? = $ac_status" >&5
2851   (exit $ac_status); }; }; then
2852   break
2853 else
2854   echo "$as_me: failed program was:" >&5
2855 cat conftest.$ac_ext >&5
2856 fi
2857 rm -f conftest.$ac_objext conftest.$ac_ext
2858 done
2859 rm -rf conftest*
2860 if test -n "$ac_declaration"; then
2861   echo '#ifdef __cplusplus' >>confdefs.h
2862   echo $ac_declaration      >>confdefs.h
2863   echo '#endif'             >>confdefs.h
2864 fi
2865
2866 ac_ext=c
2867 ac_cpp='$CPP $CPPFLAGS'
2868 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2869 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2870 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2871 ac_main_return=return
2872
2873         ac_ext=cc
2874 ac_cpp='$CXXCPP $CPPFLAGS'
2875 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2876 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2877 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2878 ac_main_return=return
2879
2880         if test "x$cf_with_cxx" != xno
2881         then
2882                 # Several of the C++ configurations do not work, particularly when
2883                 # cross-compiling (20140913 -TD)
2884                 echo "$as_me:2884: checking if $CXX works" >&5
2885 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2886
2887                 save_CPPFLAGS="$CPPFLAGS"
2888                 eval cf_includedir=${includedir}
2889                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2890
2891 cat >conftest.$ac_ext <<_ACEOF
2892 #line 2892 "configure"
2893 #include "confdefs.h"
2894
2895 #include <stdlib.h>
2896 #include <stdio.h>
2897
2898 int
2899 main ()
2900 {
2901
2902                 printf("Hello world!\n")
2903
2904   ;
2905   return 0;
2906 }
2907 _ACEOF
2908 rm -f conftest.$ac_objext
2909 if { (eval echo "$as_me:2909: \"$ac_compile\"") >&5
2910   (eval $ac_compile) 2>&5
2911   ac_status=$?
2912   echo "$as_me:2912: \$? = $ac_status" >&5
2913   (exit $ac_status); } &&
2914          { ac_try='test -s conftest.$ac_objext'
2915   { (eval echo "$as_me:2915: \"$ac_try\"") >&5
2916   (eval $ac_try) 2>&5
2917   ac_status=$?
2918   echo "$as_me:2918: \$? = $ac_status" >&5
2919   (exit $ac_status); }; }; then
2920   cf_cxx_works=yes
2921 else
2922   echo "$as_me: failed program was:" >&5
2923 cat conftest.$ac_ext >&5
2924 cf_cxx_works=no
2925 fi
2926 rm -f conftest.$ac_objext conftest.$ac_ext
2927                 CPPFLAGS="$save_CPPFLAGS"
2928
2929                 echo "$as_me:2929: result: $cf_cxx_works" >&5
2930 echo "${ECHO_T}$cf_cxx_works" >&6
2931                 if test "x$cf_cxx_works" = xno
2932                 then
2933                         { echo "$as_me:2933: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
2934 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
2935                         cf_with_cxx=no; CXX=""; GXX="";
2936                 fi
2937         fi
2938         ac_ext=c
2939 ac_cpp='$CPP $CPPFLAGS'
2940 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2941 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2942 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2943 ac_main_return=return
2944
2945         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2946         if test "$CXX" = "g++" ; then
2947                 # Extract the first word of "g++", so it can be a program name with args.
2948 set dummy g++; ac_word=$2
2949 echo "$as_me:2949: checking for $ac_word" >&5
2950 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2951 if test "${ac_cv_path_CXX+set}" = set; then
2952   echo $ECHO_N "(cached) $ECHO_C" >&6
2953 else
2954   case $CXX in
2955   [\\/]* | ?:[\\/]*)
2956   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2957   ;;
2958   *)
2959   ac_save_IFS=$IFS; IFS=$ac_path_separator
2960 ac_dummy="$PATH"
2961 for ac_dir in $ac_dummy; do
2962   IFS=$ac_save_IFS
2963   test -z "$ac_dir" && ac_dir=.
2964   if $as_executable_p "$ac_dir/$ac_word"; then
2965    ac_cv_path_CXX="$ac_dir/$ac_word"
2966    echo "$as_me:2966: found $ac_dir/$ac_word" >&5
2967    break
2968 fi
2969 done
2970
2971   ;;
2972 esac
2973 fi
2974 CXX=$ac_cv_path_CXX
2975
2976 if test -n "$CXX"; then
2977   echo "$as_me:2977: result: $CXX" >&5
2978 echo "${ECHO_T}$CXX" >&6
2979 else
2980   echo "$as_me:2980: result: no" >&5
2981 echo "${ECHO_T}no" >&6
2982 fi
2983
2984         fi
2985         case "x$CXX" in #(vi
2986         x|xg++)
2987                 { echo "$as_me:2987: WARNING: You don't have any C++ compiler, too bad" >&5
2988 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2989                 cf_with_cxx=no; CXX=""; GXX="";
2990                 ;;
2991         esac
2992 fi
2993
2994 GXX_VERSION=none
2995 if test "$GXX" = yes; then
2996         echo "$as_me:2996: checking version of ${CXX:-g++}" >&5
2997 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2998         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2999         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3000         echo "$as_me:3000: result: $GXX_VERSION" >&5
3001 echo "${ECHO_T}$GXX_VERSION" >&6
3002 fi
3003
3004 case $GXX_VERSION in
3005 1*|2.[0-6]*)
3006         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3007         # cf_cxx_library=no
3008         { echo "$as_me:3008: WARNING: templates do not work" >&5
3009 echo "$as_me: WARNING: templates do not work" >&2;}
3010         ;;
3011 esac
3012
3013 echo "$as_me:3013: checking if you want to build C++ binding and demo" >&5
3014 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3015
3016 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3017 if test "${with_cxx_binding+set}" = set; then
3018   withval="$with_cxx_binding"
3019   cf_with_cxx_binding=$withval
3020 else
3021   cf_with_cxx_binding=$cf_with_cxx
3022 fi;
3023 echo "$as_me:3023: result: $cf_with_cxx_binding" >&5
3024 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3025
3026 echo "$as_me:3026: checking if you want to build with Ada95" >&5
3027 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3028 echo "$as_me:3028: result: $cf_with_ada" >&5
3029 echo "${ECHO_T}$cf_with_ada" >&6
3030
3031 echo "$as_me:3031: checking if you want to install terminal database" >&5
3032 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3033
3034 # Check whether --enable-db-install or --disable-db-install was given.
3035 if test "${enable_db_install+set}" = set; then
3036   enableval="$enable_db_install"
3037   cf_with_db_install=$enableval
3038 else
3039   cf_with_db_install=yes
3040 fi;
3041 echo "$as_me:3041: result: $cf_with_db_install" >&5
3042 echo "${ECHO_T}$cf_with_db_install" >&6
3043
3044 echo "$as_me:3044: checking if you want to install manpages" >&5
3045 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3046
3047 # Check whether --with-manpages or --without-manpages was given.
3048 if test "${with_manpages+set}" = set; then
3049   withval="$with_manpages"
3050   cf_with_manpages=$withval
3051 else
3052   cf_with_manpages=yes
3053 fi;
3054 echo "$as_me:3054: result: $cf_with_manpages" >&5
3055 echo "${ECHO_T}$cf_with_manpages" >&6
3056
3057 echo "$as_me:3057: checking if you want to build programs such as tic" >&5
3058 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3059
3060 # Check whether --with-progs or --without-progs was given.
3061 if test "${with_progs+set}" = set; then
3062   withval="$with_progs"
3063   cf_with_progs=$withval
3064 else
3065   cf_with_progs=yes
3066 fi;
3067 echo "$as_me:3067: result: $cf_with_progs" >&5
3068 echo "${ECHO_T}$cf_with_progs" >&6
3069
3070 echo "$as_me:3070: checking if you want to build test-programs" >&5
3071 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3072
3073 # Check whether --with-tests or --without-tests was given.
3074 if test "${with_tests+set}" = set; then
3075   withval="$with_tests"
3076   cf_with_tests=$withval
3077 else
3078   cf_with_tests=yes
3079 fi;
3080 echo "$as_me:3080: result: $cf_with_tests" >&5
3081 echo "${ECHO_T}$cf_with_tests" >&6
3082
3083 echo "$as_me:3083: checking if you wish to install curses.h" >&5
3084 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3085
3086 # Check whether --with-curses-h or --without-curses-h was given.
3087 if test "${with_curses_h+set}" = set; then
3088   withval="$with_curses_h"
3089   with_curses_h=$withval
3090 else
3091   with_curses_h=yes
3092 fi;
3093 echo "$as_me:3093: result: $with_curses_h" >&5
3094 echo "${ECHO_T}$with_curses_h" >&6
3095
3096 modules_to_build="ncurses"
3097 if test "X$cf_with_progs" != Xno ; then
3098 modules_to_build="$modules_to_build progs tack"
3099 fi
3100 modules_to_build="$modules_to_build panel menu form"
3101
3102 test "$program_prefix" != NONE &&
3103   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3104 # Use a double $ so make ignores it.
3105 test "$program_suffix" != NONE &&
3106   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3107 # Double any \ or $.  echo might interpret backslashes.
3108 # By default was `s,x,x', remove it if useless.
3109 cat <<\_ACEOF >conftest.sed
3110 s/[\\$]/&&/g;s/;s,x,x,$//
3111 _ACEOF
3112 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3113 rm conftest.sed
3114
3115 for ac_prog in mawk gawk nawk awk
3116 do
3117   # Extract the first word of "$ac_prog", so it can be a program name with args.
3118 set dummy $ac_prog; ac_word=$2
3119 echo "$as_me:3119: checking for $ac_word" >&5
3120 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3121 if test "${ac_cv_prog_AWK+set}" = set; then
3122   echo $ECHO_N "(cached) $ECHO_C" >&6
3123 else
3124   if test -n "$AWK"; then
3125   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3126 else
3127   ac_save_IFS=$IFS; IFS=$ac_path_separator
3128 ac_dummy="$PATH"
3129 for ac_dir in $ac_dummy; do
3130   IFS=$ac_save_IFS
3131   test -z "$ac_dir" && ac_dir=.
3132   $as_executable_p "$ac_dir/$ac_word" || continue
3133 ac_cv_prog_AWK="$ac_prog"
3134 echo "$as_me:3134: found $ac_dir/$ac_word" >&5
3135 break
3136 done
3137
3138 fi
3139 fi
3140 AWK=$ac_cv_prog_AWK
3141 if test -n "$AWK"; then
3142   echo "$as_me:3142: result: $AWK" >&5
3143 echo "${ECHO_T}$AWK" >&6
3144 else
3145   echo "$as_me:3145: result: no" >&5
3146 echo "${ECHO_T}no" >&6
3147 fi
3148
3149   test -n "$AWK" && break
3150 done
3151
3152 test -z "$AWK" && { { echo "$as_me:3152: error: No awk program found" >&5
3153 echo "$as_me: error: No awk program found" >&2;}
3154    { (exit 1); exit 1; }; }
3155
3156 echo "$as_me:3156: checking for egrep" >&5
3157 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3158 if test "${ac_cv_prog_egrep+set}" = set; then
3159   echo $ECHO_N "(cached) $ECHO_C" >&6
3160 else
3161   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3162     then ac_cv_prog_egrep='grep -E'
3163     else ac_cv_prog_egrep='egrep'
3164     fi
3165 fi
3166 echo "$as_me:3166: result: $ac_cv_prog_egrep" >&5
3167 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3168  EGREP=$ac_cv_prog_egrep
3169
3170 test -z "$EGREP" && { { echo "$as_me:3170: error: No egrep program found" >&5
3171 echo "$as_me: error: No egrep program found" >&2;}
3172    { (exit 1); exit 1; }; }
3173
3174 # Find a good install program.  We prefer a C program (faster),
3175 # so one script is as good as another.  But avoid the broken or
3176 # incompatible versions:
3177 # SysV /etc/install, /usr/sbin/install
3178 # SunOS /usr/etc/install
3179 # IRIX /sbin/install
3180 # AIX /bin/install
3181 # AmigaOS /C/install, which installs bootblocks on floppy discs
3182 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3183 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3184 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3185 # ./install, which can be erroneously created by make from ./install.sh.
3186 echo "$as_me:3186: checking for a BSD compatible install" >&5
3187 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3188 if test -z "$INSTALL"; then
3189 if test "${ac_cv_path_install+set}" = set; then
3190   echo $ECHO_N "(cached) $ECHO_C" >&6
3191 else
3192     ac_save_IFS=$IFS; IFS=$ac_path_separator
3193   for ac_dir in $PATH; do
3194     IFS=$ac_save_IFS
3195     # Account for people who put trailing slashes in PATH elements.
3196     case $ac_dir/ in
3197     / | ./ | .// | /cC/* \
3198     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3199     | /usr/ucb/* ) ;;
3200     *)
3201       # OSF1 and SCO ODT 3.0 have their own names for install.
3202       # Don't use installbsd from OSF since it installs stuff as root
3203       # by default.
3204       for ac_prog in ginstall scoinst install; do
3205         if $as_executable_p "$ac_dir/$ac_prog"; then
3206           if test $ac_prog = install &&
3207             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3208             # AIX install.  It has an incompatible calling convention.
3209             :
3210           elif test $ac_prog = install &&
3211             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3212             # program-specific install script used by HP pwplus--don't use.
3213             :
3214           else
3215             ac_cv_path_install="$ac_dir/$ac_prog -c"
3216             break 2
3217           fi
3218         fi
3219       done
3220       ;;
3221     esac
3222   done
3223
3224 fi
3225   if test "${ac_cv_path_install+set}" = set; then
3226     INSTALL=$ac_cv_path_install
3227   else
3228     # As a last resort, use the slow shell script.  We don't cache a
3229     # path for INSTALL within a source directory, because that will
3230     # break other packages using the cache if that directory is
3231     # removed, or if the path is relative.
3232     INSTALL=$ac_install_sh
3233   fi
3234 fi
3235 echo "$as_me:3235: result: $INSTALL" >&5
3236 echo "${ECHO_T}$INSTALL" >&6
3237
3238 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3239 # It thinks the first close brace ends the variable substitution.
3240 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3241
3242 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3243
3244 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3245
3246 case $INSTALL in
3247 /*)
3248   ;;
3249 *)
3250   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3251   test -z "$cf_dir" && cf_dir=.
3252   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3253   ;;
3254 esac
3255
3256 for ac_prog in tdlint lint alint splint lclint
3257 do
3258   # Extract the first word of "$ac_prog", so it can be a program name with args.
3259 set dummy $ac_prog; ac_word=$2
3260 echo "$as_me:3260: checking for $ac_word" >&5
3261 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3262 if test "${ac_cv_prog_LINT+set}" = set; then
3263   echo $ECHO_N "(cached) $ECHO_C" >&6
3264 else
3265   if test -n "$LINT"; then
3266   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3267 else
3268   ac_save_IFS=$IFS; IFS=$ac_path_separator
3269 ac_dummy="$PATH"
3270 for ac_dir in $ac_dummy; do
3271   IFS=$ac_save_IFS
3272   test -z "$ac_dir" && ac_dir=.
3273   $as_executable_p "$ac_dir/$ac_word" || continue
3274 ac_cv_prog_LINT="$ac_prog"
3275 echo "$as_me:3275: found $ac_dir/$ac_word" >&5
3276 break
3277 done
3278
3279 fi
3280 fi
3281 LINT=$ac_cv_prog_LINT
3282 if test -n "$LINT"; then
3283   echo "$as_me:3283: result: $LINT" >&5
3284 echo "${ECHO_T}$LINT" >&6
3285 else
3286   echo "$as_me:3286: result: no" >&5
3287 echo "${ECHO_T}no" >&6
3288 fi
3289
3290   test -n "$LINT" && break
3291 done
3292
3293 echo "$as_me:3293: checking whether ln -s works" >&5
3294 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3295 LN_S=$as_ln_s
3296 if test "$LN_S" = "ln -s"; then
3297   echo "$as_me:3297: result: yes" >&5
3298 echo "${ECHO_T}yes" >&6
3299 else
3300   echo "$as_me:3300: result: no, using $LN_S" >&5
3301 echo "${ECHO_T}no, using $LN_S" >&6
3302 fi
3303
3304 echo "$as_me:3304: checking if $LN_S -f options work" >&5
3305 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3306
3307 rm -f conf$$.src conf$$dst
3308 echo >conf$$.dst
3309 echo first >conf$$.src
3310 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3311         cf_prog_ln_sf=yes
3312 else
3313         cf_prog_ln_sf=no
3314 fi
3315 rm -f conf$$.dst conf$$src
3316 echo "$as_me:3316: result: $cf_prog_ln_sf" >&5
3317 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3318
3319 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3320
3321 echo "$as_me:3321: checking for long file names" >&5
3322 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3323 if test "${ac_cv_sys_long_file_names+set}" = set; then
3324   echo $ECHO_N "(cached) $ECHO_C" >&6
3325 else
3326   ac_cv_sys_long_file_names=yes
3327 # Test for long file names in all the places we know might matter:
3328 #      .                the current directory, where building will happen
3329 #      $prefix/lib      where we will be installing things
3330 #      $exec_prefix/lib likewise
3331 # eval it to expand exec_prefix.
3332 #      $TMPDIR          if set, where it might want to write temporary files
3333 # if $TMPDIR is not set:
3334 #      /tmp             where it might want to write temporary files
3335 #      /var/tmp         likewise
3336 #      /usr/tmp         likewise
3337 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3338   ac_tmpdirs=$TMPDIR
3339 else
3340   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3341 fi
3342 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3343   test -d $ac_dir || continue
3344   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3345   ac_xdir=$ac_dir/cf$$
3346   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3347   ac_tf1=$ac_xdir/conftest9012345
3348   ac_tf2=$ac_xdir/conftest9012346
3349   (echo 1 >$ac_tf1) 2>/dev/null
3350   (echo 2 >$ac_tf2) 2>/dev/null
3351   ac_val=`cat $ac_tf1 2>/dev/null`
3352   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3353     ac_cv_sys_long_file_names=no
3354     rm -rf $ac_xdir 2>/dev/null
3355     break
3356   fi
3357   rm -rf $ac_xdir 2>/dev/null
3358 done
3359 fi
3360 echo "$as_me:3360: result: $ac_cv_sys_long_file_names" >&5
3361 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3362 if test $ac_cv_sys_long_file_names = yes; then
3363
3364 cat >>confdefs.h <<\EOF
3365 #define HAVE_LONG_FILE_NAMES 1
3366 EOF
3367
3368 fi
3369
3370 # if we find pkg-config, check if we should install the ".pc" files.
3371
3372 echo "$as_me:3372: checking if you want to use pkg-config" >&5
3373 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3374
3375 # Check whether --with-pkg-config or --without-pkg-config was given.
3376 if test "${with_pkg_config+set}" = set; then
3377   withval="$with_pkg_config"
3378   cf_pkg_config=$withval
3379 else
3380   cf_pkg_config=yes
3381 fi;
3382 echo "$as_me:3382: result: $cf_pkg_config" >&5
3383 echo "${ECHO_T}$cf_pkg_config" >&6
3384
3385 case $cf_pkg_config in #(vi
3386 no) #(vi
3387         PKG_CONFIG=none
3388         ;;
3389 yes) #(vi
3390
3391 if test -n "$ac_tool_prefix"; then
3392   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3393 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3394 echo "$as_me:3394: checking for $ac_word" >&5
3395 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3396 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3397   echo $ECHO_N "(cached) $ECHO_C" >&6
3398 else
3399   case $PKG_CONFIG in
3400   [\\/]* | ?:[\\/]*)
3401   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3402   ;;
3403   *)
3404   ac_save_IFS=$IFS; IFS=$ac_path_separator
3405 ac_dummy="$PATH"
3406 for ac_dir in $ac_dummy; do
3407   IFS=$ac_save_IFS
3408   test -z "$ac_dir" && ac_dir=.
3409   if $as_executable_p "$ac_dir/$ac_word"; then
3410    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3411    echo "$as_me:3411: found $ac_dir/$ac_word" >&5
3412    break
3413 fi
3414 done
3415
3416   ;;
3417 esac
3418 fi
3419 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3420
3421 if test -n "$PKG_CONFIG"; then
3422   echo "$as_me:3422: result: $PKG_CONFIG" >&5
3423 echo "${ECHO_T}$PKG_CONFIG" >&6
3424 else
3425   echo "$as_me:3425: result: no" >&5
3426 echo "${ECHO_T}no" >&6
3427 fi
3428
3429 fi
3430 if test -z "$ac_cv_path_PKG_CONFIG"; then
3431   ac_pt_PKG_CONFIG=$PKG_CONFIG
3432   # Extract the first word of "pkg-config", so it can be a program name with args.
3433 set dummy pkg-config; ac_word=$2
3434 echo "$as_me:3434: checking for $ac_word" >&5
3435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3436 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3437   echo $ECHO_N "(cached) $ECHO_C" >&6
3438 else
3439   case $ac_pt_PKG_CONFIG in
3440   [\\/]* | ?:[\\/]*)
3441   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3442   ;;
3443   *)
3444   ac_save_IFS=$IFS; IFS=$ac_path_separator
3445 ac_dummy="$PATH"
3446 for ac_dir in $ac_dummy; do
3447   IFS=$ac_save_IFS
3448   test -z "$ac_dir" && ac_dir=.
3449   if $as_executable_p "$ac_dir/$ac_word"; then
3450    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3451    echo "$as_me:3451: found $ac_dir/$ac_word" >&5
3452    break
3453 fi
3454 done
3455
3456   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3457   ;;
3458 esac
3459 fi
3460 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3461
3462 if test -n "$ac_pt_PKG_CONFIG"; then
3463   echo "$as_me:3463: result: $ac_pt_PKG_CONFIG" >&5
3464 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3465 else
3466   echo "$as_me:3466: result: no" >&5
3467 echo "${ECHO_T}no" >&6
3468 fi
3469
3470   PKG_CONFIG=$ac_pt_PKG_CONFIG
3471 else
3472   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3473 fi
3474
3475         ;;
3476 *)
3477         PKG_CONFIG=$withval
3478         ;;
3479 esac
3480
3481 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3482 if test "$PKG_CONFIG" != none ; then
3483
3484 if test "x$prefix" != xNONE; then
3485   cf_path_syntax="$prefix"
3486 else
3487   cf_path_syntax="$ac_default_prefix"
3488 fi
3489
3490 case ".$PKG_CONFIG" in #(vi
3491 .\$\(*\)*|.\'*\'*) #(vi
3492   ;;
3493 ..|./*|.\\*) #(vi
3494   ;;
3495 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3496   ;;
3497 .\${*prefix}*|.\${*dir}*) #(vi
3498   eval PKG_CONFIG="$PKG_CONFIG"
3499   case ".$PKG_CONFIG" in #(vi
3500   .NONE/*)
3501     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3502     ;;
3503   esac
3504   ;; #(vi
3505 .no|.NONE/*)
3506   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3507   ;;
3508 *)
3509   { { echo "$as_me:3509: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3510 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3511    { (exit 1); exit 1; }; }
3512   ;;
3513 esac
3514
3515 else
3516         { echo "$as_me:3516: WARNING: pkg-config is not installed" >&5
3517 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3518 fi
3519
3520 echo "$as_me:3520: checking for $PKG_CONFIG library directory" >&5
3521 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3522
3523 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3524 if test "${with_pkg_config_libdir+set}" = set; then
3525   withval="$with_pkg_config_libdir"
3526   PKG_CONFIG_LIBDIR=$withval
3527 else
3528   PKG_CONFIG_LIBDIR=yes
3529 fi;
3530
3531 case x$PKG_CONFIG_LIBDIR in #(vi
3532 x/*) #(vi
3533         ;;
3534 xyes) #(vi
3535         # Look for the library directory using the same prefix as the executable
3536         if test "x$PKG_CONFIG" = xnone
3537         then
3538                 cf_path=$prefix
3539         else
3540                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3541         fi
3542
3543         # If you don't like using the default architecture, you have to specify the
3544         # intended library directory and corresponding compiler/linker options.
3545         #
3546         # This case allows for Debian's 2014-flavor of multiarch, along with the
3547         # most common variations before that point.  Some other variants spell the
3548         # directory differently, e.g., "pkg-config", and put it in unusual places.
3549         # pkg-config has always been poorly standardized, which is ironic...
3550         case x`(arch) 2>/dev/null` in #(vi
3551         *64) #(vi
3552                 cf_search_path="\
3553                         $cf_path/lib/*64-linux-gnu \
3554                         $cf_path/share \
3555                         $cf_path/lib64 \
3556                         $cf_path/lib32 \
3557                         $cf_path/lib"
3558                 ;;
3559         *)
3560                 cf_search_path="\
3561                         $cf_path/lib/*-linux-gnu \
3562                         $cf_path/share \
3563                         $cf_path/lib32 \
3564                         $cf_path/lib"
3565                 ;;
3566         esac
3567
3568         test -n "$verbose" && echo "    list..." 1>&6
3569
3570 echo "${as_me:-configure}:3570: testing list... ..." 1>&5
3571
3572         for cf_config in $cf_search_path
3573         do
3574                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3575
3576 echo "${as_me:-configure}:3576: testing checking $cf_config/pkgconfig ..." 1>&5
3577
3578                 if test -d $cf_config/pkgconfig
3579                 then
3580                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3581                         echo "$as_me:3581: checking done" >&5
3582 echo $ECHO_N "checking done... $ECHO_C" >&6
3583                         break
3584                 fi
3585         done
3586         ;;
3587 *)
3588         ;;
3589 esac
3590
3591 echo "$as_me:3591: result: $PKG_CONFIG_LIBDIR" >&5
3592 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3593
3594 if test "x$PKG_CONFIG" != xnone
3595 then
3596         echo "$as_me:3596: checking if we should install .pc files for $PKG_CONFIG" >&5
3597 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3598 else
3599         echo "$as_me:3599: checking if we should install .pc files" >&5
3600 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3601 fi
3602
3603 # Check whether --enable-pc-files or --disable-pc-files was given.
3604 if test "${enable_pc_files+set}" = set; then
3605   enableval="$enable_pc_files"
3606   enable_pc_files=$enableval
3607 else
3608   enable_pc_files=no
3609 fi;
3610 echo "$as_me:3610: result: $enable_pc_files" >&5
3611 echo "${ECHO_T}$enable_pc_files" >&6
3612 if test "x$enable_pc_files" != xno
3613 then
3614
3615 if test "x$prefix" != xNONE; then
3616   cf_path_syntax="$prefix"
3617 else
3618   cf_path_syntax="$ac_default_prefix"
3619 fi
3620
3621 case ".$PKG_CONFIG_LIBDIR" in #(vi
3622 .\$\(*\)*|.\'*\'*) #(vi
3623   ;;
3624 ..|./*|.\\*) #(vi
3625   ;;
3626 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3627   ;;
3628 .\${*prefix}*|.\${*dir}*) #(vi
3629   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3630   case ".$PKG_CONFIG_LIBDIR" in #(vi
3631   .NONE/*)
3632     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3633     ;;
3634   esac
3635   ;; #(vi
3636 .no|.NONE/*)
3637   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3638   ;;
3639 *)
3640   { { echo "$as_me:3640: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3641 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3642    { (exit 1); exit 1; }; }
3643   ;;
3644 esac
3645
3646         MAKE_PC_FILES=
3647 else
3648         MAKE_PC_FILES="#"
3649 fi
3650
3651 if test -z "$MAKE_PC_FILES"
3652 then
3653         echo "$as_me:3653: checking for suffix to add to pc-files" >&5
3654 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3655
3656 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3657 if test "${with_pc_suffix+set}" = set; then
3658   withval="$with_pc_suffix"
3659   case "x$withval" in #(vi
3660         xyes|xno) #(vi
3661                 PC_MODULE_SUFFIX=
3662                 ;;
3663         *)      PC_MODULE_SUFFIX="$withval"
3664                 ;;
3665         esac
3666 fi;
3667         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3668         echo "$as_me:3668: result: $PC_MODULE_SUFFIX" >&5
3669 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3670         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3671
3672 fi
3673
3674 echo "$as_me:3674: checking if we should assume mixed-case filenames" >&5
3675 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3676
3677 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3678 if test "${enable_mixed_case+set}" = set; then
3679   enableval="$enable_mixed_case"
3680   enable_mixedcase=$enableval
3681 else
3682   enable_mixedcase=auto
3683 fi;
3684 echo "$as_me:3684: result: $enable_mixedcase" >&5
3685 echo "${ECHO_T}$enable_mixedcase" >&6
3686 if test "$enable_mixedcase" = "auto" ; then
3687
3688 echo "$as_me:3688: checking if filesystem supports mixed-case filenames" >&5
3689 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3690 if test "${cf_cv_mixedcase+set}" = set; then
3691   echo $ECHO_N "(cached) $ECHO_C" >&6
3692 else
3693
3694 if test "$cross_compiling" = yes ; then
3695         case $target_alias in #(vi
3696         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
3697                 cf_cv_mixedcase=no
3698                 ;;
3699         *)
3700                 cf_cv_mixedcase=yes
3701                 ;;
3702         esac
3703 else
3704         rm -f conftest CONFTEST
3705         echo test >conftest
3706         if test -f CONFTEST ; then
3707                 cf_cv_mixedcase=no
3708         else
3709                 cf_cv_mixedcase=yes
3710         fi
3711         rm -f conftest CONFTEST
3712 fi
3713
3714 fi
3715 echo "$as_me:3715: result: $cf_cv_mixedcase" >&5
3716 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3717 test "$cf_cv_mixedcase" = yes &&
3718 cat >>confdefs.h <<\EOF
3719 #define MIXEDCASE_FILENAMES 1
3720 EOF
3721
3722 else
3723     cf_cv_mixedcase=$enable_mixedcase
3724     if test "x$enable_mixedcase" = "xyes" ; then
3725
3726 cat >>confdefs.h <<\EOF
3727 #define MIXEDCASE_FILENAMES 1
3728 EOF
3729
3730     fi
3731 fi
3732
3733 # do this after mixed-case option (tags/TAGS is not as important as tic).
3734 echo "$as_me:3734: checking whether ${MAKE-make} sets \${MAKE}" >&5
3735 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3736 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3737 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3738   echo $ECHO_N "(cached) $ECHO_C" >&6
3739 else
3740   cat >conftest.make <<\EOF
3741 all:
3742         @echo 'ac_maketemp="${MAKE}"'
3743 EOF
3744 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3745 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3746 if test -n "$ac_maketemp"; then
3747   eval ac_cv_prog_make_${ac_make}_set=yes
3748 else
3749   eval ac_cv_prog_make_${ac_make}_set=no
3750 fi
3751 rm -f conftest.make
3752 fi
3753 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3754   echo "$as_me:3754: result: yes" >&5
3755 echo "${ECHO_T}yes" >&6
3756   SET_MAKE=
3757 else
3758   echo "$as_me:3758: result: no" >&5
3759 echo "${ECHO_T}no" >&6
3760   SET_MAKE="MAKE=${MAKE-make}"
3761 fi
3762
3763 for ac_prog in exctags ctags
3764 do
3765   # Extract the first word of "$ac_prog", so it can be a program name with args.
3766 set dummy $ac_prog; ac_word=$2
3767 echo "$as_me:3767: checking for $ac_word" >&5
3768 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3769 if test "${ac_cv_prog_CTAGS+set}" = set; then
3770   echo $ECHO_N "(cached) $ECHO_C" >&6
3771 else
3772   if test -n "$CTAGS"; then
3773   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3774 else
3775   ac_save_IFS=$IFS; IFS=$ac_path_separator
3776 ac_dummy="$PATH"
3777 for ac_dir in $ac_dummy; do
3778   IFS=$ac_save_IFS
3779   test -z "$ac_dir" && ac_dir=.
3780   $as_executable_p "$ac_dir/$ac_word" || continue
3781 ac_cv_prog_CTAGS="$ac_prog"
3782 echo "$as_me:3782: found $ac_dir/$ac_word" >&5
3783 break
3784 done
3785
3786 fi
3787 fi
3788 CTAGS=$ac_cv_prog_CTAGS
3789 if test -n "$CTAGS"; then
3790   echo "$as_me:3790: result: $CTAGS" >&5
3791 echo "${ECHO_T}$CTAGS" >&6
3792 else
3793   echo "$as_me:3793: result: no" >&5
3794 echo "${ECHO_T}no" >&6
3795 fi
3796
3797   test -n "$CTAGS" && break
3798 done
3799
3800 for ac_prog in exetags etags
3801 do
3802   # Extract the first word of "$ac_prog", so it can be a program name with args.
3803 set dummy $ac_prog; ac_word=$2
3804 echo "$as_me:3804: checking for $ac_word" >&5
3805 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3806 if test "${ac_cv_prog_ETAGS+set}" = set; then
3807   echo $ECHO_N "(cached) $ECHO_C" >&6
3808 else
3809   if test -n "$ETAGS"; then
3810   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3811 else
3812   ac_save_IFS=$IFS; IFS=$ac_path_separator
3813 ac_dummy="$PATH"
3814 for ac_dir in $ac_dummy; do
3815   IFS=$ac_save_IFS
3816   test -z "$ac_dir" && ac_dir=.
3817   $as_executable_p "$ac_dir/$ac_word" || continue
3818 ac_cv_prog_ETAGS="$ac_prog"
3819 echo "$as_me:3819: found $ac_dir/$ac_word" >&5
3820 break
3821 done
3822
3823 fi
3824 fi
3825 ETAGS=$ac_cv_prog_ETAGS
3826 if test -n "$ETAGS"; then
3827   echo "$as_me:3827: result: $ETAGS" >&5
3828 echo "${ECHO_T}$ETAGS" >&6
3829 else
3830   echo "$as_me:3830: result: no" >&5
3831 echo "${ECHO_T}no" >&6
3832 fi
3833
3834   test -n "$ETAGS" && break
3835 done
3836
3837 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3838 set dummy ${CTAGS:-ctags}; ac_word=$2
3839 echo "$as_me:3839: checking for $ac_word" >&5
3840 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3841 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3842   echo $ECHO_N "(cached) $ECHO_C" >&6
3843 else
3844   if test -n "$MAKE_LOWER_TAGS"; then
3845   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3846 else
3847   ac_save_IFS=$IFS; IFS=$ac_path_separator
3848 ac_dummy="$PATH"
3849 for ac_dir in $ac_dummy; do
3850   IFS=$ac_save_IFS
3851   test -z "$ac_dir" && ac_dir=.
3852   $as_executable_p "$ac_dir/$ac_word" || continue
3853 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3854 echo "$as_me:3854: found $ac_dir/$ac_word" >&5
3855 break
3856 done
3857
3858   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3859 fi
3860 fi
3861 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3862 if test -n "$MAKE_LOWER_TAGS"; then
3863   echo "$as_me:3863: result: $MAKE_LOWER_TAGS" >&5
3864 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3865 else
3866   echo "$as_me:3866: result: no" >&5
3867 echo "${ECHO_T}no" >&6
3868 fi
3869
3870 if test "$cf_cv_mixedcase" = yes ; then
3871         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3872 set dummy ${ETAGS:-etags}; ac_word=$2
3873 echo "$as_me:3873: checking for $ac_word" >&5
3874 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3875 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3876   echo $ECHO_N "(cached) $ECHO_C" >&6
3877 else
3878   if test -n "$MAKE_UPPER_TAGS"; then
3879   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3880 else
3881   ac_save_IFS=$IFS; IFS=$ac_path_separator
3882 ac_dummy="$PATH"
3883 for ac_dir in $ac_dummy; do
3884   IFS=$ac_save_IFS
3885   test -z "$ac_dir" && ac_dir=.
3886   $as_executable_p "$ac_dir/$ac_word" || continue
3887 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3888 echo "$as_me:3888: found $ac_dir/$ac_word" >&5
3889 break
3890 done
3891
3892   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3893 fi
3894 fi
3895 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3896 if test -n "$MAKE_UPPER_TAGS"; then
3897   echo "$as_me:3897: result: $MAKE_UPPER_TAGS" >&5
3898 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3899 else
3900   echo "$as_me:3900: result: no" >&5
3901 echo "${ECHO_T}no" >&6
3902 fi
3903
3904 else
3905         MAKE_UPPER_TAGS=no
3906 fi
3907
3908 if test "$MAKE_UPPER_TAGS" = yes ; then
3909         MAKE_UPPER_TAGS=
3910 else
3911         MAKE_UPPER_TAGS="#"
3912 fi
3913
3914 if test "$MAKE_LOWER_TAGS" = yes ; then
3915         MAKE_LOWER_TAGS=
3916 else
3917         MAKE_LOWER_TAGS="#"
3918 fi
3919
3920 echo "$as_me:3920: checking for makeflags variable" >&5
3921 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3922 if test "${cf_cv_makeflags+set}" = set; then
3923   echo $ECHO_N "(cached) $ECHO_C" >&6
3924 else
3925
3926         cf_cv_makeflags=''
3927         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3928         do
3929                 cat >cf_makeflags.tmp <<CF_EOF
3930 SHELL = /bin/sh
3931 all :
3932         @ echo '.$cf_option'
3933 CF_EOF
3934                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3935                 case "$cf_result" in
3936                 .*k|.*kw)
3937                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3938                         case "$cf_result" in
3939                         .*CC=*) cf_cv_makeflags=
3940                                 ;;
3941                         *)      cf_cv_makeflags=$cf_option
3942                                 ;;
3943                         esac
3944                         break
3945                         ;;
3946                 .-)     ;;
3947                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3948                         ;;
3949                 esac
3950         done
3951         rm -f cf_makeflags.tmp
3952
3953 fi
3954 echo "$as_me:3954: result: $cf_cv_makeflags" >&5
3955 echo "${ECHO_T}$cf_cv_makeflags" >&6
3956
3957 if test -n "$ac_tool_prefix"; then
3958   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3959 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3960 echo "$as_me:3960: checking for $ac_word" >&5
3961 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3962 if test "${ac_cv_prog_RANLIB+set}" = set; then
3963   echo $ECHO_N "(cached) $ECHO_C" >&6
3964 else
3965   if test -n "$RANLIB"; then
3966   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3967 else
3968   ac_save_IFS=$IFS; IFS=$ac_path_separator
3969 ac_dummy="$PATH"
3970 for ac_dir in $ac_dummy; do
3971   IFS=$ac_save_IFS
3972   test -z "$ac_dir" && ac_dir=.
3973   $as_executable_p "$ac_dir/$ac_word" || continue
3974 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3975 echo "$as_me:3975: found $ac_dir/$ac_word" >&5
3976 break
3977 done
3978
3979 fi
3980 fi
3981 RANLIB=$ac_cv_prog_RANLIB
3982 if test -n "$RANLIB"; then
3983   echo "$as_me:3983: result: $RANLIB" >&5
3984 echo "${ECHO_T}$RANLIB" >&6
3985 else
3986   echo "$as_me:3986: result: no" >&5
3987 echo "${ECHO_T}no" >&6
3988 fi
3989
3990 fi
3991 if test -z "$ac_cv_prog_RANLIB"; then
3992   ac_ct_RANLIB=$RANLIB
3993   # Extract the first word of "ranlib", so it can be a program name with args.
3994 set dummy ranlib; ac_word=$2
3995 echo "$as_me:3995: checking for $ac_word" >&5
3996 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3997 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3998   echo $ECHO_N "(cached) $ECHO_C" >&6
3999 else
4000   if test -n "$ac_ct_RANLIB"; then
4001   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4002 else
4003   ac_save_IFS=$IFS; IFS=$ac_path_separator
4004 ac_dummy="$PATH"
4005 for ac_dir in $ac_dummy; do
4006   IFS=$ac_save_IFS
4007   test -z "$ac_dir" && ac_dir=.
4008   $as_executable_p "$ac_dir/$ac_word" || continue
4009 ac_cv_prog_ac_ct_RANLIB="ranlib"
4010 echo "$as_me:4010: found $ac_dir/$ac_word" >&5
4011 break
4012 done
4013
4014   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4015 fi
4016 fi
4017 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4018 if test -n "$ac_ct_RANLIB"; then
4019   echo "$as_me:4019: result: $ac_ct_RANLIB" >&5
4020 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4021 else
4022   echo "$as_me:4022: result: no" >&5
4023 echo "${ECHO_T}no" >&6
4024 fi
4025
4026   RANLIB=$ac_ct_RANLIB
4027 else
4028   RANLIB="$ac_cv_prog_RANLIB"
4029 fi
4030
4031 if test -n "$ac_tool_prefix"; then
4032   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4033 set dummy ${ac_tool_prefix}ld; ac_word=$2
4034 echo "$as_me:4034: checking for $ac_word" >&5
4035 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4036 if test "${ac_cv_prog_LD+set}" = set; then
4037   echo $ECHO_N "(cached) $ECHO_C" >&6
4038 else
4039   if test -n "$LD"; then
4040   ac_cv_prog_LD="$LD" # Let the user override the test.
4041 else
4042   ac_save_IFS=$IFS; IFS=$ac_path_separator
4043 ac_dummy="$PATH"
4044 for ac_dir in $ac_dummy; do
4045   IFS=$ac_save_IFS
4046   test -z "$ac_dir" && ac_dir=.
4047   $as_executable_p "$ac_dir/$ac_word" || continue
4048 ac_cv_prog_LD="${ac_tool_prefix}ld"
4049 echo "$as_me:4049: found $ac_dir/$ac_word" >&5
4050 break
4051 done
4052
4053 fi
4054 fi
4055 LD=$ac_cv_prog_LD
4056 if test -n "$LD"; then
4057   echo "$as_me:4057: result: $LD" >&5
4058 echo "${ECHO_T}$LD" >&6
4059 else
4060   echo "$as_me:4060: result: no" >&5
4061 echo "${ECHO_T}no" >&6
4062 fi
4063
4064 fi
4065 if test -z "$ac_cv_prog_LD"; then
4066   ac_ct_LD=$LD
4067   # Extract the first word of "ld", so it can be a program name with args.
4068 set dummy ld; ac_word=$2
4069 echo "$as_me:4069: checking for $ac_word" >&5
4070 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4071 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4072   echo $ECHO_N "(cached) $ECHO_C" >&6
4073 else
4074   if test -n "$ac_ct_LD"; then
4075   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4076 else
4077   ac_save_IFS=$IFS; IFS=$ac_path_separator
4078 ac_dummy="$PATH"
4079 for ac_dir in $ac_dummy; do
4080   IFS=$ac_save_IFS
4081   test -z "$ac_dir" && ac_dir=.
4082   $as_executable_p "$ac_dir/$ac_word" || continue
4083 ac_cv_prog_ac_ct_LD="ld"
4084 echo "$as_me:4084: found $ac_dir/$ac_word" >&5
4085 break
4086 done
4087
4088   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4089 fi
4090 fi
4091 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4092 if test -n "$ac_ct_LD"; then
4093   echo "$as_me:4093: result: $ac_ct_LD" >&5
4094 echo "${ECHO_T}$ac_ct_LD" >&6
4095 else
4096   echo "$as_me:4096: result: no" >&5
4097 echo "${ECHO_T}no" >&6
4098 fi
4099
4100   LD=$ac_ct_LD
4101 else
4102   LD="$ac_cv_prog_LD"
4103 fi
4104
4105 if test -n "$ac_tool_prefix"; then
4106   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4107 set dummy ${ac_tool_prefix}ar; ac_word=$2
4108 echo "$as_me:4108: checking for $ac_word" >&5
4109 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4110 if test "${ac_cv_prog_AR+set}" = set; then
4111   echo $ECHO_N "(cached) $ECHO_C" >&6
4112 else
4113   if test -n "$AR"; then
4114   ac_cv_prog_AR="$AR" # Let the user override the test.
4115 else
4116   ac_save_IFS=$IFS; IFS=$ac_path_separator
4117 ac_dummy="$PATH"
4118 for ac_dir in $ac_dummy; do
4119   IFS=$ac_save_IFS
4120   test -z "$ac_dir" && ac_dir=.
4121   $as_executable_p "$ac_dir/$ac_word" || continue
4122 ac_cv_prog_AR="${ac_tool_prefix}ar"
4123 echo "$as_me:4123: found $ac_dir/$ac_word" >&5
4124 break
4125 done
4126
4127 fi
4128 fi
4129 AR=$ac_cv_prog_AR
4130 if test -n "$AR"; then
4131   echo "$as_me:4131: result: $AR" >&5
4132 echo "${ECHO_T}$AR" >&6
4133 else
4134   echo "$as_me:4134: result: no" >&5
4135 echo "${ECHO_T}no" >&6
4136 fi
4137
4138 fi
4139 if test -z "$ac_cv_prog_AR"; then
4140   ac_ct_AR=$AR
4141   # Extract the first word of "ar", so it can be a program name with args.
4142 set dummy ar; ac_word=$2
4143 echo "$as_me:4143: checking for $ac_word" >&5
4144 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4145 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4146   echo $ECHO_N "(cached) $ECHO_C" >&6
4147 else
4148   if test -n "$ac_ct_AR"; then
4149   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4150 else
4151   ac_save_IFS=$IFS; IFS=$ac_path_separator
4152 ac_dummy="$PATH"
4153 for ac_dir in $ac_dummy; do
4154   IFS=$ac_save_IFS
4155   test -z "$ac_dir" && ac_dir=.
4156   $as_executable_p "$ac_dir/$ac_word" || continue
4157 ac_cv_prog_ac_ct_AR="ar"
4158 echo "$as_me:4158: found $ac_dir/$ac_word" >&5
4159 break
4160 done
4161
4162   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4163 fi
4164 fi
4165 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4166 if test -n "$ac_ct_AR"; then
4167   echo "$as_me:4167: result: $ac_ct_AR" >&5
4168 echo "${ECHO_T}$ac_ct_AR" >&6
4169 else
4170   echo "$as_me:4170: result: no" >&5
4171 echo "${ECHO_T}no" >&6
4172 fi
4173
4174   AR=$ac_ct_AR
4175 else
4176   AR="$ac_cv_prog_AR"
4177 fi
4178
4179 if test -n "$ac_tool_prefix"; then
4180   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4181 set dummy ${ac_tool_prefix}nm; ac_word=$2
4182 echo "$as_me:4182: checking for $ac_word" >&5
4183 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4184 if test "${ac_cv_prog_NM+set}" = set; then
4185   echo $ECHO_N "(cached) $ECHO_C" >&6
4186 else
4187   if test -n "$NM"; then
4188   ac_cv_prog_NM="$NM" # Let the user override the test.
4189 else
4190   ac_save_IFS=$IFS; IFS=$ac_path_separator
4191 ac_dummy="$PATH"
4192 for ac_dir in $ac_dummy; do
4193   IFS=$ac_save_IFS
4194   test -z "$ac_dir" && ac_dir=.
4195   $as_executable_p "$ac_dir/$ac_word" || continue
4196 ac_cv_prog_NM="${ac_tool_prefix}nm"
4197 echo "$as_me:4197: found $ac_dir/$ac_word" >&5
4198 break
4199 done
4200
4201 fi
4202 fi
4203 NM=$ac_cv_prog_NM
4204 if test -n "$NM"; then
4205   echo "$as_me:4205: result: $NM" >&5
4206 echo "${ECHO_T}$NM" >&6
4207 else
4208   echo "$as_me:4208: result: no" >&5
4209 echo "${ECHO_T}no" >&6
4210 fi
4211
4212 fi
4213 if test -z "$ac_cv_prog_NM"; then
4214   ac_ct_NM=$NM
4215   # Extract the first word of "nm", so it can be a program name with args.
4216 set dummy nm; ac_word=$2
4217 echo "$as_me:4217: checking for $ac_word" >&5
4218 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4219 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4220   echo $ECHO_N "(cached) $ECHO_C" >&6
4221 else
4222   if test -n "$ac_ct_NM"; then
4223   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4224 else
4225   ac_save_IFS=$IFS; IFS=$ac_path_separator
4226 ac_dummy="$PATH"
4227 for ac_dir in $ac_dummy; do
4228   IFS=$ac_save_IFS
4229   test -z "$ac_dir" && ac_dir=.
4230   $as_executable_p "$ac_dir/$ac_word" || continue
4231 ac_cv_prog_ac_ct_NM="nm"
4232 echo "$as_me:4232: found $ac_dir/$ac_word" >&5
4233 break
4234 done
4235
4236   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4237 fi
4238 fi
4239 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4240 if test -n "$ac_ct_NM"; then
4241   echo "$as_me:4241: result: $ac_ct_NM" >&5
4242 echo "${ECHO_T}$ac_ct_NM" >&6
4243 else
4244   echo "$as_me:4244: result: no" >&5
4245 echo "${ECHO_T}no" >&6
4246 fi
4247
4248   NM=$ac_ct_NM
4249 else
4250   NM="$ac_cv_prog_NM"
4251 fi
4252
4253 if test -n "$ac_tool_prefix"; then
4254   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4255 set dummy ${ac_tool_prefix}ar; ac_word=$2
4256 echo "$as_me:4256: checking for $ac_word" >&5
4257 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4258 if test "${ac_cv_prog_AR+set}" = set; then
4259   echo $ECHO_N "(cached) $ECHO_C" >&6
4260 else
4261   if test -n "$AR"; then
4262   ac_cv_prog_AR="$AR" # Let the user override the test.
4263 else
4264   ac_save_IFS=$IFS; IFS=$ac_path_separator
4265 ac_dummy="$PATH"
4266 for ac_dir in $ac_dummy; do
4267   IFS=$ac_save_IFS
4268   test -z "$ac_dir" && ac_dir=.
4269   $as_executable_p "$ac_dir/$ac_word" || continue
4270 ac_cv_prog_AR="${ac_tool_prefix}ar"
4271 echo "$as_me:4271: found $ac_dir/$ac_word" >&5
4272 break
4273 done
4274
4275 fi
4276 fi
4277 AR=$ac_cv_prog_AR
4278 if test -n "$AR"; then
4279   echo "$as_me:4279: result: $AR" >&5
4280 echo "${ECHO_T}$AR" >&6
4281 else
4282   echo "$as_me:4282: result: no" >&5
4283 echo "${ECHO_T}no" >&6
4284 fi
4285
4286 fi
4287 if test -z "$ac_cv_prog_AR"; then
4288   ac_ct_AR=$AR
4289   # Extract the first word of "ar", so it can be a program name with args.
4290 set dummy ar; ac_word=$2
4291 echo "$as_me:4291: checking for $ac_word" >&5
4292 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4293 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4294   echo $ECHO_N "(cached) $ECHO_C" >&6
4295 else
4296   if test -n "$ac_ct_AR"; then
4297   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4298 else
4299   ac_save_IFS=$IFS; IFS=$ac_path_separator
4300 ac_dummy="$PATH"
4301 for ac_dir in $ac_dummy; do
4302   IFS=$ac_save_IFS
4303   test -z "$ac_dir" && ac_dir=.
4304   $as_executable_p "$ac_dir/$ac_word" || continue
4305 ac_cv_prog_ac_ct_AR="ar"
4306 echo "$as_me:4306: found $ac_dir/$ac_word" >&5
4307 break
4308 done
4309
4310   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4311 fi
4312 fi
4313 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4314 if test -n "$ac_ct_AR"; then
4315   echo "$as_me:4315: result: $ac_ct_AR" >&5
4316 echo "${ECHO_T}$ac_ct_AR" >&6
4317 else
4318   echo "$as_me:4318: result: no" >&5
4319 echo "${ECHO_T}no" >&6
4320 fi
4321
4322   AR=$ac_ct_AR
4323 else
4324   AR="$ac_cv_prog_AR"
4325 fi
4326
4327 echo "$as_me:4327: checking for options to update archives" >&5
4328 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4329 if test "${cf_cv_ar_flags+set}" = set; then
4330   echo $ECHO_N "(cached) $ECHO_C" >&6
4331 else
4332
4333         cf_cv_ar_flags=unknown
4334         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4335         do
4336
4337                 # check if $ARFLAGS already contains this choice
4338                 if test "x$ARFLAGS" != "x" ; then
4339                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4340                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4341                                 cf_cv_ar_flags=
4342                                 break
4343                         fi
4344                 fi
4345
4346                 rm -f conftest.$ac_cv_objext
4347                 rm -f conftest.a
4348
4349                 cat >conftest.$ac_ext <<EOF
4350 #line 4350 "configure"
4351 int     testdata[3] = { 123, 456, 789 };
4352 EOF
4353                 if { (eval echo "$as_me:4353: \"$ac_compile\"") >&5
4354   (eval $ac_compile) 2>&5
4355   ac_status=$?
4356   echo "$as_me:4356: \$? = $ac_status" >&5
4357   (exit $ac_status); } ; then
4358                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4359                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4360                         if test -f conftest.a ; then
4361                                 cf_cv_ar_flags=$cf_ar_flags
4362                                 break
4363                         fi
4364                 else
4365                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4366
4367 echo "${as_me:-configure}:4367: testing cannot compile test-program ..." 1>&5
4368
4369                         break
4370                 fi
4371         done
4372         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4373
4374 fi
4375 echo "$as_me:4375: result: $cf_cv_ar_flags" >&5
4376 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4377
4378 if test -n "$ARFLAGS" ; then
4379         if test -n "$cf_cv_ar_flags" ; then
4380                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4381         fi
4382 else
4383         ARFLAGS=$cf_cv_ar_flags
4384 fi
4385
4386 echo "$as_me:4386: checking if you have specified an install-prefix" >&5
4387 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4388
4389 # Check whether --with-install-prefix or --without-install-prefix was given.
4390 if test "${with_install_prefix+set}" = set; then
4391   withval="$with_install_prefix"
4392   case "x$withval" in #(vi
4393         xyes|xno) #(vi
4394                 ;;
4395         *)      DESTDIR="$withval"
4396                 ;;
4397         esac
4398 fi;
4399 echo "$as_me:4399: result: $DESTDIR" >&5
4400 echo "${ECHO_T}$DESTDIR" >&6
4401
4402 ###############################################################################
4403
4404 # If we're cross-compiling, allow the user to override the tools and their
4405 # options.  The configure script is oriented toward identifying the host
4406 # compiler, etc., but we need a build compiler to generate parts of the source.
4407
4408 if test "$cross_compiling" = yes ; then
4409
4410         # defaults that we might want to override
4411         : ${BUILD_CFLAGS:=''}
4412         : ${BUILD_CPPFLAGS:=''}
4413         : ${BUILD_LDFLAGS:=''}
4414         : ${BUILD_LIBS:=''}
4415         : ${BUILD_EXEEXT:='$x'}
4416         : ${BUILD_OBJEXT:='o'}
4417
4418 # Check whether --with-build-cc or --without-build-cc was given.
4419 if test "${with_build_cc+set}" = set; then
4420   withval="$with_build_cc"
4421   BUILD_CC="$withval"
4422 else
4423   for ac_prog in gcc cc cl
4424 do
4425   # Extract the first word of "$ac_prog", so it can be a program name with args.
4426 set dummy $ac_prog; ac_word=$2
4427 echo "$as_me:4427: checking for $ac_word" >&5
4428 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4429 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4430   echo $ECHO_N "(cached) $ECHO_C" >&6
4431 else
4432   if test -n "$BUILD_CC"; then
4433   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4434 else
4435   ac_save_IFS=$IFS; IFS=$ac_path_separator
4436 ac_dummy="$PATH"
4437 for ac_dir in $ac_dummy; do
4438   IFS=$ac_save_IFS
4439   test -z "$ac_dir" && ac_dir=.
4440   $as_executable_p "$ac_dir/$ac_word" || continue
4441 ac_cv_prog_BUILD_CC="$ac_prog"
4442 echo "$as_me:4442: found $ac_dir/$ac_word" >&5
4443 break
4444 done
4445
4446 fi
4447 fi
4448 BUILD_CC=$ac_cv_prog_BUILD_CC
4449 if test -n "$BUILD_CC"; then
4450   echo "$as_me:4450: result: $BUILD_CC" >&5
4451 echo "${ECHO_T}$BUILD_CC" >&6
4452 else
4453   echo "$as_me:4453: result: no" >&5
4454 echo "${ECHO_T}no" >&6
4455 fi
4456
4457   test -n "$BUILD_CC" && break
4458 done
4459
4460 fi;
4461         echo "$as_me:4461: checking for native build C compiler" >&5
4462 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4463         echo "$as_me:4463: result: $BUILD_CC" >&5
4464 echo "${ECHO_T}$BUILD_CC" >&6
4465
4466         echo "$as_me:4466: checking for native build C preprocessor" >&5
4467 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4468
4469 # Check whether --with-build-cpp or --without-build-cpp was given.
4470 if test "${with_build_cpp+set}" = set; then
4471   withval="$with_build_cpp"
4472   BUILD_CPP="$withval"
4473 else
4474   BUILD_CPP='${BUILD_CC} -E'
4475 fi;
4476         echo "$as_me:4476: result: $BUILD_CPP" >&5
4477 echo "${ECHO_T}$BUILD_CPP" >&6
4478
4479         echo "$as_me:4479: checking for native build C flags" >&5
4480 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4481
4482 # Check whether --with-build-cflags or --without-build-cflags was given.
4483 if test "${with_build_cflags+set}" = set; then
4484   withval="$with_build_cflags"
4485   BUILD_CFLAGS="$withval"
4486 fi;
4487         echo "$as_me:4487: result: $BUILD_CFLAGS" >&5
4488 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4489
4490         echo "$as_me:4490: checking for native build C preprocessor-flags" >&5
4491 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4492
4493 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4494 if test "${with_build_cppflags+set}" = set; then
4495   withval="$with_build_cppflags"
4496   BUILD_CPPFLAGS="$withval"
4497 fi;
4498         echo "$as_me:4498: result: $BUILD_CPPFLAGS" >&5
4499 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4500
4501         echo "$as_me:4501: checking for native build linker-flags" >&5
4502 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4503
4504 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4505 if test "${with_build_ldflags+set}" = set; then
4506   withval="$with_build_ldflags"
4507   BUILD_LDFLAGS="$withval"
4508 fi;
4509         echo "$as_me:4509: result: $BUILD_LDFLAGS" >&5
4510 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4511
4512         echo "$as_me:4512: checking for native build linker-libraries" >&5
4513 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4514
4515 # Check whether --with-build-libs or --without-build-libs was given.
4516 if test "${with_build_libs+set}" = set; then
4517   withval="$with_build_libs"
4518   BUILD_LIBS="$withval"
4519 fi;
4520         echo "$as_me:4520: result: $BUILD_LIBS" >&5
4521 echo "${ECHO_T}$BUILD_LIBS" >&6
4522
4523         # this assumes we're on Unix.
4524         BUILD_EXEEXT=
4525         BUILD_OBJEXT=o
4526
4527         : ${BUILD_CC:='${CC}'}
4528
4529         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4530                 { { echo "$as_me:4530: error: Cross-build requires two compilers.
4531 Use --with-build-cc to specify the native compiler." >&5
4532 echo "$as_me: error: Cross-build requires two compilers.
4533 Use --with-build-cc to specify the native compiler." >&2;}
4534    { (exit 1); exit 1; }; }
4535         fi
4536
4537 else
4538         : ${BUILD_CC:='${CC}'}
4539         : ${BUILD_CPP:='${CPP}'}
4540         : ${BUILD_CFLAGS:='${CFLAGS}'}
4541         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4542         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4543         : ${BUILD_LIBS:='${LIBS}'}
4544         : ${BUILD_EXEEXT:='$x'}
4545         : ${BUILD_OBJEXT:='o'}
4546 fi
4547
4548 ###############################################################################
4549
4550 ### Options to allow the user to specify the set of libraries which are used.
4551 ### Use "--without-normal --with-shared" to allow the default model to be
4552 ### shared, for example.
4553 cf_list_models=""
4554
4555 echo "$as_me:4555: checking if libtool -version-number should be used" >&5
4556 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4557
4558 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4559 if test "${enable_libtool_version+set}" = set; then
4560   enableval="$enable_libtool_version"
4561   test "$enableval" != no && enableval=yes
4562   if test "$enableval" != "yes" ; then
4563     cf_libtool_version=no
4564   else
4565     cf_libtool_version=yes
4566   fi
4567 else
4568   enableval=yes
4569   cf_libtool_version=yes
4570
4571 fi;
4572 echo "$as_me:4572: result: $cf_libtool_version" >&5
4573 echo "${ECHO_T}$cf_libtool_version" >&6
4574
4575 if test "$cf_libtool_version" = yes ; then
4576         LIBTOOL_VERSION="-version-number"
4577 else
4578         LIBTOOL_VERSION="-version-info"
4579         case "x$VERSION" in #(vi
4580         x) #(vi
4581                 { echo "$as_me:4581: WARNING: VERSION was not set" >&5
4582 echo "$as_me: WARNING: VERSION was not set" >&2;}
4583                 ;;
4584         x*.*.*)
4585                 ABI_VERSION="$VERSION"
4586                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4587
4588 echo "${as_me:-configure}:4588: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4589
4590                 ;;
4591         x*:*:*)
4592                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4593                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4594
4595 echo "${as_me:-configure}:4595: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4596
4597                 ;;
4598         *)
4599                 { echo "$as_me:4599: WARNING: unexpected VERSION value: $VERSION" >&5
4600 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4601                 ;;
4602         esac
4603 fi
4604
4605 LIBTOOL=
4606
4607 # common library maintenance symbols that are convenient for libtool scripts:
4608 LIB_CREATE='${AR} -cr'
4609 LIB_OBJECT='${OBJECTS}'
4610 LIB_SUFFIX=.a
4611 LIB_PREP="$RANLIB"
4612
4613 # symbols used to prop libtool up to enable it to determine what it should be
4614 # doing:
4615 LIB_CLEAN=
4616 LIB_COMPILE=
4617 LIB_LINK='${CC}'
4618 LIB_INSTALL=
4619 LIB_UNINSTALL=
4620
4621 echo "$as_me:4621: checking if you want to build libraries with libtool" >&5
4622 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4623
4624 # Check whether --with-libtool or --without-libtool was given.
4625 if test "${with_libtool+set}" = set; then
4626   withval="$with_libtool"
4627   with_libtool=$withval
4628 else
4629   with_libtool=no
4630 fi;
4631 echo "$as_me:4631: result: $with_libtool" >&5
4632 echo "${ECHO_T}$with_libtool" >&6
4633 if test "$with_libtool" != "no"; then
4634
4635         if test "$with_libtool" != "yes" ; then
4636
4637 if test "x$prefix" != xNONE; then
4638   cf_path_syntax="$prefix"
4639 else
4640   cf_path_syntax="$ac_default_prefix"
4641 fi
4642
4643 case ".$with_libtool" in #(vi
4644 .\$\(*\)*|.\'*\'*) #(vi
4645   ;;
4646 ..|./*|.\\*) #(vi
4647   ;;
4648 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4649   ;;
4650 .\${*prefix}*|.\${*dir}*) #(vi
4651   eval with_libtool="$with_libtool"
4652   case ".$with_libtool" in #(vi
4653   .NONE/*)
4654     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4655     ;;
4656   esac
4657   ;; #(vi
4658 .no|.NONE/*)
4659   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4660   ;;
4661 *)
4662   { { echo "$as_me:4662: error: expected a pathname, not \"$with_libtool\"" >&5
4663 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4664    { (exit 1); exit 1; }; }
4665   ;;
4666 esac
4667
4668                 LIBTOOL=$with_libtool
4669         else
4670                 if test -n "$ac_tool_prefix"; then
4671   for ac_prog in libtool glibtool
4672   do
4673     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4674 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4675 echo "$as_me:4675: checking for $ac_word" >&5
4676 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4677 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4678   echo $ECHO_N "(cached) $ECHO_C" >&6
4679 else
4680   if test -n "$LIBTOOL"; then
4681   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4682 else
4683   ac_save_IFS=$IFS; IFS=$ac_path_separator
4684 ac_dummy="$PATH"
4685 for ac_dir in $ac_dummy; do
4686   IFS=$ac_save_IFS
4687   test -z "$ac_dir" && ac_dir=.
4688   $as_executable_p "$ac_dir/$ac_word" || continue
4689 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4690 echo "$as_me:4690: found $ac_dir/$ac_word" >&5
4691 break
4692 done
4693
4694 fi
4695 fi
4696 LIBTOOL=$ac_cv_prog_LIBTOOL
4697 if test -n "$LIBTOOL"; then
4698   echo "$as_me:4698: result: $LIBTOOL" >&5
4699 echo "${ECHO_T}$LIBTOOL" >&6
4700 else
4701   echo "$as_me:4701: result: no" >&5
4702 echo "${ECHO_T}no" >&6
4703 fi
4704
4705     test -n "$LIBTOOL" && break
4706   done
4707 fi
4708 if test -z "$LIBTOOL"; then
4709   ac_ct_LIBTOOL=$LIBTOOL
4710   for ac_prog in libtool glibtool
4711 do
4712   # Extract the first word of "$ac_prog", so it can be a program name with args.
4713 set dummy $ac_prog; ac_word=$2
4714 echo "$as_me:4714: checking for $ac_word" >&5
4715 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4716 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4717   echo $ECHO_N "(cached) $ECHO_C" >&6
4718 else
4719   if test -n "$ac_ct_LIBTOOL"; then
4720   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4721 else
4722   ac_save_IFS=$IFS; IFS=$ac_path_separator
4723 ac_dummy="$PATH"
4724 for ac_dir in $ac_dummy; do
4725   IFS=$ac_save_IFS
4726   test -z "$ac_dir" && ac_dir=.
4727   $as_executable_p "$ac_dir/$ac_word" || continue
4728 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4729 echo "$as_me:4729: found $ac_dir/$ac_word" >&5
4730 break
4731 done
4732
4733 fi
4734 fi
4735 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4736 if test -n "$ac_ct_LIBTOOL"; then
4737   echo "$as_me:4737: result: $ac_ct_LIBTOOL" >&5
4738 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4739 else
4740   echo "$as_me:4740: result: no" >&5
4741 echo "${ECHO_T}no" >&6
4742 fi
4743
4744   test -n "$ac_ct_LIBTOOL" && break
4745 done
4746 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4747
4748   LIBTOOL=$ac_ct_LIBTOOL
4749 fi
4750
4751 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4752 then
4753         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.].*//'`
4754 else
4755         cf_cv_libtool_version=
4756 fi
4757 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4758
4759                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4760                 then
4761
4762 unset ac_cv_prog_ac_ct_LIBTOOL
4763 unset ac_ct_LIBTOOL
4764 unset LIBTOOL
4765
4766                         if test -n "$ac_tool_prefix"; then
4767   for ac_prog in glibtool
4768   do
4769     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4770 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4771 echo "$as_me:4771: checking for $ac_word" >&5
4772 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4773 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4774   echo $ECHO_N "(cached) $ECHO_C" >&6
4775 else
4776   if test -n "$LIBTOOL"; then
4777   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4778 else
4779   ac_save_IFS=$IFS; IFS=$ac_path_separator
4780 ac_dummy="$PATH"
4781 for ac_dir in $ac_dummy; do
4782   IFS=$ac_save_IFS
4783   test -z "$ac_dir" && ac_dir=.
4784   $as_executable_p "$ac_dir/$ac_word" || continue
4785 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4786 echo "$as_me:4786: found $ac_dir/$ac_word" >&5
4787 break
4788 done
4789
4790 fi
4791 fi
4792 LIBTOOL=$ac_cv_prog_LIBTOOL
4793 if test -n "$LIBTOOL"; then
4794   echo "$as_me:4794: result: $LIBTOOL" >&5
4795 echo "${ECHO_T}$LIBTOOL" >&6
4796 else
4797   echo "$as_me:4797: result: no" >&5
4798 echo "${ECHO_T}no" >&6
4799 fi
4800
4801     test -n "$LIBTOOL" && break
4802   done
4803 fi
4804 if test -z "$LIBTOOL"; then
4805   ac_ct_LIBTOOL=$LIBTOOL
4806   for ac_prog in glibtool
4807 do
4808   # Extract the first word of "$ac_prog", so it can be a program name with args.
4809 set dummy $ac_prog; ac_word=$2
4810 echo "$as_me:4810: checking for $ac_word" >&5
4811 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4812 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4813   echo $ECHO_N "(cached) $ECHO_C" >&6
4814 else
4815   if test -n "$ac_ct_LIBTOOL"; then
4816   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4817 else
4818   ac_save_IFS=$IFS; IFS=$ac_path_separator
4819 ac_dummy="$PATH"
4820 for ac_dir in $ac_dummy; do
4821   IFS=$ac_save_IFS
4822   test -z "$ac_dir" && ac_dir=.
4823   $as_executable_p "$ac_dir/$ac_word" || continue
4824 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4825 echo "$as_me:4825: found $ac_dir/$ac_word" >&5
4826 break
4827 done
4828
4829 fi
4830 fi
4831 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4832 if test -n "$ac_ct_LIBTOOL"; then
4833   echo "$as_me:4833: result: $ac_ct_LIBTOOL" >&5
4834 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4835 else
4836   echo "$as_me:4836: result: no" >&5
4837 echo "${ECHO_T}no" >&6
4838 fi
4839
4840   test -n "$ac_ct_LIBTOOL" && break
4841 done
4842 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4843
4844   LIBTOOL=$ac_ct_LIBTOOL
4845 fi
4846
4847 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4848 then
4849         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.].*//'`
4850 else
4851         cf_cv_libtool_version=
4852 fi
4853 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4854
4855                 fi
4856         fi
4857         if test -z "$LIBTOOL" ; then
4858                 { { echo "$as_me:4858: error: Cannot find libtool" >&5
4859 echo "$as_me: error: Cannot find libtool" >&2;}
4860    { (exit 1); exit 1; }; }
4861         fi
4862         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4863         LIB_OBJECT='${OBJECTS:.o=.lo}'
4864         LIB_SUFFIX=.la
4865         LIB_CLEAN='${LIBTOOL} --mode=clean'
4866         LIB_COMPILE='${LIBTOOL} --mode=compile'
4867         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4868         LIB_INSTALL='${LIBTOOL} --mode=install'
4869         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4870         LIB_PREP=:
4871
4872 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4873 then
4874         echo "$as_me:4874: checking version of $LIBTOOL" >&5
4875 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4876
4877 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4878 then
4879         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.].*//'`
4880 else
4881         cf_cv_libtool_version=
4882 fi
4883 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4884
4885         echo "$as_me:4885: result: $cf_cv_libtool_version" >&5
4886 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4887         if test -z "$cf_cv_libtool_version" ; then
4888                 { { echo "$as_me:4888: error: This is not GNU libtool" >&5
4889 echo "$as_me: error: This is not GNU libtool" >&2;}
4890    { (exit 1); exit 1; }; }
4891         fi
4892 else
4893         { { echo "$as_me:4893: error: GNU libtool has not been found" >&5
4894 echo "$as_me: error: GNU libtool has not been found" >&2;}
4895    { (exit 1); exit 1; }; }
4896 fi
4897
4898         # special hack to add -no-undefined (which libtool should do for itself)
4899         LT_UNDEF=
4900         case "$cf_cv_system_name" in #(vi
4901         cygwin*|msys*|mingw32*|uwin*|aix[4-7]) #(vi
4902                 LT_UNDEF=-no-undefined
4903                 ;;
4904         esac
4905
4906         # special hack to add --tag option for C++ compiler
4907         case $cf_cv_libtool_version in #(vi
4908         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4909                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4910                 LIBTOOL="$LIBTOOL --tag=CC"
4911                 ;;
4912         *)
4913                 LIBTOOL_CXX="$LIBTOOL"
4914                 ;;
4915         esac
4916 else
4917         LIBTOOL=""
4918         LIBTOOL_CXX=""
4919 fi
4920
4921 test -z "$LIBTOOL" && ECHO_LT=
4922
4923 if test "$with_libtool" != "no" ; then
4924
4925 cf_list_models="$cf_list_models libtool"
4926
4927 else
4928
4929 echo "$as_me:4929: checking if you want to build shared libraries" >&5
4930 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4931
4932 # Check whether --with-shared or --without-shared was given.
4933 if test "${with_shared+set}" = set; then
4934   withval="$with_shared"
4935   with_shared=$withval
4936 else
4937   with_shared=no
4938 fi;
4939 echo "$as_me:4939: result: $with_shared" >&5
4940 echo "${ECHO_T}$with_shared" >&6
4941 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4942
4943 echo "$as_me:4943: checking if you want to build static libraries" >&5
4944 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4945
4946 # Check whether --with-normal or --without-normal was given.
4947 if test "${with_normal+set}" = set; then
4948   withval="$with_normal"
4949   with_normal=$withval
4950 else
4951   with_normal=yes
4952 fi;
4953 echo "$as_me:4953: result: $with_normal" >&5
4954 echo "${ECHO_T}$with_normal" >&6
4955 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4956
4957 echo "$as_me:4957: checking if you want to build debug libraries" >&5
4958 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4959
4960 # Check whether --with-debug or --without-debug was given.
4961 if test "${with_debug+set}" = set; then
4962   withval="$with_debug"
4963   with_debug=$withval
4964 else
4965   with_debug=yes
4966 fi;
4967 echo "$as_me:4967: result: $with_debug" >&5
4968 echo "${ECHO_T}$with_debug" >&6
4969 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4970
4971 echo "$as_me:4971: checking if you want to build profiling libraries" >&5
4972 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4973
4974 # Check whether --with-profile or --without-profile was given.
4975 if test "${with_profile+set}" = set; then
4976   withval="$with_profile"
4977   with_profile=$withval
4978 else
4979   with_profile=no
4980 fi;
4981 echo "$as_me:4981: result: $with_profile" >&5
4982 echo "${ECHO_T}$with_profile" >&6
4983 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4984
4985 fi
4986
4987 if test "X$cf_with_cxx_binding" != Xno; then
4988 if test "x$with_shared" = "xyes"; then
4989 echo "$as_me:4989: checking if you want to build C++ shared libraries" >&5
4990 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
4991
4992 # Check whether --with-cxx-shared or --without-cxx-shared was given.
4993 if test "${with_cxx_shared+set}" = set; then
4994   withval="$with_cxx_shared"
4995   with_shared_cxx=$withval
4996 else
4997   with_shared_cxx=no
4998 fi;
4999 echo "$as_me:4999: result: $with_shared_cxx" >&5
5000 echo "${ECHO_T}$with_shared_cxx" >&6
5001 fi
5002 fi
5003
5004 ###############################################################################
5005
5006 echo "$as_me:5006: checking for specified models" >&5
5007 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5008 test -z "$cf_list_models" && cf_list_models=normal
5009 test "$with_libtool" != "no" && cf_list_models=libtool
5010 echo "$as_me:5010: result: $cf_list_models" >&5
5011 echo "${ECHO_T}$cf_list_models" >&6
5012
5013 ### Use the first model as the default, and save its suffix for use in building
5014 ### up test-applications.
5015 echo "$as_me:5015: checking for default model" >&5
5016 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5017 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5018 echo "$as_me:5018: result: $DFT_LWR_MODEL" >&5
5019 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5020
5021 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5022
5023 TICS_NAME=tic
5024
5025 TINFO_NAME=tinfo
5026
5027 LIB_NAME=ncurses
5028
5029 LIB_DIR=../lib
5030 LIB_2ND=../../lib
5031
5032 echo "$as_me:5032: checking if you want to have a library-prefix" >&5
5033 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5034
5035 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5036 if test "${with_lib_prefix+set}" = set; then
5037   withval="$with_lib_prefix"
5038   with_lib_prefix=$withval
5039 else
5040   with_lib_prefix=auto
5041 fi;
5042 echo "$as_me:5042: result: $with_lib_prefix" >&5
5043 echo "${ECHO_T}$with_lib_prefix" >&6
5044
5045 if test $with_lib_prefix = auto
5046 then
5047
5048         case $cf_cv_system_name in #(vi
5049         OS/2*|os2*) #(vi
5050         LIB_PREFIX=''
5051         ;;
5052         *)      LIB_PREFIX='lib'
5053         ;;
5054         esac
5055 cf_prefix=$LIB_PREFIX
5056
5057 elif test $with_lib_prefix = no
5058 then
5059         LIB_PREFIX=
5060 else
5061         LIB_PREFIX=$with_lib_prefix
5062 fi
5063
5064 LIB_SUFFIX=
5065
5066         echo "$as_me:5066: checking for PATH separator" >&5
5067 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5068         case $cf_cv_system_name in
5069         os2*)   PATH_SEPARATOR=';'  ;;
5070         *)      ${PATH_SEPARATOR:=':'}  ;;
5071         esac
5072
5073         echo "$as_me:5073: result: $PATH_SEPARATOR" >&5
5074 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5075
5076 ###############################################################################
5077
5078 echo "$as_me:5078: checking if you want to build a separate terminfo library" >&5
5079 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5080
5081 # Check whether --with-termlib or --without-termlib was given.
5082 if test "${with_termlib+set}" = set; then
5083   withval="$with_termlib"
5084   with_termlib=$withval
5085 else
5086   with_termlib=no
5087 fi;
5088 echo "$as_me:5088: result: $with_termlib" >&5
5089 echo "${ECHO_T}$with_termlib" >&6
5090
5091 echo "$as_me:5091: checking if you want to build a separate tic library" >&5
5092 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5093
5094 # Check whether --with-ticlib or --without-ticlib was given.
5095 if test "${with_ticlib+set}" = set; then
5096   withval="$with_ticlib"
5097   with_ticlib=$withval
5098 else
5099   with_ticlib=no
5100 fi;
5101 echo "$as_me:5101: result: $with_ticlib" >&5
5102 echo "${ECHO_T}$with_ticlib" >&6
5103
5104 ### Checks for special libraries, must be done up-front.
5105 SHLIB_LIST=""
5106
5107 echo "$as_me:5107: checking if you want to link with the GPM mouse library" >&5
5108 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5109
5110 # Check whether --with-gpm or --without-gpm was given.
5111 if test "${with_gpm+set}" = set; then
5112   withval="$with_gpm"
5113   with_gpm=$withval
5114 else
5115   with_gpm=maybe
5116 fi;
5117 echo "$as_me:5117: result: $with_gpm" >&5
5118 echo "${ECHO_T}$with_gpm" >&6
5119
5120 if test "$with_gpm" != no ; then
5121         echo "$as_me:5121: checking for gpm.h" >&5
5122 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5123 if test "${ac_cv_header_gpm_h+set}" = set; then
5124   echo $ECHO_N "(cached) $ECHO_C" >&6
5125 else
5126   cat >conftest.$ac_ext <<_ACEOF
5127 #line 5127 "configure"
5128 #include "confdefs.h"
5129 #include <gpm.h>
5130 _ACEOF
5131 if { (eval echo "$as_me:5131: \"$ac_cpp conftest.$ac_ext\"") >&5
5132   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5133   ac_status=$?
5134   egrep -v '^ *\+' conftest.er1 >conftest.err
5135   rm -f conftest.er1
5136   cat conftest.err >&5
5137   echo "$as_me:5137: \$? = $ac_status" >&5
5138   (exit $ac_status); } >/dev/null; then
5139   if test -s conftest.err; then
5140     ac_cpp_err=$ac_c_preproc_warn_flag
5141   else
5142     ac_cpp_err=
5143   fi
5144 else
5145   ac_cpp_err=yes
5146 fi
5147 if test -z "$ac_cpp_err"; then
5148   ac_cv_header_gpm_h=yes
5149 else
5150   echo "$as_me: failed program was:" >&5
5151   cat conftest.$ac_ext >&5
5152   ac_cv_header_gpm_h=no
5153 fi
5154 rm -f conftest.err conftest.$ac_ext
5155 fi
5156 echo "$as_me:5156: result: $ac_cv_header_gpm_h" >&5
5157 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5158 if test $ac_cv_header_gpm_h = yes; then
5159
5160 cat >>confdefs.h <<\EOF
5161 #define HAVE_GPM_H 1
5162 EOF
5163
5164                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5165                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5166
5167 echo "${as_me:-configure}:5167: testing assuming we really have GPM library ..." 1>&5
5168
5169 cat >>confdefs.h <<\EOF
5170 #define HAVE_LIBGPM 1
5171 EOF
5172
5173                 else
5174                         echo "$as_me:5174: checking for Gpm_Open in -lgpm" >&5
5175 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5176 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5177   echo $ECHO_N "(cached) $ECHO_C" >&6
5178 else
5179   ac_check_lib_save_LIBS=$LIBS
5180 LIBS="-lgpm  $LIBS"
5181 cat >conftest.$ac_ext <<_ACEOF
5182 #line 5182 "configure"
5183 #include "confdefs.h"
5184
5185 /* Override any gcc2 internal prototype to avoid an error.  */
5186 #ifdef __cplusplus
5187 extern "C"
5188 #endif
5189 /* We use char because int might match the return type of a gcc2
5190    builtin and then its argument prototype would still apply.  */
5191 char Gpm_Open ();
5192 int
5193 main ()
5194 {
5195 Gpm_Open ();
5196   ;
5197   return 0;
5198 }
5199 _ACEOF
5200 rm -f conftest.$ac_objext conftest$ac_exeext
5201 if { (eval echo "$as_me:5201: \"$ac_link\"") >&5
5202   (eval $ac_link) 2>&5
5203   ac_status=$?
5204   echo "$as_me:5204: \$? = $ac_status" >&5
5205   (exit $ac_status); } &&
5206          { ac_try='test -s conftest$ac_exeext'
5207   { (eval echo "$as_me:5207: \"$ac_try\"") >&5
5208   (eval $ac_try) 2>&5
5209   ac_status=$?
5210   echo "$as_me:5210: \$? = $ac_status" >&5
5211   (exit $ac_status); }; }; then
5212   ac_cv_lib_gpm_Gpm_Open=yes
5213 else
5214   echo "$as_me: failed program was:" >&5
5215 cat conftest.$ac_ext >&5
5216 ac_cv_lib_gpm_Gpm_Open=no
5217 fi
5218 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5219 LIBS=$ac_check_lib_save_LIBS
5220 fi
5221 echo "$as_me:5221: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5222 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5223 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5224   :
5225 else
5226
5227                                 { { echo "$as_me:5227: error: Cannot link with GPM library" >&5
5228 echo "$as_me: error: Cannot link with GPM library" >&2;}
5229    { (exit 1); exit 1; }; }
5230                 fi
5231                 with_gpm=yes
5232
5233 fi
5234
5235 else
5236
5237                 test "$with_gpm" != maybe && { echo "$as_me:5237: WARNING: Cannot find GPM header" >&5
5238 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5239                 with_gpm=no
5240
5241 fi
5242
5243 fi
5244
5245 if test "$with_gpm" != no ; then
5246         echo "$as_me:5246: checking if you want to load GPM dynamically" >&5
5247 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5248
5249 # Check whether --with-dlsym or --without-dlsym was given.
5250 if test "${with_dlsym+set}" = set; then
5251   withval="$with_dlsym"
5252   with_dlsym=$withval
5253 else
5254   with_dlsym=yes
5255 fi;
5256         echo "$as_me:5256: result: $with_dlsym" >&5
5257 echo "${ECHO_T}$with_dlsym" >&6
5258         if test "x$with_dlsym" = xyes ; then
5259
5260 cf_have_dlsym=no
5261 echo "$as_me:5261: checking for dlsym" >&5
5262 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5263 if test "${ac_cv_func_dlsym+set}" = set; then
5264   echo $ECHO_N "(cached) $ECHO_C" >&6
5265 else
5266   cat >conftest.$ac_ext <<_ACEOF
5267 #line 5267 "configure"
5268 #include "confdefs.h"
5269 /* System header to define __stub macros and hopefully few prototypes,
5270     which can conflict with char dlsym (); below.  */
5271 #include <assert.h>
5272 /* Override any gcc2 internal prototype to avoid an error.  */
5273 #ifdef __cplusplus
5274 extern "C"
5275 #endif
5276 /* We use char because int might match the return type of a gcc2
5277    builtin and then its argument prototype would still apply.  */
5278 char dlsym ();
5279 char (*f) ();
5280
5281 int
5282 main ()
5283 {
5284 /* The GNU C library defines this for functions which it implements
5285     to always fail with ENOSYS.  Some functions are actually named
5286     something starting with __ and the normal name is an alias.  */
5287 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5288 choke me
5289 #else
5290 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5291 #endif
5292
5293   ;
5294   return 0;
5295 }
5296 _ACEOF
5297 rm -f conftest.$ac_objext conftest$ac_exeext
5298 if { (eval echo "$as_me:5298: \"$ac_link\"") >&5
5299   (eval $ac_link) 2>&5
5300   ac_status=$?
5301   echo "$as_me:5301: \$? = $ac_status" >&5
5302   (exit $ac_status); } &&
5303          { ac_try='test -s conftest$ac_exeext'
5304   { (eval echo "$as_me:5304: \"$ac_try\"") >&5
5305   (eval $ac_try) 2>&5
5306   ac_status=$?
5307   echo "$as_me:5307: \$? = $ac_status" >&5
5308   (exit $ac_status); }; }; then
5309   ac_cv_func_dlsym=yes
5310 else
5311   echo "$as_me: failed program was:" >&5
5312 cat conftest.$ac_ext >&5
5313 ac_cv_func_dlsym=no
5314 fi
5315 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5316 fi
5317 echo "$as_me:5317: result: $ac_cv_func_dlsym" >&5
5318 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5319 if test $ac_cv_func_dlsym = yes; then
5320   cf_have_dlsym=yes
5321 else
5322
5323 cf_have_libdl=no
5324 echo "$as_me:5324: checking for dlsym in -ldl" >&5
5325 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5326 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5327   echo $ECHO_N "(cached) $ECHO_C" >&6
5328 else
5329   ac_check_lib_save_LIBS=$LIBS
5330 LIBS="-ldl  $LIBS"
5331 cat >conftest.$ac_ext <<_ACEOF
5332 #line 5332 "configure"
5333 #include "confdefs.h"
5334
5335 /* Override any gcc2 internal prototype to avoid an error.  */
5336 #ifdef __cplusplus
5337 extern "C"
5338 #endif
5339 /* We use char because int might match the return type of a gcc2
5340    builtin and then its argument prototype would still apply.  */
5341 char dlsym ();
5342 int
5343 main ()
5344 {
5345 dlsym ();
5346   ;
5347   return 0;
5348 }
5349 _ACEOF
5350 rm -f conftest.$ac_objext conftest$ac_exeext
5351 if { (eval echo "$as_me:5351: \"$ac_link\"") >&5
5352   (eval $ac_link) 2>&5
5353   ac_status=$?
5354   echo "$as_me:5354: \$? = $ac_status" >&5
5355   (exit $ac_status); } &&
5356          { ac_try='test -s conftest$ac_exeext'
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   ac_cv_lib_dl_dlsym=yes
5363 else
5364   echo "$as_me: failed program was:" >&5
5365 cat conftest.$ac_ext >&5
5366 ac_cv_lib_dl_dlsym=no
5367 fi
5368 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5369 LIBS=$ac_check_lib_save_LIBS
5370 fi
5371 echo "$as_me:5371: result: $ac_cv_lib_dl_dlsym" >&5
5372 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5373 if test $ac_cv_lib_dl_dlsym = yes; then
5374
5375         cf_have_dlsym=yes
5376         cf_have_libdl=yes
5377 fi
5378
5379 fi
5380
5381 if test "$cf_have_dlsym" = yes ; then
5382         test "$cf_have_libdl" = yes &&
5383 cf_add_libs="-ldl"
5384 # Filter out duplicates - this happens with badly-designed ".pc" files...
5385 for cf_add_1lib in $LIBS
5386 do
5387         for cf_add_2lib in $cf_add_libs
5388         do
5389                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5390                 then
5391                         cf_add_1lib=
5392                         break
5393                 fi
5394         done
5395         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5396 done
5397 LIBS="$cf_add_libs"
5398
5399         echo "$as_me:5399: checking whether able to link to dl*() functions" >&5
5400 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5401         cat >conftest.$ac_ext <<_ACEOF
5402 #line 5402 "configure"
5403 #include "confdefs.h"
5404 #include <dlfcn.h>
5405 int
5406 main ()
5407 {
5408
5409                 void *obj;
5410                 if ((obj = dlopen("filename", 0)) != 0) {
5411                         if (dlsym(obj, "symbolname") == 0) {
5412                         dlclose(obj);
5413                         }
5414                 }
5415   ;
5416   return 0;
5417 }
5418 _ACEOF
5419 rm -f conftest.$ac_objext conftest$ac_exeext
5420 if { (eval echo "$as_me:5420: \"$ac_link\"") >&5
5421   (eval $ac_link) 2>&5
5422   ac_status=$?
5423   echo "$as_me:5423: \$? = $ac_status" >&5
5424   (exit $ac_status); } &&
5425          { ac_try='test -s conftest$ac_exeext'
5426   { (eval echo "$as_me:5426: \"$ac_try\"") >&5
5427   (eval $ac_try) 2>&5
5428   ac_status=$?
5429   echo "$as_me:5429: \$? = $ac_status" >&5
5430   (exit $ac_status); }; }; then
5431
5432 cat >>confdefs.h <<\EOF
5433 #define HAVE_LIBDL 1
5434 EOF
5435
5436 else
5437   echo "$as_me: failed program was:" >&5
5438 cat conftest.$ac_ext >&5
5439
5440                 { { echo "$as_me:5440: error: Cannot link test program for libdl" >&5
5441 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5442    { (exit 1); exit 1; }; }
5443 fi
5444 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5445         echo "$as_me:5445: result: ok" >&5
5446 echo "${ECHO_T}ok" >&6
5447 else
5448         { { echo "$as_me:5448: error: Cannot find dlsym function" >&5
5449 echo "$as_me: error: Cannot find dlsym function" >&2;}
5450    { (exit 1); exit 1; }; }
5451 fi
5452
5453                 if test "x$with_gpm" != xyes ; then
5454                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5455
5456 echo "${as_me:-configure}:5456: testing assuming soname for gpm is $with_gpm ..." 1>&5
5457
5458                         cf_cv_gpm_soname="$with_gpm"
5459                 else
5460
5461 echo "$as_me:5461: checking for soname of gpm library" >&5
5462 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5463 if test "${cf_cv_gpm_soname+set}" = set; then
5464   echo $ECHO_N "(cached) $ECHO_C" >&6
5465 else
5466
5467 cf_cv_gpm_soname=unknown
5468 if test "$cross_compiling" != yes ; then
5469 cat >conftest.$ac_ext <<CF_EOF
5470 #include <gpm.h>
5471 int main()
5472 {
5473 if (Gpm_Open(0,0)) Gpm_Close();
5474         ${cf_cv_main_return:-return}(0);
5475 }
5476 CF_EOF
5477 cf_save_LIBS="$LIBS"
5478
5479 cf_add_libs="-lgpm"
5480 # Filter out duplicates - this happens with badly-designed ".pc" files...
5481 for cf_add_1lib in $LIBS
5482 do
5483         for cf_add_2lib in $cf_add_libs
5484         do
5485                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5486                 then
5487                         cf_add_1lib=
5488                         break
5489                 fi
5490         done
5491         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5492 done
5493 LIBS="$cf_add_libs"
5494
5495         if { (eval echo "$as_me:5495: \"$ac_compile\"") >&5
5496   (eval $ac_compile) 2>&5
5497   ac_status=$?
5498   echo "$as_me:5498: \$? = $ac_status" >&5
5499   (exit $ac_status); } ; then
5500                 if { (eval echo "$as_me:5500: \"$ac_link\"") >&5
5501   (eval $ac_link) 2>&5
5502   ac_status=$?
5503   echo "$as_me:5503: \$? = $ac_status" >&5
5504   (exit $ac_status); } ; then
5505                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5506                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5507                 fi
5508         fi
5509 rm -rf conftest*
5510 LIBS="$cf_save_LIBS"
5511 fi
5512
5513 fi
5514 echo "$as_me:5514: result: $cf_cv_gpm_soname" >&5
5515 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5516
5517                 fi
5518                 test "$cf_cv_gpm_soname" != "unknown" &&
5519 cat >>confdefs.h <<EOF
5520 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5521 EOF
5522
5523                 SHLIB_LIST="-ldl $SHLIB_LIST"
5524         else
5525                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5526
5527 cf_add_libs="-lgpm"
5528 # Filter out duplicates - this happens with badly-designed ".pc" files...
5529 for cf_add_1lib in $TEST_LIBS
5530 do
5531         for cf_add_2lib in $cf_add_libs
5532         do
5533                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5534                 then
5535                         cf_add_1lib=
5536                         break
5537                 fi
5538         done
5539         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5540 done
5541 TEST_LIBS="$cf_add_libs"
5542
5543         fi
5544
5545 cat >>confdefs.h <<\EOF
5546 #define HAVE_LIBGPM 1
5547 EOF
5548
5549 echo "$as_me:5549: checking for Gpm_Wgetch in -lgpm" >&5
5550 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5551 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5552   echo $ECHO_N "(cached) $ECHO_C" >&6
5553 else
5554   ac_check_lib_save_LIBS=$LIBS
5555 LIBS="-lgpm  $LIBS"
5556 cat >conftest.$ac_ext <<_ACEOF
5557 #line 5557 "configure"
5558 #include "confdefs.h"
5559
5560 /* Override any gcc2 internal prototype to avoid an error.  */
5561 #ifdef __cplusplus
5562 extern "C"
5563 #endif
5564 /* We use char because int might match the return type of a gcc2
5565    builtin and then its argument prototype would still apply.  */
5566 char Gpm_Wgetch ();
5567 int
5568 main ()
5569 {
5570 Gpm_Wgetch ();
5571   ;
5572   return 0;
5573 }
5574 _ACEOF
5575 rm -f conftest.$ac_objext conftest$ac_exeext
5576 if { (eval echo "$as_me:5576: \"$ac_link\"") >&5
5577   (eval $ac_link) 2>&5
5578   ac_status=$?
5579   echo "$as_me:5579: \$? = $ac_status" >&5
5580   (exit $ac_status); } &&
5581          { ac_try='test -s conftest$ac_exeext'
5582   { (eval echo "$as_me:5582: \"$ac_try\"") >&5
5583   (eval $ac_try) 2>&5
5584   ac_status=$?
5585   echo "$as_me:5585: \$? = $ac_status" >&5
5586   (exit $ac_status); }; }; then
5587   ac_cv_lib_gpm_Gpm_Wgetch=yes
5588 else
5589   echo "$as_me: failed program was:" >&5
5590 cat conftest.$ac_ext >&5
5591 ac_cv_lib_gpm_Gpm_Wgetch=no
5592 fi
5593 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5594 LIBS=$ac_check_lib_save_LIBS
5595 fi
5596 echo "$as_me:5596: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5597 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5598 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5599
5600 echo "$as_me:5600: checking if GPM is weakly bound to curses library" >&5
5601 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5602 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5603   echo $ECHO_N "(cached) $ECHO_C" >&6
5604 else
5605
5606 cf_cv_check_gpm_wgetch=unknown
5607 if test "$cross_compiling" != yes ; then
5608
5609 cat >conftest.$ac_ext <<CF_EOF
5610 #include <gpm.h>
5611 int main()
5612 {
5613         Gpm_Wgetch();
5614         ${cf_cv_main_return:-return}(0);
5615 }
5616 CF_EOF
5617
5618         cf_save_LIBS="$LIBS"
5619         # This only works if we can look at the symbol table.  If a shared
5620         # library is stripped for install, we cannot use that.  So we're forced
5621         # to rely on the static library, noting that some packagers may not
5622         # include it.
5623         LIBS="-static -lgpm -dynamic $LIBS"
5624         if { (eval echo "$as_me:5624: \"$ac_compile\"") >&5
5625   (eval $ac_compile) 2>&5
5626   ac_status=$?
5627   echo "$as_me:5627: \$? = $ac_status" >&5
5628   (exit $ac_status); } ; then
5629                 if { (eval echo "$as_me:5629: \"$ac_link\"") >&5
5630   (eval $ac_link) 2>&5
5631   ac_status=$?
5632   echo "$as_me:5632: \$? = $ac_status" >&5
5633   (exit $ac_status); } ; then
5634                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5635                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5636                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5637                 fi
5638         fi
5639         rm -rf conftest*
5640         LIBS="$cf_save_LIBS"
5641 fi
5642
5643 fi
5644 echo "$as_me:5644: result: $cf_cv_check_gpm_wgetch" >&5
5645 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5646
5647 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5648         { echo "$as_me:5648: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5649 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5650 fi
5651
5652 fi
5653
5654 fi
5655
5656 # not everyone has "test -c"
5657 if test -c /dev/sysmouse 2>/dev/null ; then
5658 echo "$as_me:5658: checking if you want to use sysmouse" >&5
5659 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5660
5661 # Check whether --with-sysmouse or --without-sysmouse was given.
5662 if test "${with_sysmouse+set}" = set; then
5663   withval="$with_sysmouse"
5664   cf_with_sysmouse=$withval
5665 else
5666   cf_with_sysmouse=maybe
5667 fi;
5668         if test "$cf_with_sysmouse" != no ; then
5669         cat >conftest.$ac_ext <<_ACEOF
5670 #line 5670 "configure"
5671 #include "confdefs.h"
5672
5673 #include <osreldate.h>
5674 #if (__FreeBSD_version >= 400017)
5675 #include <sys/consio.h>
5676 #include <sys/fbio.h>
5677 #else
5678 #include <machine/console.h>
5679 #endif
5680
5681 int
5682 main ()
5683 {
5684
5685         struct mouse_info the_mouse;
5686         ioctl(0, CONS_MOUSECTL, &the_mouse);
5687
5688   ;
5689   return 0;
5690 }
5691 _ACEOF
5692 rm -f conftest.$ac_objext
5693 if { (eval echo "$as_me:5693: \"$ac_compile\"") >&5
5694   (eval $ac_compile) 2>&5
5695   ac_status=$?
5696   echo "$as_me:5696: \$? = $ac_status" >&5
5697   (exit $ac_status); } &&
5698          { ac_try='test -s conftest.$ac_objext'
5699   { (eval echo "$as_me:5699: \"$ac_try\"") >&5
5700   (eval $ac_try) 2>&5
5701   ac_status=$?
5702   echo "$as_me:5702: \$? = $ac_status" >&5
5703   (exit $ac_status); }; }; then
5704   cf_with_sysmouse=yes
5705 else
5706   echo "$as_me: failed program was:" >&5
5707 cat conftest.$ac_ext >&5
5708 cf_with_sysmouse=no
5709 fi
5710 rm -f conftest.$ac_objext conftest.$ac_ext
5711         fi
5712 echo "$as_me:5712: result: $cf_with_sysmouse" >&5
5713 echo "${ECHO_T}$cf_with_sysmouse" >&6
5714 test "$cf_with_sysmouse" = yes &&
5715 cat >>confdefs.h <<\EOF
5716 #define USE_SYSMOUSE 1
5717 EOF
5718
5719 fi
5720
5721 if test X"$CC_G_OPT" = X"" ; then
5722         CC_G_OPT='-g'
5723         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5724 fi
5725
5726 if test X"$CXX_G_OPT" = X"" ; then
5727         CXX_G_OPT='-g'
5728         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5729 fi
5730
5731 echo "$as_me:5731: checking for default loader flags" >&5
5732 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5733 case $DFT_LWR_MODEL in
5734 libtool) LD_MODEL=''   ;;
5735 normal)  LD_MODEL=''   ;;
5736 debug)   LD_MODEL=$CC_G_OPT ;;
5737 profile) LD_MODEL='-pg';;
5738 shared)  LD_MODEL=''   ;;
5739 esac
5740 echo "$as_me:5740: result: $LD_MODEL" >&5
5741 echo "${ECHO_T}$LD_MODEL" >&6
5742
5743 case $DFT_LWR_MODEL in
5744 shared)
5745
5746 echo "$as_me:5746: checking if rpath option should be used" >&5
5747 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5748
5749 # Check whether --enable-rpath or --disable-rpath was given.
5750 if test "${enable_rpath+set}" = set; then
5751   enableval="$enable_rpath"
5752   cf_cv_enable_rpath=$enableval
5753 else
5754   cf_cv_enable_rpath=no
5755 fi;
5756 echo "$as_me:5756: result: $cf_cv_enable_rpath" >&5
5757 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5758
5759 echo "$as_me:5759: checking if shared libraries should be relinked during install" >&5
5760 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5761
5762 # Check whether --enable-relink or --disable-relink was given.
5763 if test "${enable_relink+set}" = set; then
5764   enableval="$enable_relink"
5765   cf_cv_do_relink=$enableval
5766 else
5767   cf_cv_do_relink=yes
5768 fi;
5769 echo "$as_me:5769: result: $cf_cv_do_relink" >&5
5770 echo "${ECHO_T}$cf_cv_do_relink" >&6
5771         ;;
5772 esac
5773
5774 # we will build libraries one-level down.
5775 rel_builddir=..
5776
5777 LD_RPATH_OPT=
5778 echo "$as_me:5778: checking for an rpath option" >&5
5779 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5780 case $cf_cv_system_name in #(vi
5781 irix*) #(vi
5782         if test "$GCC" = yes; then
5783                 LD_RPATH_OPT="-Wl,-rpath,"
5784         else
5785                 LD_RPATH_OPT="-rpath "
5786         fi
5787         ;;
5788 linux*|gnu*|k*bsd*-gnu) #(vi
5789         LD_RPATH_OPT="-Wl,-rpath,"
5790         ;;
5791 openbsd[2-9].*|mirbsd*) #(vi
5792         LD_RPATH_OPT="-Wl,-rpath,"
5793         ;;
5794 dragonfly*|freebsd*) #(vi
5795         LD_RPATH_OPT="-rpath "
5796         ;;
5797 netbsd*) #(vi
5798         LD_RPATH_OPT="-Wl,-rpath,"
5799         ;;
5800 osf*|mls+*) #(vi
5801         LD_RPATH_OPT="-rpath "
5802         ;;
5803 solaris2*) #(vi
5804         LD_RPATH_OPT="-R"
5805         ;;
5806 *)
5807         ;;
5808 esac
5809 echo "$as_me:5809: result: $LD_RPATH_OPT" >&5
5810 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5811
5812 case "x$LD_RPATH_OPT" in #(vi
5813 x-R*)
5814         echo "$as_me:5814: checking if we need a space after rpath option" >&5
5815 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5816         cf_save_LIBS="$LIBS"
5817
5818 cf_add_libs="${LD_RPATH_OPT}$libdir"
5819 # Filter out duplicates - this happens with badly-designed ".pc" files...
5820 for cf_add_1lib in $LIBS
5821 do
5822         for cf_add_2lib in $cf_add_libs
5823         do
5824                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5825                 then
5826                         cf_add_1lib=
5827                         break
5828                 fi
5829         done
5830         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5831 done
5832 LIBS="$cf_add_libs"
5833
5834         cat >conftest.$ac_ext <<_ACEOF
5835 #line 5835 "configure"
5836 #include "confdefs.h"
5837
5838 int
5839 main ()
5840 {
5841
5842   ;
5843   return 0;
5844 }
5845 _ACEOF
5846 rm -f conftest.$ac_objext conftest$ac_exeext
5847 if { (eval echo "$as_me:5847: \"$ac_link\"") >&5
5848   (eval $ac_link) 2>&5
5849   ac_status=$?
5850   echo "$as_me:5850: \$? = $ac_status" >&5
5851   (exit $ac_status); } &&
5852          { ac_try='test -s conftest$ac_exeext'
5853   { (eval echo "$as_me:5853: \"$ac_try\"") >&5
5854   (eval $ac_try) 2>&5
5855   ac_status=$?
5856   echo "$as_me:5856: \$? = $ac_status" >&5
5857   (exit $ac_status); }; }; then
5858   cf_rpath_space=no
5859 else
5860   echo "$as_me: failed program was:" >&5
5861 cat conftest.$ac_ext >&5
5862 cf_rpath_space=yes
5863 fi
5864 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5865         LIBS="$cf_save_LIBS"
5866         echo "$as_me:5866: result: $cf_rpath_space" >&5
5867 echo "${ECHO_T}$cf_rpath_space" >&6
5868         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5869         ;;
5870 esac
5871
5872         RM_SHARED_OPTS=
5873         LOCAL_LDFLAGS=
5874         LOCAL_LDFLAGS2=
5875         LD_SHARED_OPTS=
5876         INSTALL_LIB="-m 644"
5877         : ${rel_builddir:=.}
5878
5879         shlibdir=$libdir
5880
5881         MAKE_DLLS="#"
5882
5883         cf_cv_do_symlinks=no
5884         cf_ld_rpath_opt=
5885         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5886
5887         echo "$as_me:5887: checking if release/abi version should be used for shared libs" >&5
5888 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5889
5890 # Check whether --with-shlib-version or --without-shlib-version was given.
5891 if test "${with_shlib_version+set}" = set; then
5892   withval="$with_shlib_version"
5893   test -z "$withval" && withval=auto
5894         case $withval in #(vi
5895         yes) #(vi
5896                 cf_cv_shlib_version=auto
5897                 ;;
5898         rel|abi|auto|no) #(vi
5899                 cf_cv_shlib_version=$withval
5900                 ;;
5901         *)
5902                 { { echo "$as_me:5902: error: option value must be one of: rel, abi, auto or no" >&5
5903 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5904    { (exit 1); exit 1; }; }
5905                 ;;
5906         esac
5907
5908 else
5909   cf_cv_shlib_version=auto
5910 fi;
5911         echo "$as_me:5911: result: $cf_cv_shlib_version" >&5
5912 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5913
5914         cf_cv_rm_so_locs=no
5915         cf_try_cflags=
5916
5917         # Some less-capable ports of gcc support only -fpic
5918         CC_SHARED_OPTS=
5919         if test "$GCC" = yes
5920         then
5921                 echo "$as_me:5921: checking which $CC option to use" >&5
5922 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5923                 cf_save_CFLAGS="$CFLAGS"
5924                 for CC_SHARED_OPTS in -fPIC -fpic ''
5925                 do
5926                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5927                         cat >conftest.$ac_ext <<_ACEOF
5928 #line 5928 "configure"
5929 #include "confdefs.h"
5930 #include <stdio.h>
5931 int
5932 main ()
5933 {
5934 int x = 1
5935   ;
5936   return 0;
5937 }
5938 _ACEOF
5939 rm -f conftest.$ac_objext
5940 if { (eval echo "$as_me:5940: \"$ac_compile\"") >&5
5941   (eval $ac_compile) 2>&5
5942   ac_status=$?
5943   echo "$as_me:5943: \$? = $ac_status" >&5
5944   (exit $ac_status); } &&
5945          { ac_try='test -s conftest.$ac_objext'
5946   { (eval echo "$as_me:5946: \"$ac_try\"") >&5
5947   (eval $ac_try) 2>&5
5948   ac_status=$?
5949   echo "$as_me:5949: \$? = $ac_status" >&5
5950   (exit $ac_status); }; }; then
5951   break
5952 else
5953   echo "$as_me: failed program was:" >&5
5954 cat conftest.$ac_ext >&5
5955 fi
5956 rm -f conftest.$ac_objext conftest.$ac_ext
5957                 done
5958                 echo "$as_me:5958: result: $CC_SHARED_OPTS" >&5
5959 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5960                 CFLAGS="$cf_save_CFLAGS"
5961         fi
5962
5963         cf_cv_shlib_version_infix=no
5964
5965         case $cf_cv_system_name in #(vi
5966         aix4.3-9*|aix[5-7]*) #(vi
5967                 if test "$GCC" = yes; then
5968                         CC_SHARED_OPTS=
5969                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5970                 else
5971                         # CC_SHARED_OPTS='-qpic=large -G'
5972                         # perhaps "-bM:SRE -bnoentry -bexpall"
5973                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5974                 fi
5975                 ;;
5976         beos*) #(vi
5977                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5978                 ;;
5979         cygwin*) #(vi
5980                 CC_SHARED_OPTS=
5981                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5982                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5983                 cf_cv_shlib_version=cygdll
5984                 cf_cv_shlib_version_infix=cygdll
5985                 shlibdir=$bindir
5986                 MAKE_DLLS=
5987                 cat >mk_shared_lib.sh <<-CF_EOF
5988                 #!/bin/sh
5989                 SHARED_LIB=\$1
5990                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5991                 shift
5992                 cat <<-EOF
5993                 Linking shared library
5994                 ** SHARED_LIB \$SHARED_LIB
5995                 ** IMPORT_LIB \$IMPORT_LIB
5996 EOF
5997                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5998 CF_EOF
5999                 chmod +x mk_shared_lib.sh
6000                 ;;
6001         msys*) #(vi
6002                 CC_SHARED_OPTS=
6003                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6004                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6005                 cf_cv_shlib_version=msysdll
6006                 cf_cv_shlib_version_infix=msysdll
6007                 shlibdir=$bindir
6008                 MAKE_DLLS=
6009                 cat >mk_shared_lib.sh <<-CF_EOF
6010                 #!/bin/sh
6011                 SHARED_LIB=\$1
6012                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6013                 shift
6014                 cat <<-EOF
6015                 Linking shared library
6016                 ** SHARED_LIB \$SHARED_LIB
6017                 ** IMPORT_LIB \$IMPORT_LIB
6018 EOF
6019                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6020 CF_EOF
6021                 chmod +x mk_shared_lib.sh
6022                 ;;
6023         darwin*) #(vi
6024                 cf_try_cflags="no-cpp-precomp"
6025                 CC_SHARED_OPTS="-dynamic"
6026                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6027                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6028                 cf_cv_shlib_version_infix=yes
6029                 echo "$as_me:6029: checking if ld -search_paths_first works" >&5
6030 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6031 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6032   echo $ECHO_N "(cached) $ECHO_C" >&6
6033 else
6034
6035                         cf_save_LDFLAGS=$LDFLAGS
6036                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6037                         cat >conftest.$ac_ext <<_ACEOF
6038 #line 6038 "configure"
6039 #include "confdefs.h"
6040
6041 int
6042 main ()
6043 {
6044 int i;
6045   ;
6046   return 0;
6047 }
6048 _ACEOF
6049 rm -f conftest.$ac_objext conftest$ac_exeext
6050 if { (eval echo "$as_me:6050: \"$ac_link\"") >&5
6051   (eval $ac_link) 2>&5
6052   ac_status=$?
6053   echo "$as_me:6053: \$? = $ac_status" >&5
6054   (exit $ac_status); } &&
6055          { ac_try='test -s conftest$ac_exeext'
6056   { (eval echo "$as_me:6056: \"$ac_try\"") >&5
6057   (eval $ac_try) 2>&5
6058   ac_status=$?
6059   echo "$as_me:6059: \$? = $ac_status" >&5
6060   (exit $ac_status); }; }; then
6061   cf_cv_ldflags_search_paths_first=yes
6062 else
6063   echo "$as_me: failed program was:" >&5
6064 cat conftest.$ac_ext >&5
6065 cf_cv_ldflags_search_paths_first=no
6066 fi
6067 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6068                                 LDFLAGS=$cf_save_LDFLAGS
6069 fi
6070 echo "$as_me:6070: result: $cf_cv_ldflags_search_paths_first" >&5
6071 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6072                 if test $cf_cv_ldflags_search_paths_first = yes; then
6073                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6074                 fi
6075                 ;;
6076         hpux[7-8]*) #(vi
6077                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6078                 if test "$GCC" != yes; then
6079                         CC_SHARED_OPTS='+Z'
6080                 fi
6081                 MK_SHARED_LIB='${LD} -b -o $@'
6082                 INSTALL_LIB="-m 555"
6083                 ;;
6084         hpux*) #(vi
6085                 # (tested with gcc 2.7.2 -- I don't have c89)
6086                 if test "$GCC" = yes; then
6087                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6088                 else
6089                         CC_SHARED_OPTS='+Z'
6090                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6091                 fi
6092                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6093                 # HP-UX shared libraries must be executable, and should be
6094                 # readonly to exploit a quirk in the memory manager.
6095                 INSTALL_LIB="-m 555"
6096                 ;;
6097         interix*)
6098                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6099                 if test "$cf_cv_shlib_version" = rel; then
6100                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6101                 else
6102                         cf_shared_soname='`basename `'
6103                 fi
6104                 CC_SHARED_OPTS=
6105                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6106                 ;;
6107         irix*) #(vi
6108                 if test "$cf_cv_enable_rpath" = yes ; then
6109                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6110                 fi
6111                 # tested with IRIX 5.2 and 'cc'.
6112                 if test "$GCC" != yes; then
6113                         CC_SHARED_OPTS='-KPIC'
6114                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6115                 else
6116                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6117                 fi
6118                 cf_cv_rm_so_locs=yes
6119                 ;;
6120         linux*|gnu*|k*bsd*-gnu) #(vi
6121                 if test "$DFT_LWR_MODEL" = "shared" ; then
6122                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6123                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6124                 fi
6125                 if test "$cf_cv_enable_rpath" = yes ; then
6126                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6127                 fi
6128
6129         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6130         if test "$cf_cv_shlib_version" = rel; then
6131                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6132         else
6133                 cf_cv_shared_soname='`basename $@`'
6134         fi
6135
6136                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6137                 ;;
6138         mingw*) #(vi
6139                 cf_cv_shlib_version=mingw
6140                 cf_cv_shlib_version_infix=mingw
6141                 shlibdir=$bindir
6142                 MAKE_DLLS=
6143                 if test "$DFT_LWR_MODEL" = "shared" ; then
6144                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6145                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6146                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6147                 fi
6148                 CC_SHARED_OPTS=
6149                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6150                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6151                 cat >mk_shared_lib.sh <<-CF_EOF
6152                 #!/bin/sh
6153                 SHARED_LIB=\$1
6154                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6155                 shift
6156                 cat <<-EOF
6157                 Linking shared library
6158                 ** SHARED_LIB \$SHARED_LIB
6159                 ** IMPORT_LIB \$IMPORT_LIB
6160 EOF
6161                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6162 CF_EOF
6163                 chmod +x mk_shared_lib.sh
6164                 ;;
6165         openbsd[2-9].*|mirbsd*) #(vi
6166                 if test "$DFT_LWR_MODEL" = "shared" ; then
6167                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6168                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6169                 fi
6170                 if test "$cf_cv_enable_rpath" = yes ; then
6171                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6172                 fi
6173                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6174
6175         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6176         if test "$cf_cv_shlib_version" = rel; then
6177                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6178         else
6179                 cf_cv_shared_soname='`basename $@`'
6180         fi
6181
6182                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6183                 ;;
6184         nto-qnx*|openbsd*|freebsd[12].*) #(vi
6185                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6186                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6187                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6188                 ;;
6189         dragonfly*|freebsd*) #(vi
6190                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6191                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6192                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6193                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6194                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6195                 fi
6196
6197         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6198         if test "$cf_cv_shlib_version" = rel; then
6199                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6200         else
6201                 cf_cv_shared_soname='`basename $@`'
6202         fi
6203
6204                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
6205                 ;;
6206         netbsd*) #(vi
6207                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6208                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6209                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6210                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6211                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6212                         if test "$cf_cv_shlib_version" = auto; then
6213                         if test -f /usr/libexec/ld.elf_so; then
6214                                 cf_cv_shlib_version=abi
6215                         else
6216                                 cf_cv_shlib_version=rel
6217                         fi
6218                         fi
6219
6220         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6221         if test "$cf_cv_shlib_version" = rel; then
6222                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6223         else
6224                 cf_cv_shared_soname='`basename $@`'
6225         fi
6226
6227                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6228                 else
6229                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6230                 fi
6231                 ;;
6232         osf*|mls+*) #(vi
6233                 # tested with OSF/1 V3.2 and 'cc'
6234                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6235                 # link with shared libs).
6236                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6237                 case $host_os in #(vi
6238                 osf4*)
6239                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6240                         ;;
6241                 esac
6242                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6243                 if test "$DFT_LWR_MODEL" = "shared" ; then
6244                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6245                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6246                 fi
6247                 cf_cv_rm_so_locs=yes
6248                 ;;
6249         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
6250                 # tested with osr5.0.5
6251                 if test "$GCC" != yes; then
6252                         CC_SHARED_OPTS='-belf -KPIC'
6253                 fi
6254                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6255                 if test "$cf_cv_enable_rpath" = yes ; then
6256                         # only way is to set LD_RUN_PATH but no switch for it
6257                         RUN_PATH=$libdir
6258                 fi
6259                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6260                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6261                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6262                 ;;
6263         sunos4*) #(vi
6264                 # tested with SunOS 4.1.1 and gcc 2.7.0
6265                 if test "$GCC" != yes; then
6266                         CC_SHARED_OPTS='-KPIC'
6267                 fi
6268                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6269                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6270                 ;;
6271         solaris2*) #(vi
6272                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6273                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6274                 if test "$DFT_LWR_MODEL" = "shared" ; then
6275                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6276                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6277                 fi
6278                 if test "$cf_cv_enable_rpath" = yes ; then
6279                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6280                 fi
6281
6282         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6283         if test "$cf_cv_shlib_version" = rel; then
6284                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6285         else
6286                 cf_cv_shared_soname='`basename $@`'
6287         fi
6288
6289                 if test "$GCC" != yes; then
6290                         cf_save_CFLAGS="$CFLAGS"
6291                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6292                         do
6293                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6294                                 cat >conftest.$ac_ext <<_ACEOF
6295 #line 6295 "configure"
6296 #include "confdefs.h"
6297 #include <stdio.h>
6298 int
6299 main ()
6300 {
6301 printf("Hello\n");
6302   ;
6303   return 0;
6304 }
6305 _ACEOF
6306 rm -f conftest.$ac_objext
6307 if { (eval echo "$as_me:6307: \"$ac_compile\"") >&5
6308   (eval $ac_compile) 2>&5
6309   ac_status=$?
6310   echo "$as_me:6310: \$? = $ac_status" >&5
6311   (exit $ac_status); } &&
6312          { ac_try='test -s conftest.$ac_objext'
6313   { (eval echo "$as_me:6313: \"$ac_try\"") >&5
6314   (eval $ac_try) 2>&5
6315   ac_status=$?
6316   echo "$as_me:6316: \$? = $ac_status" >&5
6317   (exit $ac_status); }; }; then
6318   break
6319 else
6320   echo "$as_me: failed program was:" >&5
6321 cat conftest.$ac_ext >&5
6322 fi
6323 rm -f conftest.$ac_objext conftest.$ac_ext
6324                         done
6325                         CFLAGS="$cf_save_CFLAGS"
6326                         CC_SHARED_OPTS=$cf_shared_opts
6327                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6328                 else
6329                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6330                 fi
6331                 ;;
6332         sysv5uw7*|unix_sv*) #(vi
6333                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6334                 if test "$GCC" != yes; then
6335                         CC_SHARED_OPTS='-KPIC'
6336                 fi
6337                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6338                 ;;
6339         *)
6340                 CC_SHARED_OPTS='unknown'
6341                 MK_SHARED_LIB='echo unknown'
6342                 ;;
6343         esac
6344
6345         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6346         case "$cf_cv_shlib_version" in #(vi
6347         rel|abi)
6348                 case "$MK_SHARED_LIB" in #(vi
6349                 *'-o $@') #(vi
6350                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6351                         ;;
6352                 *)
6353                         { echo "$as_me:6353: WARNING: ignored --with-shlib-version" >&5
6354 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6355                         ;;
6356                 esac
6357                 ;;
6358         esac
6359
6360         if test -n "$cf_try_cflags"
6361         then
6362 cat > conftest.$ac_ext <<EOF
6363 #line 6363 "${as_me:-configure}"
6364 #include <stdio.h>
6365 int main(int argc, char *argv[])
6366 {
6367         printf("hello\n");
6368         return (argv[argc-1] == 0) ;
6369 }
6370 EOF
6371                 cf_save_CFLAGS="$CFLAGS"
6372                 for cf_opt in $cf_try_cflags
6373                 do
6374                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6375                         echo "$as_me:6375: checking if CFLAGS option -$cf_opt works" >&5
6376 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6377                         if { (eval echo "$as_me:6377: \"$ac_compile\"") >&5
6378   (eval $ac_compile) 2>&5
6379   ac_status=$?
6380   echo "$as_me:6380: \$? = $ac_status" >&5
6381   (exit $ac_status); }; then
6382                                 echo "$as_me:6382: result: yes" >&5
6383 echo "${ECHO_T}yes" >&6
6384                                 cf_save_CFLAGS="$CFLAGS"
6385                         else
6386                                 echo "$as_me:6386: result: no" >&5
6387 echo "${ECHO_T}no" >&6
6388                         fi
6389                 done
6390                 CFLAGS="$cf_save_CFLAGS"
6391         fi
6392
6393         # RPATH_LIST is a colon-separated list of directories
6394         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6395         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6396
6397         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6398
6399         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6400
6401 echo "${as_me:-configure}:6401: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6402
6403         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6404
6405 echo "${as_me:-configure}:6405: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6406
6407 for model in $cf_list_models; do
6408         case $model in #(vi
6409         libtool)
6410
6411 echo "$as_me:6411: checking for additional libtool options" >&5
6412 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6413
6414 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6415 if test "${with_libtool_opts+set}" = set; then
6416   withval="$with_libtool_opts"
6417   with_libtool_opts=$withval
6418 else
6419   with_libtool_opts=no
6420 fi;
6421 echo "$as_me:6421: result: $with_libtool_opts" >&5
6422 echo "${ECHO_T}$with_libtool_opts" >&6
6423
6424 case .$with_libtool_opts in
6425 .yes|.no|.)
6426         ;;
6427 *)
6428         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6429         ;;
6430 esac
6431
6432 echo "$as_me:6432: checking if exported-symbols file should be used" >&5
6433 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6434
6435 # Check whether --with-export-syms or --without-export-syms was given.
6436 if test "${with_export_syms+set}" = set; then
6437   withval="$with_export_syms"
6438   with_export_syms=$withval
6439 else
6440   with_export_syms=no
6441 fi;
6442 if test "x$with_export_syms" = xyes
6443 then
6444         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6445
6446 fi
6447 echo "$as_me:6447: result: $with_export_syms" >&5
6448 echo "${ECHO_T}$with_export_syms" >&6
6449 if test "x$with_export_syms" != xno
6450 then
6451         EXPORT_SYMS="$EXPORT_SYMS -export-symbols $with_export_syms"
6452
6453 fi
6454
6455                 ;;
6456         shared) #(vi
6457                 if test "$CC_SHARED_OPTS" = "unknown"; then
6458                         { { echo "$as_me:6458: error: Shared libraries are not supported in this version" >&5
6459 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6460    { (exit 1); exit 1; }; }
6461                 fi
6462
6463 echo "$as_me:6463: checking if versioned-symbols file should be used" >&5
6464 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6465
6466 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6467 if test "${with_versioned_syms+set}" = set; then
6468   withval="$with_versioned_syms"
6469   with_versioned_syms=$withval
6470 else
6471   with_versioned_syms=no
6472 fi;
6473 if test "x$with_versioned_syms" = xyes
6474 then
6475         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6476
6477 fi
6478 echo "$as_me:6478: result: $with_versioned_syms" >&5
6479 echo "${ECHO_T}$with_versioned_syms" >&6
6480
6481 if test "x$with_versioned_syms" != xno
6482 then
6483
6484         case "x$MK_SHARED_LIB" in
6485         *-Wl,*) #(vi
6486                 VERSIONED_SYMS="-Wl,--version-script,$with_versioned_syms"
6487                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6488                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6489
6490 echo "${as_me:-configure}:6490: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6491
6492                 ;;
6493         *-dy*) #(vi
6494                 VERSIONED_SYMS="-Wl,-M,$with_versioned_syms"
6495                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6496                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6497
6498 echo "${as_me:-configure}:6498: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6499
6500                 ;;
6501         *)
6502                 { echo "$as_me:6502: WARNING: this system does not support versioned-symbols" >&5
6503 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6504                 ;;
6505         esac
6506 fi
6507
6508                 ;;
6509         esac
6510 done
6511
6512 # pretend that ncurses==ncursesw==ncursest
6513 echo "$as_me:6513: checking if you want to disable library suffixes" >&5
6514 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6515
6516 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6517 if test "${enable_lib_suffixes+set}" = set; then
6518   enableval="$enable_lib_suffixes"
6519   disable_lib_suffixes=$enableval
6520 else
6521   disable_lib_suffixes=no
6522 fi;
6523 echo "$as_me:6523: result: $disable_lib_suffixes" >&5
6524 echo "${ECHO_T}$disable_lib_suffixes" >&6
6525
6526 ### If we're building with rpath, try to link non-standard libs that way too.
6527 if test "$DFT_LWR_MODEL" = "shared"; then
6528
6529 echo "$as_me:6529: checking if rpath-hack should be disabled" >&5
6530 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6531
6532 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6533 if test "${enable_rpath_hack+set}" = set; then
6534   enableval="$enable_rpath_hack"
6535   test "$enableval" != no && enableval=yes
6536   if test "$enableval" != "yes" ; then
6537     cf_disable_rpath_hack=yes
6538   else
6539     cf_disable_rpath_hack=no
6540   fi
6541 else
6542   enableval=yes
6543   cf_disable_rpath_hack=no
6544
6545 fi;
6546 echo "$as_me:6546: result: $cf_disable_rpath_hack" >&5
6547 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6548 if test "$cf_disable_rpath_hack" = no ; then
6549
6550 echo "$as_me:6550: checking for updated LDFLAGS" >&5
6551 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6552 if test -n "$LD_RPATH_OPT" ; then
6553         echo "$as_me:6553: result: maybe" >&5
6554 echo "${ECHO_T}maybe" >&6
6555
6556         for ac_prog in ldd
6557 do
6558   # Extract the first word of "$ac_prog", so it can be a program name with args.
6559 set dummy $ac_prog; ac_word=$2
6560 echo "$as_me:6560: checking for $ac_word" >&5
6561 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6562 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6563   echo $ECHO_N "(cached) $ECHO_C" >&6
6564 else
6565   if test -n "$cf_ldd_prog"; then
6566   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6567 else
6568   ac_save_IFS=$IFS; IFS=$ac_path_separator
6569 ac_dummy="$PATH"
6570 for ac_dir in $ac_dummy; do
6571   IFS=$ac_save_IFS
6572   test -z "$ac_dir" && ac_dir=.
6573   $as_executable_p "$ac_dir/$ac_word" || continue
6574 ac_cv_prog_cf_ldd_prog="$ac_prog"
6575 echo "$as_me:6575: found $ac_dir/$ac_word" >&5
6576 break
6577 done
6578
6579 fi
6580 fi
6581 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6582 if test -n "$cf_ldd_prog"; then
6583   echo "$as_me:6583: result: $cf_ldd_prog" >&5
6584 echo "${ECHO_T}$cf_ldd_prog" >&6
6585 else
6586   echo "$as_me:6586: result: no" >&5
6587 echo "${ECHO_T}no" >&6
6588 fi
6589
6590   test -n "$cf_ldd_prog" && break
6591 done
6592 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6593
6594         cf_rpath_list="/usr/lib /lib"
6595         if test "$cf_ldd_prog" != no
6596         then
6597                 cf_rpath_oops=
6598
6599 cat >conftest.$ac_ext <<_ACEOF
6600 #line 6600 "configure"
6601 #include "confdefs.h"
6602 #include <stdio.h>
6603 int
6604 main ()
6605 {
6606 printf("Hello");
6607   ;
6608   return 0;
6609 }
6610 _ACEOF
6611 rm -f conftest.$ac_objext conftest$ac_exeext
6612 if { (eval echo "$as_me:6612: \"$ac_link\"") >&5
6613   (eval $ac_link) 2>&5
6614   ac_status=$?
6615   echo "$as_me:6615: \$? = $ac_status" >&5
6616   (exit $ac_status); } &&
6617          { ac_try='test -s conftest$ac_exeext'
6618   { (eval echo "$as_me:6618: \"$ac_try\"") >&5
6619   (eval $ac_try) 2>&5
6620   ac_status=$?
6621   echo "$as_me:6621: \$? = $ac_status" >&5
6622   (exit $ac_status); }; }; then
6623   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6624                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6625 else
6626   echo "$as_me: failed program was:" >&5
6627 cat conftest.$ac_ext >&5
6628 fi
6629 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6630
6631                 # If we passed the link-test, but get a "not found" on a given library,
6632                 # this could be due to inept reconfiguration of gcc to make it only
6633                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6634                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6635                 # /usr/local libraries.
6636                 if test -n "$cf_rpath_oops"
6637                 then
6638                         for cf_rpath_src in $cf_rpath_oops
6639                         do
6640                                 for cf_rpath_dir in \
6641                                         /usr/local \
6642                                         /usr/pkg \
6643                                         /opt/sfw
6644                                 do
6645                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6646                                         then
6647                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6648
6649 echo "${as_me:-configure}:6649: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6650
6651                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6652                                                 break
6653                                         fi
6654                                 done
6655                         done
6656                 fi
6657         fi
6658
6659         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6660
6661 echo "${as_me:-configure}:6661: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6662
6663 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6664
6665 echo "${as_me:-configure}:6665: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6666
6667 cf_rpath_dst=
6668 for cf_rpath_src in $LDFLAGS
6669 do
6670         case $cf_rpath_src in #(vi
6671         -L*) #(vi
6672
6673                 # check if this refers to a directory which we will ignore
6674                 cf_rpath_skip=no
6675                 if test -n "$cf_rpath_list"
6676                 then
6677                         for cf_rpath_item in $cf_rpath_list
6678                         do
6679                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6680                                 then
6681                                         cf_rpath_skip=yes
6682                                         break
6683                                 fi
6684                         done
6685                 fi
6686
6687                 if test "$cf_rpath_skip" = no
6688                 then
6689                         # transform the option
6690                         if test "$LD_RPATH_OPT" = "-R " ; then
6691                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6692                         else
6693                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6694                         fi
6695
6696                         # if we have not already added this, add it now
6697                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6698                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6699                         then
6700                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6701
6702 echo "${as_me:-configure}:6702: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6703
6704                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6705                         fi
6706                 fi
6707                 ;;
6708         esac
6709         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6710 done
6711 LDFLAGS=$cf_rpath_dst
6712
6713 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6714
6715 echo "${as_me:-configure}:6715: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6716
6717 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6718
6719 echo "${as_me:-configure}:6719: testing ...checking LIBS $LIBS ..." 1>&5
6720
6721 cf_rpath_dst=
6722 for cf_rpath_src in $LIBS
6723 do
6724         case $cf_rpath_src in #(vi
6725         -L*) #(vi
6726
6727                 # check if this refers to a directory which we will ignore
6728                 cf_rpath_skip=no
6729                 if test -n "$cf_rpath_list"
6730                 then
6731                         for cf_rpath_item in $cf_rpath_list
6732                         do
6733                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6734                                 then
6735                                         cf_rpath_skip=yes
6736                                         break
6737                                 fi
6738                         done
6739                 fi
6740
6741                 if test "$cf_rpath_skip" = no
6742                 then
6743                         # transform the option
6744                         if test "$LD_RPATH_OPT" = "-R " ; then
6745                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6746                         else
6747                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6748                         fi
6749
6750                         # if we have not already added this, add it now
6751                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6752                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6753                         then
6754                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6755
6756 echo "${as_me:-configure}:6756: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6757
6758                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6759                         fi
6760                 fi
6761                 ;;
6762         esac
6763         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6764 done
6765 LIBS=$cf_rpath_dst
6766
6767 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6768
6769 echo "${as_me:-configure}:6769: testing ...checked LIBS $LIBS ..." 1>&5
6770
6771         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6772
6773 echo "${as_me:-configure}:6773: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6774
6775 else
6776         echo "$as_me:6776: result: no" >&5
6777 echo "${ECHO_T}no" >&6
6778 fi
6779
6780 fi
6781
6782 fi
6783
6784 ###############################################################################
6785
6786 ###     use option --disable-overwrite to leave out the link to -lcurses
6787 echo "$as_me:6787: checking if you wish to install ncurses overwriting curses" >&5
6788 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6789
6790 # Check whether --enable-overwrite or --disable-overwrite was given.
6791 if test "${enable_overwrite+set}" = set; then
6792   enableval="$enable_overwrite"
6793   with_overwrite=$enableval
6794 else
6795   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6796 fi;
6797 echo "$as_me:6797: result: $with_overwrite" >&5
6798 echo "${ECHO_T}$with_overwrite" >&6
6799
6800 echo "$as_me:6800: checking if external terminfo-database is used" >&5
6801 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6802
6803 # Check whether --enable-database or --disable-database was given.
6804 if test "${enable_database+set}" = set; then
6805   enableval="$enable_database"
6806   use_database=$enableval
6807 else
6808   use_database=yes
6809 fi;
6810 echo "$as_me:6810: result: $use_database" >&5
6811 echo "${ECHO_T}$use_database" >&6
6812
6813 case $host_os in #(vi
6814 os2*) #(vi
6815         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6816         ;;
6817 *) #(vi
6818         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6819         ;;
6820 esac
6821
6822 NCURSES_USE_DATABASE=0
6823 if test "$use_database" != no ; then
6824         NCURSES_USE_DATABASE=1
6825
6826         echo "$as_me:6826: checking which terminfo source-file will be installed" >&5
6827 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6828
6829 # Check whether --with-database or --without-database was given.
6830 if test "${with_database+set}" = set; then
6831   withval="$with_database"
6832   TERMINFO_SRC=$withval
6833 fi;
6834         echo "$as_me:6834: result: $TERMINFO_SRC" >&5
6835 echo "${ECHO_T}$TERMINFO_SRC" >&6
6836
6837         echo "$as_me:6837: checking whether to use hashed database instead of directory/tree" >&5
6838 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6839
6840 # Check whether --with-hashed-db or --without-hashed-db was given.
6841 if test "${with_hashed_db+set}" = set; then
6842   withval="$with_hashed_db"
6843
6844 else
6845   with_hashed_db=no
6846 fi;
6847         echo "$as_me:6847: result: $with_hashed_db" >&5
6848 echo "${ECHO_T}$with_hashed_db" >&6
6849 else
6850         with_hashed_db=no
6851 fi
6852
6853 echo "$as_me:6853: checking for list of fallback descriptions" >&5
6854 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6855
6856 # Check whether --with-fallbacks or --without-fallbacks was given.
6857 if test "${with_fallbacks+set}" = set; then
6858   withval="$with_fallbacks"
6859   with_fallback=$withval
6860 else
6861   with_fallback=
6862 fi;
6863 echo "$as_me:6863: result: $with_fallback" >&5
6864 echo "${ECHO_T}$with_fallback" >&6
6865 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6866
6867 echo "$as_me:6867: checking if you want modern xterm or antique" >&5
6868 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6869
6870 # Check whether --with-xterm-new or --without-xterm-new was given.
6871 if test "${with_xterm_new+set}" = set; then
6872   withval="$with_xterm_new"
6873   with_xterm_new=$withval
6874 else
6875   with_xterm_new=yes
6876 fi;
6877 case $with_xterm_new in
6878 no)     with_xterm_new=xterm-old;;
6879 *)      with_xterm_new=xterm-new;;
6880 esac
6881 echo "$as_me:6881: result: $with_xterm_new" >&5
6882 echo "${ECHO_T}$with_xterm_new" >&6
6883 WHICH_XTERM=$with_xterm_new
6884
6885 echo "$as_me:6885: checking if xterm backspace sends BS or DEL" >&5
6886 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6887
6888 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6889 if test "${with_xterm_kbs+set}" = set; then
6890   withval="$with_xterm_kbs"
6891   with_xterm_kbs=$withval
6892 else
6893   with_xterm_kbs=BS
6894 fi;
6895 case x$with_xterm_kbs in
6896 xyes|xno|xBS|xbs|x8)
6897         with_xterm_kbs=BS
6898         ;;
6899 xDEL|xdel|x127)
6900         with_xterm_kbs=DEL
6901         ;;
6902 *)
6903         with_xterm_kbs=$withval
6904         ;;
6905 esac
6906 echo "$as_me:6906: result: $with_xterm_kbs" >&5
6907 echo "${ECHO_T}$with_xterm_kbs" >&6
6908 XTERM_KBS=$with_xterm_kbs
6909
6910 MAKE_TERMINFO=
6911 if test "$use_database" = no ; then
6912         TERMINFO="${datadir}/terminfo"
6913         MAKE_TERMINFO="#"
6914 else
6915
6916 echo "$as_me:6916: checking for list of terminfo directories" >&5
6917 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6918
6919 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6920 if test "${with_terminfo_dirs+set}" = set; then
6921   withval="$with_terminfo_dirs"
6922
6923 else
6924   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6925 fi;
6926 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6927 cf_dst_path=
6928 for cf_src_path in $withval
6929 do
6930
6931 if test "x$prefix" != xNONE; then
6932   cf_path_syntax="$prefix"
6933 else
6934   cf_path_syntax="$ac_default_prefix"
6935 fi
6936
6937 case ".$cf_src_path" in #(vi
6938 .\$\(*\)*|.\'*\'*) #(vi
6939   ;;
6940 ..|./*|.\\*) #(vi
6941   ;;
6942 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6943   ;;
6944 .\${*prefix}*|.\${*dir}*) #(vi
6945   eval cf_src_path="$cf_src_path"
6946   case ".$cf_src_path" in #(vi
6947   .NONE/*)
6948     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6949     ;;
6950   esac
6951   ;; #(vi
6952 .no|.NONE/*)
6953   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6954   ;;
6955 *)
6956   { { echo "$as_me:6956: error: expected a pathname, not \"$cf_src_path\"" >&5
6957 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6958    { (exit 1); exit 1; }; }
6959   ;;
6960 esac
6961
6962   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6963   cf_dst_path="${cf_dst_path}${cf_src_path}"
6964 done
6965 IFS="$ac_save_ifs"
6966
6967 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6968 # so we have to check/work around.  We do prefer the result of "eval"...
6969 eval cf_dst_eval="$cf_dst_path"
6970 case "x$cf_dst_eval" in #(vi
6971 xNONE*) #(vi
6972         TERMINFO_DIRS=$cf_dst_path
6973         ;;
6974 *)
6975         TERMINFO_DIRS="$cf_dst_eval"
6976         ;;
6977 esac
6978
6979 echo "$as_me:6979: result: $TERMINFO_DIRS" >&5
6980 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6981 test -n "$TERMINFO_DIRS" &&
6982 cat >>confdefs.h <<EOF
6983 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6984 EOF
6985
6986 echo "$as_me:6986: checking for default terminfo directory" >&5
6987 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6988
6989 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6990 if test "${with_default_terminfo_dir+set}" = set; then
6991   withval="$with_default_terminfo_dir"
6992
6993 else
6994   withval="${TERMINFO:-${datadir}/terminfo}"
6995 fi; if test -n "${datadir}/terminfo" ; then
6996
6997 if test "x$prefix" != xNONE; then
6998   cf_path_syntax="$prefix"
6999 else
7000   cf_path_syntax="$ac_default_prefix"
7001 fi
7002
7003 case ".$withval" in #(vi
7004 .\$\(*\)*|.\'*\'*) #(vi
7005   ;;
7006 ..|./*|.\\*) #(vi
7007   ;;
7008 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
7009   ;;
7010 .\${*prefix}*|.\${*dir}*) #(vi
7011   eval withval="$withval"
7012   case ".$withval" in #(vi
7013   .NONE/*)
7014     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7015     ;;
7016   esac
7017   ;; #(vi
7018 .no|.NONE/*)
7019   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7020   ;;
7021 *)
7022   { { echo "$as_me:7022: error: expected a pathname, not \"$withval\"" >&5
7023 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7024    { (exit 1); exit 1; }; }
7025   ;;
7026 esac
7027
7028 fi
7029 eval TERMINFO="$withval"
7030
7031 echo "$as_me:7031: result: $TERMINFO" >&5
7032 echo "${ECHO_T}$TERMINFO" >&6
7033
7034 cat >>confdefs.h <<EOF
7035 #define TERMINFO "$TERMINFO"
7036 EOF
7037
7038 fi
7039
7040 ###     use option --disable-big-core to make tic run on small machines
7041 ###     We need 4Mb, check if we can allocate 50% more than that.
7042 echo "$as_me:7042: checking if big-core option selected" >&5
7043 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7044
7045 # Check whether --enable-big-core or --disable-big-core was given.
7046 if test "${enable_big_core+set}" = set; then
7047   enableval="$enable_big_core"
7048   with_big_core=$enableval
7049 else
7050   if test "$cross_compiling" = yes; then
7051   with_big_core=no
7052 else
7053   cat >conftest.$ac_ext <<_ACEOF
7054 #line 7054 "configure"
7055 #include "confdefs.h"
7056
7057 #include <stdlib.h>
7058 #include <string.h>
7059 int main() {
7060         unsigned long n = 6000000L;
7061         char *s = malloc(n);
7062         if (s != 0)
7063                 s[0] = s[n-1] = 0;
7064         ${cf_cv_main_return:-return}(s == 0);
7065 }
7066 _ACEOF
7067 rm -f conftest$ac_exeext
7068 if { (eval echo "$as_me:7068: \"$ac_link\"") >&5
7069   (eval $ac_link) 2>&5
7070   ac_status=$?
7071   echo "$as_me:7071: \$? = $ac_status" >&5
7072   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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   with_big_core=yes
7079 else
7080   echo "$as_me: program exited with status $ac_status" >&5
7081 echo "$as_me: failed program was:" >&5
7082 cat conftest.$ac_ext >&5
7083 with_big_core=no
7084 fi
7085 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7086 fi
7087 fi;
7088 echo "$as_me:7088: result: $with_big_core" >&5
7089 echo "${ECHO_T}$with_big_core" >&6
7090 test "x$with_big_core" = "xyes" &&
7091 cat >>confdefs.h <<\EOF
7092 #define HAVE_BIG_CORE 1
7093 EOF
7094
7095 ### ISO C only guarantees 512-char strings, we have tables which load faster
7096 ### when constructed using "big" strings.  More than the C compiler, the awk
7097 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7098 echo "$as_me:7098: checking if big-strings option selected" >&5
7099 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7100
7101 # Check whether --enable-big-strings or --disable-big-strings was given.
7102 if test "${enable_big_strings+set}" = set; then
7103   enableval="$enable_big_strings"
7104   with_big_strings=$enableval
7105 else
7106
7107         case x$AWK in #(vi
7108         x)
7109                 eval with_big_strings=no
7110                 ;;
7111         *) #(vi
7112                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7113                         | $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
7114                         eval with_big_strings=yes
7115                 else
7116                         eval with_big_strings=no
7117                 fi
7118                 ;;
7119         esac
7120
7121 fi;
7122 echo "$as_me:7122: result: $with_big_strings" >&5
7123 echo "${ECHO_T}$with_big_strings" >&6
7124
7125 USE_BIG_STRINGS=0
7126 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7127
7128 ###     use option --enable-termcap to compile in the termcap fallback support
7129 echo "$as_me:7129: checking if you want termcap-fallback support" >&5
7130 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7131
7132 # Check whether --enable-termcap or --disable-termcap was given.
7133 if test "${enable_termcap+set}" = set; then
7134   enableval="$enable_termcap"
7135   with_termcap=$enableval
7136 else
7137   with_termcap=no
7138 fi;
7139 echo "$as_me:7139: result: $with_termcap" >&5
7140 echo "${ECHO_T}$with_termcap" >&6
7141
7142 NCURSES_USE_TERMCAP=0
7143 if test "x$with_termcap" != "xyes" ; then
7144         if test "$use_database" = no ; then
7145                 if test -z "$with_fallback" ; then
7146                         { { echo "$as_me:7146: error: You have disabled the database w/o specifying fallbacks" >&5
7147 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7148    { (exit 1); exit 1; }; }
7149                 fi
7150         fi
7151
7152 cat >>confdefs.h <<\EOF
7153 #define PURE_TERMINFO 1
7154 EOF
7155
7156 else
7157
7158         if test "$with_ticlib" != no ; then
7159                 { { echo "$as_me:7159: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7160 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7161    { (exit 1); exit 1; }; }
7162         fi
7163
7164         NCURSES_USE_TERMCAP=1
7165         echo "$as_me:7165: checking for list of termcap files" >&5
7166 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7167
7168 # Check whether --with-termpath or --without-termpath was given.
7169 if test "${with_termpath+set}" = set; then
7170   withval="$with_termpath"
7171
7172 else
7173   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7174 fi;
7175 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7176 cf_dst_path=
7177 for cf_src_path in $withval
7178 do
7179
7180 if test "x$prefix" != xNONE; then
7181   cf_path_syntax="$prefix"
7182 else
7183   cf_path_syntax="$ac_default_prefix"
7184 fi
7185
7186 case ".$cf_src_path" in #(vi
7187 .\$\(*\)*|.\'*\'*) #(vi
7188   ;;
7189 ..|./*|.\\*) #(vi
7190   ;;
7191 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
7192   ;;
7193 .\${*prefix}*|.\${*dir}*) #(vi
7194   eval cf_src_path="$cf_src_path"
7195   case ".$cf_src_path" in #(vi
7196   .NONE/*)
7197     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7198     ;;
7199   esac
7200   ;; #(vi
7201 .no|.NONE/*)
7202   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7203   ;;
7204 *)
7205   { { echo "$as_me:7205: error: expected a pathname, not \"$cf_src_path\"" >&5
7206 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7207    { (exit 1); exit 1; }; }
7208   ;;
7209 esac
7210
7211   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7212   cf_dst_path="${cf_dst_path}${cf_src_path}"
7213 done
7214 IFS="$ac_save_ifs"
7215
7216 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7217 # so we have to check/work around.  We do prefer the result of "eval"...
7218 eval cf_dst_eval="$cf_dst_path"
7219 case "x$cf_dst_eval" in #(vi
7220 xNONE*) #(vi
7221         TERMPATH=$cf_dst_path
7222         ;;
7223 *)
7224         TERMPATH="$cf_dst_eval"
7225         ;;
7226 esac
7227
7228         echo "$as_me:7228: result: $TERMPATH" >&5
7229 echo "${ECHO_T}$TERMPATH" >&6
7230         test -n "$TERMPATH" &&
7231 cat >>confdefs.h <<EOF
7232 #define TERMPATH "$TERMPATH"
7233 EOF
7234
7235         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7236         echo "$as_me:7236: checking if fast termcap-loader is needed" >&5
7237 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7238
7239 # Check whether --enable-getcap or --disable-getcap was given.
7240 if test "${enable_getcap+set}" = set; then
7241   enableval="$enable_getcap"
7242   with_getcap=$enableval
7243 else
7244   with_getcap=no
7245 fi;
7246         echo "$as_me:7246: result: $with_getcap" >&5
7247 echo "${ECHO_T}$with_getcap" >&6
7248         test "x$with_getcap" = "xyes" &&
7249 cat >>confdefs.h <<\EOF
7250 #define USE_GETCAP 1
7251 EOF
7252
7253         echo "$as_me:7253: checking if translated termcaps will be cached in ~/.terminfo" >&5
7254 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7255
7256 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7257 if test "${enable_getcap_cache+set}" = set; then
7258   enableval="$enable_getcap_cache"
7259   with_getcap_cache=$enableval
7260 else
7261   with_getcap_cache=no
7262 fi;
7263         echo "$as_me:7263: result: $with_getcap_cache" >&5
7264 echo "${ECHO_T}$with_getcap_cache" >&6
7265         test "x$with_getcap_cache" = "xyes" &&
7266 cat >>confdefs.h <<\EOF
7267 #define USE_GETCAP_CACHE 1
7268 EOF
7269
7270 fi
7271
7272 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7273 echo "$as_me:7273: checking if ~/.terminfo is wanted" >&5
7274 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7275
7276 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7277 if test "${enable_home_terminfo+set}" = set; then
7278   enableval="$enable_home_terminfo"
7279   with_home_terminfo=$enableval
7280 else
7281   with_home_terminfo=yes
7282 fi;
7283 echo "$as_me:7283: result: $with_home_terminfo" >&5
7284 echo "${ECHO_T}$with_home_terminfo" >&6
7285 test "x$with_home_terminfo" = "xyes" &&
7286 cat >>confdefs.h <<\EOF
7287 #define USE_HOME_TERMINFO 1
7288 EOF
7289
7290 echo "$as_me:7290: checking if you want to use restricted environment when running as root" >&5
7291 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7292
7293 # Check whether --enable-root-environ or --disable-root-environ was given.
7294 if test "${enable_root_environ+set}" = set; then
7295   enableval="$enable_root_environ"
7296   with_root_environ=$enableval
7297 else
7298   with_root_environ=yes
7299 fi;
7300 echo "$as_me:7300: result: $with_root_environ" >&5
7301 echo "${ECHO_T}$with_root_environ" >&6
7302 test "x$with_root_environ" = xyes &&
7303 cat >>confdefs.h <<\EOF
7304 #define USE_ROOT_ENVIRON 1
7305 EOF
7306
7307 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7308 ###   to reduce storage requirements for the terminfo database.
7309
7310 for ac_func in \
7311         remove \
7312         unlink
7313 do
7314 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7315 echo "$as_me:7315: checking for $ac_func" >&5
7316 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7317 if eval "test \"\${$as_ac_var+set}\" = set"; then
7318   echo $ECHO_N "(cached) $ECHO_C" >&6
7319 else
7320   cat >conftest.$ac_ext <<_ACEOF
7321 #line 7321 "configure"
7322 #include "confdefs.h"
7323 /* System header to define __stub macros and hopefully few prototypes,
7324     which can conflict with char $ac_func (); below.  */
7325 #include <assert.h>
7326 /* Override any gcc2 internal prototype to avoid an error.  */
7327 #ifdef __cplusplus
7328 extern "C"
7329 #endif
7330 /* We use char because int might match the return type of a gcc2
7331    builtin and then its argument prototype would still apply.  */
7332 char $ac_func ();
7333 char (*f) ();
7334
7335 int
7336 main ()
7337 {
7338 /* The GNU C library defines this for functions which it implements
7339     to always fail with ENOSYS.  Some functions are actually named
7340     something starting with __ and the normal name is an alias.  */
7341 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7342 choke me
7343 #else
7344 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7345 #endif
7346
7347   ;
7348   return 0;
7349 }
7350 _ACEOF
7351 rm -f conftest.$ac_objext conftest$ac_exeext
7352 if { (eval echo "$as_me:7352: \"$ac_link\"") >&5
7353   (eval $ac_link) 2>&5
7354   ac_status=$?
7355   echo "$as_me:7355: \$? = $ac_status" >&5
7356   (exit $ac_status); } &&
7357          { ac_try='test -s conftest$ac_exeext'
7358   { (eval echo "$as_me:7358: \"$ac_try\"") >&5
7359   (eval $ac_try) 2>&5
7360   ac_status=$?
7361   echo "$as_me:7361: \$? = $ac_status" >&5
7362   (exit $ac_status); }; }; then
7363   eval "$as_ac_var=yes"
7364 else
7365   echo "$as_me: failed program was:" >&5
7366 cat conftest.$ac_ext >&5
7367 eval "$as_ac_var=no"
7368 fi
7369 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7370 fi
7371 echo "$as_me:7371: result: `eval echo '${'$as_ac_var'}'`" >&5
7372 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7373 if test `eval echo '${'$as_ac_var'}'` = yes; then
7374   cat >>confdefs.h <<EOF
7375 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7376 EOF
7377
7378 fi
7379 done
7380
7381 if test "$cross_compiling" = yes ; then
7382
7383 for ac_func in \
7384                 link \
7385                 symlink
7386 do
7387 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7388 echo "$as_me:7388: checking for $ac_func" >&5
7389 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7390 if eval "test \"\${$as_ac_var+set}\" = set"; then
7391   echo $ECHO_N "(cached) $ECHO_C" >&6
7392 else
7393   cat >conftest.$ac_ext <<_ACEOF
7394 #line 7394 "configure"
7395 #include "confdefs.h"
7396 /* System header to define __stub macros and hopefully few prototypes,
7397     which can conflict with char $ac_func (); below.  */
7398 #include <assert.h>
7399 /* Override any gcc2 internal prototype to avoid an error.  */
7400 #ifdef __cplusplus
7401 extern "C"
7402 #endif
7403 /* We use char because int might match the return type of a gcc2
7404    builtin and then its argument prototype would still apply.  */
7405 char $ac_func ();
7406 char (*f) ();
7407
7408 int
7409 main ()
7410 {
7411 /* The GNU C library defines this for functions which it implements
7412     to always fail with ENOSYS.  Some functions are actually named
7413     something starting with __ and the normal name is an alias.  */
7414 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7415 choke me
7416 #else
7417 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7418 #endif
7419
7420   ;
7421   return 0;
7422 }
7423 _ACEOF
7424 rm -f conftest.$ac_objext conftest$ac_exeext
7425 if { (eval echo "$as_me:7425: \"$ac_link\"") >&5
7426   (eval $ac_link) 2>&5
7427   ac_status=$?
7428   echo "$as_me:7428: \$? = $ac_status" >&5
7429   (exit $ac_status); } &&
7430          { ac_try='test -s conftest$ac_exeext'
7431   { (eval echo "$as_me:7431: \"$ac_try\"") >&5
7432   (eval $ac_try) 2>&5
7433   ac_status=$?
7434   echo "$as_me:7434: \$? = $ac_status" >&5
7435   (exit $ac_status); }; }; then
7436   eval "$as_ac_var=yes"
7437 else
7438   echo "$as_me: failed program was:" >&5
7439 cat conftest.$ac_ext >&5
7440 eval "$as_ac_var=no"
7441 fi
7442 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7443 fi
7444 echo "$as_me:7444: result: `eval echo '${'$as_ac_var'}'`" >&5
7445 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7446 if test `eval echo '${'$as_ac_var'}'` = yes; then
7447   cat >>confdefs.h <<EOF
7448 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7449 EOF
7450
7451 fi
7452 done
7453
7454 else
7455         echo "$as_me:7455: checking if link/symlink functions work" >&5
7456 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7457 if test "${cf_cv_link_funcs+set}" = set; then
7458   echo $ECHO_N "(cached) $ECHO_C" >&6
7459 else
7460
7461                 cf_cv_link_funcs=
7462                 for cf_func in link symlink ; do
7463                         if test "$cross_compiling" = yes; then
7464
7465                         eval 'ac_cv_func_'$cf_func'=error'
7466 else
7467   cat >conftest.$ac_ext <<_ACEOF
7468 #line 7468 "configure"
7469 #include "confdefs.h"
7470
7471 #include <sys/types.h>
7472 #include <sys/stat.h>
7473 #ifdef HAVE_UNISTD_H
7474 #include <unistd.h>
7475 #endif
7476 int main()
7477 {
7478         int fail = 0;
7479         char *src = "config.log";
7480         char *dst = "conftest.chk";
7481         struct stat src_sb;
7482         struct stat dst_sb;
7483
7484         stat(src, &src_sb);
7485         fail = ($cf_func("config.log", "conftest.chk") < 0)
7486             || (stat(dst, &dst_sb) < 0)
7487             || (dst_sb.st_mtime != src_sb.st_mtime);
7488 #ifdef HAVE_UNLINK
7489         unlink(dst);
7490 #else
7491         remove(dst);
7492 #endif
7493         ${cf_cv_main_return:-return} (fail);
7494 }
7495
7496 _ACEOF
7497 rm -f conftest$ac_exeext
7498 if { (eval echo "$as_me:7498: \"$ac_link\"") >&5
7499   (eval $ac_link) 2>&5
7500   ac_status=$?
7501   echo "$as_me:7501: \$? = $ac_status" >&5
7502   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7503   { (eval echo "$as_me:7503: \"$ac_try\"") >&5
7504   (eval $ac_try) 2>&5
7505   ac_status=$?
7506   echo "$as_me:7506: \$? = $ac_status" >&5
7507   (exit $ac_status); }; }; then
7508
7509                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7510                         eval 'ac_cv_func_'$cf_func'=yes'
7511 else
7512   echo "$as_me: program exited with status $ac_status" >&5
7513 echo "$as_me: failed program was:" >&5
7514 cat conftest.$ac_ext >&5
7515
7516                         eval 'ac_cv_func_'$cf_func'=no'
7517 fi
7518 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7519 fi
7520                 done
7521                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7522
7523 fi
7524 echo "$as_me:7524: result: $cf_cv_link_funcs" >&5
7525 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7526         test "$ac_cv_func_link"    = yes &&
7527 cat >>confdefs.h <<\EOF
7528 #define HAVE_LINK 1
7529 EOF
7530
7531         test "$ac_cv_func_symlink" = yes &&
7532 cat >>confdefs.h <<\EOF
7533 #define HAVE_SYMLINK 1
7534 EOF
7535
7536 fi
7537
7538 with_links=no
7539 with_symlinks=no
7540
7541 # soft links (symbolic links) are useful for some systems where hard links do
7542 # not work, or to make it simpler to copy terminfo trees around.
7543 if test "x$ac_cv_func_symlink" = xyes ; then
7544     echo "$as_me:7544: checking if tic should use symbolic links" >&5
7545 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7546
7547 # Check whether --enable-symlinks or --disable-symlinks was given.
7548 if test "${enable_symlinks+set}" = set; then
7549   enableval="$enable_symlinks"
7550   with_symlinks=$enableval
7551 else
7552   with_symlinks=no
7553 fi;
7554     echo "$as_me:7554: result: $with_symlinks" >&5
7555 echo "${ECHO_T}$with_symlinks" >&6
7556 fi
7557
7558 # If we have hard links and did not choose to use soft links instead, there is
7559 # no reason to make this choice optional - use the hard links.
7560 if test "$with_symlinks" = no ; then
7561     echo "$as_me:7561: checking if tic should use hard links" >&5
7562 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7563     if test "x$ac_cv_func_link" = xyes ; then
7564         with_links=yes
7565     else
7566         with_links=no
7567     fi
7568     echo "$as_me:7568: result: $with_links" >&5
7569 echo "${ECHO_T}$with_links" >&6
7570 fi
7571
7572 test "x$with_links" = xyes &&
7573 cat >>confdefs.h <<\EOF
7574 #define USE_LINKS 1
7575 EOF
7576
7577 test "x$with_symlinks" = xyes &&
7578 cat >>confdefs.h <<\EOF
7579 #define USE_SYMLINKS 1
7580 EOF
7581
7582 ###   use option --enable-broken-linker to force on use of broken-linker support
7583 echo "$as_me:7583: checking if you want broken-linker support code" >&5
7584 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7585
7586 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7587 if test "${enable_broken_linker+set}" = set; then
7588   enableval="$enable_broken_linker"
7589   with_broken_linker=$enableval
7590 else
7591   with_broken_linker=${BROKEN_LINKER:-no}
7592 fi;
7593 echo "$as_me:7593: result: $with_broken_linker" >&5
7594 echo "${ECHO_T}$with_broken_linker" >&6
7595
7596 BROKEN_LINKER=0
7597 if test "x$with_broken_linker" = xyes ; then
7598
7599 cat >>confdefs.h <<\EOF
7600 #define BROKEN_LINKER 1
7601 EOF
7602
7603         BROKEN_LINKER=1
7604 elif test "$DFT_LWR_MODEL" = shared ; then
7605         case $cf_cv_system_name in #(vi
7606         cygwin*)
7607
7608 cat >>confdefs.h <<\EOF
7609 #define BROKEN_LINKER 1
7610 EOF
7611
7612                 BROKEN_LINKER=1
7613                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7614
7615 echo "${as_me:-configure}:7615: testing cygwin linker is broken anyway ..." 1>&5
7616
7617                 ;;
7618         esac
7619 fi
7620
7621 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7622 echo "$as_me:7622: checking if tputs should process BSD-style prefix padding" >&5
7623 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7624
7625 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7626 if test "${enable_bsdpad+set}" = set; then
7627   enableval="$enable_bsdpad"
7628   with_bsdpad=$enableval
7629 else
7630   with_bsdpad=no
7631 fi;
7632 echo "$as_me:7632: result: $with_bsdpad" >&5
7633 echo "${ECHO_T}$with_bsdpad" >&6
7634 test "x$with_bsdpad" = xyes &&
7635 cat >>confdefs.h <<\EOF
7636 #define BSD_TPUTS 1
7637 EOF
7638
7639 ###   use option --enable-widec to turn on use of wide-character support
7640 NCURSES_CH_T=chtype
7641 NCURSES_LIBUTF8=0
7642
7643 NEED_WCHAR_H=0
7644 NCURSES_MBSTATE_T=0
7645 NCURSES_WCHAR_T=0
7646 NCURSES_WINT_T=0
7647
7648 # Check to define _XOPEN_SOURCE "automatically"
7649
7650 cf_XOPEN_SOURCE=500
7651 cf_POSIX_C_SOURCE=199506L
7652 cf_xopen_source=
7653
7654 case $host_os in #(vi
7655 aix[4-7]*) #(vi
7656         cf_xopen_source="-D_ALL_SOURCE"
7657         ;;
7658 cygwin|msys) #(vi
7659         cf_XOPEN_SOURCE=600
7660         ;;
7661 darwin[0-8].*) #(vi
7662         cf_xopen_source="-D_APPLE_C_SOURCE"
7663         ;;
7664 darwin*) #(vi
7665         cf_xopen_source="-D_DARWIN_C_SOURCE"
7666         cf_XOPEN_SOURCE=
7667         ;;
7668 freebsd*|dragonfly*) #(vi
7669         # 5.x headers associate
7670         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7671         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7672         cf_POSIX_C_SOURCE=200112L
7673         cf_XOPEN_SOURCE=600
7674         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7675         ;;
7676 hpux11*) #(vi
7677         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7678         ;;
7679 hpux*) #(vi
7680         cf_xopen_source="-D_HPUX_SOURCE"
7681         ;;
7682 irix[56].*) #(vi
7683         cf_xopen_source="-D_SGI_SOURCE"
7684         cf_XOPEN_SOURCE=
7685         ;;
7686 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7687
7688 echo "$as_me:7688: checking if we must define _GNU_SOURCE" >&5
7689 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7690 if test "${cf_cv_gnu_source+set}" = set; then
7691   echo $ECHO_N "(cached) $ECHO_C" >&6
7692 else
7693
7694 cat >conftest.$ac_ext <<_ACEOF
7695 #line 7695 "configure"
7696 #include "confdefs.h"
7697 #include <sys/types.h>
7698 int
7699 main ()
7700 {
7701
7702 #ifndef _XOPEN_SOURCE
7703 make an error
7704 #endif
7705   ;
7706   return 0;
7707 }
7708 _ACEOF
7709 rm -f conftest.$ac_objext
7710 if { (eval echo "$as_me:7710: \"$ac_compile\"") >&5
7711   (eval $ac_compile) 2>&5
7712   ac_status=$?
7713   echo "$as_me:7713: \$? = $ac_status" >&5
7714   (exit $ac_status); } &&
7715          { ac_try='test -s conftest.$ac_objext'
7716   { (eval echo "$as_me:7716: \"$ac_try\"") >&5
7717   (eval $ac_try) 2>&5
7718   ac_status=$?
7719   echo "$as_me:7719: \$? = $ac_status" >&5
7720   (exit $ac_status); }; }; then
7721   cf_cv_gnu_source=no
7722 else
7723   echo "$as_me: failed program was:" >&5
7724 cat conftest.$ac_ext >&5
7725 cf_save="$CPPFLAGS"
7726          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7727          cat >conftest.$ac_ext <<_ACEOF
7728 #line 7728 "configure"
7729 #include "confdefs.h"
7730 #include <sys/types.h>
7731 int
7732 main ()
7733 {
7734
7735 #ifdef _XOPEN_SOURCE
7736 make an error
7737 #endif
7738   ;
7739   return 0;
7740 }
7741 _ACEOF
7742 rm -f conftest.$ac_objext
7743 if { (eval echo "$as_me:7743: \"$ac_compile\"") >&5
7744   (eval $ac_compile) 2>&5
7745   ac_status=$?
7746   echo "$as_me:7746: \$? = $ac_status" >&5
7747   (exit $ac_status); } &&
7748          { ac_try='test -s conftest.$ac_objext'
7749   { (eval echo "$as_me:7749: \"$ac_try\"") >&5
7750   (eval $ac_try) 2>&5
7751   ac_status=$?
7752   echo "$as_me:7752: \$? = $ac_status" >&5
7753   (exit $ac_status); }; }; then
7754   cf_cv_gnu_source=no
7755 else
7756   echo "$as_me: failed program was:" >&5
7757 cat conftest.$ac_ext >&5
7758 cf_cv_gnu_source=yes
7759 fi
7760 rm -f conftest.$ac_objext conftest.$ac_ext
7761         CPPFLAGS="$cf_save"
7762
7763 fi
7764 rm -f conftest.$ac_objext conftest.$ac_ext
7765
7766 fi
7767 echo "$as_me:7767: result: $cf_cv_gnu_source" >&5
7768 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7769 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7770
7771         ;;
7772 minix*) #(vi
7773         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7774         ;;
7775 mirbsd*) #(vi
7776         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7777         cf_XOPEN_SOURCE=
7778
7779 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7780
7781 cf_save_CFLAGS="$CFLAGS"
7782 cf_save_CPPFLAGS="$CPPFLAGS"
7783
7784 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7785         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7786                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7787
7788 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7789         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7790                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7791
7792 echo "$as_me:7792: checking if we should define _POSIX_C_SOURCE" >&5
7793 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7794 if test "${cf_cv_posix_c_source+set}" = set; then
7795   echo $ECHO_N "(cached) $ECHO_C" >&6
7796 else
7797
7798 echo "${as_me:-configure}:7798: testing if the symbol is already defined go no further ..." 1>&5
7799
7800         cat >conftest.$ac_ext <<_ACEOF
7801 #line 7801 "configure"
7802 #include "confdefs.h"
7803 #include <sys/types.h>
7804 int
7805 main ()
7806 {
7807
7808 #ifndef _POSIX_C_SOURCE
7809 make an error
7810 #endif
7811   ;
7812   return 0;
7813 }
7814 _ACEOF
7815 rm -f conftest.$ac_objext
7816 if { (eval echo "$as_me:7816: \"$ac_compile\"") >&5
7817   (eval $ac_compile) 2>&5
7818   ac_status=$?
7819   echo "$as_me:7819: \$? = $ac_status" >&5
7820   (exit $ac_status); } &&
7821          { ac_try='test -s conftest.$ac_objext'
7822   { (eval echo "$as_me:7822: \"$ac_try\"") >&5
7823   (eval $ac_try) 2>&5
7824   ac_status=$?
7825   echo "$as_me:7825: \$? = $ac_status" >&5
7826   (exit $ac_status); }; }; then
7827   cf_cv_posix_c_source=no
7828 else
7829   echo "$as_me: failed program was:" >&5
7830 cat conftest.$ac_ext >&5
7831 cf_want_posix_source=no
7832          case .$cf_POSIX_C_SOURCE in #(vi
7833          .[12]??*) #(vi
7834                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7835                 ;;
7836          .2) #(vi
7837                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7838                 cf_want_posix_source=yes
7839                 ;;
7840          .*)
7841                 cf_want_posix_source=yes
7842                 ;;
7843          esac
7844          if test "$cf_want_posix_source" = yes ; then
7845                 cat >conftest.$ac_ext <<_ACEOF
7846 #line 7846 "configure"
7847 #include "confdefs.h"
7848 #include <sys/types.h>
7849 int
7850 main ()
7851 {
7852
7853 #ifdef _POSIX_SOURCE
7854 make an error
7855 #endif
7856   ;
7857   return 0;
7858 }
7859 _ACEOF
7860 rm -f conftest.$ac_objext
7861 if { (eval echo "$as_me:7861: \"$ac_compile\"") >&5
7862   (eval $ac_compile) 2>&5
7863   ac_status=$?
7864   echo "$as_me:7864: \$? = $ac_status" >&5
7865   (exit $ac_status); } &&
7866          { ac_try='test -s conftest.$ac_objext'
7867   { (eval echo "$as_me:7867: \"$ac_try\"") >&5
7868   (eval $ac_try) 2>&5
7869   ac_status=$?
7870   echo "$as_me:7870: \$? = $ac_status" >&5
7871   (exit $ac_status); }; }; then
7872   :
7873 else
7874   echo "$as_me: failed program was:" >&5
7875 cat conftest.$ac_ext >&5
7876 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7877 fi
7878 rm -f conftest.$ac_objext conftest.$ac_ext
7879          fi
7880
7881 echo "${as_me:-configure}:7881: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7882
7883          CFLAGS="$cf_trim_CFLAGS"
7884          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7885
7886 echo "${as_me:-configure}:7886: testing if the second compile does not leave our definition intact error ..." 1>&5
7887
7888          cat >conftest.$ac_ext <<_ACEOF
7889 #line 7889 "configure"
7890 #include "confdefs.h"
7891 #include <sys/types.h>
7892 int
7893 main ()
7894 {
7895
7896 #ifndef _POSIX_C_SOURCE
7897 make an error
7898 #endif
7899   ;
7900   return 0;
7901 }
7902 _ACEOF
7903 rm -f conftest.$ac_objext
7904 if { (eval echo "$as_me:7904: \"$ac_compile\"") >&5
7905   (eval $ac_compile) 2>&5
7906   ac_status=$?
7907   echo "$as_me:7907: \$? = $ac_status" >&5
7908   (exit $ac_status); } &&
7909          { ac_try='test -s conftest.$ac_objext'
7910   { (eval echo "$as_me:7910: \"$ac_try\"") >&5
7911   (eval $ac_try) 2>&5
7912   ac_status=$?
7913   echo "$as_me:7913: \$? = $ac_status" >&5
7914   (exit $ac_status); }; }; then
7915   :
7916 else
7917   echo "$as_me: failed program was:" >&5
7918 cat conftest.$ac_ext >&5
7919 cf_cv_posix_c_source=no
7920 fi
7921 rm -f conftest.$ac_objext conftest.$ac_ext
7922          CFLAGS="$cf_save_CFLAGS"
7923          CPPFLAGS="$cf_save_CPPFLAGS"
7924
7925 fi
7926 rm -f conftest.$ac_objext conftest.$ac_ext
7927
7928 fi
7929 echo "$as_me:7929: result: $cf_cv_posix_c_source" >&5
7930 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7931
7932 if test "$cf_cv_posix_c_source" != no ; then
7933         CFLAGS="$cf_trim_CFLAGS"
7934         CPPFLAGS="$cf_trim_CPPFLAGS"
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_cv_posix_c_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 "x${cf_add_cflags}" != "x${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 "x${cf_add_cflags}" != "x${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         ;;
8017 netbsd*) #(vi
8018         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8019         ;;
8020 openbsd[4-9]*) #(vi
8021         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8022         cf_xopen_source="-D_BSD_SOURCE"
8023         cf_XOPEN_SOURCE=600
8024         ;;
8025 openbsd*) #(vi
8026         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8027         ;;
8028 osf[45]*) #(vi
8029         cf_xopen_source="-D_OSF_SOURCE"
8030         ;;
8031 nto-qnx*) #(vi
8032         cf_xopen_source="-D_QNX_SOURCE"
8033         ;;
8034 sco*) #(vi
8035         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8036         ;;
8037 solaris2.*) #(vi
8038         cf_xopen_source="-D__EXTENSIONS__"
8039         cf_cv_xopen_source=broken
8040         ;;
8041 sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8042         cf_XOPEN_SOURCE=
8043         cf_POSIX_C_SOURCE=
8044         ;;
8045 *)
8046
8047 echo "$as_me:8047: checking if we should define _XOPEN_SOURCE" >&5
8048 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8049 if test "${cf_cv_xopen_source+set}" = set; then
8050   echo $ECHO_N "(cached) $ECHO_C" >&6
8051 else
8052
8053         cat >conftest.$ac_ext <<_ACEOF
8054 #line 8054 "configure"
8055 #include "confdefs.h"
8056
8057 #include <stdlib.h>
8058 #include <string.h>
8059 #include <sys/types.h>
8060
8061 int
8062 main ()
8063 {
8064
8065 #ifndef _XOPEN_SOURCE
8066 make an error
8067 #endif
8068   ;
8069   return 0;
8070 }
8071 _ACEOF
8072 rm -f conftest.$ac_objext
8073 if { (eval echo "$as_me:8073: \"$ac_compile\"") >&5
8074   (eval $ac_compile) 2>&5
8075   ac_status=$?
8076   echo "$as_me:8076: \$? = $ac_status" >&5
8077   (exit $ac_status); } &&
8078          { ac_try='test -s conftest.$ac_objext'
8079   { (eval echo "$as_me:8079: \"$ac_try\"") >&5
8080   (eval $ac_try) 2>&5
8081   ac_status=$?
8082   echo "$as_me:8082: \$? = $ac_status" >&5
8083   (exit $ac_status); }; }; then
8084   cf_cv_xopen_source=no
8085 else
8086   echo "$as_me: failed program was:" >&5
8087 cat conftest.$ac_ext >&5
8088 cf_save="$CPPFLAGS"
8089          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8090          cat >conftest.$ac_ext <<_ACEOF
8091 #line 8091 "configure"
8092 #include "confdefs.h"
8093
8094 #include <stdlib.h>
8095 #include <string.h>
8096 #include <sys/types.h>
8097
8098 int
8099 main ()
8100 {
8101
8102 #ifdef _XOPEN_SOURCE
8103 make an error
8104 #endif
8105   ;
8106   return 0;
8107 }
8108 _ACEOF
8109 rm -f conftest.$ac_objext
8110 if { (eval echo "$as_me:8110: \"$ac_compile\"") >&5
8111   (eval $ac_compile) 2>&5
8112   ac_status=$?
8113   echo "$as_me:8113: \$? = $ac_status" >&5
8114   (exit $ac_status); } &&
8115          { ac_try='test -s conftest.$ac_objext'
8116   { (eval echo "$as_me:8116: \"$ac_try\"") >&5
8117   (eval $ac_try) 2>&5
8118   ac_status=$?
8119   echo "$as_me:8119: \$? = $ac_status" >&5
8120   (exit $ac_status); }; }; then
8121   cf_cv_xopen_source=no
8122 else
8123   echo "$as_me: failed program was:" >&5
8124 cat conftest.$ac_ext >&5
8125 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8126 fi
8127 rm -f conftest.$ac_objext conftest.$ac_ext
8128         CPPFLAGS="$cf_save"
8129
8130 fi
8131 rm -f conftest.$ac_objext conftest.$ac_ext
8132
8133 fi
8134 echo "$as_me:8134: result: $cf_cv_xopen_source" >&5
8135 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8136
8137 if test "$cf_cv_xopen_source" != no ; then
8138
8139 CFLAGS=`echo "$CFLAGS" | \
8140         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8141                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8142
8143 CPPFLAGS=`echo "$CPPFLAGS" | \
8144         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8145                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8146
8147         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8148
8149 cf_fix_cppflags=no
8150 cf_new_cflags=
8151 cf_new_cppflags=
8152 cf_new_extra_cppflags=
8153
8154 for cf_add_cflags in $cf_temp_xopen_source
8155 do
8156 case $cf_fix_cppflags in
8157 no)
8158         case $cf_add_cflags in #(vi
8159         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8160                 case $cf_add_cflags in
8161                 -D*)
8162                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8163
8164                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8165                                 && test -z "${cf_tst_cflags}" \
8166                                 && cf_fix_cppflags=yes
8167
8168                         if test $cf_fix_cppflags = yes ; then
8169                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8170                                 continue
8171                         elif test "${cf_tst_cflags}" = "\"'" ; then
8172                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8173                                 continue
8174                         fi
8175                         ;;
8176                 esac
8177                 case "$CPPFLAGS" in
8178                 *$cf_add_cflags) #(vi
8179                         ;;
8180                 *) #(vi
8181                         case $cf_add_cflags in #(vi
8182                         -D*)
8183                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8184
8185 CPPFLAGS=`echo "$CPPFLAGS" | \
8186         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8187                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8188
8189                                 ;;
8190                         esac
8191                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8192                         ;;
8193                 esac
8194                 ;;
8195         *)
8196                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8197                 ;;
8198         esac
8199         ;;
8200 yes)
8201         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8202
8203         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8204
8205         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8206                 && test -z "${cf_tst_cflags}" \
8207                 && cf_fix_cppflags=no
8208         ;;
8209 esac
8210 done
8211
8212 if test -n "$cf_new_cflags" ; then
8213
8214         CFLAGS="$CFLAGS $cf_new_cflags"
8215 fi
8216
8217 if test -n "$cf_new_cppflags" ; then
8218
8219         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8220 fi
8221
8222 if test -n "$cf_new_extra_cppflags" ; then
8223
8224         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8225 fi
8226
8227 fi
8228
8229 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8230
8231 cf_save_CFLAGS="$CFLAGS"
8232 cf_save_CPPFLAGS="$CPPFLAGS"
8233
8234 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8235         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8236                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8237
8238 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8239         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8240                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8241
8242 echo "$as_me:8242: checking if we should define _POSIX_C_SOURCE" >&5
8243 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8244 if test "${cf_cv_posix_c_source+set}" = set; then
8245   echo $ECHO_N "(cached) $ECHO_C" >&6
8246 else
8247
8248 echo "${as_me:-configure}:8248: testing if the symbol is already defined go no further ..." 1>&5
8249
8250         cat >conftest.$ac_ext <<_ACEOF
8251 #line 8251 "configure"
8252 #include "confdefs.h"
8253 #include <sys/types.h>
8254 int
8255 main ()
8256 {
8257
8258 #ifndef _POSIX_C_SOURCE
8259 make an error
8260 #endif
8261   ;
8262   return 0;
8263 }
8264 _ACEOF
8265 rm -f conftest.$ac_objext
8266 if { (eval echo "$as_me:8266: \"$ac_compile\"") >&5
8267   (eval $ac_compile) 2>&5
8268   ac_status=$?
8269   echo "$as_me:8269: \$? = $ac_status" >&5
8270   (exit $ac_status); } &&
8271          { ac_try='test -s conftest.$ac_objext'
8272   { (eval echo "$as_me:8272: \"$ac_try\"") >&5
8273   (eval $ac_try) 2>&5
8274   ac_status=$?
8275   echo "$as_me:8275: \$? = $ac_status" >&5
8276   (exit $ac_status); }; }; then
8277   cf_cv_posix_c_source=no
8278 else
8279   echo "$as_me: failed program was:" >&5
8280 cat conftest.$ac_ext >&5
8281 cf_want_posix_source=no
8282          case .$cf_POSIX_C_SOURCE in #(vi
8283          .[12]??*) #(vi
8284                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8285                 ;;
8286          .2) #(vi
8287                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8288                 cf_want_posix_source=yes
8289                 ;;
8290          .*)
8291                 cf_want_posix_source=yes
8292                 ;;
8293          esac
8294          if test "$cf_want_posix_source" = yes ; then
8295                 cat >conftest.$ac_ext <<_ACEOF
8296 #line 8296 "configure"
8297 #include "confdefs.h"
8298 #include <sys/types.h>
8299 int
8300 main ()
8301 {
8302
8303 #ifdef _POSIX_SOURCE
8304 make an error
8305 #endif
8306   ;
8307   return 0;
8308 }
8309 _ACEOF
8310 rm -f conftest.$ac_objext
8311 if { (eval echo "$as_me:8311: \"$ac_compile\"") >&5
8312   (eval $ac_compile) 2>&5
8313   ac_status=$?
8314   echo "$as_me:8314: \$? = $ac_status" >&5
8315   (exit $ac_status); } &&
8316          { ac_try='test -s conftest.$ac_objext'
8317   { (eval echo "$as_me:8317: \"$ac_try\"") >&5
8318   (eval $ac_try) 2>&5
8319   ac_status=$?
8320   echo "$as_me:8320: \$? = $ac_status" >&5
8321   (exit $ac_status); }; }; then
8322   :
8323 else
8324   echo "$as_me: failed program was:" >&5
8325 cat conftest.$ac_ext >&5
8326 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8327 fi
8328 rm -f conftest.$ac_objext conftest.$ac_ext
8329          fi
8330
8331 echo "${as_me:-configure}:8331: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8332
8333          CFLAGS="$cf_trim_CFLAGS"
8334          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8335
8336 echo "${as_me:-configure}:8336: testing if the second compile does not leave our definition intact error ..." 1>&5
8337
8338          cat >conftest.$ac_ext <<_ACEOF
8339 #line 8339 "configure"
8340 #include "confdefs.h"
8341 #include <sys/types.h>
8342 int
8343 main ()
8344 {
8345
8346 #ifndef _POSIX_C_SOURCE
8347 make an error
8348 #endif
8349   ;
8350   return 0;
8351 }
8352 _ACEOF
8353 rm -f conftest.$ac_objext
8354 if { (eval echo "$as_me:8354: \"$ac_compile\"") >&5
8355   (eval $ac_compile) 2>&5
8356   ac_status=$?
8357   echo "$as_me:8357: \$? = $ac_status" >&5
8358   (exit $ac_status); } &&
8359          { ac_try='test -s conftest.$ac_objext'
8360   { (eval echo "$as_me:8360: \"$ac_try\"") >&5
8361   (eval $ac_try) 2>&5
8362   ac_status=$?
8363   echo "$as_me:8363: \$? = $ac_status" >&5
8364   (exit $ac_status); }; }; then
8365   :
8366 else
8367   echo "$as_me: failed program was:" >&5
8368 cat conftest.$ac_ext >&5
8369 cf_cv_posix_c_source=no
8370 fi
8371 rm -f conftest.$ac_objext conftest.$ac_ext
8372          CFLAGS="$cf_save_CFLAGS"
8373          CPPFLAGS="$cf_save_CPPFLAGS"
8374
8375 fi
8376 rm -f conftest.$ac_objext conftest.$ac_ext
8377
8378 fi
8379 echo "$as_me:8379: result: $cf_cv_posix_c_source" >&5
8380 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8381
8382 if test "$cf_cv_posix_c_source" != no ; then
8383         CFLAGS="$cf_trim_CFLAGS"
8384         CPPFLAGS="$cf_trim_CPPFLAGS"
8385
8386 cf_fix_cppflags=no
8387 cf_new_cflags=
8388 cf_new_cppflags=
8389 cf_new_extra_cppflags=
8390
8391 for cf_add_cflags in $cf_cv_posix_c_source
8392 do
8393 case $cf_fix_cppflags in
8394 no)
8395         case $cf_add_cflags in #(vi
8396         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8397                 case $cf_add_cflags in
8398                 -D*)
8399                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8400
8401                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8402                                 && test -z "${cf_tst_cflags}" \
8403                                 && cf_fix_cppflags=yes
8404
8405                         if test $cf_fix_cppflags = yes ; then
8406                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8407                                 continue
8408                         elif test "${cf_tst_cflags}" = "\"'" ; then
8409                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8410                                 continue
8411                         fi
8412                         ;;
8413                 esac
8414                 case "$CPPFLAGS" in
8415                 *$cf_add_cflags) #(vi
8416                         ;;
8417                 *) #(vi
8418                         case $cf_add_cflags in #(vi
8419                         -D*)
8420                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8421
8422 CPPFLAGS=`echo "$CPPFLAGS" | \
8423         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8424                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8425
8426                                 ;;
8427                         esac
8428                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8429                         ;;
8430                 esac
8431                 ;;
8432         *)
8433                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8434                 ;;
8435         esac
8436         ;;
8437 yes)
8438         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8439
8440         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8441
8442         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8443                 && test -z "${cf_tst_cflags}" \
8444                 && cf_fix_cppflags=no
8445         ;;
8446 esac
8447 done
8448
8449 if test -n "$cf_new_cflags" ; then
8450
8451         CFLAGS="$CFLAGS $cf_new_cflags"
8452 fi
8453
8454 if test -n "$cf_new_cppflags" ; then
8455
8456         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8457 fi
8458
8459 if test -n "$cf_new_extra_cppflags" ; then
8460
8461         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8462 fi
8463
8464 fi
8465
8466         ;;
8467 esac
8468
8469 if test -n "$cf_xopen_source" ; then
8470
8471 cf_fix_cppflags=no
8472 cf_new_cflags=
8473 cf_new_cppflags=
8474 cf_new_extra_cppflags=
8475
8476 for cf_add_cflags in $cf_xopen_source
8477 do
8478 case $cf_fix_cppflags in
8479 no)
8480         case $cf_add_cflags in #(vi
8481         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8482                 case $cf_add_cflags in
8483                 -D*)
8484                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8485
8486                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8487                                 && test -z "${cf_tst_cflags}" \
8488                                 && cf_fix_cppflags=yes
8489
8490                         if test $cf_fix_cppflags = yes ; then
8491                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8492                                 continue
8493                         elif test "${cf_tst_cflags}" = "\"'" ; then
8494                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8495                                 continue
8496                         fi
8497                         ;;
8498                 esac
8499                 case "$CPPFLAGS" in
8500                 *$cf_add_cflags) #(vi
8501                         ;;
8502                 *) #(vi
8503                         case $cf_add_cflags in #(vi
8504                         -D*)
8505                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8506
8507 CPPFLAGS=`echo "$CPPFLAGS" | \
8508         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8509                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8510
8511                                 ;;
8512                         esac
8513                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8514                         ;;
8515                 esac
8516                 ;;
8517         *)
8518                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8519                 ;;
8520         esac
8521         ;;
8522 yes)
8523         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8524
8525         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8526
8527         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8528                 && test -z "${cf_tst_cflags}" \
8529                 && cf_fix_cppflags=no
8530         ;;
8531 esac
8532 done
8533
8534 if test -n "$cf_new_cflags" ; then
8535         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8536
8537 echo "${as_me:-configure}:8537: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8538
8539         CFLAGS="$CFLAGS $cf_new_cflags"
8540 fi
8541
8542 if test -n "$cf_new_cppflags" ; then
8543         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8544
8545 echo "${as_me:-configure}:8545: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8546
8547         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8548 fi
8549
8550 if test -n "$cf_new_extra_cppflags" ; then
8551         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8552
8553 echo "${as_me:-configure}:8553: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8554
8555         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8556 fi
8557
8558 fi
8559
8560 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8561         echo "$as_me:8561: checking if _XOPEN_SOURCE really is set" >&5
8562 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8563         cat >conftest.$ac_ext <<_ACEOF
8564 #line 8564 "configure"
8565 #include "confdefs.h"
8566 #include <stdlib.h>
8567 int
8568 main ()
8569 {
8570
8571 #ifndef _XOPEN_SOURCE
8572 make an error
8573 #endif
8574   ;
8575   return 0;
8576 }
8577 _ACEOF
8578 rm -f conftest.$ac_objext
8579 if { (eval echo "$as_me:8579: \"$ac_compile\"") >&5
8580   (eval $ac_compile) 2>&5
8581   ac_status=$?
8582   echo "$as_me:8582: \$? = $ac_status" >&5
8583   (exit $ac_status); } &&
8584          { ac_try='test -s conftest.$ac_objext'
8585   { (eval echo "$as_me:8585: \"$ac_try\"") >&5
8586   (eval $ac_try) 2>&5
8587   ac_status=$?
8588   echo "$as_me:8588: \$? = $ac_status" >&5
8589   (exit $ac_status); }; }; then
8590   cf_XOPEN_SOURCE_set=yes
8591 else
8592   echo "$as_me: failed program was:" >&5
8593 cat conftest.$ac_ext >&5
8594 cf_XOPEN_SOURCE_set=no
8595 fi
8596 rm -f conftest.$ac_objext conftest.$ac_ext
8597         echo "$as_me:8597: result: $cf_XOPEN_SOURCE_set" >&5
8598 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8599         if test $cf_XOPEN_SOURCE_set = yes
8600         then
8601                 cat >conftest.$ac_ext <<_ACEOF
8602 #line 8602 "configure"
8603 #include "confdefs.h"
8604 #include <stdlib.h>
8605 int
8606 main ()
8607 {
8608
8609 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8610 make an error
8611 #endif
8612   ;
8613   return 0;
8614 }
8615 _ACEOF
8616 rm -f conftest.$ac_objext
8617 if { (eval echo "$as_me:8617: \"$ac_compile\"") >&5
8618   (eval $ac_compile) 2>&5
8619   ac_status=$?
8620   echo "$as_me:8620: \$? = $ac_status" >&5
8621   (exit $ac_status); } &&
8622          { ac_try='test -s conftest.$ac_objext'
8623   { (eval echo "$as_me:8623: \"$ac_try\"") >&5
8624   (eval $ac_try) 2>&5
8625   ac_status=$?
8626   echo "$as_me:8626: \$? = $ac_status" >&5
8627   (exit $ac_status); }; }; then
8628   cf_XOPEN_SOURCE_set_ok=yes
8629 else
8630   echo "$as_me: failed program was:" >&5
8631 cat conftest.$ac_ext >&5
8632 cf_XOPEN_SOURCE_set_ok=no
8633 fi
8634 rm -f conftest.$ac_objext conftest.$ac_ext
8635                 if test $cf_XOPEN_SOURCE_set_ok = no
8636                 then
8637                         { echo "$as_me:8637: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8638 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8639                 fi
8640         else
8641
8642 echo "$as_me:8642: checking if we should define _XOPEN_SOURCE" >&5
8643 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8644 if test "${cf_cv_xopen_source+set}" = set; then
8645   echo $ECHO_N "(cached) $ECHO_C" >&6
8646 else
8647
8648         cat >conftest.$ac_ext <<_ACEOF
8649 #line 8649 "configure"
8650 #include "confdefs.h"
8651
8652 #include <stdlib.h>
8653 #include <string.h>
8654 #include <sys/types.h>
8655
8656 int
8657 main ()
8658 {
8659
8660 #ifndef _XOPEN_SOURCE
8661 make an error
8662 #endif
8663   ;
8664   return 0;
8665 }
8666 _ACEOF
8667 rm -f conftest.$ac_objext
8668 if { (eval echo "$as_me:8668: \"$ac_compile\"") >&5
8669   (eval $ac_compile) 2>&5
8670   ac_status=$?
8671   echo "$as_me:8671: \$? = $ac_status" >&5
8672   (exit $ac_status); } &&
8673          { ac_try='test -s conftest.$ac_objext'
8674   { (eval echo "$as_me:8674: \"$ac_try\"") >&5
8675   (eval $ac_try) 2>&5
8676   ac_status=$?
8677   echo "$as_me:8677: \$? = $ac_status" >&5
8678   (exit $ac_status); }; }; then
8679   cf_cv_xopen_source=no
8680 else
8681   echo "$as_me: failed program was:" >&5
8682 cat conftest.$ac_ext >&5
8683 cf_save="$CPPFLAGS"
8684          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8685          cat >conftest.$ac_ext <<_ACEOF
8686 #line 8686 "configure"
8687 #include "confdefs.h"
8688
8689 #include <stdlib.h>
8690 #include <string.h>
8691 #include <sys/types.h>
8692
8693 int
8694 main ()
8695 {
8696
8697 #ifdef _XOPEN_SOURCE
8698 make an error
8699 #endif
8700   ;
8701   return 0;
8702 }
8703 _ACEOF
8704 rm -f conftest.$ac_objext
8705 if { (eval echo "$as_me:8705: \"$ac_compile\"") >&5
8706   (eval $ac_compile) 2>&5
8707   ac_status=$?
8708   echo "$as_me:8708: \$? = $ac_status" >&5
8709   (exit $ac_status); } &&
8710          { ac_try='test -s conftest.$ac_objext'
8711   { (eval echo "$as_me:8711: \"$ac_try\"") >&5
8712   (eval $ac_try) 2>&5
8713   ac_status=$?
8714   echo "$as_me:8714: \$? = $ac_status" >&5
8715   (exit $ac_status); }; }; then
8716   cf_cv_xopen_source=no
8717 else
8718   echo "$as_me: failed program was:" >&5
8719 cat conftest.$ac_ext >&5
8720 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8721 fi
8722 rm -f conftest.$ac_objext conftest.$ac_ext
8723         CPPFLAGS="$cf_save"
8724
8725 fi
8726 rm -f conftest.$ac_objext conftest.$ac_ext
8727
8728 fi
8729 echo "$as_me:8729: result: $cf_cv_xopen_source" >&5
8730 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8731
8732 if test "$cf_cv_xopen_source" != no ; then
8733
8734 CFLAGS=`echo "$CFLAGS" | \
8735         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8736                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8737
8738 CPPFLAGS=`echo "$CPPFLAGS" | \
8739         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8740                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8741
8742         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8743
8744 cf_fix_cppflags=no
8745 cf_new_cflags=
8746 cf_new_cppflags=
8747 cf_new_extra_cppflags=
8748
8749 for cf_add_cflags in $cf_temp_xopen_source
8750 do
8751 case $cf_fix_cppflags in
8752 no)
8753         case $cf_add_cflags in #(vi
8754         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8755                 case $cf_add_cflags in
8756                 -D*)
8757                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8758
8759                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8760                                 && test -z "${cf_tst_cflags}" \
8761                                 && cf_fix_cppflags=yes
8762
8763                         if test $cf_fix_cppflags = yes ; then
8764                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8765                                 continue
8766                         elif test "${cf_tst_cflags}" = "\"'" ; then
8767                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8768                                 continue
8769                         fi
8770                         ;;
8771                 esac
8772                 case "$CPPFLAGS" in
8773                 *$cf_add_cflags) #(vi
8774                         ;;
8775                 *) #(vi
8776                         case $cf_add_cflags in #(vi
8777                         -D*)
8778                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8779
8780 CPPFLAGS=`echo "$CPPFLAGS" | \
8781         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8782                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8783
8784                                 ;;
8785                         esac
8786                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8787                         ;;
8788                 esac
8789                 ;;
8790         *)
8791                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8792                 ;;
8793         esac
8794         ;;
8795 yes)
8796         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8797
8798         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8799
8800         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8801                 && test -z "${cf_tst_cflags}" \
8802                 && cf_fix_cppflags=no
8803         ;;
8804 esac
8805 done
8806
8807 if test -n "$cf_new_cflags" ; then
8808
8809         CFLAGS="$CFLAGS $cf_new_cflags"
8810 fi
8811
8812 if test -n "$cf_new_cppflags" ; then
8813
8814         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8815 fi
8816
8817 if test -n "$cf_new_extra_cppflags" ; then
8818
8819         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8820 fi
8821
8822 fi
8823
8824         fi
8825 fi
8826
8827 # Work around breakage on OS X
8828
8829 echo "$as_me:8829: checking if SIGWINCH is defined" >&5
8830 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8831 if test "${cf_cv_define_sigwinch+set}" = set; then
8832   echo $ECHO_N "(cached) $ECHO_C" >&6
8833 else
8834
8835         cat >conftest.$ac_ext <<_ACEOF
8836 #line 8836 "configure"
8837 #include "confdefs.h"
8838
8839 #include <sys/types.h>
8840 #include <sys/signal.h>
8841
8842 int
8843 main ()
8844 {
8845 int x = SIGWINCH
8846   ;
8847   return 0;
8848 }
8849 _ACEOF
8850 rm -f conftest.$ac_objext
8851 if { (eval echo "$as_me:8851: \"$ac_compile\"") >&5
8852   (eval $ac_compile) 2>&5
8853   ac_status=$?
8854   echo "$as_me:8854: \$? = $ac_status" >&5
8855   (exit $ac_status); } &&
8856          { ac_try='test -s conftest.$ac_objext'
8857   { (eval echo "$as_me:8857: \"$ac_try\"") >&5
8858   (eval $ac_try) 2>&5
8859   ac_status=$?
8860   echo "$as_me:8860: \$? = $ac_status" >&5
8861   (exit $ac_status); }; }; then
8862   cf_cv_define_sigwinch=yes
8863 else
8864   echo "$as_me: failed program was:" >&5
8865 cat conftest.$ac_ext >&5
8866 cat >conftest.$ac_ext <<_ACEOF
8867 #line 8867 "configure"
8868 #include "confdefs.h"
8869
8870 #undef _XOPEN_SOURCE
8871 #undef _POSIX_SOURCE
8872 #undef _POSIX_C_SOURCE
8873 #include <sys/types.h>
8874 #include <sys/signal.h>
8875
8876 int
8877 main ()
8878 {
8879 int x = SIGWINCH
8880   ;
8881   return 0;
8882 }
8883 _ACEOF
8884 rm -f conftest.$ac_objext
8885 if { (eval echo "$as_me:8885: \"$ac_compile\"") >&5
8886   (eval $ac_compile) 2>&5
8887   ac_status=$?
8888   echo "$as_me:8888: \$? = $ac_status" >&5
8889   (exit $ac_status); } &&
8890          { ac_try='test -s conftest.$ac_objext'
8891   { (eval echo "$as_me:8891: \"$ac_try\"") >&5
8892   (eval $ac_try) 2>&5
8893   ac_status=$?
8894   echo "$as_me:8894: \$? = $ac_status" >&5
8895   (exit $ac_status); }; }; then
8896   cf_cv_define_sigwinch=maybe
8897 else
8898   echo "$as_me: failed program was:" >&5
8899 cat conftest.$ac_ext >&5
8900 cf_cv_define_sigwinch=no
8901 fi
8902 rm -f conftest.$ac_objext conftest.$ac_ext
8903
8904 fi
8905 rm -f conftest.$ac_objext conftest.$ac_ext
8906
8907 fi
8908 echo "$as_me:8908: result: $cf_cv_define_sigwinch" >&5
8909 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8910
8911 if test "$cf_cv_define_sigwinch" = maybe ; then
8912 echo "$as_me:8912: checking for actual SIGWINCH definition" >&5
8913 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8914 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8915   echo $ECHO_N "(cached) $ECHO_C" >&6
8916 else
8917
8918 cf_cv_fixup_sigwinch=unknown
8919 cf_sigwinch=32
8920 while test $cf_sigwinch != 1
8921 do
8922         cat >conftest.$ac_ext <<_ACEOF
8923 #line 8923 "configure"
8924 #include "confdefs.h"
8925
8926 #undef _XOPEN_SOURCE
8927 #undef _POSIX_SOURCE
8928 #undef _POSIX_C_SOURCE
8929 #include <sys/types.h>
8930 #include <sys/signal.h>
8931
8932 int
8933 main ()
8934 {
8935
8936 #if SIGWINCH != $cf_sigwinch
8937 make an error
8938 #endif
8939 int x = SIGWINCH
8940   ;
8941   return 0;
8942 }
8943 _ACEOF
8944 rm -f conftest.$ac_objext
8945 if { (eval echo "$as_me:8945: \"$ac_compile\"") >&5
8946   (eval $ac_compile) 2>&5
8947   ac_status=$?
8948   echo "$as_me:8948: \$? = $ac_status" >&5
8949   (exit $ac_status); } &&
8950          { ac_try='test -s conftest.$ac_objext'
8951   { (eval echo "$as_me:8951: \"$ac_try\"") >&5
8952   (eval $ac_try) 2>&5
8953   ac_status=$?
8954   echo "$as_me:8954: \$? = $ac_status" >&5
8955   (exit $ac_status); }; }; then
8956   cf_cv_fixup_sigwinch=$cf_sigwinch
8957          break
8958 else
8959   echo "$as_me: failed program was:" >&5
8960 cat conftest.$ac_ext >&5
8961 fi
8962 rm -f conftest.$ac_objext conftest.$ac_ext
8963
8964 cf_sigwinch=`expr $cf_sigwinch - 1`
8965 done
8966
8967 fi
8968 echo "$as_me:8968: result: $cf_cv_fixup_sigwinch" >&5
8969 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8970
8971         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8972                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8973         fi
8974 fi
8975
8976 # Checks for CODESET support.
8977
8978   echo "$as_me:8978: checking for nl_langinfo and CODESET" >&5
8979 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8980 if test "${am_cv_langinfo_codeset+set}" = set; then
8981   echo $ECHO_N "(cached) $ECHO_C" >&6
8982 else
8983   cat >conftest.$ac_ext <<_ACEOF
8984 #line 8984 "configure"
8985 #include "confdefs.h"
8986 #include <langinfo.h>
8987 int
8988 main ()
8989 {
8990 char* cs = nl_langinfo(CODESET);
8991   ;
8992   return 0;
8993 }
8994 _ACEOF
8995 rm -f conftest.$ac_objext conftest$ac_exeext
8996 if { (eval echo "$as_me:8996: \"$ac_link\"") >&5
8997   (eval $ac_link) 2>&5
8998   ac_status=$?
8999   echo "$as_me:8999: \$? = $ac_status" >&5
9000   (exit $ac_status); } &&
9001          { ac_try='test -s conftest$ac_exeext'
9002   { (eval echo "$as_me:9002: \"$ac_try\"") >&5
9003   (eval $ac_try) 2>&5
9004   ac_status=$?
9005   echo "$as_me:9005: \$? = $ac_status" >&5
9006   (exit $ac_status); }; }; then
9007   am_cv_langinfo_codeset=yes
9008 else
9009   echo "$as_me: failed program was:" >&5
9010 cat conftest.$ac_ext >&5
9011 am_cv_langinfo_codeset=no
9012 fi
9013 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9014
9015 fi
9016 echo "$as_me:9016: result: $am_cv_langinfo_codeset" >&5
9017 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9018   if test $am_cv_langinfo_codeset = yes; then
9019
9020 cat >>confdefs.h <<\EOF
9021 #define HAVE_LANGINFO_CODESET 1
9022 EOF
9023
9024   fi
9025
9026 # use these variables to work around a defect in gcc's fixincludes.
9027 NCURSES_OK_WCHAR_T=
9028 NCURSES_OK_WINT_T=
9029
9030 echo "$as_me:9030: checking if you want wide-character code" >&5
9031 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9032
9033 # Check whether --enable-widec or --disable-widec was given.
9034 if test "${enable_widec+set}" = set; then
9035   enableval="$enable_widec"
9036   with_widec=$enableval
9037 else
9038   with_widec=no
9039 fi;
9040 echo "$as_me:9040: result: $with_widec" >&5
9041 echo "${ECHO_T}$with_widec" >&6
9042 if test "x$with_widec" = xyes ; then
9043         if test "x$disable_lib_suffixes" = xno ; then
9044                 LIB_SUFFIX="w${LIB_SUFFIX}"
9045         fi
9046
9047 cat >>confdefs.h <<\EOF
9048 #define USE_WIDEC_SUPPORT 1
9049 EOF
9050
9051 cat >>confdefs.h <<\EOF
9052 #define NCURSES_WIDECHAR 1
9053 EOF
9054
9055 echo "$as_me:9055: checking if wchar.h can be used as is" >&5
9056 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9057 if test "${cf_cv_wchar_h_okay+set}" = set; then
9058   echo $ECHO_N "(cached) $ECHO_C" >&6
9059 else
9060
9061 cat >conftest.$ac_ext <<_ACEOF
9062 #line 9062 "configure"
9063 #include "confdefs.h"
9064
9065 #include <stdlib.h>
9066 #include <wchar.h>
9067
9068 int
9069 main ()
9070 {
9071
9072         wint_t foo = 0;
9073         int bar = iswpunct(foo)
9074   ;
9075   return 0;
9076 }
9077 _ACEOF
9078 rm -f conftest.$ac_objext
9079 if { (eval echo "$as_me:9079: \"$ac_compile\"") >&5
9080   (eval $ac_compile) 2>&5
9081   ac_status=$?
9082   echo "$as_me:9082: \$? = $ac_status" >&5
9083   (exit $ac_status); } &&
9084          { ac_try='test -s conftest.$ac_objext'
9085   { (eval echo "$as_me:9085: \"$ac_try\"") >&5
9086   (eval $ac_try) 2>&5
9087   ac_status=$?
9088   echo "$as_me:9088: \$? = $ac_status" >&5
9089   (exit $ac_status); }; }; then
9090   cf_cv_wchar_h_okay=yes
9091 else
9092   echo "$as_me: failed program was:" >&5
9093 cat conftest.$ac_ext >&5
9094 cf_cv_wchar_h_okay=no
9095 fi
9096 rm -f conftest.$ac_objext conftest.$ac_ext
9097 fi
9098 echo "$as_me:9098: result: $cf_cv_wchar_h_okay" >&5
9099 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9100
9101 if test $cf_cv_wchar_h_okay = no
9102 then
9103
9104 echo "$as_me:9104: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9105 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9106 cat >conftest.$ac_ext <<_ACEOF
9107 #line 9107 "configure"
9108 #include "confdefs.h"
9109 #include <sys/types.h>
9110
9111 int
9112 main ()
9113 {
9114
9115 #ifndef _XOPEN_SOURCE_EXTENDED
9116 make an error
9117 #endif
9118   ;
9119   return 0;
9120 }
9121 _ACEOF
9122 rm -f conftest.$ac_objext
9123 if { (eval echo "$as_me:9123: \"$ac_compile\"") >&5
9124   (eval $ac_compile) 2>&5
9125   ac_status=$?
9126   echo "$as_me:9126: \$? = $ac_status" >&5
9127   (exit $ac_status); } &&
9128          { ac_try='test -s conftest.$ac_objext'
9129   { (eval echo "$as_me:9129: \"$ac_try\"") >&5
9130   (eval $ac_try) 2>&5
9131   ac_status=$?
9132   echo "$as_me:9132: \$? = $ac_status" >&5
9133   (exit $ac_status); }; }; then
9134   cf_result=no
9135 else
9136   echo "$as_me: failed program was:" >&5
9137 cat conftest.$ac_ext >&5
9138 cf_result=yes
9139 fi
9140 rm -f conftest.$ac_objext conftest.$ac_ext
9141 echo "$as_me:9141: result: $cf_result" >&5
9142 echo "${ECHO_T}$cf_result" >&6
9143
9144 if test "$cf_result" = yes ; then
9145         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9146 elif test "x" != "x" ; then
9147         echo "$as_me:9147: checking checking for compatible value versus " >&5
9148 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9149         cat >conftest.$ac_ext <<_ACEOF
9150 #line 9150 "configure"
9151 #include "confdefs.h"
9152 #include <sys/types.h>
9153
9154 int
9155 main ()
9156 {
9157
9158 #if _XOPEN_SOURCE_EXTENDED- < 0
9159 make an error
9160 #endif
9161   ;
9162   return 0;
9163 }
9164 _ACEOF
9165 rm -f conftest.$ac_objext
9166 if { (eval echo "$as_me:9166: \"$ac_compile\"") >&5
9167   (eval $ac_compile) 2>&5
9168   ac_status=$?
9169   echo "$as_me:9169: \$? = $ac_status" >&5
9170   (exit $ac_status); } &&
9171          { ac_try='test -s conftest.$ac_objext'
9172   { (eval echo "$as_me:9172: \"$ac_try\"") >&5
9173   (eval $ac_try) 2>&5
9174   ac_status=$?
9175   echo "$as_me:9175: \$? = $ac_status" >&5
9176   (exit $ac_status); }; }; then
9177   cf_result=yes
9178 else
9179   echo "$as_me: failed program was:" >&5
9180 cat conftest.$ac_ext >&5
9181 cf_result=no
9182 fi
9183 rm -f conftest.$ac_objext conftest.$ac_ext
9184         echo "$as_me:9184: result: $cf_result" >&5
9185 echo "${ECHO_T}$cf_result" >&6
9186         if test "$cf_result" = no ; then
9187                 # perhaps we can override it - try...
9188                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9189         fi
9190 fi
9191
9192 fi
9193
9194         # with_overwrite=no
9195         NCURSES_CH_T=cchar_t
9196
9197 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9198 do
9199 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9200 echo "$as_me:9200: checking for $ac_func" >&5
9201 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9202 if eval "test \"\${$as_ac_var+set}\" = set"; then
9203   echo $ECHO_N "(cached) $ECHO_C" >&6
9204 else
9205   cat >conftest.$ac_ext <<_ACEOF
9206 #line 9206 "configure"
9207 #include "confdefs.h"
9208 /* System header to define __stub macros and hopefully few prototypes,
9209     which can conflict with char $ac_func (); below.  */
9210 #include <assert.h>
9211 /* Override any gcc2 internal prototype to avoid an error.  */
9212 #ifdef __cplusplus
9213 extern "C"
9214 #endif
9215 /* We use char because int might match the return type of a gcc2
9216    builtin and then its argument prototype would still apply.  */
9217 char $ac_func ();
9218 char (*f) ();
9219
9220 int
9221 main ()
9222 {
9223 /* The GNU C library defines this for functions which it implements
9224     to always fail with ENOSYS.  Some functions are actually named
9225     something starting with __ and the normal name is an alias.  */
9226 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9227 choke me
9228 #else
9229 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9230 #endif
9231
9232   ;
9233   return 0;
9234 }
9235 _ACEOF
9236 rm -f conftest.$ac_objext conftest$ac_exeext
9237 if { (eval echo "$as_me:9237: \"$ac_link\"") >&5
9238   (eval $ac_link) 2>&5
9239   ac_status=$?
9240   echo "$as_me:9240: \$? = $ac_status" >&5
9241   (exit $ac_status); } &&
9242          { ac_try='test -s conftest$ac_exeext'
9243   { (eval echo "$as_me:9243: \"$ac_try\"") >&5
9244   (eval $ac_try) 2>&5
9245   ac_status=$?
9246   echo "$as_me:9246: \$? = $ac_status" >&5
9247   (exit $ac_status); }; }; then
9248   eval "$as_ac_var=yes"
9249 else
9250   echo "$as_me: failed program was:" >&5
9251 cat conftest.$ac_ext >&5
9252 eval "$as_ac_var=no"
9253 fi
9254 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9255 fi
9256 echo "$as_me:9256: result: `eval echo '${'$as_ac_var'}'`" >&5
9257 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9258 if test `eval echo '${'$as_ac_var'}'` = yes; then
9259   cat >>confdefs.h <<EOF
9260 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9261 EOF
9262
9263 fi
9264 done
9265
9266         if test "x$ac_cv_func_putwc" != xyes ; then
9267
9268 echo "$as_me:9268: checking for multibyte character support" >&5
9269 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9270 if test "${cf_cv_utf8_lib+set}" = set; then
9271   echo $ECHO_N "(cached) $ECHO_C" >&6
9272 else
9273
9274         cf_save_LIBS="$LIBS"
9275         cat >conftest.$ac_ext <<_ACEOF
9276 #line 9276 "configure"
9277 #include "confdefs.h"
9278
9279 #include <stdlib.h>
9280 int
9281 main ()
9282 {
9283 putwc(0,0);
9284   ;
9285   return 0;
9286 }
9287 _ACEOF
9288 rm -f conftest.$ac_objext conftest$ac_exeext
9289 if { (eval echo "$as_me:9289: \"$ac_link\"") >&5
9290   (eval $ac_link) 2>&5
9291   ac_status=$?
9292   echo "$as_me:9292: \$? = $ac_status" >&5
9293   (exit $ac_status); } &&
9294          { ac_try='test -s conftest$ac_exeext'
9295   { (eval echo "$as_me:9295: \"$ac_try\"") >&5
9296   (eval $ac_try) 2>&5
9297   ac_status=$?
9298   echo "$as_me:9298: \$? = $ac_status" >&5
9299   (exit $ac_status); }; }; then
9300   cf_cv_utf8_lib=yes
9301 else
9302   echo "$as_me: failed program was:" >&5
9303 cat conftest.$ac_ext >&5
9304
9305 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9306 # will be set on completion of the AC_TRY_LINK below.
9307 cf_cv_header_path_utf8=
9308 cf_cv_library_path_utf8=
9309
9310 echo "${as_me:-configure}:9310: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9311
9312 cf_save_LIBS="$LIBS"
9313
9314 cat >conftest.$ac_ext <<_ACEOF
9315 #line 9315 "configure"
9316 #include "confdefs.h"
9317
9318 #include <libutf8.h>
9319 int
9320 main ()
9321 {
9322 putwc(0,0);
9323   ;
9324   return 0;
9325 }
9326 _ACEOF
9327 rm -f conftest.$ac_objext conftest$ac_exeext
9328 if { (eval echo "$as_me:9328: \"$ac_link\"") >&5
9329   (eval $ac_link) 2>&5
9330   ac_status=$?
9331   echo "$as_me:9331: \$? = $ac_status" >&5
9332   (exit $ac_status); } &&
9333          { ac_try='test -s conftest$ac_exeext'
9334   { (eval echo "$as_me:9334: \"$ac_try\"") >&5
9335   (eval $ac_try) 2>&5
9336   ac_status=$?
9337   echo "$as_me:9337: \$? = $ac_status" >&5
9338   (exit $ac_status); }; }; then
9339
9340         cf_cv_find_linkage_utf8=yes
9341         cf_cv_header_path_utf8=/usr/include
9342         cf_cv_library_path_utf8=/usr/lib
9343
9344 else
9345   echo "$as_me: failed program was:" >&5
9346 cat conftest.$ac_ext >&5
9347
9348 LIBS="-lutf8  $cf_save_LIBS"
9349
9350 cat >conftest.$ac_ext <<_ACEOF
9351 #line 9351 "configure"
9352 #include "confdefs.h"
9353
9354 #include <libutf8.h>
9355 int
9356 main ()
9357 {
9358 putwc(0,0);
9359   ;
9360   return 0;
9361 }
9362 _ACEOF
9363 rm -f conftest.$ac_objext conftest$ac_exeext
9364 if { (eval echo "$as_me:9364: \"$ac_link\"") >&5
9365   (eval $ac_link) 2>&5
9366   ac_status=$?
9367   echo "$as_me:9367: \$? = $ac_status" >&5
9368   (exit $ac_status); } &&
9369          { ac_try='test -s conftest$ac_exeext'
9370   { (eval echo "$as_me:9370: \"$ac_try\"") >&5
9371   (eval $ac_try) 2>&5
9372   ac_status=$?
9373   echo "$as_me:9373: \$? = $ac_status" >&5
9374   (exit $ac_status); }; }; then
9375
9376         cf_cv_find_linkage_utf8=yes
9377         cf_cv_header_path_utf8=/usr/include
9378         cf_cv_library_path_utf8=/usr/lib
9379         cf_cv_library_file_utf8="-lutf8"
9380
9381 else
9382   echo "$as_me: failed program was:" >&5
9383 cat conftest.$ac_ext >&5
9384
9385         cf_cv_find_linkage_utf8=no
9386         LIBS="$cf_save_LIBS"
9387
9388     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
9389
9390 echo "${as_me:-configure}:9390: testing find linkage for utf8 library ..." 1>&5
9391
9392 echo "${as_me:-configure}:9392: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9393
9394     cf_save_CPPFLAGS="$CPPFLAGS"
9395     cf_test_CPPFLAGS="$CPPFLAGS"
9396
9397 cf_search=
9398
9399 # collect the current set of include-directories from compiler flags
9400 cf_header_path_list=""
9401 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9402         for cf_header_path in $CPPFLAGS $CFLAGS
9403         do
9404                 case $cf_header_path in #(vi
9405                 -I*)
9406                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9407
9408 test "x$cf_header_path" != "xNONE" && \
9409 test -d "$cf_header_path" && \
9410  {
9411         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9412         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9413         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9414         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9415         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9416         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9417 }
9418
9419                         cf_header_path_list="$cf_header_path_list $cf_search"
9420                         ;;
9421                 esac
9422         done
9423 fi
9424
9425 # add the variations for the package we are looking for
9426
9427 cf_search=
9428
9429 test "x$prefix" != "xNONE" && \
9430 test -d "$prefix" && \
9431  {
9432         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9433         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9434         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9435         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9436         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9437         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9438 }
9439
9440 for cf_subdir_prefix in \
9441         /usr \
9442         /usr/local \
9443         /usr/pkg \
9444         /opt \
9445         /opt/local \
9446         $HOME
9447 do
9448
9449 test "x$cf_subdir_prefix" != "x$prefix" && \
9450 test -d "$cf_subdir_prefix" && \
9451 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9452         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9453         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9454         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9455         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9456         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9457         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9458 }
9459
9460 done
9461
9462 test "$includedir" != NONE && \
9463 test "$includedir" != "/usr/include" && \
9464 test -d "$includedir" && {
9465         test -d $includedir &&    cf_search="$cf_search $includedir"
9466         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9467 }
9468
9469 test "$oldincludedir" != NONE && \
9470 test "$oldincludedir" != "/usr/include" && \
9471 test -d "$oldincludedir" && {
9472         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9473         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9474 }
9475
9476 cf_search="$cf_search $cf_header_path_list"
9477
9478     for cf_cv_header_path_utf8 in $cf_search
9479     do
9480       if test -d $cf_cv_header_path_utf8 ; then
9481         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9482
9483 echo "${as_me:-configure}:9483: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9484
9485         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9486         cat >conftest.$ac_ext <<_ACEOF
9487 #line 9487 "configure"
9488 #include "confdefs.h"
9489
9490 #include <libutf8.h>
9491 int
9492 main ()
9493 {
9494 putwc(0,0);
9495   ;
9496   return 0;
9497 }
9498 _ACEOF
9499 rm -f conftest.$ac_objext
9500 if { (eval echo "$as_me:9500: \"$ac_compile\"") >&5
9501   (eval $ac_compile) 2>&5
9502   ac_status=$?
9503   echo "$as_me:9503: \$? = $ac_status" >&5
9504   (exit $ac_status); } &&
9505          { ac_try='test -s conftest.$ac_objext'
9506   { (eval echo "$as_me:9506: \"$ac_try\"") >&5
9507   (eval $ac_try) 2>&5
9508   ac_status=$?
9509   echo "$as_me:9509: \$? = $ac_status" >&5
9510   (exit $ac_status); }; }; then
9511
9512             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9513
9514 echo "${as_me:-configure}:9514: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9515
9516             cf_cv_find_linkage_utf8=maybe
9517             cf_test_CPPFLAGS="$CPPFLAGS"
9518             break
9519 else
9520   echo "$as_me: failed program was:" >&5
9521 cat conftest.$ac_ext >&5
9522
9523             CPPFLAGS="$cf_save_CPPFLAGS"
9524
9525 fi
9526 rm -f conftest.$ac_objext conftest.$ac_ext
9527       fi
9528     done
9529
9530     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9531
9532 echo "${as_me:-configure}:9532: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9533
9534       cf_save_LIBS="$LIBS"
9535       cf_save_LDFLAGS="$LDFLAGS"
9536
9537       if test "$cf_cv_find_linkage_utf8" != yes ; then
9538
9539 cf_search=
9540 cf_library_path_list=""
9541 if test -n "${LDFLAGS}${LIBS}" ; then
9542         for cf_library_path in $LDFLAGS $LIBS
9543         do
9544                 case $cf_library_path in #(vi
9545                 -L*)
9546                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9547
9548 test "x$cf_library_path" != "xNONE" && \
9549 test -d "$cf_library_path" && \
9550  {
9551         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9552         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9553         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9554         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9555         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9556         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9557 }
9558
9559                         cf_library_path_list="$cf_library_path_list $cf_search"
9560                         ;;
9561                 esac
9562         done
9563 fi
9564
9565 cf_search=
9566
9567 test "x$prefix" != "xNONE" && \
9568 test -d "$prefix" && \
9569  {
9570         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9571         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9572         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9573         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9574         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9575         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9576 }
9577
9578 for cf_subdir_prefix in \
9579         /usr \
9580         /usr/local \
9581         /usr/pkg \
9582         /opt \
9583         /opt/local \
9584         $HOME
9585 do
9586
9587 test "x$cf_subdir_prefix" != "x$prefix" && \
9588 test -d "$cf_subdir_prefix" && \
9589 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9590         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
9591         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9592         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
9593         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
9594         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
9595         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
9596 }
9597
9598 done
9599
9600 cf_search="$cf_library_path_list $cf_search"
9601
9602         for cf_cv_library_path_utf8 in $cf_search
9603         do
9604           if test -d $cf_cv_library_path_utf8 ; then
9605             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9606
9607 echo "${as_me:-configure}:9607: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9608
9609             CPPFLAGS="$cf_test_CPPFLAGS"
9610             LIBS="-lutf8  $cf_save_LIBS"
9611             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9612             cat >conftest.$ac_ext <<_ACEOF
9613 #line 9613 "configure"
9614 #include "confdefs.h"
9615
9616 #include <libutf8.h>
9617 int
9618 main ()
9619 {
9620 putwc(0,0);
9621   ;
9622   return 0;
9623 }
9624 _ACEOF
9625 rm -f conftest.$ac_objext conftest$ac_exeext
9626 if { (eval echo "$as_me:9626: \"$ac_link\"") >&5
9627   (eval $ac_link) 2>&5
9628   ac_status=$?
9629   echo "$as_me:9629: \$? = $ac_status" >&5
9630   (exit $ac_status); } &&
9631          { ac_try='test -s conftest$ac_exeext'
9632   { (eval echo "$as_me:9632: \"$ac_try\"") >&5
9633   (eval $ac_try) 2>&5
9634   ac_status=$?
9635   echo "$as_me:9635: \$? = $ac_status" >&5
9636   (exit $ac_status); }; }; then
9637
9638                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9639
9640 echo "${as_me:-configure}:9640: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9641
9642                 cf_cv_find_linkage_utf8=yes
9643                 cf_cv_library_file_utf8="-lutf8"
9644                 break
9645 else
9646   echo "$as_me: failed program was:" >&5
9647 cat conftest.$ac_ext >&5
9648
9649                 CPPFLAGS="$cf_save_CPPFLAGS"
9650                 LIBS="$cf_save_LIBS"
9651                 LDFLAGS="$cf_save_LDFLAGS"
9652
9653 fi
9654 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9655           fi
9656         done
9657         CPPFLAGS="$cf_save_CPPFLAGS"
9658         LDFLAGS="$cf_save_LDFLAGS"
9659       fi
9660
9661     else
9662       cf_cv_find_linkage_utf8=no
9663     fi
9664
9665 fi
9666 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9667
9668 fi
9669 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9670
9671 LIBS="$cf_save_LIBS"
9672
9673 if test "$cf_cv_find_linkage_utf8" = yes ; then
9674 cf_cv_utf8_lib=add-on
9675 else
9676 cf_cv_utf8_lib=no
9677 fi
9678
9679 fi
9680 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9681 fi
9682 echo "$as_me:9682: result: $cf_cv_utf8_lib" >&5
9683 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9684
9685 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9686 # ncurses/ncursesw:
9687 if test "$cf_cv_utf8_lib" = "add-on" ; then
9688
9689 cat >>confdefs.h <<\EOF
9690 #define HAVE_LIBUTF8_H 1
9691 EOF
9692
9693 if test -n "$cf_cv_header_path_utf8" ; then
9694   for cf_add_incdir in $cf_cv_header_path_utf8
9695   do
9696         while test $cf_add_incdir != /usr/include
9697         do
9698           if test -d $cf_add_incdir
9699           then
9700                 cf_have_incdir=no
9701                 if test -n "$CFLAGS$CPPFLAGS" ; then
9702                   # a loop is needed to ensure we can add subdirs of existing dirs
9703                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9704                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9705                           cf_have_incdir=yes; break
9706                         fi
9707                   done
9708                 fi
9709
9710                 if test "$cf_have_incdir" = no ; then
9711                   if test "$cf_add_incdir" = /usr/local/include ; then
9712                         if test "$GCC" = yes
9713                         then
9714                           cf_save_CPPFLAGS=$CPPFLAGS
9715                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9716                           cat >conftest.$ac_ext <<_ACEOF
9717 #line 9717 "configure"
9718 #include "confdefs.h"
9719 #include <stdio.h>
9720 int
9721 main ()
9722 {
9723 printf("Hello")
9724   ;
9725   return 0;
9726 }
9727 _ACEOF
9728 rm -f conftest.$ac_objext
9729 if { (eval echo "$as_me:9729: \"$ac_compile\"") >&5
9730   (eval $ac_compile) 2>&5
9731   ac_status=$?
9732   echo "$as_me:9732: \$? = $ac_status" >&5
9733   (exit $ac_status); } &&
9734          { ac_try='test -s conftest.$ac_objext'
9735   { (eval echo "$as_me:9735: \"$ac_try\"") >&5
9736   (eval $ac_try) 2>&5
9737   ac_status=$?
9738   echo "$as_me:9738: \$? = $ac_status" >&5
9739   (exit $ac_status); }; }; then
9740   :
9741 else
9742   echo "$as_me: failed program was:" >&5
9743 cat conftest.$ac_ext >&5
9744 cf_have_incdir=yes
9745 fi
9746 rm -f conftest.$ac_objext conftest.$ac_ext
9747                           CPPFLAGS=$cf_save_CPPFLAGS
9748                         fi
9749                   fi
9750                 fi
9751
9752                 if test "$cf_have_incdir" = no ; then
9753                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9754
9755 echo "${as_me:-configure}:9755: testing adding $cf_add_incdir to include-path ..." 1>&5
9756
9757                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9758
9759                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9760                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9761                   cf_add_incdir="$cf_top_incdir"
9762                 else
9763                   break
9764                 fi
9765           fi
9766         done
9767   done
9768 fi
9769
9770 if test -n "$cf_cv_library_path_utf8" ; then
9771   for cf_add_libdir in $cf_cv_library_path_utf8
9772   do
9773     if test $cf_add_libdir = /usr/lib ; then
9774       :
9775     elif test -d $cf_add_libdir
9776     then
9777       cf_have_libdir=no
9778       if test -n "$LDFLAGS$LIBS" ; then
9779         # a loop is needed to ensure we can add subdirs of existing dirs
9780         for cf_test_libdir in $LDFLAGS $LIBS ; do
9781           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9782             cf_have_libdir=yes; break
9783           fi
9784         done
9785       fi
9786       if test "$cf_have_libdir" = no ; then
9787         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9788
9789 echo "${as_me:-configure}:9789: testing adding $cf_add_libdir to library-path ..." 1>&5
9790
9791         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9792       fi
9793     fi
9794   done
9795 fi
9796
9797 cf_add_libs="$cf_cv_library_file_utf8"
9798 # Filter out duplicates - this happens with badly-designed ".pc" files...
9799 for cf_add_1lib in $LIBS
9800 do
9801         for cf_add_2lib in $cf_add_libs
9802         do
9803                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9804                 then
9805                         cf_add_1lib=
9806                         break
9807                 fi
9808         done
9809         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9810 done
9811 LIBS="$cf_add_libs"
9812
9813 fi
9814
9815                 if test "$cf_cv_utf8_lib" != no ; then
9816                         NCURSES_LIBUTF8=1
9817                 fi
9818         fi
9819
9820 # This is needed on Tru64 5.0 to declare mbstate_t
9821 echo "$as_me:9821: checking if we must include wchar.h to declare mbstate_t" >&5
9822 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9823 if test "${cf_cv_mbstate_t+set}" = set; then
9824   echo $ECHO_N "(cached) $ECHO_C" >&6
9825 else
9826
9827 cat >conftest.$ac_ext <<_ACEOF
9828 #line 9828 "configure"
9829 #include "confdefs.h"
9830
9831 #include <stdlib.h>
9832 #include <stdarg.h>
9833 #include <stdio.h>
9834 #ifdef HAVE_LIBUTF8_H
9835 #include <libutf8.h>
9836 #endif
9837 int
9838 main ()
9839 {
9840 mbstate_t state
9841   ;
9842   return 0;
9843 }
9844 _ACEOF
9845 rm -f conftest.$ac_objext
9846 if { (eval echo "$as_me:9846: \"$ac_compile\"") >&5
9847   (eval $ac_compile) 2>&5
9848   ac_status=$?
9849   echo "$as_me:9849: \$? = $ac_status" >&5
9850   (exit $ac_status); } &&
9851          { ac_try='test -s conftest.$ac_objext'
9852   { (eval echo "$as_me:9852: \"$ac_try\"") >&5
9853   (eval $ac_try) 2>&5
9854   ac_status=$?
9855   echo "$as_me:9855: \$? = $ac_status" >&5
9856   (exit $ac_status); }; }; then
9857   cf_cv_mbstate_t=no
9858 else
9859   echo "$as_me: failed program was:" >&5
9860 cat conftest.$ac_ext >&5
9861 cat >conftest.$ac_ext <<_ACEOF
9862 #line 9862 "configure"
9863 #include "confdefs.h"
9864
9865 #include <stdlib.h>
9866 #include <stdarg.h>
9867 #include <stdio.h>
9868 #include <wchar.h>
9869 #ifdef HAVE_LIBUTF8_H
9870 #include <libutf8.h>
9871 #endif
9872 int
9873 main ()
9874 {
9875 mbstate_t value
9876   ;
9877   return 0;
9878 }
9879 _ACEOF
9880 rm -f conftest.$ac_objext
9881 if { (eval echo "$as_me:9881: \"$ac_compile\"") >&5
9882   (eval $ac_compile) 2>&5
9883   ac_status=$?
9884   echo "$as_me:9884: \$? = $ac_status" >&5
9885   (exit $ac_status); } &&
9886          { ac_try='test -s conftest.$ac_objext'
9887   { (eval echo "$as_me:9887: \"$ac_try\"") >&5
9888   (eval $ac_try) 2>&5
9889   ac_status=$?
9890   echo "$as_me:9890: \$? = $ac_status" >&5
9891   (exit $ac_status); }; }; then
9892   cf_cv_mbstate_t=yes
9893 else
9894   echo "$as_me: failed program was:" >&5
9895 cat conftest.$ac_ext >&5
9896 cf_cv_mbstate_t=unknown
9897 fi
9898 rm -f conftest.$ac_objext conftest.$ac_ext
9899 fi
9900 rm -f conftest.$ac_objext conftest.$ac_ext
9901 fi
9902 echo "$as_me:9902: result: $cf_cv_mbstate_t" >&5
9903 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9904
9905 if test "$cf_cv_mbstate_t" = yes ; then
9906
9907 cat >>confdefs.h <<\EOF
9908 #define NEED_WCHAR_H 1
9909 EOF
9910
9911         NEED_WCHAR_H=1
9912 fi
9913
9914 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9915 if test "$cf_cv_mbstate_t" = unknown ; then
9916         NCURSES_MBSTATE_T=1
9917 fi
9918
9919 # This is needed on Tru64 5.0 to declare wchar_t
9920 echo "$as_me:9920: checking if we must include wchar.h to declare wchar_t" >&5
9921 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9922 if test "${cf_cv_wchar_t+set}" = set; then
9923   echo $ECHO_N "(cached) $ECHO_C" >&6
9924 else
9925
9926 cat >conftest.$ac_ext <<_ACEOF
9927 #line 9927 "configure"
9928 #include "confdefs.h"
9929
9930 #include <stdlib.h>
9931 #include <stdarg.h>
9932 #include <stdio.h>
9933 #ifdef HAVE_LIBUTF8_H
9934 #include <libutf8.h>
9935 #endif
9936 int
9937 main ()
9938 {
9939 wchar_t state
9940   ;
9941   return 0;
9942 }
9943 _ACEOF
9944 rm -f conftest.$ac_objext
9945 if { (eval echo "$as_me:9945: \"$ac_compile\"") >&5
9946   (eval $ac_compile) 2>&5
9947   ac_status=$?
9948   echo "$as_me:9948: \$? = $ac_status" >&5
9949   (exit $ac_status); } &&
9950          { ac_try='test -s conftest.$ac_objext'
9951   { (eval echo "$as_me:9951: \"$ac_try\"") >&5
9952   (eval $ac_try) 2>&5
9953   ac_status=$?
9954   echo "$as_me:9954: \$? = $ac_status" >&5
9955   (exit $ac_status); }; }; then
9956   cf_cv_wchar_t=no
9957 else
9958   echo "$as_me: failed program was:" >&5
9959 cat conftest.$ac_ext >&5
9960 cat >conftest.$ac_ext <<_ACEOF
9961 #line 9961 "configure"
9962 #include "confdefs.h"
9963
9964 #include <stdlib.h>
9965 #include <stdarg.h>
9966 #include <stdio.h>
9967 #include <wchar.h>
9968 #ifdef HAVE_LIBUTF8_H
9969 #include <libutf8.h>
9970 #endif
9971 int
9972 main ()
9973 {
9974 wchar_t value
9975   ;
9976   return 0;
9977 }
9978 _ACEOF
9979 rm -f conftest.$ac_objext
9980 if { (eval echo "$as_me:9980: \"$ac_compile\"") >&5
9981   (eval $ac_compile) 2>&5
9982   ac_status=$?
9983   echo "$as_me:9983: \$? = $ac_status" >&5
9984   (exit $ac_status); } &&
9985          { ac_try='test -s conftest.$ac_objext'
9986   { (eval echo "$as_me:9986: \"$ac_try\"") >&5
9987   (eval $ac_try) 2>&5
9988   ac_status=$?
9989   echo "$as_me:9989: \$? = $ac_status" >&5
9990   (exit $ac_status); }; }; then
9991   cf_cv_wchar_t=yes
9992 else
9993   echo "$as_me: failed program was:" >&5
9994 cat conftest.$ac_ext >&5
9995 cf_cv_wchar_t=unknown
9996 fi
9997 rm -f conftest.$ac_objext conftest.$ac_ext
9998 fi
9999 rm -f conftest.$ac_objext conftest.$ac_ext
10000 fi
10001 echo "$as_me:10001: result: $cf_cv_wchar_t" >&5
10002 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10003
10004 if test "$cf_cv_wchar_t" = yes ; then
10005
10006 cat >>confdefs.h <<\EOF
10007 #define NEED_WCHAR_H 1
10008 EOF
10009
10010         NEED_WCHAR_H=1
10011 fi
10012
10013 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10014 if test "$cf_cv_wchar_t" = unknown ; then
10015         NCURSES_WCHAR_T=1
10016 fi
10017
10018 # if we find wchar_t in either place, use substitution to provide a fallback.
10019 if test "$cf_cv_wchar_t" != unknown ; then
10020         NCURSES_OK_WCHAR_T=1
10021 fi
10022
10023 # This is needed on Tru64 5.0 to declare wint_t
10024 echo "$as_me:10024: checking if we must include wchar.h to declare wint_t" >&5
10025 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10026 if test "${cf_cv_wint_t+set}" = set; then
10027   echo $ECHO_N "(cached) $ECHO_C" >&6
10028 else
10029
10030 cat >conftest.$ac_ext <<_ACEOF
10031 #line 10031 "configure"
10032 #include "confdefs.h"
10033
10034 #include <stdlib.h>
10035 #include <stdarg.h>
10036 #include <stdio.h>
10037 #ifdef HAVE_LIBUTF8_H
10038 #include <libutf8.h>
10039 #endif
10040 int
10041 main ()
10042 {
10043 wint_t state
10044   ;
10045   return 0;
10046 }
10047 _ACEOF
10048 rm -f conftest.$ac_objext
10049 if { (eval echo "$as_me:10049: \"$ac_compile\"") >&5
10050   (eval $ac_compile) 2>&5
10051   ac_status=$?
10052   echo "$as_me:10052: \$? = $ac_status" >&5
10053   (exit $ac_status); } &&
10054          { ac_try='test -s conftest.$ac_objext'
10055   { (eval echo "$as_me:10055: \"$ac_try\"") >&5
10056   (eval $ac_try) 2>&5
10057   ac_status=$?
10058   echo "$as_me:10058: \$? = $ac_status" >&5
10059   (exit $ac_status); }; }; then
10060   cf_cv_wint_t=no
10061 else
10062   echo "$as_me: failed program was:" >&5
10063 cat conftest.$ac_ext >&5
10064 cat >conftest.$ac_ext <<_ACEOF
10065 #line 10065 "configure"
10066 #include "confdefs.h"
10067
10068 #include <stdlib.h>
10069 #include <stdarg.h>
10070 #include <stdio.h>
10071 #include <wchar.h>
10072 #ifdef HAVE_LIBUTF8_H
10073 #include <libutf8.h>
10074 #endif
10075 int
10076 main ()
10077 {
10078 wint_t value
10079   ;
10080   return 0;
10081 }
10082 _ACEOF
10083 rm -f conftest.$ac_objext
10084 if { (eval echo "$as_me:10084: \"$ac_compile\"") >&5
10085   (eval $ac_compile) 2>&5
10086   ac_status=$?
10087   echo "$as_me:10087: \$? = $ac_status" >&5
10088   (exit $ac_status); } &&
10089          { ac_try='test -s conftest.$ac_objext'
10090   { (eval echo "$as_me:10090: \"$ac_try\"") >&5
10091   (eval $ac_try) 2>&5
10092   ac_status=$?
10093   echo "$as_me:10093: \$? = $ac_status" >&5
10094   (exit $ac_status); }; }; then
10095   cf_cv_wint_t=yes
10096 else
10097   echo "$as_me: failed program was:" >&5
10098 cat conftest.$ac_ext >&5
10099 cf_cv_wint_t=unknown
10100 fi
10101 rm -f conftest.$ac_objext conftest.$ac_ext
10102 fi
10103 rm -f conftest.$ac_objext conftest.$ac_ext
10104 fi
10105 echo "$as_me:10105: result: $cf_cv_wint_t" >&5
10106 echo "${ECHO_T}$cf_cv_wint_t" >&6
10107
10108 if test "$cf_cv_wint_t" = yes ; then
10109
10110 cat >>confdefs.h <<\EOF
10111 #define NEED_WCHAR_H 1
10112 EOF
10113
10114         NEED_WCHAR_H=1
10115 fi
10116
10117 # if we do not find wint_t in either place, use substitution to provide a fallback.
10118 if test "$cf_cv_wint_t" = unknown ; then
10119         NCURSES_WINT_T=1
10120 fi
10121
10122 # if we find wint_t in either place, use substitution to provide a fallback.
10123 if test "$cf_cv_wint_t" != unknown ; then
10124         NCURSES_OK_WINT_T=1
10125 fi
10126
10127         if test "$NCURSES_MBSTATE_T" != 0; then
10128
10129 cat >>confdefs.h <<\EOF
10130 #define NEED_MBSTATE_T_DEF 1
10131 EOF
10132
10133         fi
10134 fi
10135
10136 ###   use option --disable-lp64 to allow long chtype
10137 case $cf_cv_abi_version in
10138 [345]*)
10139         default_with_lp64=no
10140         ;;
10141 *)
10142         default_with_lp64=yes
10143         ;;
10144 esac
10145
10146 echo "$as_me:10146: checking whether to enable _LP64 definition in curses.h" >&5
10147 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10148
10149 # Check whether --enable-lp64 or --disable-lp64 was given.
10150 if test "${enable_lp64+set}" = set; then
10151   enableval="$enable_lp64"
10152   with_lp64=$enableval
10153 else
10154   with_lp64=$default_with_lp64
10155 fi;
10156 echo "$as_me:10156: result: $with_lp64" >&5
10157 echo "${ECHO_T}$with_lp64" >&6
10158
10159 if test "x$with_lp64" = xyes ; then
10160         cf_cv_enable_lp64=1
10161 else
10162         cf_cv_enable_lp64=0
10163 fi
10164
10165 # Check whether --enable-largefile or --disable-largefile was given.
10166 if test "${enable_largefile+set}" = set; then
10167   enableval="$enable_largefile"
10168
10169 fi;
10170 if test "$enable_largefile" != no; then
10171
10172   echo "$as_me:10172: checking for special C compiler options needed for large files" >&5
10173 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10174 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10175   echo $ECHO_N "(cached) $ECHO_C" >&6
10176 else
10177   ac_cv_sys_largefile_CC=no
10178      if test "$GCC" != yes; then
10179        ac_save_CC=$CC
10180        while :; do
10181          # IRIX 6.2 and later do not support large files by default,
10182          # so use the C compiler's -n32 option if that helps.
10183          cat >conftest.$ac_ext <<_ACEOF
10184 #line 10184 "configure"
10185 #include "confdefs.h"
10186 #include <sys/types.h>
10187  /* Check that off_t can represent 2**63 - 1 correctly.
10188     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10189     since some C++ compilers masquerading as C compilers
10190     incorrectly reject 9223372036854775807.  */
10191 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10192   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10193                        && LARGE_OFF_T % 2147483647 == 1)
10194                       ? 1 : -1];
10195 int
10196 main ()
10197 {
10198
10199   ;
10200   return 0;
10201 }
10202 _ACEOF
10203          rm -f conftest.$ac_objext
10204 if { (eval echo "$as_me:10204: \"$ac_compile\"") >&5
10205   (eval $ac_compile) 2>&5
10206   ac_status=$?
10207   echo "$as_me:10207: \$? = $ac_status" >&5
10208   (exit $ac_status); } &&
10209          { ac_try='test -s conftest.$ac_objext'
10210   { (eval echo "$as_me:10210: \"$ac_try\"") >&5
10211   (eval $ac_try) 2>&5
10212   ac_status=$?
10213   echo "$as_me:10213: \$? = $ac_status" >&5
10214   (exit $ac_status); }; }; then
10215   break
10216 else
10217   echo "$as_me: failed program was:" >&5
10218 cat conftest.$ac_ext >&5
10219 fi
10220 rm -f conftest.$ac_objext
10221          CC="$CC -n32"
10222          rm -f conftest.$ac_objext
10223 if { (eval echo "$as_me:10223: \"$ac_compile\"") >&5
10224   (eval $ac_compile) 2>&5
10225   ac_status=$?
10226   echo "$as_me:10226: \$? = $ac_status" >&5
10227   (exit $ac_status); } &&
10228          { ac_try='test -s conftest.$ac_objext'
10229   { (eval echo "$as_me:10229: \"$ac_try\"") >&5
10230   (eval $ac_try) 2>&5
10231   ac_status=$?
10232   echo "$as_me:10232: \$? = $ac_status" >&5
10233   (exit $ac_status); }; }; then
10234   ac_cv_sys_largefile_CC=' -n32'; break
10235 else
10236   echo "$as_me: failed program was:" >&5
10237 cat conftest.$ac_ext >&5
10238 fi
10239 rm -f conftest.$ac_objext
10240          break
10241        done
10242        CC=$ac_save_CC
10243        rm -f conftest.$ac_ext
10244     fi
10245 fi
10246 echo "$as_me:10246: result: $ac_cv_sys_largefile_CC" >&5
10247 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10248   if test "$ac_cv_sys_largefile_CC" != no; then
10249     CC=$CC$ac_cv_sys_largefile_CC
10250   fi
10251
10252   echo "$as_me:10252: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10253 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10254 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10255   echo $ECHO_N "(cached) $ECHO_C" >&6
10256 else
10257   while :; do
10258   ac_cv_sys_file_offset_bits=no
10259   cat >conftest.$ac_ext <<_ACEOF
10260 #line 10260 "configure"
10261 #include "confdefs.h"
10262 #include <sys/types.h>
10263  /* Check that off_t can represent 2**63 - 1 correctly.
10264     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10265     since some C++ compilers masquerading as C compilers
10266     incorrectly reject 9223372036854775807.  */
10267 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10268   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10269                        && LARGE_OFF_T % 2147483647 == 1)
10270                       ? 1 : -1];
10271 int
10272 main ()
10273 {
10274
10275   ;
10276   return 0;
10277 }
10278 _ACEOF
10279 rm -f conftest.$ac_objext
10280 if { (eval echo "$as_me:10280: \"$ac_compile\"") >&5
10281   (eval $ac_compile) 2>&5
10282   ac_status=$?
10283   echo "$as_me:10283: \$? = $ac_status" >&5
10284   (exit $ac_status); } &&
10285          { ac_try='test -s conftest.$ac_objext'
10286   { (eval echo "$as_me:10286: \"$ac_try\"") >&5
10287   (eval $ac_try) 2>&5
10288   ac_status=$?
10289   echo "$as_me:10289: \$? = $ac_status" >&5
10290   (exit $ac_status); }; }; then
10291   break
10292 else
10293   echo "$as_me: failed program was:" >&5
10294 cat conftest.$ac_ext >&5
10295 fi
10296 rm -f conftest.$ac_objext conftest.$ac_ext
10297   cat >conftest.$ac_ext <<_ACEOF
10298 #line 10298 "configure"
10299 #include "confdefs.h"
10300 #define _FILE_OFFSET_BITS 64
10301 #include <sys/types.h>
10302  /* Check that off_t can represent 2**63 - 1 correctly.
10303     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10304     since some C++ compilers masquerading as C compilers
10305     incorrectly reject 9223372036854775807.  */
10306 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10307   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10308                        && LARGE_OFF_T % 2147483647 == 1)
10309                       ? 1 : -1];
10310 int
10311 main ()
10312 {
10313
10314   ;
10315   return 0;
10316 }
10317 _ACEOF
10318 rm -f conftest.$ac_objext
10319 if { (eval echo "$as_me:10319: \"$ac_compile\"") >&5
10320   (eval $ac_compile) 2>&5
10321   ac_status=$?
10322   echo "$as_me:10322: \$? = $ac_status" >&5
10323   (exit $ac_status); } &&
10324          { ac_try='test -s conftest.$ac_objext'
10325   { (eval echo "$as_me:10325: \"$ac_try\"") >&5
10326   (eval $ac_try) 2>&5
10327   ac_status=$?
10328   echo "$as_me:10328: \$? = $ac_status" >&5
10329   (exit $ac_status); }; }; then
10330   ac_cv_sys_file_offset_bits=64; break
10331 else
10332   echo "$as_me: failed program was:" >&5
10333 cat conftest.$ac_ext >&5
10334 fi
10335 rm -f conftest.$ac_objext conftest.$ac_ext
10336   break
10337 done
10338 fi
10339 echo "$as_me:10339: result: $ac_cv_sys_file_offset_bits" >&5
10340 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10341 if test "$ac_cv_sys_file_offset_bits" != no; then
10342
10343 cat >>confdefs.h <<EOF
10344 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10345 EOF
10346
10347 fi
10348 rm -rf conftest*
10349   echo "$as_me:10349: checking for _LARGE_FILES value needed for large files" >&5
10350 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10351 if test "${ac_cv_sys_large_files+set}" = set; then
10352   echo $ECHO_N "(cached) $ECHO_C" >&6
10353 else
10354   while :; do
10355   ac_cv_sys_large_files=no
10356   cat >conftest.$ac_ext <<_ACEOF
10357 #line 10357 "configure"
10358 #include "confdefs.h"
10359 #include <sys/types.h>
10360  /* Check that off_t can represent 2**63 - 1 correctly.
10361     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10362     since some C++ compilers masquerading as C compilers
10363     incorrectly reject 9223372036854775807.  */
10364 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10365   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10366                        && LARGE_OFF_T % 2147483647 == 1)
10367                       ? 1 : -1];
10368 int
10369 main ()
10370 {
10371
10372   ;
10373   return 0;
10374 }
10375 _ACEOF
10376 rm -f conftest.$ac_objext
10377 if { (eval echo "$as_me:10377: \"$ac_compile\"") >&5
10378   (eval $ac_compile) 2>&5
10379   ac_status=$?
10380   echo "$as_me:10380: \$? = $ac_status" >&5
10381   (exit $ac_status); } &&
10382          { ac_try='test -s conftest.$ac_objext'
10383   { (eval echo "$as_me:10383: \"$ac_try\"") >&5
10384   (eval $ac_try) 2>&5
10385   ac_status=$?
10386   echo "$as_me:10386: \$? = $ac_status" >&5
10387   (exit $ac_status); }; }; then
10388   break
10389 else
10390   echo "$as_me: failed program was:" >&5
10391 cat conftest.$ac_ext >&5
10392 fi
10393 rm -f conftest.$ac_objext conftest.$ac_ext
10394   cat >conftest.$ac_ext <<_ACEOF
10395 #line 10395 "configure"
10396 #include "confdefs.h"
10397 #define _LARGE_FILES 1
10398 #include <sys/types.h>
10399  /* Check that off_t can represent 2**63 - 1 correctly.
10400     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10401     since some C++ compilers masquerading as C compilers
10402     incorrectly reject 9223372036854775807.  */
10403 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10404   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10405                        && LARGE_OFF_T % 2147483647 == 1)
10406                       ? 1 : -1];
10407 int
10408 main ()
10409 {
10410
10411   ;
10412   return 0;
10413 }
10414 _ACEOF
10415 rm -f conftest.$ac_objext
10416 if { (eval echo "$as_me:10416: \"$ac_compile\"") >&5
10417   (eval $ac_compile) 2>&5
10418   ac_status=$?
10419   echo "$as_me:10419: \$? = $ac_status" >&5
10420   (exit $ac_status); } &&
10421          { ac_try='test -s conftest.$ac_objext'
10422   { (eval echo "$as_me:10422: \"$ac_try\"") >&5
10423   (eval $ac_try) 2>&5
10424   ac_status=$?
10425   echo "$as_me:10425: \$? = $ac_status" >&5
10426   (exit $ac_status); }; }; then
10427   ac_cv_sys_large_files=1; break
10428 else
10429   echo "$as_me: failed program was:" >&5
10430 cat conftest.$ac_ext >&5
10431 fi
10432 rm -f conftest.$ac_objext conftest.$ac_ext
10433   break
10434 done
10435 fi
10436 echo "$as_me:10436: result: $ac_cv_sys_large_files" >&5
10437 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10438 if test "$ac_cv_sys_large_files" != no; then
10439
10440 cat >>confdefs.h <<EOF
10441 #define _LARGE_FILES $ac_cv_sys_large_files
10442 EOF
10443
10444 fi
10445 rm -rf conftest*
10446 fi
10447
10448     if test "$enable_largefile" != no ; then
10449         echo "$as_me:10449: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10450 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10451 if test "${ac_cv_sys_largefile_source+set}" = set; then
10452   echo $ECHO_N "(cached) $ECHO_C" >&6
10453 else
10454   while :; do
10455   ac_cv_sys_largefile_source=no
10456   cat >conftest.$ac_ext <<_ACEOF
10457 #line 10457 "configure"
10458 #include "confdefs.h"
10459 #include <stdio.h>
10460 int
10461 main ()
10462 {
10463 return !fseeko;
10464   ;
10465   return 0;
10466 }
10467 _ACEOF
10468 rm -f conftest.$ac_objext
10469 if { (eval echo "$as_me:10469: \"$ac_compile\"") >&5
10470   (eval $ac_compile) 2>&5
10471   ac_status=$?
10472   echo "$as_me:10472: \$? = $ac_status" >&5
10473   (exit $ac_status); } &&
10474          { ac_try='test -s conftest.$ac_objext'
10475   { (eval echo "$as_me:10475: \"$ac_try\"") >&5
10476   (eval $ac_try) 2>&5
10477   ac_status=$?
10478   echo "$as_me:10478: \$? = $ac_status" >&5
10479   (exit $ac_status); }; }; then
10480   break
10481 else
10482   echo "$as_me: failed program was:" >&5
10483 cat conftest.$ac_ext >&5
10484 fi
10485 rm -f conftest.$ac_objext conftest.$ac_ext
10486   cat >conftest.$ac_ext <<_ACEOF
10487 #line 10487 "configure"
10488 #include "confdefs.h"
10489 #define _LARGEFILE_SOURCE 1
10490 #include <stdio.h>
10491 int
10492 main ()
10493 {
10494 return !fseeko;
10495   ;
10496   return 0;
10497 }
10498 _ACEOF
10499 rm -f conftest.$ac_objext
10500 if { (eval echo "$as_me:10500: \"$ac_compile\"") >&5
10501   (eval $ac_compile) 2>&5
10502   ac_status=$?
10503   echo "$as_me:10503: \$? = $ac_status" >&5
10504   (exit $ac_status); } &&
10505          { ac_try='test -s conftest.$ac_objext'
10506   { (eval echo "$as_me:10506: \"$ac_try\"") >&5
10507   (eval $ac_try) 2>&5
10508   ac_status=$?
10509   echo "$as_me:10509: \$? = $ac_status" >&5
10510   (exit $ac_status); }; }; then
10511   ac_cv_sys_largefile_source=1; break
10512 else
10513   echo "$as_me: failed program was:" >&5
10514 cat conftest.$ac_ext >&5
10515 fi
10516 rm -f conftest.$ac_objext conftest.$ac_ext
10517   break
10518 done
10519 fi
10520 echo "$as_me:10520: result: $ac_cv_sys_largefile_source" >&5
10521 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10522 if test "$ac_cv_sys_largefile_source" != no; then
10523
10524 cat >>confdefs.h <<EOF
10525 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10526 EOF
10527
10528 fi
10529 rm -rf conftest*
10530
10531 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10532 # in glibc 2.1.3, but that breaks too many other things.
10533 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10534 echo "$as_me:10534: checking for fseeko" >&5
10535 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10536 if test "${ac_cv_func_fseeko+set}" = set; then
10537   echo $ECHO_N "(cached) $ECHO_C" >&6
10538 else
10539   cat >conftest.$ac_ext <<_ACEOF
10540 #line 10540 "configure"
10541 #include "confdefs.h"
10542 #include <stdio.h>
10543 int
10544 main ()
10545 {
10546 return fseeko && fseeko (stdin, 0, 0);
10547   ;
10548   return 0;
10549 }
10550 _ACEOF
10551 rm -f conftest.$ac_objext conftest$ac_exeext
10552 if { (eval echo "$as_me:10552: \"$ac_link\"") >&5
10553   (eval $ac_link) 2>&5
10554   ac_status=$?
10555   echo "$as_me:10555: \$? = $ac_status" >&5
10556   (exit $ac_status); } &&
10557          { ac_try='test -s conftest$ac_exeext'
10558   { (eval echo "$as_me:10558: \"$ac_try\"") >&5
10559   (eval $ac_try) 2>&5
10560   ac_status=$?
10561   echo "$as_me:10561: \$? = $ac_status" >&5
10562   (exit $ac_status); }; }; then
10563   ac_cv_func_fseeko=yes
10564 else
10565   echo "$as_me: failed program was:" >&5
10566 cat conftest.$ac_ext >&5
10567 ac_cv_func_fseeko=no
10568 fi
10569 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10570 fi
10571 echo "$as_me:10571: result: $ac_cv_func_fseeko" >&5
10572 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10573 if test $ac_cv_func_fseeko = yes; then
10574
10575 cat >>confdefs.h <<\EOF
10576 #define HAVE_FSEEKO 1
10577 EOF
10578
10579 fi
10580
10581         # Normally we would collect these definitions in the config.h,
10582         # but (like _XOPEN_SOURCE), some environments rely on having these
10583         # defined before any of the system headers are included.  Another
10584         # case comes up with C++, e.g., on AIX the compiler compiles the
10585         # header files by themselves before looking at the body files it is
10586         # told to compile.  For ncurses, those header files do not include
10587         # the config.h
10588         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10589         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10590         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10591
10592         echo "$as_me:10592: checking whether to use struct dirent64" >&5
10593 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10594 if test "${cf_cv_struct_dirent64+set}" = set; then
10595   echo $ECHO_N "(cached) $ECHO_C" >&6
10596 else
10597
10598                 cat >conftest.$ac_ext <<_ACEOF
10599 #line 10599 "configure"
10600 #include "confdefs.h"
10601
10602 #include <sys/types.h>
10603 #include <dirent.h>
10604
10605 int
10606 main ()
10607 {
10608
10609                 /* if transitional largefile support is setup, this is true */
10610                 extern struct dirent64 * readdir(DIR *);
10611                 struct dirent64 *x = readdir((DIR *)0);
10612                 struct dirent *y = readdir((DIR *)0);
10613                 int z = x - y;
10614
10615   ;
10616   return 0;
10617 }
10618 _ACEOF
10619 rm -f conftest.$ac_objext
10620 if { (eval echo "$as_me:10620: \"$ac_compile\"") >&5
10621   (eval $ac_compile) 2>&5
10622   ac_status=$?
10623   echo "$as_me:10623: \$? = $ac_status" >&5
10624   (exit $ac_status); } &&
10625          { ac_try='test -s conftest.$ac_objext'
10626   { (eval echo "$as_me:10626: \"$ac_try\"") >&5
10627   (eval $ac_try) 2>&5
10628   ac_status=$?
10629   echo "$as_me:10629: \$? = $ac_status" >&5
10630   (exit $ac_status); }; }; then
10631   cf_cv_struct_dirent64=yes
10632 else
10633   echo "$as_me: failed program was:" >&5
10634 cat conftest.$ac_ext >&5
10635 cf_cv_struct_dirent64=no
10636 fi
10637 rm -f conftest.$ac_objext conftest.$ac_ext
10638
10639 fi
10640 echo "$as_me:10640: result: $cf_cv_struct_dirent64" >&5
10641 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10642         test "$cf_cv_struct_dirent64" = yes &&
10643 cat >>confdefs.h <<\EOF
10644 #define HAVE_STRUCT_DIRENT64 1
10645 EOF
10646
10647     fi
10648
10649 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10650 echo "$as_me:10650: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10651 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10652
10653 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10654 if test "${enable_tparm_varargs+set}" = set; then
10655   enableval="$enable_tparm_varargs"
10656   with_tparm_varargs=$enableval
10657 else
10658   with_tparm_varargs=yes
10659 fi;
10660 echo "$as_me:10660: result: $with_tparm_varargs" >&5
10661 echo "${ECHO_T}$with_tparm_varargs" >&6
10662 NCURSES_TPARM_VARARGS=0
10663 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10664
10665 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10666 if test "$with_ticlib" != no ; then
10667 echo "$as_me:10667: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10668 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10669
10670 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10671 if test "${enable_tic_depends+set}" = set; then
10672   enableval="$enable_tic_depends"
10673   with_tic_depends=$enableval
10674 else
10675   with_tic_depends=yes
10676 fi;
10677 echo "$as_me:10677: result: $with_tic_depends" >&5
10678 echo "${ECHO_T}$with_tic_depends" >&6
10679 else
10680         with_tic_depends=no
10681 fi
10682
10683 ###   use option --with-bool to override bool's type
10684 echo "$as_me:10684: checking for type of bool" >&5
10685 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10686
10687 # Check whether --with-bool or --without-bool was given.
10688 if test "${with_bool+set}" = set; then
10689   withval="$with_bool"
10690   NCURSES_BOOL="$withval"
10691 else
10692   NCURSES_BOOL=auto
10693 fi;
10694 echo "$as_me:10694: result: $NCURSES_BOOL" >&5
10695 echo "${ECHO_T}$NCURSES_BOOL" >&6
10696
10697 echo "$as_me:10697: checking for alternate terminal capabilities file" >&5
10698 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10699
10700 # Check whether --with-caps or --without-caps was given.
10701 if test "${with_caps+set}" = set; then
10702   withval="$with_caps"
10703   TERMINFO_CAPS=Caps.$withval
10704 else
10705   TERMINFO_CAPS=Caps
10706 fi;
10707 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10708 echo "$as_me:10708: result: $TERMINFO_CAPS" >&5
10709 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10710
10711 ###   use option --with-chtype to override chtype's type
10712 echo "$as_me:10712: checking for type of chtype" >&5
10713 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10714
10715 # Check whether --with-chtype or --without-chtype was given.
10716 if test "${with_chtype+set}" = set; then
10717   withval="$with_chtype"
10718   NCURSES_CHTYPE="$withval"
10719 else
10720   NCURSES_CHTYPE=auto
10721 fi;
10722 echo "$as_me:10722: result: $NCURSES_CHTYPE" >&5
10723 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10724
10725 ###   use option --with-ospeed to override ospeed's type
10726 echo "$as_me:10726: checking for type of ospeed" >&5
10727 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10728
10729 # Check whether --with-ospeed or --without-ospeed was given.
10730 if test "${with_ospeed+set}" = set; then
10731   withval="$with_ospeed"
10732   NCURSES_OSPEED="$withval"
10733 else
10734   NCURSES_OSPEED=short
10735 fi;
10736 echo "$as_me:10736: result: $NCURSES_OSPEED" >&5
10737 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10738
10739 ###   use option --with-mmask-t to override mmask_t's type
10740 echo "$as_me:10740: checking for type of mmask_t" >&5
10741 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10742
10743 # Check whether --with-mmask-t or --without-mmask-t was given.
10744 if test "${with_mmask_t+set}" = set; then
10745   withval="$with_mmask_t"
10746   NCURSES_MMASK_T="$withval"
10747 else
10748   NCURSES_MMASK_T=auto
10749 fi;
10750 echo "$as_me:10750: result: $NCURSES_MMASK_T" >&5
10751 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10752
10753 ###   use option --with-ccharw-max to override CCHARW_MAX size
10754 echo "$as_me:10754: checking for size CCHARW_MAX" >&5
10755 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10756
10757 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10758 if test "${with_ccharw_max+set}" = set; then
10759   withval="$with_ccharw_max"
10760   NCURSES_CCHARW_MAX="$withval"
10761 else
10762   NCURSES_CCHARW_MAX=5
10763 fi;
10764 echo "$as_me:10764: result: $NCURSES_CCHARW_MAX" >&5
10765 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10766
10767 ###   use option --with-tparm-arg to override tparm's argument type
10768 echo "$as_me:10768: checking for type of tparm args" >&5
10769 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10770
10771 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10772 if test "${with_tparm_arg+set}" = set; then
10773   withval="$with_tparm_arg"
10774   NCURSES_TPARM_ARG="$withval"
10775 else
10776   NCURSES_TPARM_ARG=long
10777 fi;
10778 echo "$as_me:10778: result: $NCURSES_TPARM_ARG" >&5
10779 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10780
10781 ### Enable compiling-in rcs id's
10782 echo "$as_me:10782: checking if RCS identifiers should be compiled-in" >&5
10783 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10784
10785 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10786 if test "${with_rcs_ids+set}" = set; then
10787   withval="$with_rcs_ids"
10788   with_rcs_ids=$withval
10789 else
10790   with_rcs_ids=no
10791 fi;
10792 echo "$as_me:10792: result: $with_rcs_ids" >&5
10793 echo "${ECHO_T}$with_rcs_ids" >&6
10794 test "x$with_rcs_ids" = xyes &&
10795 cat >>confdefs.h <<\EOF
10796 #define USE_RCS_IDS 1
10797 EOF
10798
10799 ###############################################################################
10800
10801 echo "$as_me:10801: checking format of man-pages" >&5
10802 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10803
10804 # Check whether --with-manpage-format or --without-manpage-format was given.
10805 if test "${with_manpage_format+set}" = set; then
10806   withval="$with_manpage_format"
10807   MANPAGE_FORMAT=$withval
10808 else
10809   MANPAGE_FORMAT=unknown
10810 fi;
10811
10812 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10813 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10814
10815 cf_unknown=
10816
10817 case $MANPAGE_FORMAT in
10818 unknown)
10819   if test -z "$MANPATH" ; then
10820     MANPATH="/usr/man:/usr/share/man"
10821   fi
10822
10823   # look for the 'date' man-page (it's most likely to be installed!)
10824   MANPAGE_FORMAT=
10825   cf_preform=no
10826   cf_catonly=yes
10827   cf_example=date
10828
10829   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10830   for cf_dir in $MANPATH; do
10831     test -z "$cf_dir" && cf_dir=/usr/man
10832     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
10833     do
10834       cf_test=`echo $cf_name | sed -e 's/*//'`
10835       if test "x$cf_test" = "x$cf_name" ; then
10836
10837         case "$cf_name" in
10838         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10839         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10840         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10841         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10842         esac
10843
10844         case "$cf_name" in
10845         $cf_dir/man*)
10846           cf_catonly=no
10847           ;;
10848         $cf_dir/cat*)
10849           cf_preform=yes
10850           ;;
10851         esac
10852         break
10853       fi
10854
10855       # if we found a match in either man* or cat*, stop looking
10856       if test -n "$MANPAGE_FORMAT" ; then
10857         cf_found=no
10858         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10859         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10860         case "$cf_name" in
10861         $cf_dir/cat*)
10862           cf_found=yes
10863           ;;
10864         esac
10865         test $cf_found=yes && break
10866       fi
10867     done
10868     # only check the first directory in $MANPATH where we find manpages
10869     if test -n "$MANPAGE_FORMAT" ; then
10870        break
10871     fi
10872   done
10873   # if we did not find the example, just assume it is normal
10874   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10875   IFS="$ac_save_ifs"
10876   ;;
10877 *)
10878   for cf_option in $MANPAGE_FORMAT; do
10879      case $cf_option in #(vi
10880      gzip|compress|BSDI|normal|formatted|catonly)
10881        ;;
10882      *)
10883        cf_unknown="$cf_unknown $cf_option"
10884        ;;
10885      esac
10886   done
10887   ;;
10888 esac
10889
10890 echo "$as_me:10890: result: $MANPAGE_FORMAT" >&5
10891 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10892 if test -n "$cf_unknown" ; then
10893   { echo "$as_me:10893: WARNING: Unexpected manpage-format $cf_unknown" >&5
10894 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10895 fi
10896
10897 echo "$as_me:10897: checking for manpage renaming" >&5
10898 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10899
10900 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10901 if test "${with_manpage_renames+set}" = set; then
10902   withval="$with_manpage_renames"
10903   MANPAGE_RENAMES=$withval
10904 else
10905   MANPAGE_RENAMES=yes
10906 fi;
10907
10908 case ".$MANPAGE_RENAMES" in #(vi
10909 .no) #(vi
10910   ;;
10911 .|.yes)
10912   # Debian 'man' program?
10913   if test -f /etc/debian_version ; then
10914     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10915   else
10916     MANPAGE_RENAMES=no
10917   fi
10918   ;;
10919 esac
10920
10921 if test "$MANPAGE_RENAMES" != no ; then
10922   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10923     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10924   elif test ! -f $MANPAGE_RENAMES ; then
10925     { { echo "$as_me:10925: error: not a filename: $MANPAGE_RENAMES" >&5
10926 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10927    { (exit 1); exit 1; }; }
10928   fi
10929
10930   test ! -d man && mkdir man
10931
10932   # Construct a sed-script to perform renaming within man-pages
10933   if test -n "$MANPAGE_RENAMES" ; then
10934     test ! -d man && mkdir man
10935     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10936   fi
10937 fi
10938
10939 echo "$as_me:10939: result: $MANPAGE_RENAMES" >&5
10940 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10941
10942 echo "$as_me:10942: checking if manpage aliases will be installed" >&5
10943 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10944
10945 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10946 if test "${with_manpage_aliases+set}" = set; then
10947   withval="$with_manpage_aliases"
10948   MANPAGE_ALIASES=$withval
10949 else
10950   MANPAGE_ALIASES=yes
10951 fi;
10952
10953 echo "$as_me:10953: result: $MANPAGE_ALIASES" >&5
10954 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10955
10956 case "x$LN_S" in #(vi
10957 xln*) #(vi
10958         cf_use_symlinks=yes
10959         ;;
10960 *)
10961         cf_use_symlinks=no
10962         ;;
10963 esac
10964
10965 MANPAGE_SYMLINKS=no
10966 if test "$MANPAGE_ALIASES" = yes ; then
10967 echo "$as_me:10967: checking if manpage symlinks should be used" >&5
10968 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10969
10970 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10971 if test "${with_manpage_symlinks+set}" = set; then
10972   withval="$with_manpage_symlinks"
10973   MANPAGE_SYMLINKS=$withval
10974 else
10975   MANPAGE_SYMLINKS=$cf_use_symlinks
10976 fi;
10977
10978 if test "$$cf_use_symlinks" = no; then
10979 if test "$MANPAGE_SYMLINKS" = yes ; then
10980         { echo "$as_me:10980: WARNING: cannot make symlinks" >&5
10981 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10982         MANPAGE_SYMLINKS=no
10983 fi
10984 fi
10985
10986 echo "$as_me:10986: result: $MANPAGE_SYMLINKS" >&5
10987 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10988 fi
10989
10990 echo "$as_me:10990: checking for manpage tbl" >&5
10991 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10992
10993 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10994 if test "${with_manpage_tbl+set}" = set; then
10995   withval="$with_manpage_tbl"
10996   MANPAGE_TBL=$withval
10997 else
10998   MANPAGE_TBL=no
10999 fi;
11000
11001 echo "$as_me:11001: result: $MANPAGE_TBL" >&5
11002 echo "${ECHO_T}$MANPAGE_TBL" >&6
11003
11004   if test "$prefix" = "NONE" ; then
11005      cf_prefix="$ac_default_prefix"
11006   else
11007      cf_prefix="$prefix"
11008   fi
11009
11010   case "$MANPAGE_FORMAT" in # (vi
11011   *catonly*) # (vi
11012     cf_format=yes
11013     cf_inboth=no
11014     ;;
11015   *formatted*) # (vi
11016     cf_format=yes
11017     cf_inboth=yes
11018     ;;
11019   *)
11020     cf_format=no
11021     cf_inboth=no
11022     ;;
11023   esac
11024
11025 test ! -d man && mkdir man
11026
11027 cf_so_strip=
11028 cf_compress=
11029 case "$MANPAGE_FORMAT" in #(vi
11030 *compress*) #(vi
11031         cf_so_strip="Z"
11032         cf_compress=compress
11033   ;;
11034 *gzip*)
11035         cf_so_strip="gz"
11036         cf_compress=gzip
11037   ;;
11038 esac
11039
11040 cf_edit_man=./edit_man.sh
11041 cf_man_alias=`pwd`/man_alias.sed
11042
11043 cat >$cf_edit_man <<CF_EOF
11044 #! /bin/sh
11045 # this script is generated by the configure-script CF_MAN_PAGES macro.
11046
11047 prefix="$cf_prefix"
11048 datarootdir="$datarootdir"
11049 datadir="$datadir"
11050
11051 NCURSES_MAJOR="$NCURSES_MAJOR"
11052 NCURSES_MINOR="$NCURSES_MINOR"
11053 NCURSES_PATCH="$NCURSES_PATCH"
11054
11055 NCURSES_OSPEED="$NCURSES_OSPEED"
11056 TERMINFO="$TERMINFO"
11057
11058 INSTALL="$INSTALL"
11059 INSTALL_DATA="$INSTALL_DATA"
11060
11061 transform="$program_transform_name"
11062
11063 TMP=\${TMPDIR:=/tmp}/man\$\$
11064 trap "rm -f \$TMP" 0 1 2 5 15
11065
11066 form=\$1
11067 shift || exit 1
11068
11069 verb=\$1
11070 shift || exit 1
11071
11072 mandir=\$1
11073 shift || exit 1
11074
11075 srcdir=\$1
11076 top_srcdir=\$srcdir/..
11077 shift || exit 1
11078
11079 if test "\$form" = normal ; then
11080         if test "$cf_format" = yes ; then
11081         if test "$cf_inboth" = no ; then
11082                 sh \$0 format \$verb \$mandir \$srcdir \$*
11083                 exit $?
11084         fi
11085         fi
11086         cf_subdir=\$mandir/man
11087         cf_tables=$MANPAGE_TBL
11088 else
11089         cf_subdir=\$mandir/cat
11090         cf_tables=yes
11091 fi
11092
11093 # process the list of source-files
11094 for i in \$* ; do
11095 case \$i in #(vi
11096 *.orig|*.rej) ;; #(vi
11097 *.[0-9]*)
11098         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11099         if test \$verb = installing ; then
11100         if test ! -d \$cf_subdir\${section} ; then
11101                 mkdir -p \$cf_subdir\$section
11102         fi
11103         fi
11104
11105         # replace variables in man page
11106         if test ! -f $cf_man_alias ; then
11107 cat >>$cf_man_alias <<-CF_EOF2
11108                 s,@DATADIR@,\$datadir,g
11109                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11110                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11111                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11112                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11113                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11114                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11115 CF_EOF
11116
11117         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
11118         do
11119                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11120                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11121 cat >>$cf_edit_man <<-CF_EOF
11122                 s,@$cf_NAME@,$cf_name,g
11123 CF_EOF
11124         done
11125
11126 cat >>$cf_edit_man <<CF_EOF
11127 CF_EOF2
11128                 echo "...made $cf_man_alias"
11129         fi
11130
11131         aliases=
11132         cf_source=\`basename \$i\`
11133         inalias=\$cf_source
11134         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11135         if test ! -f \$inalias ; then
11136                 echo .. skipped \$cf_source
11137                 continue
11138         fi
11139 CF_EOF
11140
11141 if test "$MANPAGE_ALIASES" != no ; then
11142 cat >>$cf_edit_man <<CF_EOF
11143         nCurses=ignore.3x
11144         test $with_curses_h = yes && nCurses=ncurses.3x
11145         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11146 CF_EOF
11147 fi
11148
11149 if test "$MANPAGE_RENAMES" = no ; then
11150 cat >>$cf_edit_man <<CF_EOF
11151         # perform program transformations for section 1 man pages
11152         if test \$section = 1 ; then
11153                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11154         else
11155                 cf_target=\$cf_subdir\${section}/\$cf_source
11156         fi
11157 CF_EOF
11158 else
11159 cat >>$cf_edit_man <<CF_EOF
11160         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11161         if test -z "\$cf_target" ; then
11162                 echo '? missing rename for '\$cf_source
11163                 cf_target="\$cf_source"
11164         fi
11165         cf_target="\$cf_subdir\${section}/\${cf_target}"
11166
11167 CF_EOF
11168 fi
11169
11170 cat >>$cf_edit_man <<CF_EOF
11171         sed     -f $cf_man_alias \\
11172 CF_EOF
11173
11174 if test -f $MANPAGE_RENAMES ; then
11175 cat >>$cf_edit_man <<CF_EOF
11176                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11177 CF_EOF
11178 else
11179 cat >>$cf_edit_man <<CF_EOF
11180                 < \$i >\$TMP
11181 CF_EOF
11182 fi
11183
11184 cat >>$cf_edit_man <<CF_EOF
11185 if test \$cf_tables = yes ; then
11186         tbl \$TMP >\$TMP.out
11187         mv \$TMP.out \$TMP
11188 fi
11189 CF_EOF
11190
11191 if test $with_overwrite != yes ; then
11192 cat >>$cf_edit_man <<CF_EOF
11193         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11194         mv \$TMP.out \$TMP
11195 CF_EOF
11196 fi
11197
11198 if test $with_curses_h != yes ; then
11199 cat >>$cf_edit_man <<CF_EOF
11200         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11201         mv \$TMP.out \$TMP
11202 CF_EOF
11203 fi
11204
11205 cat >>$cf_edit_man <<CF_EOF
11206         if test \$form = format ; then
11207                 nroff -man \$TMP >\$TMP.out
11208                 mv \$TMP.out \$TMP
11209         fi
11210 CF_EOF
11211
11212 if test -n "$cf_compress" ; then
11213 cat >>$cf_edit_man <<CF_EOF
11214         if test \$verb = installing ; then
11215         if ( $cf_compress -f \$TMP )
11216         then
11217                 mv \$TMP.$cf_so_strip \$TMP
11218         fi
11219         fi
11220         cf_target="\$cf_target.$cf_so_strip"
11221 CF_EOF
11222 fi
11223
11224 case "$MANPAGE_FORMAT" in #(vi
11225 *BSDI*)
11226 cat >>$cf_edit_man <<CF_EOF
11227         if test \$form = format ; then
11228                 # BSDI installs only .0 suffixes in the cat directories
11229                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11230         fi
11231 CF_EOF
11232   ;;
11233 esac
11234
11235 cat >>$cf_edit_man <<CF_EOF
11236         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11237         if test \$verb = installing ; then
11238                 echo \$verb \$cf_target
11239                 \$INSTALL_DATA \$TMP \$cf_target
11240                 test -d \$cf_subdir\${section} &&
11241                 test -n "\$aliases" && (
11242                         cd \$cf_subdir\${section} && (
11243                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11244                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11245                                 cf_target=\`basename \$cf_target\`
11246                                 for cf_alias in \$aliases
11247                                 do
11248                                         if test \$section = 1 ; then
11249                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11250                                         fi
11251
11252                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11253                                                 if test -f \$cf_alias\${suffix} ; then
11254                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11255                                                         then
11256                                                                 continue
11257                                                         fi
11258                                                 fi
11259                                                 echo .. \$verb alias \$cf_alias\${suffix}
11260 CF_EOF
11261 case "x$LN_S" in #(vi
11262 *-f) #(vi
11263 cat >>$cf_edit_man <<CF_EOF
11264                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11265 CF_EOF
11266         ;;
11267 *)
11268 cat >>$cf_edit_man <<CF_EOF
11269                                                 rm -f \$cf_alias\${suffix}
11270                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11271 CF_EOF
11272         ;;
11273 esac
11274 cat >>$cf_edit_man <<CF_EOF
11275                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11276                                                 echo ".so \$cf_source" >\$TMP
11277 CF_EOF
11278 if test -n "$cf_compress" ; then
11279 cat >>$cf_edit_man <<CF_EOF
11280                                                 if test -n "$cf_so_strip" ; then
11281                                                         $cf_compress -f \$TMP
11282                                                         mv \$TMP.$cf_so_strip \$TMP
11283                                                 fi
11284 CF_EOF
11285 fi
11286 cat >>$cf_edit_man <<CF_EOF
11287                                                 echo .. \$verb alias \$cf_alias\${suffix}
11288                                                 rm -f \$cf_alias\${suffix}
11289                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11290                                         fi
11291                                 done
11292                         )
11293                 )
11294         elif test \$verb = removing ; then
11295                 test -f \$cf_target && (
11296                         echo \$verb \$cf_target
11297                         rm -f \$cf_target
11298                 )
11299                 test -d \$cf_subdir\${section} &&
11300                 test -n "\$aliases" && (
11301                         cd \$cf_subdir\${section} && (
11302                                 for cf_alias in \$aliases
11303                                 do
11304                                         if test \$section = 1 ; then
11305                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11306                                         fi
11307
11308                                         echo .. \$verb alias \$cf_alias\${suffix}
11309                                         rm -f \$cf_alias\${suffix}
11310                                 done
11311                         )
11312                 )
11313         else
11314 #               echo ".hy 0"
11315                 cat \$TMP
11316         fi
11317         ;;
11318 esac
11319 done
11320
11321 if test $cf_inboth = yes ; then
11322 if test \$form != format ; then
11323         sh \$0 format \$verb \$mandir \$srcdir \$*
11324 fi
11325 fi
11326
11327 exit 0
11328 CF_EOF
11329 chmod 755 $cf_edit_man
11330
11331 ###############################################################################
11332
11333 ### Note that some functions (such as const) are normally disabled anyway.
11334 echo "$as_me:11334: checking if you want to build with function extensions" >&5
11335 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11336
11337 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11338 if test "${enable_ext_funcs+set}" = set; then
11339   enableval="$enable_ext_funcs"
11340   with_ext_funcs=$enableval
11341 else
11342   with_ext_funcs=yes
11343 fi;
11344 echo "$as_me:11344: result: $with_ext_funcs" >&5
11345 echo "${ECHO_T}$with_ext_funcs" >&6
11346 if test "x$with_ext_funcs" = xyes ; then
11347         NCURSES_EXT_FUNCS=1
11348
11349 cat >>confdefs.h <<\EOF
11350 #define HAVE_ASSUME_DEFAULT_COLORS 1
11351 EOF
11352
11353 cat >>confdefs.h <<\EOF
11354 #define HAVE_CURSES_VERSION 1
11355 EOF
11356
11357 cat >>confdefs.h <<\EOF
11358 #define HAVE_HAS_KEY 1
11359 EOF
11360
11361 cat >>confdefs.h <<\EOF
11362 #define HAVE_RESIZETERM 1
11363 EOF
11364
11365 cat >>confdefs.h <<\EOF
11366 #define HAVE_RESIZE_TERM 1
11367 EOF
11368
11369 cat >>confdefs.h <<\EOF
11370 #define HAVE_TERM_ENTRY_H 1
11371 EOF
11372
11373 cat >>confdefs.h <<\EOF
11374 #define HAVE_USE_DEFAULT_COLORS 1
11375 EOF
11376
11377 cat >>confdefs.h <<\EOF
11378 #define HAVE_USE_SCREEN 1
11379 EOF
11380
11381 cat >>confdefs.h <<\EOF
11382 #define HAVE_USE_WINDOW 1
11383 EOF
11384
11385 cat >>confdefs.h <<\EOF
11386 #define HAVE_WRESIZE 1
11387 EOF
11388
11389 cat >>confdefs.h <<\EOF
11390 #define NCURSES_EXT_FUNCS 1
11391 EOF
11392
11393         GENERATED_EXT_FUNCS=generated
11394 else
11395         NCURSES_EXT_FUNCS=0
11396         GENERATED_EXT_FUNCS=
11397 fi
11398
11399 echo "$as_me:11399: checking if you want to build with experimental SCREEN extensions" >&5
11400 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
11401
11402 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11403 if test "${enable_sp_funcs+set}" = set; then
11404   enableval="$enable_sp_funcs"
11405   with_sp_funcs=$enableval
11406 else
11407   with_sp_funcs=no
11408 fi;
11409 echo "$as_me:11409: result: $with_sp_funcs" >&5
11410 echo "${ECHO_T}$with_sp_funcs" >&6
11411 if test "x$with_sp_funcs" = xyes ; then
11412         NCURSES_SP_FUNCS=1
11413
11414 cat >>confdefs.h <<\EOF
11415 #define NCURSES_SP_FUNCS 1
11416 EOF
11417
11418         GENERATED_SP_FUNCS=generated
11419 else
11420         NCURSES_SP_FUNCS=0
11421         GENERATED_SP_FUNCS=
11422 fi
11423
11424 echo "$as_me:11424: checking if you want to build with experimental terminal-driver" >&5
11425 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
11426
11427 # Check whether --enable-term-driver or --disable-term-driver was given.
11428 if test "${enable_term_driver+set}" = set; then
11429   enableval="$enable_term_driver"
11430   with_term_driver=$enableval
11431 else
11432   with_term_driver=no
11433 fi;
11434 echo "$as_me:11434: result: $with_term_driver" >&5
11435 echo "${ECHO_T}$with_term_driver" >&6
11436 if test "x$with_term_driver" = xyes ; then
11437
11438 cat >>confdefs.h <<\EOF
11439 #define USE_TERM_DRIVER 1
11440 EOF
11441
11442         if test "x$with_sp_funcs" != xyes ; then
11443                 { { echo "$as_me:11443: error: The term-driver option relies upon sp-funcs" >&5
11444 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11445    { (exit 1); exit 1; }; }
11446         fi
11447 fi
11448
11449 ###   use option --enable-const to turn on use of const beyond that in XSI.
11450 echo "$as_me:11450: checking for extended use of const keyword" >&5
11451 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11452
11453 # Check whether --enable-const or --disable-const was given.
11454 if test "${enable_const+set}" = set; then
11455   enableval="$enable_const"
11456   with_ext_const=$enableval
11457 else
11458   with_ext_const=no
11459 fi;
11460 echo "$as_me:11460: result: $with_ext_const" >&5
11461 echo "${ECHO_T}$with_ext_const" >&6
11462 NCURSES_CONST='/*nothing*/'
11463 if test "x$with_ext_const" = xyes ; then
11464         NCURSES_CONST=const
11465 fi
11466
11467 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11468 echo "$as_me:11468: checking if you want to use extended colors" >&5
11469 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11470
11471 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11472 if test "${enable_ext_colors+set}" = set; then
11473   enableval="$enable_ext_colors"
11474   with_ext_colors=$enableval
11475 else
11476   with_ext_colors=no
11477 fi;
11478 echo "$as_me:11478: result: $with_ext_colors" >&5
11479 echo "${ECHO_T}$with_ext_colors" >&6
11480 NCURSES_EXT_COLORS=0
11481 if test "x$with_ext_colors" = xyes ; then
11482         if test "x$with_widec" != xyes ; then
11483                 { { echo "$as_me:11483: error: This option applies only to wide-character library" >&5
11484 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11485    { (exit 1); exit 1; }; }
11486         else
11487                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11488
11489 if test "${with_abi_version+set}" != set; then
11490         case $cf_cv_rel_version in
11491         5.*)
11492                 cf_cv_rel_version=6.0
11493                 cf_cv_abi_version=6
11494                 { echo "$as_me:11494: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11495 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11496                 ;;
11497         esac
11498 fi
11499
11500         fi
11501         NCURSES_EXT_COLORS=1
11502
11503 cat >>confdefs.h <<\EOF
11504 #define NCURSES_EXT_COLORS 1
11505 EOF
11506
11507 fi
11508
11509 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11510 echo "$as_me:11510: checking if you want to use extended mouse encoding" >&5
11511 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11512
11513 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11514 if test "${enable_ext_mouse+set}" = set; then
11515   enableval="$enable_ext_mouse"
11516   with_ext_mouse=$enableval
11517 else
11518   with_ext_mouse=no
11519 fi;
11520 echo "$as_me:11520: result: $with_ext_mouse" >&5
11521 echo "${ECHO_T}$with_ext_mouse" >&6
11522 NCURSES_MOUSE_VERSION=1
11523 if test "x$with_ext_mouse" = xyes ; then
11524         NCURSES_MOUSE_VERSION=2
11525
11526 if test "${with_abi_version+set}" != set; then
11527         case $cf_cv_rel_version in
11528         5.*)
11529                 cf_cv_rel_version=6.0
11530                 cf_cv_abi_version=6
11531                 { echo "$as_me:11531: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11532 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11533                 ;;
11534         esac
11535 fi
11536
11537 fi
11538
11539 echo "$as_me:11539: checking if you want \$NCURSES_NO_PADDING code" >&5
11540 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11541
11542 # Check whether --enable-no-padding or --disable-no-padding was given.
11543 if test "${enable_no_padding+set}" = set; then
11544   enableval="$enable_no_padding"
11545   with_no_padding=$enableval
11546 else
11547   with_no_padding=$with_ext_funcs
11548 fi;
11549 echo "$as_me:11549: result: $with_no_padding" >&5
11550 echo "${ECHO_T}$with_no_padding" >&6
11551 test "x$with_no_padding" = xyes &&
11552 cat >>confdefs.h <<\EOF
11553 #define NCURSES_NO_PADDING 1
11554 EOF
11555
11556 echo "$as_me:11556: checking for ANSI C header files" >&5
11557 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11558 if test "${ac_cv_header_stdc+set}" = set; then
11559   echo $ECHO_N "(cached) $ECHO_C" >&6
11560 else
11561   cat >conftest.$ac_ext <<_ACEOF
11562 #line 11562 "configure"
11563 #include "confdefs.h"
11564 #include <stdlib.h>
11565 #include <stdarg.h>
11566 #include <string.h>
11567 #include <float.h>
11568
11569 _ACEOF
11570 if { (eval echo "$as_me:11570: \"$ac_cpp conftest.$ac_ext\"") >&5
11571   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11572   ac_status=$?
11573   egrep -v '^ *\+' conftest.er1 >conftest.err
11574   rm -f conftest.er1
11575   cat conftest.err >&5
11576   echo "$as_me:11576: \$? = $ac_status" >&5
11577   (exit $ac_status); } >/dev/null; then
11578   if test -s conftest.err; then
11579     ac_cpp_err=$ac_c_preproc_warn_flag
11580   else
11581     ac_cpp_err=
11582   fi
11583 else
11584   ac_cpp_err=yes
11585 fi
11586 if test -z "$ac_cpp_err"; then
11587   ac_cv_header_stdc=yes
11588 else
11589   echo "$as_me: failed program was:" >&5
11590   cat conftest.$ac_ext >&5
11591   ac_cv_header_stdc=no
11592 fi
11593 rm -f conftest.err conftest.$ac_ext
11594
11595 if test $ac_cv_header_stdc = yes; then
11596   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11597   cat >conftest.$ac_ext <<_ACEOF
11598 #line 11598 "configure"
11599 #include "confdefs.h"
11600 #include <string.h>
11601
11602 _ACEOF
11603 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11604   egrep "memchr" >/dev/null 2>&1; then
11605   :
11606 else
11607   ac_cv_header_stdc=no
11608 fi
11609 rm -rf conftest*
11610
11611 fi
11612
11613 if test $ac_cv_header_stdc = yes; then
11614   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11615   cat >conftest.$ac_ext <<_ACEOF
11616 #line 11616 "configure"
11617 #include "confdefs.h"
11618 #include <stdlib.h>
11619
11620 _ACEOF
11621 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11622   egrep "free" >/dev/null 2>&1; then
11623   :
11624 else
11625   ac_cv_header_stdc=no
11626 fi
11627 rm -rf conftest*
11628
11629 fi
11630
11631 if test $ac_cv_header_stdc = yes; then
11632   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11633   if test "$cross_compiling" = yes; then
11634   :
11635 else
11636   cat >conftest.$ac_ext <<_ACEOF
11637 #line 11637 "configure"
11638 #include "confdefs.h"
11639 #include <ctype.h>
11640 #if ((' ' & 0x0FF) == 0x020)
11641 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11642 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11643 #else
11644 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11645                      || ('j' <= (c) && (c) <= 'r') \
11646                      || ('s' <= (c) && (c) <= 'z'))
11647 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11648 #endif
11649
11650 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11651 int
11652 main ()
11653 {
11654   int i;
11655   for (i = 0; i < 256; i++)
11656     if (XOR (islower (i), ISLOWER (i))
11657         || toupper (i) != TOUPPER (i))
11658       $ac_main_return(2);
11659   $ac_main_return (0);
11660 }
11661 _ACEOF
11662 rm -f conftest$ac_exeext
11663 if { (eval echo "$as_me:11663: \"$ac_link\"") >&5
11664   (eval $ac_link) 2>&5
11665   ac_status=$?
11666   echo "$as_me:11666: \$? = $ac_status" >&5
11667   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11668   { (eval echo "$as_me:11668: \"$ac_try\"") >&5
11669   (eval $ac_try) 2>&5
11670   ac_status=$?
11671   echo "$as_me:11671: \$? = $ac_status" >&5
11672   (exit $ac_status); }; }; then
11673   :
11674 else
11675   echo "$as_me: program exited with status $ac_status" >&5
11676 echo "$as_me: failed program was:" >&5
11677 cat conftest.$ac_ext >&5
11678 ac_cv_header_stdc=no
11679 fi
11680 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11681 fi
11682 fi
11683 fi
11684 echo "$as_me:11684: result: $ac_cv_header_stdc" >&5
11685 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11686 if test $ac_cv_header_stdc = yes; then
11687
11688 cat >>confdefs.h <<\EOF
11689 #define STDC_HEADERS 1
11690 EOF
11691
11692 fi
11693
11694 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11695
11696 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11697                   inttypes.h stdint.h unistd.h
11698 do
11699 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11700 echo "$as_me:11700: checking for $ac_header" >&5
11701 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11702 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11703   echo $ECHO_N "(cached) $ECHO_C" >&6
11704 else
11705   cat >conftest.$ac_ext <<_ACEOF
11706 #line 11706 "configure"
11707 #include "confdefs.h"
11708 $ac_includes_default
11709 #include <$ac_header>
11710 _ACEOF
11711 rm -f conftest.$ac_objext
11712 if { (eval echo "$as_me:11712: \"$ac_compile\"") >&5
11713   (eval $ac_compile) 2>&5
11714   ac_status=$?
11715   echo "$as_me:11715: \$? = $ac_status" >&5
11716   (exit $ac_status); } &&
11717          { ac_try='test -s conftest.$ac_objext'
11718   { (eval echo "$as_me:11718: \"$ac_try\"") >&5
11719   (eval $ac_try) 2>&5
11720   ac_status=$?
11721   echo "$as_me:11721: \$? = $ac_status" >&5
11722   (exit $ac_status); }; }; then
11723   eval "$as_ac_Header=yes"
11724 else
11725   echo "$as_me: failed program was:" >&5
11726 cat conftest.$ac_ext >&5
11727 eval "$as_ac_Header=no"
11728 fi
11729 rm -f conftest.$ac_objext conftest.$ac_ext
11730 fi
11731 echo "$as_me:11731: result: `eval echo '${'$as_ac_Header'}'`" >&5
11732 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11733 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11734   cat >>confdefs.h <<EOF
11735 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11736 EOF
11737
11738 fi
11739 done
11740
11741 echo "$as_me:11741: checking for signed char" >&5
11742 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11743 if test "${ac_cv_type_signed_char+set}" = set; then
11744   echo $ECHO_N "(cached) $ECHO_C" >&6
11745 else
11746   cat >conftest.$ac_ext <<_ACEOF
11747 #line 11747 "configure"
11748 #include "confdefs.h"
11749 $ac_includes_default
11750 int
11751 main ()
11752 {
11753 if ((signed char *) 0)
11754   return 0;
11755 if (sizeof (signed char))
11756   return 0;
11757   ;
11758   return 0;
11759 }
11760 _ACEOF
11761 rm -f conftest.$ac_objext
11762 if { (eval echo "$as_me:11762: \"$ac_compile\"") >&5
11763   (eval $ac_compile) 2>&5
11764   ac_status=$?
11765   echo "$as_me:11765: \$? = $ac_status" >&5
11766   (exit $ac_status); } &&
11767          { ac_try='test -s conftest.$ac_objext'
11768   { (eval echo "$as_me:11768: \"$ac_try\"") >&5
11769   (eval $ac_try) 2>&5
11770   ac_status=$?
11771   echo "$as_me:11771: \$? = $ac_status" >&5
11772   (exit $ac_status); }; }; then
11773   ac_cv_type_signed_char=yes
11774 else
11775   echo "$as_me: failed program was:" >&5
11776 cat conftest.$ac_ext >&5
11777 ac_cv_type_signed_char=no
11778 fi
11779 rm -f conftest.$ac_objext conftest.$ac_ext
11780 fi
11781 echo "$as_me:11781: result: $ac_cv_type_signed_char" >&5
11782 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11783
11784 echo "$as_me:11784: checking size of signed char" >&5
11785 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11786 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11787   echo $ECHO_N "(cached) $ECHO_C" >&6
11788 else
11789   if test "$ac_cv_type_signed_char" = yes; then
11790   if test "$cross_compiling" = yes; then
11791   # Depending upon the size, compute the lo and hi bounds.
11792 cat >conftest.$ac_ext <<_ACEOF
11793 #line 11793 "configure"
11794 #include "confdefs.h"
11795 $ac_includes_default
11796 int
11797 main ()
11798 {
11799 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11800   ;
11801   return 0;
11802 }
11803 _ACEOF
11804 rm -f conftest.$ac_objext
11805 if { (eval echo "$as_me:11805: \"$ac_compile\"") >&5
11806   (eval $ac_compile) 2>&5
11807   ac_status=$?
11808   echo "$as_me:11808: \$? = $ac_status" >&5
11809   (exit $ac_status); } &&
11810          { ac_try='test -s conftest.$ac_objext'
11811   { (eval echo "$as_me:11811: \"$ac_try\"") >&5
11812   (eval $ac_try) 2>&5
11813   ac_status=$?
11814   echo "$as_me:11814: \$? = $ac_status" >&5
11815   (exit $ac_status); }; }; then
11816   ac_lo=0 ac_mid=0
11817   while :; do
11818     cat >conftest.$ac_ext <<_ACEOF
11819 #line 11819 "configure"
11820 #include "confdefs.h"
11821 $ac_includes_default
11822 int
11823 main ()
11824 {
11825 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11826   ;
11827   return 0;
11828 }
11829 _ACEOF
11830 rm -f conftest.$ac_objext
11831 if { (eval echo "$as_me:11831: \"$ac_compile\"") >&5
11832   (eval $ac_compile) 2>&5
11833   ac_status=$?
11834   echo "$as_me:11834: \$? = $ac_status" >&5
11835   (exit $ac_status); } &&
11836          { ac_try='test -s conftest.$ac_objext'
11837   { (eval echo "$as_me:11837: \"$ac_try\"") >&5
11838   (eval $ac_try) 2>&5
11839   ac_status=$?
11840   echo "$as_me:11840: \$? = $ac_status" >&5
11841   (exit $ac_status); }; }; then
11842   ac_hi=$ac_mid; break
11843 else
11844   echo "$as_me: failed program was:" >&5
11845 cat conftest.$ac_ext >&5
11846 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11847 fi
11848 rm -f conftest.$ac_objext conftest.$ac_ext
11849   done
11850 else
11851   echo "$as_me: failed program was:" >&5
11852 cat conftest.$ac_ext >&5
11853 ac_hi=-1 ac_mid=-1
11854   while :; do
11855     cat >conftest.$ac_ext <<_ACEOF
11856 #line 11856 "configure"
11857 #include "confdefs.h"
11858 $ac_includes_default
11859 int
11860 main ()
11861 {
11862 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11863   ;
11864   return 0;
11865 }
11866 _ACEOF
11867 rm -f conftest.$ac_objext
11868 if { (eval echo "$as_me:11868: \"$ac_compile\"") >&5
11869   (eval $ac_compile) 2>&5
11870   ac_status=$?
11871   echo "$as_me:11871: \$? = $ac_status" >&5
11872   (exit $ac_status); } &&
11873          { ac_try='test -s conftest.$ac_objext'
11874   { (eval echo "$as_me:11874: \"$ac_try\"") >&5
11875   (eval $ac_try) 2>&5
11876   ac_status=$?
11877   echo "$as_me:11877: \$? = $ac_status" >&5
11878   (exit $ac_status); }; }; then
11879   ac_lo=$ac_mid; break
11880 else
11881   echo "$as_me: failed program was:" >&5
11882 cat conftest.$ac_ext >&5
11883 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11884 fi
11885 rm -f conftest.$ac_objext conftest.$ac_ext
11886   done
11887 fi
11888 rm -f conftest.$ac_objext conftest.$ac_ext
11889 # Binary search between lo and hi bounds.
11890 while test "x$ac_lo" != "x$ac_hi"; do
11891   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11892   cat >conftest.$ac_ext <<_ACEOF
11893 #line 11893 "configure"
11894 #include "confdefs.h"
11895 $ac_includes_default
11896 int
11897 main ()
11898 {
11899 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11900   ;
11901   return 0;
11902 }
11903 _ACEOF
11904 rm -f conftest.$ac_objext
11905 if { (eval echo "$as_me:11905: \"$ac_compile\"") >&5
11906   (eval $ac_compile) 2>&5
11907   ac_status=$?
11908   echo "$as_me:11908: \$? = $ac_status" >&5
11909   (exit $ac_status); } &&
11910          { ac_try='test -s conftest.$ac_objext'
11911   { (eval echo "$as_me:11911: \"$ac_try\"") >&5
11912   (eval $ac_try) 2>&5
11913   ac_status=$?
11914   echo "$as_me:11914: \$? = $ac_status" >&5
11915   (exit $ac_status); }; }; then
11916   ac_hi=$ac_mid
11917 else
11918   echo "$as_me: failed program was:" >&5
11919 cat conftest.$ac_ext >&5
11920 ac_lo=`expr $ac_mid + 1`
11921 fi
11922 rm -f conftest.$ac_objext conftest.$ac_ext
11923 done
11924 ac_cv_sizeof_signed_char=$ac_lo
11925 else
11926   if test "$cross_compiling" = yes; then
11927   { { echo "$as_me:11927: error: cannot run test program while cross compiling" >&5
11928 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11929    { (exit 1); exit 1; }; }
11930 else
11931   cat >conftest.$ac_ext <<_ACEOF
11932 #line 11932 "configure"
11933 #include "confdefs.h"
11934 $ac_includes_default
11935 int
11936 main ()
11937 {
11938 FILE *f = fopen ("conftest.val", "w");
11939 if (!f)
11940   $ac_main_return (1);
11941 fprintf (f, "%d", (sizeof (signed char)));
11942 fclose (f);
11943   ;
11944   return 0;
11945 }
11946 _ACEOF
11947 rm -f conftest$ac_exeext
11948 if { (eval echo "$as_me:11948: \"$ac_link\"") >&5
11949   (eval $ac_link) 2>&5
11950   ac_status=$?
11951   echo "$as_me:11951: \$? = $ac_status" >&5
11952   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11953   { (eval echo "$as_me:11953: \"$ac_try\"") >&5
11954   (eval $ac_try) 2>&5
11955   ac_status=$?
11956   echo "$as_me:11956: \$? = $ac_status" >&5
11957   (exit $ac_status); }; }; then
11958   ac_cv_sizeof_signed_char=`cat conftest.val`
11959 else
11960   echo "$as_me: program exited with status $ac_status" >&5
11961 echo "$as_me: failed program was:" >&5
11962 cat conftest.$ac_ext >&5
11963 fi
11964 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11965 fi
11966 fi
11967 rm -f conftest.val
11968 else
11969   ac_cv_sizeof_signed_char=0
11970 fi
11971 fi
11972 echo "$as_me:11972: result: $ac_cv_sizeof_signed_char" >&5
11973 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11974 cat >>confdefs.h <<EOF
11975 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11976 EOF
11977
11978 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11979         NCURSES_SBOOL="signed char"
11980 else
11981         NCURSES_SBOOL="char"
11982 fi
11983 echo "$as_me:11983: checking if you want to use signed Boolean array in term.h" >&5
11984 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11985
11986 # Check whether --enable-signed-char or --disable-signed-char was given.
11987 if test "${enable_signed_char+set}" = set; then
11988   enableval="$enable_signed_char"
11989   with_signed_char=$enableval
11990 else
11991   with_signed_char=no
11992 fi;
11993 echo "$as_me:11993: result: $with_signed_char" >&5
11994 echo "${ECHO_T}$with_signed_char" >&6
11995 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11996
11997 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11998 echo "$as_me:11998: checking if you want SIGWINCH handler" >&5
11999 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12000
12001 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12002 if test "${enable_sigwinch+set}" = set; then
12003   enableval="$enable_sigwinch"
12004   with_sigwinch=$enableval
12005 else
12006   with_sigwinch=$with_ext_funcs
12007 fi;
12008 echo "$as_me:12008: result: $with_sigwinch" >&5
12009 echo "${ECHO_T}$with_sigwinch" >&6
12010 test "x$with_sigwinch" = xyes &&
12011 cat >>confdefs.h <<\EOF
12012 #define USE_SIGWINCH 1
12013 EOF
12014
12015 ###   use option --enable-tcap-names to allow user to define new capabilities
12016 echo "$as_me:12016: checking if you want user-definable terminal capabilities like termcap" >&5
12017 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12018
12019 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12020 if test "${enable_tcap_names+set}" = set; then
12021   enableval="$enable_tcap_names"
12022   with_tcap_names=$enableval
12023 else
12024   with_tcap_names=$with_ext_funcs
12025 fi;
12026 echo "$as_me:12026: result: $with_tcap_names" >&5
12027 echo "${ECHO_T}$with_tcap_names" >&6
12028 NCURSES_XNAMES=0
12029 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12030
12031 ###############################################################################
12032 # These options are relatively safe to experiment with.
12033
12034 echo "$as_me:12034: checking if you want all development code" >&5
12035 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12036
12037 # Check whether --with-develop or --without-develop was given.
12038 if test "${with_develop+set}" = set; then
12039   withval="$with_develop"
12040   with_develop=$withval
12041 else
12042   with_develop=no
12043 fi;
12044 echo "$as_me:12044: result: $with_develop" >&5
12045 echo "${ECHO_T}$with_develop" >&6
12046
12047 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12048 echo "$as_me:12048: checking if you want hard-tabs code" >&5
12049 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12050
12051 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12052 if test "${enable_hard_tabs+set}" = set; then
12053   enableval="$enable_hard_tabs"
12054
12055 else
12056   enable_hard_tabs=$with_develop
12057 fi;
12058 echo "$as_me:12058: result: $enable_hard_tabs" >&5
12059 echo "${ECHO_T}$enable_hard_tabs" >&6
12060 test "x$enable_hard_tabs" = xyes &&
12061 cat >>confdefs.h <<\EOF
12062 #define USE_HARD_TABS 1
12063 EOF
12064
12065 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12066 echo "$as_me:12066: checking if you want limited support for xmc" >&5
12067 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12068
12069 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12070 if test "${enable_xmc_glitch+set}" = set; then
12071   enableval="$enable_xmc_glitch"
12072
12073 else
12074   enable_xmc_glitch=$with_develop
12075 fi;
12076 echo "$as_me:12076: result: $enable_xmc_glitch" >&5
12077 echo "${ECHO_T}$enable_xmc_glitch" >&6
12078 test "x$enable_xmc_glitch" = xyes &&
12079 cat >>confdefs.h <<\EOF
12080 #define USE_XMC_SUPPORT 1
12081 EOF
12082
12083 ###############################################################################
12084 # These are just experimental, probably should not be in a package:
12085
12086 echo "$as_me:12086: checking if you do not want to assume colors are white-on-black" >&5
12087 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12088
12089 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12090 if test "${enable_assumed_color+set}" = set; then
12091   enableval="$enable_assumed_color"
12092   with_assumed_color=$enableval
12093 else
12094   with_assumed_color=yes
12095 fi;
12096 echo "$as_me:12096: result: $with_assumed_color" >&5
12097 echo "${ECHO_T}$with_assumed_color" >&6
12098 test "x$with_assumed_color" = xyes &&
12099 cat >>confdefs.h <<\EOF
12100 #define USE_ASSUMED_COLOR 1
12101 EOF
12102
12103 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12104 echo "$as_me:12104: checking if you want hashmap scrolling-optimization code" >&5
12105 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12106
12107 # Check whether --enable-hashmap or --disable-hashmap was given.
12108 if test "${enable_hashmap+set}" = set; then
12109   enableval="$enable_hashmap"
12110   with_hashmap=$enableval
12111 else
12112   with_hashmap=yes
12113 fi;
12114 echo "$as_me:12114: result: $with_hashmap" >&5
12115 echo "${ECHO_T}$with_hashmap" >&6
12116 test "x$with_hashmap" = xyes &&
12117 cat >>confdefs.h <<\EOF
12118 #define USE_HASHMAP 1
12119 EOF
12120
12121 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12122 echo "$as_me:12122: checking if you want colorfgbg code" >&5
12123 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12124
12125 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12126 if test "${enable_colorfgbg+set}" = set; then
12127   enableval="$enable_colorfgbg"
12128   with_colorfgbg=$enableval
12129 else
12130   with_colorfgbg=no
12131 fi;
12132 echo "$as_me:12132: result: $with_colorfgbg" >&5
12133 echo "${ECHO_T}$with_colorfgbg" >&6
12134 test "x$with_colorfgbg" = xyes &&
12135 cat >>confdefs.h <<\EOF
12136 #define USE_COLORFGBG 1
12137 EOF
12138
12139 ###   use option --enable-interop to turn on use of bindings used for interop
12140 echo "$as_me:12140: checking if you want interop bindings" >&5
12141 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12142
12143 # Check whether --enable-interop or --disable-interop was given.
12144 if test "${enable_interop+set}" = set; then
12145   enableval="$enable_interop"
12146   with_exp_interop=$enableval
12147 else
12148   with_exp_interop=no
12149 fi;
12150 echo "$as_me:12150: result: $with_exp_interop" >&5
12151 echo "${ECHO_T}$with_exp_interop" >&6
12152
12153 NCURSES_INTEROP_FUNCS=0
12154 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12155
12156 # This is still experimental (20080329), but should ultimately be moved to
12157 # the script-block --with-normal, etc.
12158
12159 echo "$as_me:12159: checking if you want to link with the pthread library" >&5
12160 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12161
12162 # Check whether --with-pthread or --without-pthread was given.
12163 if test "${with_pthread+set}" = set; then
12164   withval="$with_pthread"
12165   with_pthread=$withval
12166 else
12167   with_pthread=no
12168 fi;
12169 echo "$as_me:12169: result: $with_pthread" >&5
12170 echo "${ECHO_T}$with_pthread" >&6
12171
12172 if test "$with_pthread" != no ; then
12173     echo "$as_me:12173: checking for pthread.h" >&5
12174 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12175 if test "${ac_cv_header_pthread_h+set}" = set; then
12176   echo $ECHO_N "(cached) $ECHO_C" >&6
12177 else
12178   cat >conftest.$ac_ext <<_ACEOF
12179 #line 12179 "configure"
12180 #include "confdefs.h"
12181 #include <pthread.h>
12182 _ACEOF
12183 if { (eval echo "$as_me:12183: \"$ac_cpp conftest.$ac_ext\"") >&5
12184   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12185   ac_status=$?
12186   egrep -v '^ *\+' conftest.er1 >conftest.err
12187   rm -f conftest.er1
12188   cat conftest.err >&5
12189   echo "$as_me:12189: \$? = $ac_status" >&5
12190   (exit $ac_status); } >/dev/null; then
12191   if test -s conftest.err; then
12192     ac_cpp_err=$ac_c_preproc_warn_flag
12193   else
12194     ac_cpp_err=
12195   fi
12196 else
12197   ac_cpp_err=yes
12198 fi
12199 if test -z "$ac_cpp_err"; then
12200   ac_cv_header_pthread_h=yes
12201 else
12202   echo "$as_me: failed program was:" >&5
12203   cat conftest.$ac_ext >&5
12204   ac_cv_header_pthread_h=no
12205 fi
12206 rm -f conftest.err conftest.$ac_ext
12207 fi
12208 echo "$as_me:12208: result: $ac_cv_header_pthread_h" >&5
12209 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12210 if test $ac_cv_header_pthread_h = yes; then
12211
12212 cat >>confdefs.h <<\EOF
12213 #define HAVE_PTHREADS_H 1
12214 EOF
12215
12216         for cf_lib_pthread in pthread c_r
12217         do
12218             echo "$as_me:12218: checking if we can link with the $cf_lib_pthread library" >&5
12219 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12220             cf_save_LIBS="$LIBS"
12221
12222 cf_add_libs="-l$cf_lib_pthread"
12223 # Filter out duplicates - this happens with badly-designed ".pc" files...
12224 for cf_add_1lib in $LIBS
12225 do
12226         for cf_add_2lib in $cf_add_libs
12227         do
12228                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12229                 then
12230                         cf_add_1lib=
12231                         break
12232                 fi
12233         done
12234         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12235 done
12236 LIBS="$cf_add_libs"
12237
12238             cat >conftest.$ac_ext <<_ACEOF
12239 #line 12239 "configure"
12240 #include "confdefs.h"
12241
12242 #include <pthread.h>
12243
12244 int
12245 main ()
12246 {
12247
12248                 int rc = pthread_create(0,0,0,0);
12249                 int r2 = pthread_mutexattr_settype(0, 0);
12250
12251   ;
12252   return 0;
12253 }
12254 _ACEOF
12255 rm -f conftest.$ac_objext conftest$ac_exeext
12256 if { (eval echo "$as_me:12256: \"$ac_link\"") >&5
12257   (eval $ac_link) 2>&5
12258   ac_status=$?
12259   echo "$as_me:12259: \$? = $ac_status" >&5
12260   (exit $ac_status); } &&
12261          { ac_try='test -s conftest$ac_exeext'
12262   { (eval echo "$as_me:12262: \"$ac_try\"") >&5
12263   (eval $ac_try) 2>&5
12264   ac_status=$?
12265   echo "$as_me:12265: \$? = $ac_status" >&5
12266   (exit $ac_status); }; }; then
12267   with_pthread=yes
12268 else
12269   echo "$as_me: failed program was:" >&5
12270 cat conftest.$ac_ext >&5
12271 with_pthread=no
12272 fi
12273 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12274             LIBS="$cf_save_LIBS"
12275             echo "$as_me:12275: result: $with_pthread" >&5
12276 echo "${ECHO_T}$with_pthread" >&6
12277             test "$with_pthread" = yes && break
12278         done
12279
12280         if test "$with_pthread" = yes ; then
12281
12282 cf_add_libs="-l$cf_lib_pthread"
12283 # Filter out duplicates - this happens with badly-designed ".pc" files...
12284 for cf_add_1lib in $LIBS
12285 do
12286         for cf_add_2lib in $cf_add_libs
12287         do
12288                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12289                 then
12290                         cf_add_1lib=
12291                         break
12292                 fi
12293         done
12294         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12295 done
12296 LIBS="$cf_add_libs"
12297
12298 cat >>confdefs.h <<\EOF
12299 #define HAVE_LIBPTHREADS 1
12300 EOF
12301
12302         else
12303             { { echo "$as_me:12303: error: Cannot link with pthread library" >&5
12304 echo "$as_me: error: Cannot link with pthread library" >&2;}
12305    { (exit 1); exit 1; }; }
12306         fi
12307
12308 fi
12309
12310 fi
12311
12312 if test "x$with_pthread" != xno; then
12313         echo "$as_me:12313: checking for pthread_kill" >&5
12314 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12315 if test "${ac_cv_func_pthread_kill+set}" = set; then
12316   echo $ECHO_N "(cached) $ECHO_C" >&6
12317 else
12318   cat >conftest.$ac_ext <<_ACEOF
12319 #line 12319 "configure"
12320 #include "confdefs.h"
12321 /* System header to define __stub macros and hopefully few prototypes,
12322     which can conflict with char pthread_kill (); below.  */
12323 #include <assert.h>
12324 /* Override any gcc2 internal prototype to avoid an error.  */
12325 #ifdef __cplusplus
12326 extern "C"
12327 #endif
12328 /* We use char because int might match the return type of a gcc2
12329    builtin and then its argument prototype would still apply.  */
12330 char pthread_kill ();
12331 char (*f) ();
12332
12333 int
12334 main ()
12335 {
12336 /* The GNU C library defines this for functions which it implements
12337     to always fail with ENOSYS.  Some functions are actually named
12338     something starting with __ and the normal name is an alias.  */
12339 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12340 choke me
12341 #else
12342 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12343 #endif
12344
12345   ;
12346   return 0;
12347 }
12348 _ACEOF
12349 rm -f conftest.$ac_objext conftest$ac_exeext
12350 if { (eval echo "$as_me:12350: \"$ac_link\"") >&5
12351   (eval $ac_link) 2>&5
12352   ac_status=$?
12353   echo "$as_me:12353: \$? = $ac_status" >&5
12354   (exit $ac_status); } &&
12355          { ac_try='test -s conftest$ac_exeext'
12356   { (eval echo "$as_me:12356: \"$ac_try\"") >&5
12357   (eval $ac_try) 2>&5
12358   ac_status=$?
12359   echo "$as_me:12359: \$? = $ac_status" >&5
12360   (exit $ac_status); }; }; then
12361   ac_cv_func_pthread_kill=yes
12362 else
12363   echo "$as_me: failed program was:" >&5
12364 cat conftest.$ac_ext >&5
12365 ac_cv_func_pthread_kill=no
12366 fi
12367 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12368 fi
12369 echo "$as_me:12369: result: $ac_cv_func_pthread_kill" >&5
12370 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12371 if test $ac_cv_func_pthread_kill = yes; then
12372
12373                 echo "$as_me:12373: checking if you want to allow EINTR in wgetch with pthreads" >&5
12374 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12375
12376 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12377 if test "${enable_pthreads_eintr+set}" = set; then
12378   enableval="$enable_pthreads_eintr"
12379   use_pthreads_eintr=$enableval
12380 else
12381   use_pthreads_eintr=no
12382 fi;
12383                 echo "$as_me:12383: result: $use_pthreads_eintr" >&5
12384 echo "${ECHO_T}$use_pthreads_eintr" >&6
12385                 if test "x$use_pthreads_eintr" = xyes ; then
12386
12387 cat >>confdefs.h <<\EOF
12388 #define USE_PTHREADS_EINTR 1
12389 EOF
12390
12391                 fi
12392 fi
12393
12394         echo "$as_me:12394: checking if you want to use weak-symbols for pthreads" >&5
12395 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12396
12397 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12398 if test "${enable_weak_symbols+set}" = set; then
12399   enableval="$enable_weak_symbols"
12400   use_weak_symbols=$enableval
12401 else
12402   use_weak_symbols=no
12403 fi;
12404         echo "$as_me:12404: result: $use_weak_symbols" >&5
12405 echo "${ECHO_T}$use_weak_symbols" >&6
12406         if test "x$use_weak_symbols" = xyes ; then
12407
12408 echo "$as_me:12408: checking if $CC supports weak symbols" >&5
12409 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12410 if test "${cf_cv_weak_symbols+set}" = set; then
12411   echo $ECHO_N "(cached) $ECHO_C" >&6
12412 else
12413
12414 cat >conftest.$ac_ext <<_ACEOF
12415 #line 12415 "configure"
12416 #include "confdefs.h"
12417
12418 #include <stdio.h>
12419 int
12420 main ()
12421 {
12422
12423 #if defined(__GNUC__)
12424 #  if defined __USE_ISOC99
12425 #    define _cat_pragma(exp)    _Pragma(#exp)
12426 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12427 #  else
12428 #    define _weak_pragma(exp)
12429 #  endif
12430 #  define _declare(name)        __extension__ extern __typeof__(name) name
12431 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12432 #endif
12433
12434 weak_symbol(fopen);
12435
12436   ;
12437   return 0;
12438 }
12439 _ACEOF
12440 rm -f conftest.$ac_objext
12441 if { (eval echo "$as_me:12441: \"$ac_compile\"") >&5
12442   (eval $ac_compile) 2>&5
12443   ac_status=$?
12444   echo "$as_me:12444: \$? = $ac_status" >&5
12445   (exit $ac_status); } &&
12446          { ac_try='test -s conftest.$ac_objext'
12447   { (eval echo "$as_me:12447: \"$ac_try\"") >&5
12448   (eval $ac_try) 2>&5
12449   ac_status=$?
12450   echo "$as_me:12450: \$? = $ac_status" >&5
12451   (exit $ac_status); }; }; then
12452   cf_cv_weak_symbols=yes
12453 else
12454   echo "$as_me: failed program was:" >&5
12455 cat conftest.$ac_ext >&5
12456 cf_cv_weak_symbols=no
12457 fi
12458 rm -f conftest.$ac_objext conftest.$ac_ext
12459
12460 fi
12461 echo "$as_me:12461: result: $cf_cv_weak_symbols" >&5
12462 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12463
12464         else
12465                 cf_cv_weak_symbols=no
12466         fi
12467
12468         if test "x$cf_cv_weak_symbols" = xyes ; then
12469
12470 cat >>confdefs.h <<\EOF
12471 #define USE_WEAK_SYMBOLS 1
12472 EOF
12473
12474         fi
12475 fi
12476
12477 PTHREAD=
12478 if test "x$with_pthread" = "xyes" ; then
12479
12480 cat >>confdefs.h <<\EOF
12481 #define USE_PTHREADS 1
12482 EOF
12483
12484     enable_reentrant=yes
12485     if test "x$cf_cv_weak_symbols" = xyes ; then
12486         PTHREAD=-lpthread
12487     fi
12488 fi
12489
12490 # Reentrant code has to be opaque; there's little advantage to making ncurses
12491 # opaque outside of that, so there is no --enable-opaque option.  We can use
12492 # this option without --with-pthreads, but this will be always set for
12493 # pthreads.
12494 echo "$as_me:12494: checking if you want experimental reentrant code" >&5
12495 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12496
12497 # Check whether --enable-reentrant or --disable-reentrant was given.
12498 if test "${enable_reentrant+set}" = set; then
12499   enableval="$enable_reentrant"
12500   with_reentrant=$enableval
12501 else
12502   with_reentrant=no
12503 fi;
12504 echo "$as_me:12504: result: $with_reentrant" >&5
12505 echo "${ECHO_T}$with_reentrant" >&6
12506 if test "x$with_reentrant" = xyes ; then
12507         cf_cv_enable_reentrant=1
12508         cf_cv_enable_opaque="NCURSES_INTERNALS"
12509         NCURSES_OPAQUE=1
12510         NCURSES_SIZE_T=int
12511         if test "x$cf_cv_weak_symbols" = xyes ; then
12512
12513 # remove pthread library from $LIBS
12514 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12515
12516 cf_add_libs="-lpthread"
12517 # Filter out duplicates - this happens with badly-designed ".pc" files...
12518 for cf_add_1lib in $TEST_LIBS
12519 do
12520         for cf_add_2lib in $cf_add_libs
12521         do
12522                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12523                 then
12524                         cf_add_1lib=
12525                         break
12526                 fi
12527         done
12528         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12529 done
12530 TEST_LIBS="$cf_add_libs"
12531
12532 cf_add_libs="-lpthread"
12533 # Filter out duplicates - this happens with badly-designed ".pc" files...
12534 for cf_add_1lib in $TEST_LIBS2
12535 do
12536         for cf_add_2lib in $cf_add_libs
12537         do
12538                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12539                 then
12540                         cf_add_1lib=
12541                         break
12542                 fi
12543         done
12544         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12545 done
12546 TEST_LIBS2="$cf_add_libs"
12547
12548         else
12549                 # when not using weak symbols but with_reentrant,
12550                 # add 't' to the library suffix on all platforms
12551                 # except cygwin, where we only do that if ALSO
12552                 # compiling with full thread support.
12553                 case "$host" in
12554                 *cygwin* | *msys*) #(vi
12555                         if test "$with_pthread" = "yes" ; then
12556                                 if test "x$disable_lib_suffixes" = "xno" ; then
12557                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12558                                 fi
12559                         fi ;;
12560                 *)
12561                         if test "x$disable_lib_suffixes" = "xno" ; then
12562                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12563                         fi
12564                         ;;
12565                 esac
12566         fi
12567
12568 cat >>confdefs.h <<\EOF
12569 #define USE_REENTRANT 1
12570 EOF
12571
12572 if test "${with_abi_version+set}" != set; then
12573         case $cf_cv_rel_version in
12574         5.*)
12575                 cf_cv_rel_version=6.0
12576                 cf_cv_abi_version=6
12577                 { echo "$as_me:12577: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12578 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12579                 ;;
12580         esac
12581 fi
12582
12583 else
12584         cf_cv_enable_reentrant=0
12585         cf_cv_enable_opaque="NCURSES_OPAQUE"
12586         NCURSES_OPAQUE=0
12587         NCURSES_SIZE_T=short
12588 fi
12589
12590 ### Allow using a different wrap-prefix
12591 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12592         echo "$as_me:12592: checking for prefix used to wrap public variables" >&5
12593 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12594
12595 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12596 if test "${with_wrap_prefix+set}" = set; then
12597   withval="$with_wrap_prefix"
12598   NCURSES_WRAP_PREFIX=$withval
12599 else
12600   NCURSES_WRAP_PREFIX=_nc_
12601 fi;
12602         echo "$as_me:12602: result: $NCURSES_WRAP_PREFIX" >&5
12603 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12604 else
12605         NCURSES_WRAP_PREFIX=_nc_
12606 fi
12607
12608 cat >>confdefs.h <<EOF
12609 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12610 EOF
12611
12612 echo "$as_me:12612: checking if you want experimental safe-sprintf code" >&5
12613 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12614
12615 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12616 if test "${enable_safe_sprintf+set}" = set; then
12617   enableval="$enable_safe_sprintf"
12618   with_safe_sprintf=$enableval
12619 else
12620   with_safe_sprintf=no
12621 fi;
12622 echo "$as_me:12622: result: $with_safe_sprintf" >&5
12623 echo "${ECHO_T}$with_safe_sprintf" >&6
12624 test "x$with_safe_sprintf" = xyes &&
12625 cat >>confdefs.h <<\EOF
12626 #define USE_SAFE_SPRINTF 1
12627 EOF
12628
12629 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12630 # when hashmap is used scroll hints are useless
12631 if test "$with_hashmap" = no ; then
12632 echo "$as_me:12632: checking if you want to experiment without scrolling-hints code" >&5
12633 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12634
12635 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12636 if test "${enable_scroll_hints+set}" = set; then
12637   enableval="$enable_scroll_hints"
12638   with_scroll_hints=$enableval
12639 else
12640   with_scroll_hints=yes
12641 fi;
12642 echo "$as_me:12642: result: $with_scroll_hints" >&5
12643 echo "${ECHO_T}$with_scroll_hints" >&6
12644 test "x$with_scroll_hints" = xyes &&
12645 cat >>confdefs.h <<\EOF
12646 #define USE_SCROLL_HINTS 1
12647 EOF
12648
12649 fi
12650
12651 echo "$as_me:12651: checking if you want experimental wgetch-events code" >&5
12652 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12653
12654 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12655 if test "${enable_wgetch_events+set}" = set; then
12656   enableval="$enable_wgetch_events"
12657   with_wgetch_events=$enableval
12658 else
12659   with_wgetch_events=no
12660 fi;
12661 echo "$as_me:12661: result: $with_wgetch_events" >&5
12662 echo "${ECHO_T}$with_wgetch_events" >&6
12663 test "x$with_wgetch_events" = xyes &&
12664 cat >>confdefs.h <<\EOF
12665 #define NCURSES_WGETCH_EVENTS 1
12666 EOF
12667
12668 ###############################################################################
12669
12670 ###     use option --disable-echo to suppress full display compiling commands
12671
12672 echo "$as_me:12672: checking if you want to see long compiling messages" >&5
12673 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12674
12675 # Check whether --enable-echo or --disable-echo was given.
12676 if test "${enable_echo+set}" = set; then
12677   enableval="$enable_echo"
12678   test "$enableval" != no && enableval=yes
12679   if test "$enableval" != "yes" ; then
12680
12681     ECHO_LT='--silent'
12682     ECHO_LD='@echo linking $@;'
12683     RULE_CC='@echo compiling $<'
12684     SHOW_CC='@echo compiling $@'
12685     ECHO_CC='@'
12686
12687   else
12688
12689     ECHO_LT=''
12690     ECHO_LD=''
12691     RULE_CC=''
12692     SHOW_CC=''
12693     ECHO_CC=''
12694
12695   fi
12696 else
12697   enableval=yes
12698
12699     ECHO_LT=''
12700     ECHO_LD=''
12701     RULE_CC=''
12702     SHOW_CC=''
12703     ECHO_CC=''
12704
12705 fi;
12706 echo "$as_me:12706: result: $enableval" >&5
12707 echo "${ECHO_T}$enableval" >&6
12708
12709 if test "x$enable_echo" = xyes; then
12710         ECHO_LINK=
12711 else
12712         ECHO_LINK='@ echo linking $@ ... ;'
12713         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12714         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12715 fi
12716
12717 ###     use option --enable-warnings to turn on all gcc warnings
12718 echo "$as_me:12718: checking if you want to see compiler warnings" >&5
12719 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12720
12721 # Check whether --enable-warnings or --disable-warnings was given.
12722 if test "${enable_warnings+set}" = set; then
12723   enableval="$enable_warnings"
12724   with_warnings=$enableval
12725 fi;
12726 echo "$as_me:12726: result: $with_warnings" >&5
12727 echo "${ECHO_T}$with_warnings" >&6
12728
12729 if test "x$with_warnings" = "xyes"; then
12730
12731         ADAFLAGS="$ADAFLAGS -gnatg"
12732
12733 INTEL_COMPILER=no
12734
12735 if test "$GCC" = yes ; then
12736         case $host_os in
12737         linux*|gnu*)
12738                 echo "$as_me:12738: checking if this is really Intel C compiler" >&5
12739 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12740                 cf_save_CFLAGS="$CFLAGS"
12741                 CFLAGS="$CFLAGS -no-gcc"
12742                 cat >conftest.$ac_ext <<_ACEOF
12743 #line 12743 "configure"
12744 #include "confdefs.h"
12745
12746 int
12747 main ()
12748 {
12749
12750 #ifdef __INTEL_COMPILER
12751 #else
12752 make an error
12753 #endif
12754
12755   ;
12756   return 0;
12757 }
12758 _ACEOF
12759 rm -f conftest.$ac_objext
12760 if { (eval echo "$as_me:12760: \"$ac_compile\"") >&5
12761   (eval $ac_compile) 2>&5
12762   ac_status=$?
12763   echo "$as_me:12763: \$? = $ac_status" >&5
12764   (exit $ac_status); } &&
12765          { ac_try='test -s conftest.$ac_objext'
12766   { (eval echo "$as_me:12766: \"$ac_try\"") >&5
12767   (eval $ac_try) 2>&5
12768   ac_status=$?
12769   echo "$as_me:12769: \$? = $ac_status" >&5
12770   (exit $ac_status); }; }; then
12771   INTEL_COMPILER=yes
12772 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12773
12774 else
12775   echo "$as_me: failed program was:" >&5
12776 cat conftest.$ac_ext >&5
12777 fi
12778 rm -f conftest.$ac_objext conftest.$ac_ext
12779                 CFLAGS="$cf_save_CFLAGS"
12780                 echo "$as_me:12780: result: $INTEL_COMPILER" >&5
12781 echo "${ECHO_T}$INTEL_COMPILER" >&6
12782                 ;;
12783         esac
12784 fi
12785
12786 CLANG_COMPILER=no
12787
12788 if test "$GCC" = yes ; then
12789         echo "$as_me:12789: checking if this is really Clang C compiler" >&5
12790 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12791         cf_save_CFLAGS="$CFLAGS"
12792         CFLAGS="$CFLAGS -Qunused-arguments"
12793         cat >conftest.$ac_ext <<_ACEOF
12794 #line 12794 "configure"
12795 #include "confdefs.h"
12796
12797 int
12798 main ()
12799 {
12800
12801 #ifdef __clang__
12802 #else
12803 make an error
12804 #endif
12805
12806   ;
12807   return 0;
12808 }
12809 _ACEOF
12810 rm -f conftest.$ac_objext
12811 if { (eval echo "$as_me:12811: \"$ac_compile\"") >&5
12812   (eval $ac_compile) 2>&5
12813   ac_status=$?
12814   echo "$as_me:12814: \$? = $ac_status" >&5
12815   (exit $ac_status); } &&
12816          { ac_try='test -s conftest.$ac_objext'
12817   { (eval echo "$as_me:12817: \"$ac_try\"") >&5
12818   (eval $ac_try) 2>&5
12819   ac_status=$?
12820   echo "$as_me:12820: \$? = $ac_status" >&5
12821   (exit $ac_status); }; }; then
12822   CLANG_COMPILER=yes
12823 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12824
12825 else
12826   echo "$as_me: failed program was:" >&5
12827 cat conftest.$ac_ext >&5
12828 fi
12829 rm -f conftest.$ac_objext conftest.$ac_ext
12830         CFLAGS="$cf_save_CFLAGS"
12831         echo "$as_me:12831: result: $CLANG_COMPILER" >&5
12832 echo "${ECHO_T}$CLANG_COMPILER" >&6
12833 fi
12834
12835 cat > conftest.$ac_ext <<EOF
12836 #line 12836 "${as_me:-configure}"
12837 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12838 EOF
12839
12840 if test "$INTEL_COMPILER" = yes
12841 then
12842 # The "-wdXXX" options suppress warnings:
12843 # remark #1419: external declaration in primary source file
12844 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12845 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12846 # remark #193: zero used for undefined preprocessing identifier
12847 # remark #593: variable "curs_sb_left_arrow" was set but never used
12848 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12849 # remark #869: parameter "tw" was never referenced
12850 # remark #981: operands are evaluated in unspecified order
12851 # warning #279: controlling expression is constant
12852
12853         { echo "$as_me:12853: checking for $CC warning options..." >&5
12854 echo "$as_me: checking for $CC warning options..." >&6;}
12855         cf_save_CFLAGS="$CFLAGS"
12856         EXTRA_CFLAGS="-Wall"
12857         for cf_opt in \
12858                 wd1419 \
12859                 wd1683 \
12860                 wd1684 \
12861                 wd193 \
12862                 wd593 \
12863                 wd279 \
12864                 wd810 \
12865                 wd869 \
12866                 wd981
12867         do
12868                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12869                 if { (eval echo "$as_me:12869: \"$ac_compile\"") >&5
12870   (eval $ac_compile) 2>&5
12871   ac_status=$?
12872   echo "$as_me:12872: \$? = $ac_status" >&5
12873   (exit $ac_status); }; then
12874                         test -n "$verbose" && echo "$as_me:12874: result: ... -$cf_opt" >&5
12875 echo "${ECHO_T}... -$cf_opt" >&6
12876                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12877                 fi
12878         done
12879         CFLAGS="$cf_save_CFLAGS"
12880
12881 elif test "$GCC" = yes
12882 then
12883         { echo "$as_me:12883: checking for $CC warning options..." >&5
12884 echo "$as_me: checking for $CC warning options..." >&6;}
12885         cf_save_CFLAGS="$CFLAGS"
12886         EXTRA_CFLAGS=
12887         cf_warn_CONST=""
12888         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12889         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12890         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12891         for cf_opt in W Wall \
12892                 Wbad-function-cast \
12893                 Wcast-align \
12894                 Wcast-qual \
12895                 Wdeclaration-after-statement \
12896                 Wextra \
12897                 Winline \
12898                 Wmissing-declarations \
12899                 Wmissing-prototypes \
12900                 Wnested-externs \
12901                 Wpointer-arith \
12902                 Wshadow \
12903                 Wstrict-prototypes \
12904                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
12905         do
12906                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12907                 if { (eval echo "$as_me:12907: \"$ac_compile\"") >&5
12908   (eval $ac_compile) 2>&5
12909   ac_status=$?
12910   echo "$as_me:12910: \$? = $ac_status" >&5
12911   (exit $ac_status); }; then
12912                         test -n "$verbose" && echo "$as_me:12912: result: ... -$cf_opt" >&5
12913 echo "${ECHO_T}... -$cf_opt" >&6
12914                         case $cf_opt in #(vi
12915                         Wcast-qual) #(vi
12916                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12917                                 ;;
12918                         Winline) #(vi
12919                                 case $GCC_VERSION in
12920                                 [34].*)
12921                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12922
12923 echo "${as_me:-configure}:12923: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12924
12925                                         continue;;
12926                                 esac
12927                                 ;;
12928                         Wpointer-arith) #(vi
12929                                 case $GCC_VERSION in
12930                                 [12].*)
12931                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12932
12933 echo "${as_me:-configure}:12933: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12934
12935                                         continue;;
12936                                 esac
12937                                 ;;
12938                         esac
12939                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12940                 fi
12941         done
12942         CFLAGS="$cf_save_CFLAGS"
12943 fi
12944 rm -rf conftest*
12945
12946         if test "x$cf_with_cxx" = xyes ; then
12947
12948 INTEL_CPLUSPLUS=no
12949
12950 if test "$GCC" = yes ; then
12951         case $host_os in
12952         linux*|gnu*)
12953                 echo "$as_me:12953: checking if this is really Intel C++ compiler" >&5
12954 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12955                 cf_save_CFLAGS="$CXXFLAGS"
12956                 CXXFLAGS="$CXXFLAGS -no-gcc"
12957                 cat >conftest.$ac_ext <<_ACEOF
12958 #line 12958 "configure"
12959 #include "confdefs.h"
12960
12961 int
12962 main ()
12963 {
12964
12965 #ifdef __INTEL_COMPILER
12966 #else
12967 make an error
12968 #endif
12969
12970   ;
12971   return 0;
12972 }
12973 _ACEOF
12974 rm -f conftest.$ac_objext
12975 if { (eval echo "$as_me:12975: \"$ac_compile\"") >&5
12976   (eval $ac_compile) 2>&5
12977   ac_status=$?
12978   echo "$as_me:12978: \$? = $ac_status" >&5
12979   (exit $ac_status); } &&
12980          { ac_try='test -s conftest.$ac_objext'
12981   { (eval echo "$as_me:12981: \"$ac_try\"") >&5
12982   (eval $ac_try) 2>&5
12983   ac_status=$?
12984   echo "$as_me:12984: \$? = $ac_status" >&5
12985   (exit $ac_status); }; }; then
12986   INTEL_CPLUSPLUS=yes
12987 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12988
12989 else
12990   echo "$as_me: failed program was:" >&5
12991 cat conftest.$ac_ext >&5
12992 fi
12993 rm -f conftest.$ac_objext conftest.$ac_ext
12994                 CXXFLAGS="$cf_save_CFLAGS"
12995                 echo "$as_me:12995: result: $INTEL_CPLUSPLUS" >&5
12996 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12997                 ;;
12998         esac
12999 fi
13000
13001 CLANG_CPLUSPLUS=no
13002
13003 if test "$GCC" = yes ; then
13004         echo "$as_me:13004: checking if this is really Clang C++ compiler" >&5
13005 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13006         cf_save_CFLAGS="$CXXFLAGS"
13007         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13008         cat >conftest.$ac_ext <<_ACEOF
13009 #line 13009 "configure"
13010 #include "confdefs.h"
13011
13012 int
13013 main ()
13014 {
13015
13016 #ifdef __clang__
13017 #else
13018 make an error
13019 #endif
13020
13021   ;
13022   return 0;
13023 }
13024 _ACEOF
13025 rm -f conftest.$ac_objext
13026 if { (eval echo "$as_me:13026: \"$ac_compile\"") >&5
13027   (eval $ac_compile) 2>&5
13028   ac_status=$?
13029   echo "$as_me:13029: \$? = $ac_status" >&5
13030   (exit $ac_status); } &&
13031          { ac_try='test -s conftest.$ac_objext'
13032   { (eval echo "$as_me:13032: \"$ac_try\"") >&5
13033   (eval $ac_try) 2>&5
13034   ac_status=$?
13035   echo "$as_me:13035: \$? = $ac_status" >&5
13036   (exit $ac_status); }; }; then
13037   CLANG_CPLUSPLUS=yes
13038 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13039
13040 else
13041   echo "$as_me: failed program was:" >&5
13042 cat conftest.$ac_ext >&5
13043 fi
13044 rm -f conftest.$ac_objext conftest.$ac_ext
13045         CXXFLAGS="$cf_save_CFLAGS"
13046         echo "$as_me:13046: result: $CLANG_CPLUSPLUS" >&5
13047 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13048 fi
13049
13050 ac_ext=cc
13051 ac_cpp='$CXXCPP $CPPFLAGS'
13052 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13053 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13054 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13055 ac_main_return=return
13056
13057 cat > conftest.$ac_ext <<EOF
13058 #line 13058 "configure"
13059 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13060 EOF
13061
13062 if test "$INTEL_CPLUSPLUS" = yes
13063 then
13064 # The "-wdXXX" options suppress warnings:
13065 # remark #1419: external declaration in primary source file
13066 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13067 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13068 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13069 # remark #193: zero used for undefined preprocessing identifier
13070 # remark #593: variable "curs_sb_left_arrow" was set but never used
13071 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13072 # remark #869: parameter "tw" was never referenced
13073 # remark #981: operands are evaluated in unspecified order
13074 # warning #269: invalid format string conversion
13075
13076         { echo "$as_me:13076: checking for $CC warning options..." >&5
13077 echo "$as_me: checking for $CC warning options..." >&6;}
13078         cf_save_CXXFLAGS="$CXXFLAGS"
13079         EXTRA_CXXFLAGS="-Wall"
13080         for cf_opt in \
13081                 wd1419 \
13082                 wd1682 \
13083                 wd1683 \
13084                 wd1684 \
13085                 wd193 \
13086                 wd279 \
13087                 wd593 \
13088                 wd810 \
13089                 wd869 \
13090                 wd981
13091         do
13092                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13093                 if { (eval echo "$as_me:13093: \"$ac_compile\"") >&5
13094   (eval $ac_compile) 2>&5
13095   ac_status=$?
13096   echo "$as_me:13096: \$? = $ac_status" >&5
13097   (exit $ac_status); }; then
13098                         test -n "$verbose" && echo "$as_me:13098: result: ... -$cf_opt" >&5
13099 echo "${ECHO_T}... -$cf_opt" >&6
13100                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13101                 fi
13102         done
13103         CXXFLAGS="$cf_save_CXXFLAGS"
13104
13105 elif test "$GXX" = yes
13106 then
13107         { echo "$as_me:13107: checking for $CXX warning options..." >&5
13108 echo "$as_me: checking for $CXX warning options..." >&6;}
13109         cf_save_CXXFLAGS="$CXXFLAGS"
13110         EXTRA_CXXFLAGS="-W -Wall"
13111         cf_gxx_extra_warnings=""
13112         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13113         case "$GCC_VERSION" in
13114         [1-2].*)
13115                 ;;
13116         *)
13117                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13118                 ;;
13119         esac
13120         for cf_opt in \
13121                 Wabi \
13122                 fabi-version=0 \
13123                 Wextra \
13124                 Wignored-qualifiers \
13125                 Wlogical-op \
13126                 Woverloaded-virtual \
13127                 Wsign-promo \
13128                 Wsynth \
13129                 Wold-style-cast \
13130                 Wcast-align \
13131                 Wcast-qual \
13132                 Wpointer-arith \
13133                 Wshadow \
13134                 Wundef $cf_gxx_extra_warnings Wno-unused
13135         do
13136                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13137                 if { (eval echo "$as_me:13137: \"$ac_compile\"") >&5
13138   (eval $ac_compile) 2>&5
13139   ac_status=$?
13140   echo "$as_me:13140: \$? = $ac_status" >&5
13141   (exit $ac_status); }; then
13142                         test -n "$verbose" && echo "$as_me:13142: result: ... -$cf_opt" >&5
13143 echo "${ECHO_T}... -$cf_opt" >&6
13144                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13145                 else
13146                         test -n "$verbose" && echo "$as_me:13146: result: ... no -$cf_opt" >&5
13147 echo "${ECHO_T}... no -$cf_opt" >&6
13148                 fi
13149         done
13150         CXXFLAGS="$cf_save_CXXFLAGS"
13151 fi
13152
13153 rm -rf conftest*
13154 ac_ext=c
13155 ac_cpp='$CPP $CPPFLAGS'
13156 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13157 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13158 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13159 ac_main_return=return
13160
13161         fi
13162 fi
13163
13164 if test "$GCC" = yes
13165 then
13166 cat > conftest.i <<EOF
13167 #ifndef GCC_PRINTF
13168 #define GCC_PRINTF 0
13169 #endif
13170 #ifndef GCC_SCANF
13171 #define GCC_SCANF 0
13172 #endif
13173 #ifndef GCC_NORETURN
13174 #define GCC_NORETURN /* nothing */
13175 #endif
13176 #ifndef GCC_UNUSED
13177 #define GCC_UNUSED /* nothing */
13178 #endif
13179 EOF
13180 if test "$GCC" = yes
13181 then
13182         { echo "$as_me:13182: checking for $CC __attribute__ directives..." >&5
13183 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13184 cat > conftest.$ac_ext <<EOF
13185 #line 13185 "${as_me:-configure}"
13186 #include "confdefs.h"
13187 #include "conftest.h"
13188 #include "conftest.i"
13189 #if     GCC_PRINTF
13190 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13191 #else
13192 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13193 #endif
13194 #if     GCC_SCANF
13195 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13196 #else
13197 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13198 #endif
13199 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13200 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13201 extern void foo(void) GCC_NORETURN;
13202 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13203 EOF
13204         cf_printf_attribute=no
13205         cf_scanf_attribute=no
13206         for cf_attribute in scanf printf unused noreturn
13207         do
13208
13209 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13210
13211                 cf_directive="__attribute__(($cf_attribute))"
13212                 echo "checking for $CC $cf_directive" 1>&5
13213
13214                 case $cf_attribute in #(vi
13215                 printf) #(vi
13216                         cf_printf_attribute=yes
13217                         cat >conftest.h <<EOF
13218 #define GCC_$cf_ATTRIBUTE 1
13219 EOF
13220                         ;;
13221                 scanf) #(vi
13222                         cf_scanf_attribute=yes
13223                         cat >conftest.h <<EOF
13224 #define GCC_$cf_ATTRIBUTE 1
13225 EOF
13226                         ;;
13227                 *) #(vi
13228                         cat >conftest.h <<EOF
13229 #define GCC_$cf_ATTRIBUTE $cf_directive
13230 EOF
13231                         ;;
13232                 esac
13233
13234                 if { (eval echo "$as_me:13234: \"$ac_compile\"") >&5
13235   (eval $ac_compile) 2>&5
13236   ac_status=$?
13237   echo "$as_me:13237: \$? = $ac_status" >&5
13238   (exit $ac_status); }; then
13239                         test -n "$verbose" && echo "$as_me:13239: result: ... $cf_attribute" >&5
13240 echo "${ECHO_T}... $cf_attribute" >&6
13241                         cat conftest.h >>confdefs.h
13242                         case $cf_attribute in #(vi
13243                         noreturn) #(vi
13244
13245 cat >>confdefs.h <<EOF
13246 #define GCC_NORETURN $cf_directive
13247 EOF
13248
13249                                 ;;
13250                         printf) #(vi
13251                                 cf_value='/* nothing */'
13252                                 if test "$cf_printf_attribute" != no ; then
13253                                         cf_value='__attribute__((format(printf,fmt,var)))'
13254
13255 cat >>confdefs.h <<\EOF
13256 #define GCC_PRINTF 1
13257 EOF
13258
13259                                 fi
13260
13261 cat >>confdefs.h <<EOF
13262 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13263 EOF
13264
13265                                 ;;
13266                         scanf) #(vi
13267                                 cf_value='/* nothing */'
13268                                 if test "$cf_scanf_attribute" != no ; then
13269                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13270
13271 cat >>confdefs.h <<\EOF
13272 #define GCC_SCANF 1
13273 EOF
13274
13275                                 fi
13276
13277 cat >>confdefs.h <<EOF
13278 #define GCC_SCANFLIKE(fmt,var) $cf_value
13279 EOF
13280
13281                                 ;;
13282                         unused) #(vi
13283
13284 cat >>confdefs.h <<EOF
13285 #define GCC_UNUSED $cf_directive
13286 EOF
13287
13288                                 ;;
13289                         esac
13290                 fi
13291         done
13292 else
13293         fgrep define conftest.i >>confdefs.h
13294 fi
13295 rm -rf conftest*
13296 fi
13297
13298 echo "$as_me:13298: checking if you want to work around bogus compiler/loader warnings" >&5
13299 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13300
13301 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13302 if test "${enable_string_hacks+set}" = set; then
13303   enableval="$enable_string_hacks"
13304   with_string_hacks=$enableval
13305 else
13306   with_string_hacks=no
13307 fi;
13308 echo "$as_me:13308: result: $with_string_hacks" >&5
13309 echo "${ECHO_T}$with_string_hacks" >&6
13310
13311 if test "x$with_string_hacks" = "xyes"; then
13312
13313 cat >>confdefs.h <<\EOF
13314 #define USE_STRING_HACKS 1
13315 EOF
13316
13317         { echo "$as_me:13317: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13318 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13319
13320 for ac_func in strlcat strlcpy snprintf
13321 do
13322 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13323 echo "$as_me:13323: checking for $ac_func" >&5
13324 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13325 if eval "test \"\${$as_ac_var+set}\" = set"; then
13326   echo $ECHO_N "(cached) $ECHO_C" >&6
13327 else
13328   cat >conftest.$ac_ext <<_ACEOF
13329 #line 13329 "configure"
13330 #include "confdefs.h"
13331 /* System header to define __stub macros and hopefully few prototypes,
13332     which can conflict with char $ac_func (); below.  */
13333 #include <assert.h>
13334 /* Override any gcc2 internal prototype to avoid an error.  */
13335 #ifdef __cplusplus
13336 extern "C"
13337 #endif
13338 /* We use char because int might match the return type of a gcc2
13339    builtin and then its argument prototype would still apply.  */
13340 char $ac_func ();
13341 char (*f) ();
13342
13343 int
13344 main ()
13345 {
13346 /* The GNU C library defines this for functions which it implements
13347     to always fail with ENOSYS.  Some functions are actually named
13348     something starting with __ and the normal name is an alias.  */
13349 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13350 choke me
13351 #else
13352 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13353 #endif
13354
13355   ;
13356   return 0;
13357 }
13358 _ACEOF
13359 rm -f conftest.$ac_objext conftest$ac_exeext
13360 if { (eval echo "$as_me:13360: \"$ac_link\"") >&5
13361   (eval $ac_link) 2>&5
13362   ac_status=$?
13363   echo "$as_me:13363: \$? = $ac_status" >&5
13364   (exit $ac_status); } &&
13365          { ac_try='test -s conftest$ac_exeext'
13366   { (eval echo "$as_me:13366: \"$ac_try\"") >&5
13367   (eval $ac_try) 2>&5
13368   ac_status=$?
13369   echo "$as_me:13369: \$? = $ac_status" >&5
13370   (exit $ac_status); }; }; then
13371   eval "$as_ac_var=yes"
13372 else
13373   echo "$as_me: failed program was:" >&5
13374 cat conftest.$ac_ext >&5
13375 eval "$as_ac_var=no"
13376 fi
13377 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13378 fi
13379 echo "$as_me:13379: result: `eval echo '${'$as_ac_var'}'`" >&5
13380 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13381 if test `eval echo '${'$as_ac_var'}'` = yes; then
13382   cat >>confdefs.h <<EOF
13383 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13384 EOF
13385
13386 fi
13387 done
13388
13389 fi
13390
13391 ###     use option --enable-assertions to turn on generation of assertion code
13392 echo "$as_me:13392: checking if you want to enable runtime assertions" >&5
13393 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13394
13395 # Check whether --enable-assertions or --disable-assertions was given.
13396 if test "${enable_assertions+set}" = set; then
13397   enableval="$enable_assertions"
13398   with_assertions=$enableval
13399 else
13400   with_assertions=no
13401 fi;
13402 echo "$as_me:13402: result: $with_assertions" >&5
13403 echo "${ECHO_T}$with_assertions" >&6
13404 if test -n "$GCC"
13405 then
13406         if test "$with_assertions" = no
13407         then
13408                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13409         else
13410
13411         ADAFLAGS="$ADAFLAGS -gnata"
13412
13413         fi
13414 fi
13415
13416 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13417
13418 echo "$as_me:13418: checking if you want to use dmalloc for testing" >&5
13419 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13420
13421 # Check whether --with-dmalloc or --without-dmalloc was given.
13422 if test "${with_dmalloc+set}" = set; then
13423   withval="$with_dmalloc"
13424
13425 cat >>confdefs.h <<EOF
13426 #define USE_DMALLOC 1
13427 EOF
13428
13429         : ${with_cflags:=-g}
13430         : ${with_no_leaks:=yes}
13431          with_dmalloc=yes
13432 else
13433   with_dmalloc=
13434 fi;
13435 echo "$as_me:13435: result: ${with_dmalloc:-no}" >&5
13436 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13437
13438 case .$with_cflags in #(vi
13439 .*-g*)
13440         case .$CFLAGS in #(vi
13441         .*-g*) #(vi
13442                 ;;
13443         *)
13444
13445 cf_fix_cppflags=no
13446 cf_new_cflags=
13447 cf_new_cppflags=
13448 cf_new_extra_cppflags=
13449
13450 for cf_add_cflags in -g
13451 do
13452 case $cf_fix_cppflags in
13453 no)
13454         case $cf_add_cflags in #(vi
13455         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13456                 case $cf_add_cflags in
13457                 -D*)
13458                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13459
13460                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13461                                 && test -z "${cf_tst_cflags}" \
13462                                 && cf_fix_cppflags=yes
13463
13464                         if test $cf_fix_cppflags = yes ; then
13465                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13466                                 continue
13467                         elif test "${cf_tst_cflags}" = "\"'" ; then
13468                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13469                                 continue
13470                         fi
13471                         ;;
13472                 esac
13473                 case "$CPPFLAGS" in
13474                 *$cf_add_cflags) #(vi
13475                         ;;
13476                 *) #(vi
13477                         case $cf_add_cflags in #(vi
13478                         -D*)
13479                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13480
13481 CPPFLAGS=`echo "$CPPFLAGS" | \
13482         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13483                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13484
13485                                 ;;
13486                         esac
13487                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13488                         ;;
13489                 esac
13490                 ;;
13491         *)
13492                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13493                 ;;
13494         esac
13495         ;;
13496 yes)
13497         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13498
13499         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13500
13501         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13502                 && test -z "${cf_tst_cflags}" \
13503                 && cf_fix_cppflags=no
13504         ;;
13505 esac
13506 done
13507
13508 if test -n "$cf_new_cflags" ; then
13509
13510         CFLAGS="$CFLAGS $cf_new_cflags"
13511 fi
13512
13513 if test -n "$cf_new_cppflags" ; then
13514
13515         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13516 fi
13517
13518 if test -n "$cf_new_extra_cppflags" ; then
13519
13520         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13521 fi
13522
13523                 ;;
13524         esac
13525         ;;
13526 esac
13527
13528 if test "$with_dmalloc" = yes ; then
13529         echo "$as_me:13529: checking for dmalloc.h" >&5
13530 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13531 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13532   echo $ECHO_N "(cached) $ECHO_C" >&6
13533 else
13534   cat >conftest.$ac_ext <<_ACEOF
13535 #line 13535 "configure"
13536 #include "confdefs.h"
13537 #include <dmalloc.h>
13538 _ACEOF
13539 if { (eval echo "$as_me:13539: \"$ac_cpp conftest.$ac_ext\"") >&5
13540   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13541   ac_status=$?
13542   egrep -v '^ *\+' conftest.er1 >conftest.err
13543   rm -f conftest.er1
13544   cat conftest.err >&5
13545   echo "$as_me:13545: \$? = $ac_status" >&5
13546   (exit $ac_status); } >/dev/null; then
13547   if test -s conftest.err; then
13548     ac_cpp_err=$ac_c_preproc_warn_flag
13549   else
13550     ac_cpp_err=
13551   fi
13552 else
13553   ac_cpp_err=yes
13554 fi
13555 if test -z "$ac_cpp_err"; then
13556   ac_cv_header_dmalloc_h=yes
13557 else
13558   echo "$as_me: failed program was:" >&5
13559   cat conftest.$ac_ext >&5
13560   ac_cv_header_dmalloc_h=no
13561 fi
13562 rm -f conftest.err conftest.$ac_ext
13563 fi
13564 echo "$as_me:13564: result: $ac_cv_header_dmalloc_h" >&5
13565 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13566 if test $ac_cv_header_dmalloc_h = yes; then
13567
13568 echo "$as_me:13568: checking for dmalloc_debug in -ldmalloc" >&5
13569 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13570 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13571   echo $ECHO_N "(cached) $ECHO_C" >&6
13572 else
13573   ac_check_lib_save_LIBS=$LIBS
13574 LIBS="-ldmalloc  $LIBS"
13575 cat >conftest.$ac_ext <<_ACEOF
13576 #line 13576 "configure"
13577 #include "confdefs.h"
13578
13579 /* Override any gcc2 internal prototype to avoid an error.  */
13580 #ifdef __cplusplus
13581 extern "C"
13582 #endif
13583 /* We use char because int might match the return type of a gcc2
13584    builtin and then its argument prototype would still apply.  */
13585 char dmalloc_debug ();
13586 int
13587 main ()
13588 {
13589 dmalloc_debug ();
13590   ;
13591   return 0;
13592 }
13593 _ACEOF
13594 rm -f conftest.$ac_objext conftest$ac_exeext
13595 if { (eval echo "$as_me:13595: \"$ac_link\"") >&5
13596   (eval $ac_link) 2>&5
13597   ac_status=$?
13598   echo "$as_me:13598: \$? = $ac_status" >&5
13599   (exit $ac_status); } &&
13600          { ac_try='test -s conftest$ac_exeext'
13601   { (eval echo "$as_me:13601: \"$ac_try\"") >&5
13602   (eval $ac_try) 2>&5
13603   ac_status=$?
13604   echo "$as_me:13604: \$? = $ac_status" >&5
13605   (exit $ac_status); }; }; then
13606   ac_cv_lib_dmalloc_dmalloc_debug=yes
13607 else
13608   echo "$as_me: failed program was:" >&5
13609 cat conftest.$ac_ext >&5
13610 ac_cv_lib_dmalloc_dmalloc_debug=no
13611 fi
13612 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13613 LIBS=$ac_check_lib_save_LIBS
13614 fi
13615 echo "$as_me:13615: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13616 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13617 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13618   cat >>confdefs.h <<EOF
13619 #define HAVE_LIBDMALLOC 1
13620 EOF
13621
13622   LIBS="-ldmalloc $LIBS"
13623
13624 fi
13625
13626 fi
13627
13628 fi
13629
13630 echo "$as_me:13630: checking if you want to use dbmalloc for testing" >&5
13631 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13632
13633 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13634 if test "${with_dbmalloc+set}" = set; then
13635   withval="$with_dbmalloc"
13636
13637 cat >>confdefs.h <<EOF
13638 #define USE_DBMALLOC 1
13639 EOF
13640
13641         : ${with_cflags:=-g}
13642         : ${with_no_leaks:=yes}
13643          with_dbmalloc=yes
13644 else
13645   with_dbmalloc=
13646 fi;
13647 echo "$as_me:13647: result: ${with_dbmalloc:-no}" >&5
13648 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13649
13650 case .$with_cflags in #(vi
13651 .*-g*)
13652         case .$CFLAGS in #(vi
13653         .*-g*) #(vi
13654                 ;;
13655         *)
13656
13657 cf_fix_cppflags=no
13658 cf_new_cflags=
13659 cf_new_cppflags=
13660 cf_new_extra_cppflags=
13661
13662 for cf_add_cflags in -g
13663 do
13664 case $cf_fix_cppflags in
13665 no)
13666         case $cf_add_cflags in #(vi
13667         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13668                 case $cf_add_cflags in
13669                 -D*)
13670                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13671
13672                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13673                                 && test -z "${cf_tst_cflags}" \
13674                                 && cf_fix_cppflags=yes
13675
13676                         if test $cf_fix_cppflags = yes ; then
13677                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13678                                 continue
13679                         elif test "${cf_tst_cflags}" = "\"'" ; then
13680                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13681                                 continue
13682                         fi
13683                         ;;
13684                 esac
13685                 case "$CPPFLAGS" in
13686                 *$cf_add_cflags) #(vi
13687                         ;;
13688                 *) #(vi
13689                         case $cf_add_cflags in #(vi
13690                         -D*)
13691                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13692
13693 CPPFLAGS=`echo "$CPPFLAGS" | \
13694         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13695                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13696
13697                                 ;;
13698                         esac
13699                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13700                         ;;
13701                 esac
13702                 ;;
13703         *)
13704                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13705                 ;;
13706         esac
13707         ;;
13708 yes)
13709         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13710
13711         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13712
13713         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13714                 && test -z "${cf_tst_cflags}" \
13715                 && cf_fix_cppflags=no
13716         ;;
13717 esac
13718 done
13719
13720 if test -n "$cf_new_cflags" ; then
13721
13722         CFLAGS="$CFLAGS $cf_new_cflags"
13723 fi
13724
13725 if test -n "$cf_new_cppflags" ; then
13726
13727         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13728 fi
13729
13730 if test -n "$cf_new_extra_cppflags" ; then
13731
13732         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13733 fi
13734
13735                 ;;
13736         esac
13737         ;;
13738 esac
13739
13740 if test "$with_dbmalloc" = yes ; then
13741         echo "$as_me:13741: checking for dbmalloc.h" >&5
13742 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13743 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13744   echo $ECHO_N "(cached) $ECHO_C" >&6
13745 else
13746   cat >conftest.$ac_ext <<_ACEOF
13747 #line 13747 "configure"
13748 #include "confdefs.h"
13749 #include <dbmalloc.h>
13750 _ACEOF
13751 if { (eval echo "$as_me:13751: \"$ac_cpp conftest.$ac_ext\"") >&5
13752   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13753   ac_status=$?
13754   egrep -v '^ *\+' conftest.er1 >conftest.err
13755   rm -f conftest.er1
13756   cat conftest.err >&5
13757   echo "$as_me:13757: \$? = $ac_status" >&5
13758   (exit $ac_status); } >/dev/null; then
13759   if test -s conftest.err; then
13760     ac_cpp_err=$ac_c_preproc_warn_flag
13761   else
13762     ac_cpp_err=
13763   fi
13764 else
13765   ac_cpp_err=yes
13766 fi
13767 if test -z "$ac_cpp_err"; then
13768   ac_cv_header_dbmalloc_h=yes
13769 else
13770   echo "$as_me: failed program was:" >&5
13771   cat conftest.$ac_ext >&5
13772   ac_cv_header_dbmalloc_h=no
13773 fi
13774 rm -f conftest.err conftest.$ac_ext
13775 fi
13776 echo "$as_me:13776: result: $ac_cv_header_dbmalloc_h" >&5
13777 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13778 if test $ac_cv_header_dbmalloc_h = yes; then
13779
13780 echo "$as_me:13780: checking for debug_malloc in -ldbmalloc" >&5
13781 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13782 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13783   echo $ECHO_N "(cached) $ECHO_C" >&6
13784 else
13785   ac_check_lib_save_LIBS=$LIBS
13786 LIBS="-ldbmalloc  $LIBS"
13787 cat >conftest.$ac_ext <<_ACEOF
13788 #line 13788 "configure"
13789 #include "confdefs.h"
13790
13791 /* Override any gcc2 internal prototype to avoid an error.  */
13792 #ifdef __cplusplus
13793 extern "C"
13794 #endif
13795 /* We use char because int might match the return type of a gcc2
13796    builtin and then its argument prototype would still apply.  */
13797 char debug_malloc ();
13798 int
13799 main ()
13800 {
13801 debug_malloc ();
13802   ;
13803   return 0;
13804 }
13805 _ACEOF
13806 rm -f conftest.$ac_objext conftest$ac_exeext
13807 if { (eval echo "$as_me:13807: \"$ac_link\"") >&5
13808   (eval $ac_link) 2>&5
13809   ac_status=$?
13810   echo "$as_me:13810: \$? = $ac_status" >&5
13811   (exit $ac_status); } &&
13812          { ac_try='test -s conftest$ac_exeext'
13813   { (eval echo "$as_me:13813: \"$ac_try\"") >&5
13814   (eval $ac_try) 2>&5
13815   ac_status=$?
13816   echo "$as_me:13816: \$? = $ac_status" >&5
13817   (exit $ac_status); }; }; then
13818   ac_cv_lib_dbmalloc_debug_malloc=yes
13819 else
13820   echo "$as_me: failed program was:" >&5
13821 cat conftest.$ac_ext >&5
13822 ac_cv_lib_dbmalloc_debug_malloc=no
13823 fi
13824 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13825 LIBS=$ac_check_lib_save_LIBS
13826 fi
13827 echo "$as_me:13827: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13828 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13829 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13830   cat >>confdefs.h <<EOF
13831 #define HAVE_LIBDBMALLOC 1
13832 EOF
13833
13834   LIBS="-ldbmalloc $LIBS"
13835
13836 fi
13837
13838 fi
13839
13840 fi
13841
13842 echo "$as_me:13842: checking if you want to use valgrind for testing" >&5
13843 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13844
13845 # Check whether --with-valgrind or --without-valgrind was given.
13846 if test "${with_valgrind+set}" = set; then
13847   withval="$with_valgrind"
13848
13849 cat >>confdefs.h <<EOF
13850 #define USE_VALGRIND 1
13851 EOF
13852
13853         : ${with_cflags:=-g}
13854         : ${with_no_leaks:=yes}
13855          with_valgrind=yes
13856 else
13857   with_valgrind=
13858 fi;
13859 echo "$as_me:13859: result: ${with_valgrind:-no}" >&5
13860 echo "${ECHO_T}${with_valgrind:-no}" >&6
13861
13862 case .$with_cflags in #(vi
13863 .*-g*)
13864         case .$CFLAGS in #(vi
13865         .*-g*) #(vi
13866                 ;;
13867         *)
13868
13869 cf_fix_cppflags=no
13870 cf_new_cflags=
13871 cf_new_cppflags=
13872 cf_new_extra_cppflags=
13873
13874 for cf_add_cflags in -g
13875 do
13876 case $cf_fix_cppflags in
13877 no)
13878         case $cf_add_cflags in #(vi
13879         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13880                 case $cf_add_cflags in
13881                 -D*)
13882                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13883
13884                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13885                                 && test -z "${cf_tst_cflags}" \
13886                                 && cf_fix_cppflags=yes
13887
13888                         if test $cf_fix_cppflags = yes ; then
13889                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13890                                 continue
13891                         elif test "${cf_tst_cflags}" = "\"'" ; then
13892                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13893                                 continue
13894                         fi
13895                         ;;
13896                 esac
13897                 case "$CPPFLAGS" in
13898                 *$cf_add_cflags) #(vi
13899                         ;;
13900                 *) #(vi
13901                         case $cf_add_cflags in #(vi
13902                         -D*)
13903                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13904
13905 CPPFLAGS=`echo "$CPPFLAGS" | \
13906         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13907                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13908
13909                                 ;;
13910                         esac
13911                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13912                         ;;
13913                 esac
13914                 ;;
13915         *)
13916                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13917                 ;;
13918         esac
13919         ;;
13920 yes)
13921         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13922
13923         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13924
13925         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13926                 && test -z "${cf_tst_cflags}" \
13927                 && cf_fix_cppflags=no
13928         ;;
13929 esac
13930 done
13931
13932 if test -n "$cf_new_cflags" ; then
13933
13934         CFLAGS="$CFLAGS $cf_new_cflags"
13935 fi
13936
13937 if test -n "$cf_new_cppflags" ; then
13938
13939         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13940 fi
13941
13942 if test -n "$cf_new_extra_cppflags" ; then
13943
13944         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13945 fi
13946
13947                 ;;
13948         esac
13949         ;;
13950 esac
13951
13952 echo "$as_me:13952: checking if you want to perform memory-leak testing" >&5
13953 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13954
13955 # Check whether --enable-leaks or --disable-leaks was given.
13956 if test "${enable_leaks+set}" = set; then
13957   enableval="$enable_leaks"
13958   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13959 else
13960   : ${with_no_leaks:=no}
13961 fi;
13962 echo "$as_me:13962: result: $with_no_leaks" >&5
13963 echo "${ECHO_T}$with_no_leaks" >&6
13964
13965 if test "$with_no_leaks" = yes ; then
13966
13967 cat >>confdefs.h <<\EOF
13968 #define NO_LEAKS 1
13969 EOF
13970
13971 cat >>confdefs.h <<\EOF
13972 #define YY_NO_LEAKS 1
13973 EOF
13974
13975 fi
13976
13977 cat >>confdefs.h <<\EOF
13978 #define HAVE_NC_ALLOC_H 1
13979 EOF
13980
13981 ###     use option --enable-expanded to generate certain macros as functions
13982
13983 # Check whether --enable-expanded or --disable-expanded was given.
13984 if test "${enable_expanded+set}" = set; then
13985   enableval="$enable_expanded"
13986   test "x$enableval" = xyes &&
13987 cat >>confdefs.h <<\EOF
13988 #define NCURSES_EXPANDED 1
13989 EOF
13990
13991 fi;
13992
13993 ###     use option --disable-macros to suppress macros in favor of functions
13994
13995 # Check whether --enable-macros or --disable-macros was given.
13996 if test "${enable_macros+set}" = set; then
13997   enableval="$enable_macros"
13998   test "$enableval" = no &&
13999 cat >>confdefs.h <<\EOF
14000 #define NCURSES_NOMACROS 1
14001 EOF
14002
14003 fi;
14004
14005 # Normally we only add trace() to the debug-library.  Allow this to be
14006 # extended to all models of the ncurses library:
14007 cf_all_traces=no
14008 case "$CFLAGS $CPPFLAGS" in
14009 *-DTRACE*)
14010         cf_all_traces=yes
14011         ;;
14012 esac
14013
14014 echo "$as_me:14014: checking whether to add trace feature to all models" >&5
14015 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14016
14017 # Check whether --with-trace or --without-trace was given.
14018 if test "${with_trace+set}" = set; then
14019   withval="$with_trace"
14020   cf_with_trace=$withval
14021 else
14022   cf_with_trace=$cf_all_traces
14023 fi;
14024 echo "$as_me:14024: result: $cf_with_trace" >&5
14025 echo "${ECHO_T}$cf_with_trace" >&6
14026
14027 if test "x$cf_with_trace" = xyes ; then
14028         LIB_TRACING=all
14029         ADA_TRACE=TRUE
14030
14031 cf_fix_cppflags=no
14032 cf_new_cflags=
14033 cf_new_cppflags=
14034 cf_new_extra_cppflags=
14035
14036 for cf_add_cflags in -DTRACE
14037 do
14038 case $cf_fix_cppflags in
14039 no)
14040         case $cf_add_cflags in #(vi
14041         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14042                 case $cf_add_cflags in
14043                 -D*)
14044                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14045
14046                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14047                                 && test -z "${cf_tst_cflags}" \
14048                                 && cf_fix_cppflags=yes
14049
14050                         if test $cf_fix_cppflags = yes ; then
14051                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14052                                 continue
14053                         elif test "${cf_tst_cflags}" = "\"'" ; then
14054                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14055                                 continue
14056                         fi
14057                         ;;
14058                 esac
14059                 case "$CPPFLAGS" in
14060                 *$cf_add_cflags) #(vi
14061                         ;;
14062                 *) #(vi
14063                         case $cf_add_cflags in #(vi
14064                         -D*)
14065                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14066
14067 CPPFLAGS=`echo "$CPPFLAGS" | \
14068         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14069                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14070
14071                                 ;;
14072                         esac
14073                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14074                         ;;
14075                 esac
14076                 ;;
14077         *)
14078                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14079                 ;;
14080         esac
14081         ;;
14082 yes)
14083         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14084
14085         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14086
14087         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14088                 && test -z "${cf_tst_cflags}" \
14089                 && cf_fix_cppflags=no
14090         ;;
14091 esac
14092 done
14093
14094 if test -n "$cf_new_cflags" ; then
14095
14096         CFLAGS="$CFLAGS $cf_new_cflags"
14097 fi
14098
14099 if test -n "$cf_new_cppflags" ; then
14100
14101         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14102 fi
14103
14104 if test -n "$cf_new_extra_cppflags" ; then
14105
14106         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14107 fi
14108
14109 else
14110         LIB_TRACING=DEBUG
14111         ADA_TRACE=FALSE
14112 fi
14113
14114 echo "$as_me:14114: checking if we want to use GNAT projects" >&5
14115 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14116
14117 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14118 if test "${enable_gnat_projects+set}" = set; then
14119   enableval="$enable_gnat_projects"
14120   test "$enableval" != no && enableval=yes
14121   if test "$enableval" != "yes" ; then
14122     enable_gnat_projects=no
14123   else
14124     enable_gnat_projects=yes
14125   fi
14126 else
14127   enableval=yes
14128   enable_gnat_projects=yes
14129
14130 fi;
14131 echo "$as_me:14131: result: $enable_gnat_projects" >&5
14132 echo "${ECHO_T}$enable_gnat_projects" >&6
14133
14134 ###     Checks for libraries.
14135 case $cf_cv_system_name in #(vi
14136 *mingw32*|*mingw64*) #(vi
14137         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
14138         LIBS=" -lpsapi $LIBS"
14139         ;;
14140 *)
14141 echo "$as_me:14141: checking for gettimeofday" >&5
14142 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14143 if test "${ac_cv_func_gettimeofday+set}" = set; then
14144   echo $ECHO_N "(cached) $ECHO_C" >&6
14145 else
14146   cat >conftest.$ac_ext <<_ACEOF
14147 #line 14147 "configure"
14148 #include "confdefs.h"
14149 /* System header to define __stub macros and hopefully few prototypes,
14150     which can conflict with char gettimeofday (); below.  */
14151 #include <assert.h>
14152 /* Override any gcc2 internal prototype to avoid an error.  */
14153 #ifdef __cplusplus
14154 extern "C"
14155 #endif
14156 /* We use char because int might match the return type of a gcc2
14157    builtin and then its argument prototype would still apply.  */
14158 char gettimeofday ();
14159 char (*f) ();
14160
14161 int
14162 main ()
14163 {
14164 /* The GNU C library defines this for functions which it implements
14165     to always fail with ENOSYS.  Some functions are actually named
14166     something starting with __ and the normal name is an alias.  */
14167 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14168 choke me
14169 #else
14170 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14171 #endif
14172
14173   ;
14174   return 0;
14175 }
14176 _ACEOF
14177 rm -f conftest.$ac_objext conftest$ac_exeext
14178 if { (eval echo "$as_me:14178: \"$ac_link\"") >&5
14179   (eval $ac_link) 2>&5
14180   ac_status=$?
14181   echo "$as_me:14181: \$? = $ac_status" >&5
14182   (exit $ac_status); } &&
14183          { ac_try='test -s conftest$ac_exeext'
14184   { (eval echo "$as_me:14184: \"$ac_try\"") >&5
14185   (eval $ac_try) 2>&5
14186   ac_status=$?
14187   echo "$as_me:14187: \$? = $ac_status" >&5
14188   (exit $ac_status); }; }; then
14189   ac_cv_func_gettimeofday=yes
14190 else
14191   echo "$as_me: failed program was:" >&5
14192 cat conftest.$ac_ext >&5
14193 ac_cv_func_gettimeofday=no
14194 fi
14195 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14196 fi
14197 echo "$as_me:14197: result: $ac_cv_func_gettimeofday" >&5
14198 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14199 if test $ac_cv_func_gettimeofday = yes; then
14200
14201 cat >>confdefs.h <<\EOF
14202 #define HAVE_GETTIMEOFDAY 1
14203 EOF
14204
14205 else
14206
14207 echo "$as_me:14207: checking for gettimeofday in -lbsd" >&5
14208 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14209 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14210   echo $ECHO_N "(cached) $ECHO_C" >&6
14211 else
14212   ac_check_lib_save_LIBS=$LIBS
14213 LIBS="-lbsd  $LIBS"
14214 cat >conftest.$ac_ext <<_ACEOF
14215 #line 14215 "configure"
14216 #include "confdefs.h"
14217
14218 /* Override any gcc2 internal prototype to avoid an error.  */
14219 #ifdef __cplusplus
14220 extern "C"
14221 #endif
14222 /* We use char because int might match the return type of a gcc2
14223    builtin and then its argument prototype would still apply.  */
14224 char gettimeofday ();
14225 int
14226 main ()
14227 {
14228 gettimeofday ();
14229   ;
14230   return 0;
14231 }
14232 _ACEOF
14233 rm -f conftest.$ac_objext conftest$ac_exeext
14234 if { (eval echo "$as_me:14234: \"$ac_link\"") >&5
14235   (eval $ac_link) 2>&5
14236   ac_status=$?
14237   echo "$as_me:14237: \$? = $ac_status" >&5
14238   (exit $ac_status); } &&
14239          { ac_try='test -s conftest$ac_exeext'
14240   { (eval echo "$as_me:14240: \"$ac_try\"") >&5
14241   (eval $ac_try) 2>&5
14242   ac_status=$?
14243   echo "$as_me:14243: \$? = $ac_status" >&5
14244   (exit $ac_status); }; }; then
14245   ac_cv_lib_bsd_gettimeofday=yes
14246 else
14247   echo "$as_me: failed program was:" >&5
14248 cat conftest.$ac_ext >&5
14249 ac_cv_lib_bsd_gettimeofday=no
14250 fi
14251 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14252 LIBS=$ac_check_lib_save_LIBS
14253 fi
14254 echo "$as_me:14254: result: $ac_cv_lib_bsd_gettimeofday" >&5
14255 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14256 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14257
14258 cat >>confdefs.h <<\EOF
14259 #define HAVE_GETTIMEOFDAY 1
14260 EOF
14261
14262 cf_add_libs="-lbsd"
14263 # Filter out duplicates - this happens with badly-designed ".pc" files...
14264 for cf_add_1lib in $LIBS
14265 do
14266         for cf_add_2lib in $cf_add_libs
14267         do
14268                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14269                 then
14270                         cf_add_1lib=
14271                         break
14272                 fi
14273         done
14274         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14275 done
14276 LIBS="$cf_add_libs"
14277
14278 fi
14279
14280 fi
14281         ;;
14282 esac
14283
14284 echo "$as_me:14284: checking if -lm needed for math functions" >&5
14285 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14286 if test "${cf_cv_need_libm+set}" = set; then
14287   echo $ECHO_N "(cached) $ECHO_C" >&6
14288 else
14289
14290         cat >conftest.$ac_ext <<_ACEOF
14291 #line 14291 "configure"
14292 #include "confdefs.h"
14293
14294         #include <stdio.h>
14295         #include <math.h>
14296
14297 int
14298 main ()
14299 {
14300 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14301   ;
14302   return 0;
14303 }
14304 _ACEOF
14305 rm -f conftest.$ac_objext conftest$ac_exeext
14306 if { (eval echo "$as_me:14306: \"$ac_link\"") >&5
14307   (eval $ac_link) 2>&5
14308   ac_status=$?
14309   echo "$as_me:14309: \$? = $ac_status" >&5
14310   (exit $ac_status); } &&
14311          { ac_try='test -s conftest$ac_exeext'
14312   { (eval echo "$as_me:14312: \"$ac_try\"") >&5
14313   (eval $ac_try) 2>&5
14314   ac_status=$?
14315   echo "$as_me:14315: \$? = $ac_status" >&5
14316   (exit $ac_status); }; }; then
14317   cf_cv_need_libm=no
14318 else
14319   echo "$as_me: failed program was:" >&5
14320 cat conftest.$ac_ext >&5
14321 cf_cv_need_libm=yes
14322 fi
14323 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14324 fi
14325 echo "$as_me:14325: result: $cf_cv_need_libm" >&5
14326 echo "${ECHO_T}$cf_cv_need_libm" >&6
14327 if test "$cf_cv_need_libm" = yes
14328 then
14329 MATH_LIB=-lm
14330 fi
14331
14332 ###     Checks for header files.
14333 echo "$as_me:14333: checking for ANSI C header files" >&5
14334 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14335 if test "${ac_cv_header_stdc+set}" = set; then
14336   echo $ECHO_N "(cached) $ECHO_C" >&6
14337 else
14338   cat >conftest.$ac_ext <<_ACEOF
14339 #line 14339 "configure"
14340 #include "confdefs.h"
14341 #include <stdlib.h>
14342 #include <stdarg.h>
14343 #include <string.h>
14344 #include <float.h>
14345
14346 _ACEOF
14347 if { (eval echo "$as_me:14347: \"$ac_cpp conftest.$ac_ext\"") >&5
14348   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14349   ac_status=$?
14350   egrep -v '^ *\+' conftest.er1 >conftest.err
14351   rm -f conftest.er1
14352   cat conftest.err >&5
14353   echo "$as_me:14353: \$? = $ac_status" >&5
14354   (exit $ac_status); } >/dev/null; then
14355   if test -s conftest.err; then
14356     ac_cpp_err=$ac_c_preproc_warn_flag
14357   else
14358     ac_cpp_err=
14359   fi
14360 else
14361   ac_cpp_err=yes
14362 fi
14363 if test -z "$ac_cpp_err"; then
14364   ac_cv_header_stdc=yes
14365 else
14366   echo "$as_me: failed program was:" >&5
14367   cat conftest.$ac_ext >&5
14368   ac_cv_header_stdc=no
14369 fi
14370 rm -f conftest.err conftest.$ac_ext
14371
14372 if test $ac_cv_header_stdc = yes; then
14373   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14374   cat >conftest.$ac_ext <<_ACEOF
14375 #line 14375 "configure"
14376 #include "confdefs.h"
14377 #include <string.h>
14378
14379 _ACEOF
14380 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14381   egrep "memchr" >/dev/null 2>&1; then
14382   :
14383 else
14384   ac_cv_header_stdc=no
14385 fi
14386 rm -rf conftest*
14387
14388 fi
14389
14390 if test $ac_cv_header_stdc = yes; then
14391   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14392   cat >conftest.$ac_ext <<_ACEOF
14393 #line 14393 "configure"
14394 #include "confdefs.h"
14395 #include <stdlib.h>
14396
14397 _ACEOF
14398 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14399   egrep "free" >/dev/null 2>&1; then
14400   :
14401 else
14402   ac_cv_header_stdc=no
14403 fi
14404 rm -rf conftest*
14405
14406 fi
14407
14408 if test $ac_cv_header_stdc = yes; then
14409   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14410   if test "$cross_compiling" = yes; then
14411   :
14412 else
14413   cat >conftest.$ac_ext <<_ACEOF
14414 #line 14414 "configure"
14415 #include "confdefs.h"
14416 #include <ctype.h>
14417 #if ((' ' & 0x0FF) == 0x020)
14418 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14419 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14420 #else
14421 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14422                      || ('j' <= (c) && (c) <= 'r') \
14423                      || ('s' <= (c) && (c) <= 'z'))
14424 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14425 #endif
14426
14427 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14428 int
14429 main ()
14430 {
14431   int i;
14432   for (i = 0; i < 256; i++)
14433     if (XOR (islower (i), ISLOWER (i))
14434         || toupper (i) != TOUPPER (i))
14435       $ac_main_return(2);
14436   $ac_main_return (0);
14437 }
14438 _ACEOF
14439 rm -f conftest$ac_exeext
14440 if { (eval echo "$as_me:14440: \"$ac_link\"") >&5
14441   (eval $ac_link) 2>&5
14442   ac_status=$?
14443   echo "$as_me:14443: \$? = $ac_status" >&5
14444   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14445   { (eval echo "$as_me:14445: \"$ac_try\"") >&5
14446   (eval $ac_try) 2>&5
14447   ac_status=$?
14448   echo "$as_me:14448: \$? = $ac_status" >&5
14449   (exit $ac_status); }; }; then
14450   :
14451 else
14452   echo "$as_me: program exited with status $ac_status" >&5
14453 echo "$as_me: failed program was:" >&5
14454 cat conftest.$ac_ext >&5
14455 ac_cv_header_stdc=no
14456 fi
14457 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14458 fi
14459 fi
14460 fi
14461 echo "$as_me:14461: result: $ac_cv_header_stdc" >&5
14462 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14463 if test $ac_cv_header_stdc = yes; then
14464
14465 cat >>confdefs.h <<\EOF
14466 #define STDC_HEADERS 1
14467 EOF
14468
14469 fi
14470
14471 ac_header_dirent=no
14472 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14473   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14474 echo "$as_me:14474: checking for $ac_hdr that defines DIR" >&5
14475 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14476 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14477   echo $ECHO_N "(cached) $ECHO_C" >&6
14478 else
14479   cat >conftest.$ac_ext <<_ACEOF
14480 #line 14480 "configure"
14481 #include "confdefs.h"
14482 #include <sys/types.h>
14483 #include <$ac_hdr>
14484
14485 int
14486 main ()
14487 {
14488 if ((DIR *) 0)
14489 return 0;
14490   ;
14491   return 0;
14492 }
14493 _ACEOF
14494 rm -f conftest.$ac_objext
14495 if { (eval echo "$as_me:14495: \"$ac_compile\"") >&5
14496   (eval $ac_compile) 2>&5
14497   ac_status=$?
14498   echo "$as_me:14498: \$? = $ac_status" >&5
14499   (exit $ac_status); } &&
14500          { ac_try='test -s conftest.$ac_objext'
14501   { (eval echo "$as_me:14501: \"$ac_try\"") >&5
14502   (eval $ac_try) 2>&5
14503   ac_status=$?
14504   echo "$as_me:14504: \$? = $ac_status" >&5
14505   (exit $ac_status); }; }; then
14506   eval "$as_ac_Header=yes"
14507 else
14508   echo "$as_me: failed program was:" >&5
14509 cat conftest.$ac_ext >&5
14510 eval "$as_ac_Header=no"
14511 fi
14512 rm -f conftest.$ac_objext conftest.$ac_ext
14513 fi
14514 echo "$as_me:14514: result: `eval echo '${'$as_ac_Header'}'`" >&5
14515 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14516 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14517   cat >>confdefs.h <<EOF
14518 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14519 EOF
14520
14521 ac_header_dirent=$ac_hdr; break
14522 fi
14523
14524 done
14525 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14526 if test $ac_header_dirent = dirent.h; then
14527   echo "$as_me:14527: checking for opendir in -ldir" >&5
14528 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14529 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14530   echo $ECHO_N "(cached) $ECHO_C" >&6
14531 else
14532   ac_check_lib_save_LIBS=$LIBS
14533 LIBS="-ldir  $LIBS"
14534 cat >conftest.$ac_ext <<_ACEOF
14535 #line 14535 "configure"
14536 #include "confdefs.h"
14537
14538 /* Override any gcc2 internal prototype to avoid an error.  */
14539 #ifdef __cplusplus
14540 extern "C"
14541 #endif
14542 /* We use char because int might match the return type of a gcc2
14543    builtin and then its argument prototype would still apply.  */
14544 char opendir ();
14545 int
14546 main ()
14547 {
14548 opendir ();
14549   ;
14550   return 0;
14551 }
14552 _ACEOF
14553 rm -f conftest.$ac_objext conftest$ac_exeext
14554 if { (eval echo "$as_me:14554: \"$ac_link\"") >&5
14555   (eval $ac_link) 2>&5
14556   ac_status=$?
14557   echo "$as_me:14557: \$? = $ac_status" >&5
14558   (exit $ac_status); } &&
14559          { ac_try='test -s conftest$ac_exeext'
14560   { (eval echo "$as_me:14560: \"$ac_try\"") >&5
14561   (eval $ac_try) 2>&5
14562   ac_status=$?
14563   echo "$as_me:14563: \$? = $ac_status" >&5
14564   (exit $ac_status); }; }; then
14565   ac_cv_lib_dir_opendir=yes
14566 else
14567   echo "$as_me: failed program was:" >&5
14568 cat conftest.$ac_ext >&5
14569 ac_cv_lib_dir_opendir=no
14570 fi
14571 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14572 LIBS=$ac_check_lib_save_LIBS
14573 fi
14574 echo "$as_me:14574: result: $ac_cv_lib_dir_opendir" >&5
14575 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14576 if test $ac_cv_lib_dir_opendir = yes; then
14577   LIBS="$LIBS -ldir"
14578 fi
14579
14580 else
14581   echo "$as_me:14581: checking for opendir in -lx" >&5
14582 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14583 if test "${ac_cv_lib_x_opendir+set}" = set; then
14584   echo $ECHO_N "(cached) $ECHO_C" >&6
14585 else
14586   ac_check_lib_save_LIBS=$LIBS
14587 LIBS="-lx  $LIBS"
14588 cat >conftest.$ac_ext <<_ACEOF
14589 #line 14589 "configure"
14590 #include "confdefs.h"
14591
14592 /* Override any gcc2 internal prototype to avoid an error.  */
14593 #ifdef __cplusplus
14594 extern "C"
14595 #endif
14596 /* We use char because int might match the return type of a gcc2
14597    builtin and then its argument prototype would still apply.  */
14598 char opendir ();
14599 int
14600 main ()
14601 {
14602 opendir ();
14603   ;
14604   return 0;
14605 }
14606 _ACEOF
14607 rm -f conftest.$ac_objext conftest$ac_exeext
14608 if { (eval echo "$as_me:14608: \"$ac_link\"") >&5
14609   (eval $ac_link) 2>&5
14610   ac_status=$?
14611   echo "$as_me:14611: \$? = $ac_status" >&5
14612   (exit $ac_status); } &&
14613          { ac_try='test -s conftest$ac_exeext'
14614   { (eval echo "$as_me:14614: \"$ac_try\"") >&5
14615   (eval $ac_try) 2>&5
14616   ac_status=$?
14617   echo "$as_me:14617: \$? = $ac_status" >&5
14618   (exit $ac_status); }; }; then
14619   ac_cv_lib_x_opendir=yes
14620 else
14621   echo "$as_me: failed program was:" >&5
14622 cat conftest.$ac_ext >&5
14623 ac_cv_lib_x_opendir=no
14624 fi
14625 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14626 LIBS=$ac_check_lib_save_LIBS
14627 fi
14628 echo "$as_me:14628: result: $ac_cv_lib_x_opendir" >&5
14629 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14630 if test $ac_cv_lib_x_opendir = yes; then
14631   LIBS="$LIBS -lx"
14632 fi
14633
14634 fi
14635
14636 echo "$as_me:14636: checking whether time.h and sys/time.h may both be included" >&5
14637 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14638 if test "${ac_cv_header_time+set}" = set; then
14639   echo $ECHO_N "(cached) $ECHO_C" >&6
14640 else
14641   cat >conftest.$ac_ext <<_ACEOF
14642 #line 14642 "configure"
14643 #include "confdefs.h"
14644 #include <sys/types.h>
14645 #include <sys/time.h>
14646 #include <time.h>
14647
14648 int
14649 main ()
14650 {
14651 if ((struct tm *) 0)
14652 return 0;
14653   ;
14654   return 0;
14655 }
14656 _ACEOF
14657 rm -f conftest.$ac_objext
14658 if { (eval echo "$as_me:14658: \"$ac_compile\"") >&5
14659   (eval $ac_compile) 2>&5
14660   ac_status=$?
14661   echo "$as_me:14661: \$? = $ac_status" >&5
14662   (exit $ac_status); } &&
14663          { ac_try='test -s conftest.$ac_objext'
14664   { (eval echo "$as_me:14664: \"$ac_try\"") >&5
14665   (eval $ac_try) 2>&5
14666   ac_status=$?
14667   echo "$as_me:14667: \$? = $ac_status" >&5
14668   (exit $ac_status); }; }; then
14669   ac_cv_header_time=yes
14670 else
14671   echo "$as_me: failed program was:" >&5
14672 cat conftest.$ac_ext >&5
14673 ac_cv_header_time=no
14674 fi
14675 rm -f conftest.$ac_objext conftest.$ac_ext
14676 fi
14677 echo "$as_me:14677: result: $ac_cv_header_time" >&5
14678 echo "${ECHO_T}$ac_cv_header_time" >&6
14679 if test $ac_cv_header_time = yes; then
14680
14681 cat >>confdefs.h <<\EOF
14682 #define TIME_WITH_SYS_TIME 1
14683 EOF
14684
14685 fi
14686
14687 cf_regex_func=no
14688
14689 cf_regex_libs="regex re"
14690 case $host_os in #(vi
14691 mingw*)
14692         cf_regex_libs="gnurx $cf_regex_libs"
14693         ;;
14694 esac
14695
14696 echo "$as_me:14696: checking for regcomp" >&5
14697 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14698 if test "${ac_cv_func_regcomp+set}" = set; then
14699   echo $ECHO_N "(cached) $ECHO_C" >&6
14700 else
14701   cat >conftest.$ac_ext <<_ACEOF
14702 #line 14702 "configure"
14703 #include "confdefs.h"
14704 /* System header to define __stub macros and hopefully few prototypes,
14705     which can conflict with char regcomp (); below.  */
14706 #include <assert.h>
14707 /* Override any gcc2 internal prototype to avoid an error.  */
14708 #ifdef __cplusplus
14709 extern "C"
14710 #endif
14711 /* We use char because int might match the return type of a gcc2
14712    builtin and then its argument prototype would still apply.  */
14713 char regcomp ();
14714 char (*f) ();
14715
14716 int
14717 main ()
14718 {
14719 /* The GNU C library defines this for functions which it implements
14720     to always fail with ENOSYS.  Some functions are actually named
14721     something starting with __ and the normal name is an alias.  */
14722 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14723 choke me
14724 #else
14725 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14726 #endif
14727
14728   ;
14729   return 0;
14730 }
14731 _ACEOF
14732 rm -f conftest.$ac_objext conftest$ac_exeext
14733 if { (eval echo "$as_me:14733: \"$ac_link\"") >&5
14734   (eval $ac_link) 2>&5
14735   ac_status=$?
14736   echo "$as_me:14736: \$? = $ac_status" >&5
14737   (exit $ac_status); } &&
14738          { ac_try='test -s conftest$ac_exeext'
14739   { (eval echo "$as_me:14739: \"$ac_try\"") >&5
14740   (eval $ac_try) 2>&5
14741   ac_status=$?
14742   echo "$as_me:14742: \$? = $ac_status" >&5
14743   (exit $ac_status); }; }; then
14744   ac_cv_func_regcomp=yes
14745 else
14746   echo "$as_me: failed program was:" >&5
14747 cat conftest.$ac_ext >&5
14748 ac_cv_func_regcomp=no
14749 fi
14750 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14751 fi
14752 echo "$as_me:14752: result: $ac_cv_func_regcomp" >&5
14753 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14754 if test $ac_cv_func_regcomp = yes; then
14755   cf_regex_func=regcomp
14756 else
14757
14758         for cf_regex_lib in $cf_regex_libs
14759         do
14760                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14761 echo "$as_me:14761: checking for regcomp in -l$cf_regex_lib" >&5
14762 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14763 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14764   echo $ECHO_N "(cached) $ECHO_C" >&6
14765 else
14766   ac_check_lib_save_LIBS=$LIBS
14767 LIBS="-l$cf_regex_lib  $LIBS"
14768 cat >conftest.$ac_ext <<_ACEOF
14769 #line 14769 "configure"
14770 #include "confdefs.h"
14771
14772 /* Override any gcc2 internal prototype to avoid an error.  */
14773 #ifdef __cplusplus
14774 extern "C"
14775 #endif
14776 /* We use char because int might match the return type of a gcc2
14777    builtin and then its argument prototype would still apply.  */
14778 char regcomp ();
14779 int
14780 main ()
14781 {
14782 regcomp ();
14783   ;
14784   return 0;
14785 }
14786 _ACEOF
14787 rm -f conftest.$ac_objext conftest$ac_exeext
14788 if { (eval echo "$as_me:14788: \"$ac_link\"") >&5
14789   (eval $ac_link) 2>&5
14790   ac_status=$?
14791   echo "$as_me:14791: \$? = $ac_status" >&5
14792   (exit $ac_status); } &&
14793          { ac_try='test -s conftest$ac_exeext'
14794   { (eval echo "$as_me:14794: \"$ac_try\"") >&5
14795   (eval $ac_try) 2>&5
14796   ac_status=$?
14797   echo "$as_me:14797: \$? = $ac_status" >&5
14798   (exit $ac_status); }; }; then
14799   eval "$as_ac_Lib=yes"
14800 else
14801   echo "$as_me: failed program was:" >&5
14802 cat conftest.$ac_ext >&5
14803 eval "$as_ac_Lib=no"
14804 fi
14805 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14806 LIBS=$ac_check_lib_save_LIBS
14807 fi
14808 echo "$as_me:14808: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14809 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14810 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14811
14812 cf_add_libs="-l$cf_regex_lib"
14813 # Filter out duplicates - this happens with badly-designed ".pc" files...
14814 for cf_add_1lib in $LIBS
14815 do
14816         for cf_add_2lib in $cf_add_libs
14817         do
14818                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14819                 then
14820                         cf_add_1lib=
14821                         break
14822                 fi
14823         done
14824         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14825 done
14826 LIBS="$cf_add_libs"
14827
14828                                 cf_regex_func=regcomp
14829                                 break
14830 fi
14831
14832         done
14833
14834 fi
14835
14836 if test "$cf_regex_func" = no ; then
14837         echo "$as_me:14837: checking for compile" >&5
14838 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14839 if test "${ac_cv_func_compile+set}" = set; then
14840   echo $ECHO_N "(cached) $ECHO_C" >&6
14841 else
14842   cat >conftest.$ac_ext <<_ACEOF
14843 #line 14843 "configure"
14844 #include "confdefs.h"
14845 /* System header to define __stub macros and hopefully few prototypes,
14846     which can conflict with char compile (); below.  */
14847 #include <assert.h>
14848 /* Override any gcc2 internal prototype to avoid an error.  */
14849 #ifdef __cplusplus
14850 extern "C"
14851 #endif
14852 /* We use char because int might match the return type of a gcc2
14853    builtin and then its argument prototype would still apply.  */
14854 char compile ();
14855 char (*f) ();
14856
14857 int
14858 main ()
14859 {
14860 /* The GNU C library defines this for functions which it implements
14861     to always fail with ENOSYS.  Some functions are actually named
14862     something starting with __ and the normal name is an alias.  */
14863 #if defined (__stub_compile) || defined (__stub___compile)
14864 choke me
14865 #else
14866 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14867 #endif
14868
14869   ;
14870   return 0;
14871 }
14872 _ACEOF
14873 rm -f conftest.$ac_objext conftest$ac_exeext
14874 if { (eval echo "$as_me:14874: \"$ac_link\"") >&5
14875   (eval $ac_link) 2>&5
14876   ac_status=$?
14877   echo "$as_me:14877: \$? = $ac_status" >&5
14878   (exit $ac_status); } &&
14879          { ac_try='test -s conftest$ac_exeext'
14880   { (eval echo "$as_me:14880: \"$ac_try\"") >&5
14881   (eval $ac_try) 2>&5
14882   ac_status=$?
14883   echo "$as_me:14883: \$? = $ac_status" >&5
14884   (exit $ac_status); }; }; then
14885   ac_cv_func_compile=yes
14886 else
14887   echo "$as_me: failed program was:" >&5
14888 cat conftest.$ac_ext >&5
14889 ac_cv_func_compile=no
14890 fi
14891 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14892 fi
14893 echo "$as_me:14893: result: $ac_cv_func_compile" >&5
14894 echo "${ECHO_T}$ac_cv_func_compile" >&6
14895 if test $ac_cv_func_compile = yes; then
14896   cf_regex_func=compile
14897 else
14898
14899                 echo "$as_me:14899: checking for compile in -lgen" >&5
14900 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14901 if test "${ac_cv_lib_gen_compile+set}" = set; then
14902   echo $ECHO_N "(cached) $ECHO_C" >&6
14903 else
14904   ac_check_lib_save_LIBS=$LIBS
14905 LIBS="-lgen  $LIBS"
14906 cat >conftest.$ac_ext <<_ACEOF
14907 #line 14907 "configure"
14908 #include "confdefs.h"
14909
14910 /* Override any gcc2 internal prototype to avoid an error.  */
14911 #ifdef __cplusplus
14912 extern "C"
14913 #endif
14914 /* We use char because int might match the return type of a gcc2
14915    builtin and then its argument prototype would still apply.  */
14916 char compile ();
14917 int
14918 main ()
14919 {
14920 compile ();
14921   ;
14922   return 0;
14923 }
14924 _ACEOF
14925 rm -f conftest.$ac_objext conftest$ac_exeext
14926 if { (eval echo "$as_me:14926: \"$ac_link\"") >&5
14927   (eval $ac_link) 2>&5
14928   ac_status=$?
14929   echo "$as_me:14929: \$? = $ac_status" >&5
14930   (exit $ac_status); } &&
14931          { ac_try='test -s conftest$ac_exeext'
14932   { (eval echo "$as_me:14932: \"$ac_try\"") >&5
14933   (eval $ac_try) 2>&5
14934   ac_status=$?
14935   echo "$as_me:14935: \$? = $ac_status" >&5
14936   (exit $ac_status); }; }; then
14937   ac_cv_lib_gen_compile=yes
14938 else
14939   echo "$as_me: failed program was:" >&5
14940 cat conftest.$ac_ext >&5
14941 ac_cv_lib_gen_compile=no
14942 fi
14943 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14944 LIBS=$ac_check_lib_save_LIBS
14945 fi
14946 echo "$as_me:14946: result: $ac_cv_lib_gen_compile" >&5
14947 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14948 if test $ac_cv_lib_gen_compile = yes; then
14949
14950 cf_add_libs="-lgen"
14951 # Filter out duplicates - this happens with badly-designed ".pc" files...
14952 for cf_add_1lib in $LIBS
14953 do
14954         for cf_add_2lib in $cf_add_libs
14955         do
14956                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14957                 then
14958                         cf_add_1lib=
14959                         break
14960                 fi
14961         done
14962         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14963 done
14964 LIBS="$cf_add_libs"
14965
14966                                 cf_regex_func=compile
14967 fi
14968
14969 fi
14970
14971 fi
14972
14973 if test "$cf_regex_func" = no ; then
14974         { echo "$as_me:14974: WARNING: cannot find regular expression library" >&5
14975 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14976 fi
14977
14978 echo "$as_me:14978: checking for regular-expression headers" >&5
14979 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14980 if test "${cf_cv_regex_hdrs+set}" = set; then
14981   echo $ECHO_N "(cached) $ECHO_C" >&6
14982 else
14983
14984 cf_cv_regex_hdrs=no
14985 case $cf_regex_func in #(vi
14986 compile) #(vi
14987         for cf_regex_hdr in regexp.h regexpr.h
14988         do
14989                 cat >conftest.$ac_ext <<_ACEOF
14990 #line 14990 "configure"
14991 #include "confdefs.h"
14992 #include <$cf_regex_hdr>
14993 int
14994 main ()
14995 {
14996
14997                         char *p = compile("", "", "", 0);
14998                         int x = step("", "");
14999
15000   ;
15001   return 0;
15002 }
15003 _ACEOF
15004 rm -f conftest.$ac_objext conftest$ac_exeext
15005 if { (eval echo "$as_me:15005: \"$ac_link\"") >&5
15006   (eval $ac_link) 2>&5
15007   ac_status=$?
15008   echo "$as_me:15008: \$? = $ac_status" >&5
15009   (exit $ac_status); } &&
15010          { ac_try='test -s conftest$ac_exeext'
15011   { (eval echo "$as_me:15011: \"$ac_try\"") >&5
15012   (eval $ac_try) 2>&5
15013   ac_status=$?
15014   echo "$as_me:15014: \$? = $ac_status" >&5
15015   (exit $ac_status); }; }; then
15016
15017                         cf_cv_regex_hdrs=$cf_regex_hdr
15018                         break
15019
15020 else
15021   echo "$as_me: failed program was:" >&5
15022 cat conftest.$ac_ext >&5
15023 fi
15024 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15025         done
15026         ;;
15027 *)
15028         for cf_regex_hdr in regex.h
15029         do
15030                 cat >conftest.$ac_ext <<_ACEOF
15031 #line 15031 "configure"
15032 #include "confdefs.h"
15033 #include <sys/types.h>
15034 #include <$cf_regex_hdr>
15035 int
15036 main ()
15037 {
15038
15039                         regex_t *p;
15040                         int x = regcomp(p, "", 0);
15041                         int y = regexec(p, "", 0, 0, 0);
15042                         regfree(p);
15043
15044   ;
15045   return 0;
15046 }
15047 _ACEOF
15048 rm -f conftest.$ac_objext conftest$ac_exeext
15049 if { (eval echo "$as_me:15049: \"$ac_link\"") >&5
15050   (eval $ac_link) 2>&5
15051   ac_status=$?
15052   echo "$as_me:15052: \$? = $ac_status" >&5
15053   (exit $ac_status); } &&
15054          { ac_try='test -s conftest$ac_exeext'
15055   { (eval echo "$as_me:15055: \"$ac_try\"") >&5
15056   (eval $ac_try) 2>&5
15057   ac_status=$?
15058   echo "$as_me:15058: \$? = $ac_status" >&5
15059   (exit $ac_status); }; }; then
15060
15061                         cf_cv_regex_hdrs=$cf_regex_hdr
15062                         break
15063
15064 else
15065   echo "$as_me: failed program was:" >&5
15066 cat conftest.$ac_ext >&5
15067 fi
15068 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15069         done
15070         ;;
15071 esac
15072
15073 fi
15074 echo "$as_me:15074: result: $cf_cv_regex_hdrs" >&5
15075 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15076
15077 case $cf_cv_regex_hdrs in #(vi
15078     no)        { echo "$as_me:15078: WARNING: no regular expression header found" >&5
15079 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
15080     regex.h)
15081 cat >>confdefs.h <<\EOF
15082 #define HAVE_REGEX_H_FUNCS 1
15083 EOF
15084  ;; #(vi
15085     regexp.h)
15086 cat >>confdefs.h <<\EOF
15087 #define HAVE_REGEXP_H_FUNCS 1
15088 EOF
15089  ;; #(vi
15090     regexpr.h)
15091 cat >>confdefs.h <<\EOF
15092 #define HAVE_REGEXPR_H_FUNCS 1
15093 EOF
15094  ;;
15095 esac
15096
15097 for ac_header in \
15098 fcntl.h \
15099 getopt.h \
15100 limits.h \
15101 locale.h \
15102 math.h \
15103 poll.h \
15104 sys/bsdtypes.h \
15105 sys/ioctl.h \
15106 sys/param.h \
15107 sys/poll.h \
15108 sys/select.h \
15109 sys/time.h \
15110 sys/times.h \
15111 ttyent.h \
15112 unistd.h \
15113 wctype.h \
15114
15115 do
15116 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15117 echo "$as_me:15117: checking for $ac_header" >&5
15118 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15119 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15120   echo $ECHO_N "(cached) $ECHO_C" >&6
15121 else
15122   cat >conftest.$ac_ext <<_ACEOF
15123 #line 15123 "configure"
15124 #include "confdefs.h"
15125 #include <$ac_header>
15126 _ACEOF
15127 if { (eval echo "$as_me:15127: \"$ac_cpp conftest.$ac_ext\"") >&5
15128   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15129   ac_status=$?
15130   egrep -v '^ *\+' conftest.er1 >conftest.err
15131   rm -f conftest.er1
15132   cat conftest.err >&5
15133   echo "$as_me:15133: \$? = $ac_status" >&5
15134   (exit $ac_status); } >/dev/null; then
15135   if test -s conftest.err; then
15136     ac_cpp_err=$ac_c_preproc_warn_flag
15137   else
15138     ac_cpp_err=
15139   fi
15140 else
15141   ac_cpp_err=yes
15142 fi
15143 if test -z "$ac_cpp_err"; then
15144   eval "$as_ac_Header=yes"
15145 else
15146   echo "$as_me: failed program was:" >&5
15147   cat conftest.$ac_ext >&5
15148   eval "$as_ac_Header=no"
15149 fi
15150 rm -f conftest.err conftest.$ac_ext
15151 fi
15152 echo "$as_me:15152: result: `eval echo '${'$as_ac_Header'}'`" >&5
15153 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15154 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15155   cat >>confdefs.h <<EOF
15156 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15157 EOF
15158
15159 fi
15160 done
15161
15162 for ac_header in unistd.h getopt.h
15163 do
15164 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15165 echo "$as_me:15165: checking for $ac_header" >&5
15166 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15167 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15168   echo $ECHO_N "(cached) $ECHO_C" >&6
15169 else
15170   cat >conftest.$ac_ext <<_ACEOF
15171 #line 15171 "configure"
15172 #include "confdefs.h"
15173 #include <$ac_header>
15174 _ACEOF
15175 if { (eval echo "$as_me:15175: \"$ac_cpp conftest.$ac_ext\"") >&5
15176   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15177   ac_status=$?
15178   egrep -v '^ *\+' conftest.er1 >conftest.err
15179   rm -f conftest.er1
15180   cat conftest.err >&5
15181   echo "$as_me:15181: \$? = $ac_status" >&5
15182   (exit $ac_status); } >/dev/null; then
15183   if test -s conftest.err; then
15184     ac_cpp_err=$ac_c_preproc_warn_flag
15185   else
15186     ac_cpp_err=
15187   fi
15188 else
15189   ac_cpp_err=yes
15190 fi
15191 if test -z "$ac_cpp_err"; then
15192   eval "$as_ac_Header=yes"
15193 else
15194   echo "$as_me: failed program was:" >&5
15195   cat conftest.$ac_ext >&5
15196   eval "$as_ac_Header=no"
15197 fi
15198 rm -f conftest.err conftest.$ac_ext
15199 fi
15200 echo "$as_me:15200: result: `eval echo '${'$as_ac_Header'}'`" >&5
15201 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15202 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15203   cat >>confdefs.h <<EOF
15204 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15205 EOF
15206
15207 fi
15208 done
15209
15210 echo "$as_me:15210: checking for header declaring getopt variables" >&5
15211 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15212 if test "${cf_cv_getopt_header+set}" = set; then
15213   echo $ECHO_N "(cached) $ECHO_C" >&6
15214 else
15215
15216 cf_cv_getopt_header=none
15217 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15218 do
15219 cat >conftest.$ac_ext <<_ACEOF
15220 #line 15220 "configure"
15221 #include "confdefs.h"
15222
15223 #include <$cf_header>
15224 int
15225 main ()
15226 {
15227 int x = optind; char *y = optarg
15228   ;
15229   return 0;
15230 }
15231 _ACEOF
15232 rm -f conftest.$ac_objext
15233 if { (eval echo "$as_me:15233: \"$ac_compile\"") >&5
15234   (eval $ac_compile) 2>&5
15235   ac_status=$?
15236   echo "$as_me:15236: \$? = $ac_status" >&5
15237   (exit $ac_status); } &&
15238          { ac_try='test -s conftest.$ac_objext'
15239   { (eval echo "$as_me:15239: \"$ac_try\"") >&5
15240   (eval $ac_try) 2>&5
15241   ac_status=$?
15242   echo "$as_me:15242: \$? = $ac_status" >&5
15243   (exit $ac_status); }; }; then
15244   cf_cv_getopt_header=$cf_header
15245  break
15246 else
15247   echo "$as_me: failed program was:" >&5
15248 cat conftest.$ac_ext >&5
15249 fi
15250 rm -f conftest.$ac_objext conftest.$ac_ext
15251 done
15252
15253 fi
15254 echo "$as_me:15254: result: $cf_cv_getopt_header" >&5
15255 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15256 if test $cf_cv_getopt_header != none ; then
15257
15258 cat >>confdefs.h <<\EOF
15259 #define HAVE_GETOPT_HEADER 1
15260 EOF
15261
15262 fi
15263 if test $cf_cv_getopt_header = getopt.h ; then
15264
15265 cat >>confdefs.h <<\EOF
15266 #define NEED_GETOPT_H 1
15267 EOF
15268
15269 fi
15270
15271 # check for ISC (this may also define _POSIX_SOURCE)
15272 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15273 if test "x$ISC" = xyes ; then
15274
15275 echo "$as_me:15275: checking for main in -lcposix" >&5
15276 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15277 if test "${ac_cv_lib_cposix_main+set}" = set; then
15278   echo $ECHO_N "(cached) $ECHO_C" >&6
15279 else
15280   ac_check_lib_save_LIBS=$LIBS
15281 LIBS="-lcposix  $LIBS"
15282 cat >conftest.$ac_ext <<_ACEOF
15283 #line 15283 "configure"
15284 #include "confdefs.h"
15285
15286 int
15287 main ()
15288 {
15289 main ();
15290   ;
15291   return 0;
15292 }
15293 _ACEOF
15294 rm -f conftest.$ac_objext conftest$ac_exeext
15295 if { (eval echo "$as_me:15295: \"$ac_link\"") >&5
15296   (eval $ac_link) 2>&5
15297   ac_status=$?
15298   echo "$as_me:15298: \$? = $ac_status" >&5
15299   (exit $ac_status); } &&
15300          { ac_try='test -s conftest$ac_exeext'
15301   { (eval echo "$as_me:15301: \"$ac_try\"") >&5
15302   (eval $ac_try) 2>&5
15303   ac_status=$?
15304   echo "$as_me:15304: \$? = $ac_status" >&5
15305   (exit $ac_status); }; }; then
15306   ac_cv_lib_cposix_main=yes
15307 else
15308   echo "$as_me: failed program was:" >&5
15309 cat conftest.$ac_ext >&5
15310 ac_cv_lib_cposix_main=no
15311 fi
15312 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15313 LIBS=$ac_check_lib_save_LIBS
15314 fi
15315 echo "$as_me:15315: result: $ac_cv_lib_cposix_main" >&5
15316 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15317 if test $ac_cv_lib_cposix_main = yes; then
15318   cat >>confdefs.h <<EOF
15319 #define HAVE_LIBCPOSIX 1
15320 EOF
15321
15322   LIBS="-lcposix $LIBS"
15323
15324 fi
15325
15326         echo "$as_me:15326: checking for bzero in -linet" >&5
15327 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15328 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15329   echo $ECHO_N "(cached) $ECHO_C" >&6
15330 else
15331   ac_check_lib_save_LIBS=$LIBS
15332 LIBS="-linet  $LIBS"
15333 cat >conftest.$ac_ext <<_ACEOF
15334 #line 15334 "configure"
15335 #include "confdefs.h"
15336
15337 /* Override any gcc2 internal prototype to avoid an error.  */
15338 #ifdef __cplusplus
15339 extern "C"
15340 #endif
15341 /* We use char because int might match the return type of a gcc2
15342    builtin and then its argument prototype would still apply.  */
15343 char bzero ();
15344 int
15345 main ()
15346 {
15347 bzero ();
15348   ;
15349   return 0;
15350 }
15351 _ACEOF
15352 rm -f conftest.$ac_objext conftest$ac_exeext
15353 if { (eval echo "$as_me:15353: \"$ac_link\"") >&5
15354   (eval $ac_link) 2>&5
15355   ac_status=$?
15356   echo "$as_me:15356: \$? = $ac_status" >&5
15357   (exit $ac_status); } &&
15358          { ac_try='test -s conftest$ac_exeext'
15359   { (eval echo "$as_me:15359: \"$ac_try\"") >&5
15360   (eval $ac_try) 2>&5
15361   ac_status=$?
15362   echo "$as_me:15362: \$? = $ac_status" >&5
15363   (exit $ac_status); }; }; then
15364   ac_cv_lib_inet_bzero=yes
15365 else
15366   echo "$as_me: failed program was:" >&5
15367 cat conftest.$ac_ext >&5
15368 ac_cv_lib_inet_bzero=no
15369 fi
15370 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15371 LIBS=$ac_check_lib_save_LIBS
15372 fi
15373 echo "$as_me:15373: result: $ac_cv_lib_inet_bzero" >&5
15374 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15375 if test $ac_cv_lib_inet_bzero = yes; then
15376
15377 cf_add_libs="-linet"
15378 # Filter out duplicates - this happens with badly-designed ".pc" files...
15379 for cf_add_1lib in $LIBS
15380 do
15381         for cf_add_2lib in $cf_add_libs
15382         do
15383                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15384                 then
15385                         cf_add_1lib=
15386                         break
15387                 fi
15388         done
15389         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15390 done
15391 LIBS="$cf_add_libs"
15392
15393 fi
15394 fi
15395
15396 echo "$as_me:15396: checking if sys/time.h works with sys/select.h" >&5
15397 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15398 if test "${cf_cv_sys_time_select+set}" = set; then
15399   echo $ECHO_N "(cached) $ECHO_C" >&6
15400 else
15401
15402 cat >conftest.$ac_ext <<_ACEOF
15403 #line 15403 "configure"
15404 #include "confdefs.h"
15405
15406 #include <sys/types.h>
15407 #ifdef HAVE_SYS_TIME_H
15408 #include <sys/time.h>
15409 #endif
15410 #ifdef HAVE_SYS_SELECT_H
15411 #include <sys/select.h>
15412 #endif
15413
15414 int
15415 main ()
15416 {
15417
15418   ;
15419   return 0;
15420 }
15421 _ACEOF
15422 rm -f conftest.$ac_objext
15423 if { (eval echo "$as_me:15423: \"$ac_compile\"") >&5
15424   (eval $ac_compile) 2>&5
15425   ac_status=$?
15426   echo "$as_me:15426: \$? = $ac_status" >&5
15427   (exit $ac_status); } &&
15428          { ac_try='test -s conftest.$ac_objext'
15429   { (eval echo "$as_me:15429: \"$ac_try\"") >&5
15430   (eval $ac_try) 2>&5
15431   ac_status=$?
15432   echo "$as_me:15432: \$? = $ac_status" >&5
15433   (exit $ac_status); }; }; then
15434   cf_cv_sys_time_select=yes
15435 else
15436   echo "$as_me: failed program was:" >&5
15437 cat conftest.$ac_ext >&5
15438 cf_cv_sys_time_select=no
15439 fi
15440 rm -f conftest.$ac_objext conftest.$ac_ext
15441
15442 fi
15443
15444 echo "$as_me:15444: result: $cf_cv_sys_time_select" >&5
15445 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15446 test "$cf_cv_sys_time_select" = yes &&
15447 cat >>confdefs.h <<\EOF
15448 #define HAVE_SYS_TIME_SELECT 1
15449 EOF
15450
15451 ###     checks for compiler characteristics
15452 ac_ext=c
15453 ac_cpp='$CPP $CPPFLAGS'
15454 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15455 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15456 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15457 ac_main_return=return
15458
15459 echo "$as_me:15459: checking for an ANSI C-conforming const" >&5
15460 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15461 if test "${ac_cv_c_const+set}" = set; then
15462   echo $ECHO_N "(cached) $ECHO_C" >&6
15463 else
15464   cat >conftest.$ac_ext <<_ACEOF
15465 #line 15465 "configure"
15466 #include "confdefs.h"
15467
15468 int
15469 main ()
15470 {
15471 /* FIXME: Include the comments suggested by Paul. */
15472 #ifndef __cplusplus
15473   /* Ultrix mips cc rejects this.  */
15474   typedef int charset[2];
15475   const charset x;
15476   /* SunOS 4.1.1 cc rejects this.  */
15477   char const *const *ccp;
15478   char **p;
15479   /* NEC SVR4.0.2 mips cc rejects this.  */
15480   struct point {int x, y;};
15481   static struct point const zero = {0,0};
15482   /* AIX XL C 1.02.0.0 rejects this.
15483      It does not let you subtract one const X* pointer from another in
15484      an arm of an if-expression whose if-part is not a constant
15485      expression */
15486   const char *g = "string";
15487   ccp = &g + (g ? g-g : 0);
15488   /* HPUX 7.0 cc rejects these. */
15489   ++ccp;
15490   p = (char**) ccp;
15491   ccp = (char const *const *) p;
15492   { /* SCO 3.2v4 cc rejects this.  */
15493     char *t;
15494     char const *s = 0 ? (char *) 0 : (char const *) 0;
15495
15496     *t++ = 0;
15497   }
15498   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15499     int x[] = {25, 17};
15500     const int *foo = &x[0];
15501     ++foo;
15502   }
15503   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15504     typedef const int *iptr;
15505     iptr p = 0;
15506     ++p;
15507   }
15508   { /* AIX XL C 1.02.0.0 rejects this saying
15509        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15510     struct s { int j; const int *ap[3]; };
15511     struct s *b; b->j = 5;
15512   }
15513   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15514     const int foo = 10;
15515   }
15516 #endif
15517
15518   ;
15519   return 0;
15520 }
15521 _ACEOF
15522 rm -f conftest.$ac_objext
15523 if { (eval echo "$as_me:15523: \"$ac_compile\"") >&5
15524   (eval $ac_compile) 2>&5
15525   ac_status=$?
15526   echo "$as_me:15526: \$? = $ac_status" >&5
15527   (exit $ac_status); } &&
15528          { ac_try='test -s conftest.$ac_objext'
15529   { (eval echo "$as_me:15529: \"$ac_try\"") >&5
15530   (eval $ac_try) 2>&5
15531   ac_status=$?
15532   echo "$as_me:15532: \$? = $ac_status" >&5
15533   (exit $ac_status); }; }; then
15534   ac_cv_c_const=yes
15535 else
15536   echo "$as_me: failed program was:" >&5
15537 cat conftest.$ac_ext >&5
15538 ac_cv_c_const=no
15539 fi
15540 rm -f conftest.$ac_objext conftest.$ac_ext
15541 fi
15542 echo "$as_me:15542: result: $ac_cv_c_const" >&5
15543 echo "${ECHO_T}$ac_cv_c_const" >&6
15544 if test $ac_cv_c_const = no; then
15545
15546 cat >>confdefs.h <<\EOF
15547 #define const
15548 EOF
15549
15550 fi
15551
15552 echo "$as_me:15552: checking for inline" >&5
15553 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15554 if test "${ac_cv_c_inline+set}" = set; then
15555   echo $ECHO_N "(cached) $ECHO_C" >&6
15556 else
15557   ac_cv_c_inline=no
15558 for ac_kw in inline __inline__ __inline; do
15559   cat >conftest.$ac_ext <<_ACEOF
15560 #line 15560 "configure"
15561 #include "confdefs.h"
15562 #ifndef __cplusplus
15563 static $ac_kw int static_foo () {return 0; }
15564 $ac_kw int foo () {return 0; }
15565 #endif
15566
15567 _ACEOF
15568 rm -f conftest.$ac_objext
15569 if { (eval echo "$as_me:15569: \"$ac_compile\"") >&5
15570   (eval $ac_compile) 2>&5
15571   ac_status=$?
15572   echo "$as_me:15572: \$? = $ac_status" >&5
15573   (exit $ac_status); } &&
15574          { ac_try='test -s conftest.$ac_objext'
15575   { (eval echo "$as_me:15575: \"$ac_try\"") >&5
15576   (eval $ac_try) 2>&5
15577   ac_status=$?
15578   echo "$as_me:15578: \$? = $ac_status" >&5
15579   (exit $ac_status); }; }; then
15580   ac_cv_c_inline=$ac_kw; break
15581 else
15582   echo "$as_me: failed program was:" >&5
15583 cat conftest.$ac_ext >&5
15584 fi
15585 rm -f conftest.$ac_objext conftest.$ac_ext
15586 done
15587
15588 fi
15589 echo "$as_me:15589: result: $ac_cv_c_inline" >&5
15590 echo "${ECHO_T}$ac_cv_c_inline" >&6
15591 case $ac_cv_c_inline in
15592   inline | yes) ;;
15593   no)
15594 cat >>confdefs.h <<\EOF
15595 #define inline
15596 EOF
15597  ;;
15598   *)  cat >>confdefs.h <<EOF
15599 #define inline $ac_cv_c_inline
15600 EOF
15601  ;;
15602 esac
15603
15604 NCURSES_INLINE=
15605 if test "$ac_cv_c_inline" != no ; then
15606   NCURSES_INLINE=inline
15607   if test "$INTEL_COMPILER" = yes
15608   then
15609     :
15610   elif test "$CLANG_COMPILER" = yes
15611   then
15612     :
15613   elif test "$GCC" = yes
15614   then
15615     echo "$as_me:15615: checking if $CC supports options to tune inlining" >&5
15616 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15617 if test "${cf_cv_gcc_inline+set}" = set; then
15618   echo $ECHO_N "(cached) $ECHO_C" >&6
15619 else
15620
15621       cf_save_CFLAGS=$CFLAGS
15622       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15623       cat >conftest.$ac_ext <<_ACEOF
15624 #line 15624 "configure"
15625 #include "confdefs.h"
15626 inline int foo(void) { return 1; }
15627 int
15628 main ()
15629 {
15630 ${cf_cv_main_return:-return} foo()
15631   ;
15632   return 0;
15633 }
15634 _ACEOF
15635 rm -f conftest.$ac_objext
15636 if { (eval echo "$as_me:15636: \"$ac_compile\"") >&5
15637   (eval $ac_compile) 2>&5
15638   ac_status=$?
15639   echo "$as_me:15639: \$? = $ac_status" >&5
15640   (exit $ac_status); } &&
15641          { ac_try='test -s conftest.$ac_objext'
15642   { (eval echo "$as_me:15642: \"$ac_try\"") >&5
15643   (eval $ac_try) 2>&5
15644   ac_status=$?
15645   echo "$as_me:15645: \$? = $ac_status" >&5
15646   (exit $ac_status); }; }; then
15647   cf_cv_gcc_inline=yes
15648 else
15649   echo "$as_me: failed program was:" >&5
15650 cat conftest.$ac_ext >&5
15651 cf_cv_gcc_inline=no
15652 fi
15653 rm -f conftest.$ac_objext conftest.$ac_ext
15654       CFLAGS=$cf_save_CFLAGS
15655
15656 fi
15657 echo "$as_me:15657: result: $cf_cv_gcc_inline" >&5
15658 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15659     if test "$cf_cv_gcc_inline" = yes ; then
15660
15661 cf_fix_cppflags=no
15662 cf_new_cflags=
15663 cf_new_cppflags=
15664 cf_new_extra_cppflags=
15665
15666 for cf_add_cflags in --param max-inline-insns-single=1200
15667 do
15668 case $cf_fix_cppflags in
15669 no)
15670         case $cf_add_cflags in #(vi
15671         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15672                 case $cf_add_cflags in
15673                 -D*)
15674                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15675
15676                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15677                                 && test -z "${cf_tst_cflags}" \
15678                                 && cf_fix_cppflags=yes
15679
15680                         if test $cf_fix_cppflags = yes ; then
15681                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15682                                 continue
15683                         elif test "${cf_tst_cflags}" = "\"'" ; then
15684                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15685                                 continue
15686                         fi
15687                         ;;
15688                 esac
15689                 case "$CPPFLAGS" in
15690                 *$cf_add_cflags) #(vi
15691                         ;;
15692                 *) #(vi
15693                         case $cf_add_cflags in #(vi
15694                         -D*)
15695                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15696
15697 CPPFLAGS=`echo "$CPPFLAGS" | \
15698         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15699                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15700
15701                                 ;;
15702                         esac
15703                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15704                         ;;
15705                 esac
15706                 ;;
15707         *)
15708                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15709                 ;;
15710         esac
15711         ;;
15712 yes)
15713         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15714
15715         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15716
15717         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15718                 && test -z "${cf_tst_cflags}" \
15719                 && cf_fix_cppflags=no
15720         ;;
15721 esac
15722 done
15723
15724 if test -n "$cf_new_cflags" ; then
15725
15726         CFLAGS="$CFLAGS $cf_new_cflags"
15727 fi
15728
15729 if test -n "$cf_new_cppflags" ; then
15730
15731         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15732 fi
15733
15734 if test -n "$cf_new_extra_cppflags" ; then
15735
15736         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15737 fi
15738
15739     fi
15740   fi
15741 fi
15742
15743 echo "$as_me:15743: checking for signal global datatype" >&5
15744 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15745 if test "${cf_cv_sig_atomic_t+set}" = set; then
15746   echo $ECHO_N "(cached) $ECHO_C" >&6
15747 else
15748
15749         for cf_type in \
15750                 "volatile sig_atomic_t" \
15751                 "sig_atomic_t" \
15752                 "int"
15753         do
15754         cat >conftest.$ac_ext <<_ACEOF
15755 #line 15755 "configure"
15756 #include "confdefs.h"
15757
15758 #include <sys/types.h>
15759 #include <signal.h>
15760 #include <stdio.h>
15761
15762 extern $cf_type x;
15763 $cf_type x;
15764 static void handler(int sig)
15765 {
15766         x = 5;
15767 }
15768 int
15769 main ()
15770 {
15771 signal(SIGINT, handler);
15772                  x = 1
15773   ;
15774   return 0;
15775 }
15776 _ACEOF
15777 rm -f conftest.$ac_objext
15778 if { (eval echo "$as_me:15778: \"$ac_compile\"") >&5
15779   (eval $ac_compile) 2>&5
15780   ac_status=$?
15781   echo "$as_me:15781: \$? = $ac_status" >&5
15782   (exit $ac_status); } &&
15783          { ac_try='test -s conftest.$ac_objext'
15784   { (eval echo "$as_me:15784: \"$ac_try\"") >&5
15785   (eval $ac_try) 2>&5
15786   ac_status=$?
15787   echo "$as_me:15787: \$? = $ac_status" >&5
15788   (exit $ac_status); }; }; then
15789   cf_cv_sig_atomic_t=$cf_type
15790 else
15791   echo "$as_me: failed program was:" >&5
15792 cat conftest.$ac_ext >&5
15793 cf_cv_sig_atomic_t=no
15794 fi
15795 rm -f conftest.$ac_objext conftest.$ac_ext
15796                 test "$cf_cv_sig_atomic_t" != no && break
15797         done
15798
15799 fi
15800
15801 echo "$as_me:15801: result: $cf_cv_sig_atomic_t" >&5
15802 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15803 test "$cf_cv_sig_atomic_t" != no &&
15804 cat >>confdefs.h <<EOF
15805 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15806 EOF
15807
15808 if test $NCURSES_CHTYPE = auto ; then
15809
15810 echo "$as_me:15810: checking for type of chtype" >&5
15811 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15812 if test "${cf_cv_typeof_chtype+set}" = set; then
15813   echo $ECHO_N "(cached) $ECHO_C" >&6
15814 else
15815
15816                 if test "$cross_compiling" = yes; then
15817   cf_cv_typeof_chtype=long
15818 else
15819   cat >conftest.$ac_ext <<_ACEOF
15820 #line 15820 "configure"
15821 #include "confdefs.h"
15822
15823 #define WANT_BITS 31
15824 #include <stdio.h>
15825 int main()
15826 {
15827         FILE *fp = fopen("cf_test.out", "w");
15828         if (fp != 0) {
15829                 char *result = "long";
15830                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15831                         int n;
15832                         unsigned int x, y;
15833                         for (n = 0; n < WANT_BITS; n++) {
15834                                 x = (1 << n);
15835                                 y = (x >> n);
15836                                 if (y != 1 || x == 0) {
15837                                         x = 0;
15838                                         break;
15839                                 }
15840                         }
15841                         /*
15842                          * If x is nonzero, an int is big enough for the bits
15843                          * that we want.
15844                          */
15845                         result = (x != 0) ? "int" : "long";
15846                 }
15847                 fputs(result, fp);
15848                 fclose(fp);
15849         }
15850         ${cf_cv_main_return:-return}(0);
15851 }
15852
15853 _ACEOF
15854 rm -f conftest$ac_exeext
15855 if { (eval echo "$as_me:15855: \"$ac_link\"") >&5
15856   (eval $ac_link) 2>&5
15857   ac_status=$?
15858   echo "$as_me:15858: \$? = $ac_status" >&5
15859   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15860   { (eval echo "$as_me:15860: \"$ac_try\"") >&5
15861   (eval $ac_try) 2>&5
15862   ac_status=$?
15863   echo "$as_me:15863: \$? = $ac_status" >&5
15864   (exit $ac_status); }; }; then
15865   cf_cv_typeof_chtype=`cat cf_test.out`
15866 else
15867   echo "$as_me: program exited with status $ac_status" >&5
15868 echo "$as_me: failed program was:" >&5
15869 cat conftest.$ac_ext >&5
15870 cf_cv_typeof_chtype=long
15871 fi
15872 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15873 fi
15874                 rm -f cf_test.out
15875
15876 fi
15877
15878 echo "$as_me:15878: result: $cf_cv_typeof_chtype" >&5
15879 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15880
15881 cat >>confdefs.h <<EOF
15882 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15883 EOF
15884
15885 else
15886         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15887 fi
15888 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15889
15890 echo "$as_me:15890: checking if unsigned literals are legal" >&5
15891 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15892 if test "${cf_cv_unsigned_literals+set}" = set; then
15893   echo $ECHO_N "(cached) $ECHO_C" >&6
15894 else
15895
15896         cat >conftest.$ac_ext <<_ACEOF
15897 #line 15897 "configure"
15898 #include "confdefs.h"
15899
15900 int
15901 main ()
15902 {
15903 long x = 1L + 1UL + 1U + 1
15904   ;
15905   return 0;
15906 }
15907 _ACEOF
15908 rm -f conftest.$ac_objext
15909 if { (eval echo "$as_me:15909: \"$ac_compile\"") >&5
15910   (eval $ac_compile) 2>&5
15911   ac_status=$?
15912   echo "$as_me:15912: \$? = $ac_status" >&5
15913   (exit $ac_status); } &&
15914          { ac_try='test -s conftest.$ac_objext'
15915   { (eval echo "$as_me:15915: \"$ac_try\"") >&5
15916   (eval $ac_try) 2>&5
15917   ac_status=$?
15918   echo "$as_me:15918: \$? = $ac_status" >&5
15919   (exit $ac_status); }; }; then
15920   cf_cv_unsigned_literals=yes
15921 else
15922   echo "$as_me: failed program was:" >&5
15923 cat conftest.$ac_ext >&5
15924 cf_cv_unsigned_literals=no
15925 fi
15926 rm -f conftest.$ac_objext conftest.$ac_ext
15927
15928 fi
15929
15930 echo "$as_me:15930: result: $cf_cv_unsigned_literals" >&5
15931 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15932
15933 cf_cv_1UL="1"
15934 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15935 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15936
15937 if test $NCURSES_MMASK_T = auto ; then
15938         cf_cv_typeof_mmask_t=long
15939 else
15940         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15941 fi
15942 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15943
15944 ###     Checks for external-data
15945
15946 echo "$as_me:15946: checking if external errno is declared" >&5
15947 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15948 if test "${cf_cv_dcl_errno+set}" = set; then
15949   echo $ECHO_N "(cached) $ECHO_C" >&6
15950 else
15951
15952     cat >conftest.$ac_ext <<_ACEOF
15953 #line 15953 "configure"
15954 #include "confdefs.h"
15955
15956 #ifdef HAVE_STDLIB_H
15957 #include <stdlib.h>
15958 #endif
15959 #include <stdio.h>
15960 #include <sys/types.h>
15961 #include <errno.h>
15962 int
15963 main ()
15964 {
15965 int x = (int) errno
15966   ;
15967   return 0;
15968 }
15969 _ACEOF
15970 rm -f conftest.$ac_objext
15971 if { (eval echo "$as_me:15971: \"$ac_compile\"") >&5
15972   (eval $ac_compile) 2>&5
15973   ac_status=$?
15974   echo "$as_me:15974: \$? = $ac_status" >&5
15975   (exit $ac_status); } &&
15976          { ac_try='test -s conftest.$ac_objext'
15977   { (eval echo "$as_me:15977: \"$ac_try\"") >&5
15978   (eval $ac_try) 2>&5
15979   ac_status=$?
15980   echo "$as_me:15980: \$? = $ac_status" >&5
15981   (exit $ac_status); }; }; then
15982   cf_cv_dcl_errno=yes
15983 else
15984   echo "$as_me: failed program was:" >&5
15985 cat conftest.$ac_ext >&5
15986 cf_cv_dcl_errno=no
15987 fi
15988 rm -f conftest.$ac_objext conftest.$ac_ext
15989
15990 fi
15991 echo "$as_me:15991: result: $cf_cv_dcl_errno" >&5
15992 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15993
15994 if test "$cf_cv_dcl_errno" = no ; then
15995
15996 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15997
15998     cat >>confdefs.h <<EOF
15999 #define $cf_result 1
16000 EOF
16001
16002 fi
16003
16004 # It's possible (for near-UNIX clones) that the data doesn't exist
16005
16006 echo "$as_me:16006: checking if external errno exists" >&5
16007 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16008 if test "${cf_cv_have_errno+set}" = set; then
16009   echo $ECHO_N "(cached) $ECHO_C" >&6
16010 else
16011
16012     cat >conftest.$ac_ext <<_ACEOF
16013 #line 16013 "configure"
16014 #include "confdefs.h"
16015
16016 #undef errno
16017 extern int errno;
16018
16019 int
16020 main ()
16021 {
16022 errno = 2
16023   ;
16024   return 0;
16025 }
16026 _ACEOF
16027 rm -f conftest.$ac_objext conftest$ac_exeext
16028 if { (eval echo "$as_me:16028: \"$ac_link\"") >&5
16029   (eval $ac_link) 2>&5
16030   ac_status=$?
16031   echo "$as_me:16031: \$? = $ac_status" >&5
16032   (exit $ac_status); } &&
16033          { ac_try='test -s conftest$ac_exeext'
16034   { (eval echo "$as_me:16034: \"$ac_try\"") >&5
16035   (eval $ac_try) 2>&5
16036   ac_status=$?
16037   echo "$as_me:16037: \$? = $ac_status" >&5
16038   (exit $ac_status); }; }; then
16039   cf_cv_have_errno=yes
16040 else
16041   echo "$as_me: failed program was:" >&5
16042 cat conftest.$ac_ext >&5
16043 cf_cv_have_errno=no
16044 fi
16045 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16046
16047 fi
16048 echo "$as_me:16048: result: $cf_cv_have_errno" >&5
16049 echo "${ECHO_T}$cf_cv_have_errno" >&6
16050
16051 if test "$cf_cv_have_errno" = yes ; then
16052
16053 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16054
16055     cat >>confdefs.h <<EOF
16056 #define $cf_result 1
16057 EOF
16058
16059 fi
16060
16061 echo "$as_me:16061: checking if data-only library module links" >&5
16062 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16063 if test "${cf_cv_link_dataonly+set}" = set; then
16064   echo $ECHO_N "(cached) $ECHO_C" >&6
16065 else
16066
16067         rm -f conftest.a
16068         cat >conftest.$ac_ext <<EOF
16069 #line 16069 "configure"
16070 int     testdata[3] = { 123, 456, 789 };
16071 EOF
16072         if { (eval echo "$as_me:16072: \"$ac_compile\"") >&5
16073   (eval $ac_compile) 2>&5
16074   ac_status=$?
16075   echo "$as_me:16075: \$? = $ac_status" >&5
16076   (exit $ac_status); } ; then
16077                 mv conftest.o data.o && \
16078                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16079         fi
16080         rm -f conftest.$ac_ext data.o
16081         cat >conftest.$ac_ext <<EOF
16082 #line 16082 "configure"
16083 int     testfunc()
16084 {
16085 #if defined(NeXT)
16086         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16087 #else
16088         extern int testdata[3];
16089         return testdata[0] == 123
16090            &&  testdata[1] == 456
16091            &&  testdata[2] == 789;
16092 #endif
16093 }
16094 EOF
16095         if { (eval echo "$as_me:16095: \"$ac_compile\"") >&5
16096   (eval $ac_compile) 2>&5
16097   ac_status=$?
16098   echo "$as_me:16098: \$? = $ac_status" >&5
16099   (exit $ac_status); }; then
16100                 mv conftest.o func.o && \
16101                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16102         fi
16103         rm -f conftest.$ac_ext func.o
16104         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16105         cf_saveLIBS="$LIBS"
16106         LIBS="conftest.a $LIBS"
16107         if test "$cross_compiling" = yes; then
16108   cf_cv_link_dataonly=unknown
16109 else
16110   cat >conftest.$ac_ext <<_ACEOF
16111 #line 16111 "configure"
16112 #include "confdefs.h"
16113
16114         int main()
16115         {
16116                 extern int testfunc();
16117                 ${cf_cv_main_return:-return} (!testfunc());
16118         }
16119
16120 _ACEOF
16121 rm -f conftest$ac_exeext
16122 if { (eval echo "$as_me:16122: \"$ac_link\"") >&5
16123   (eval $ac_link) 2>&5
16124   ac_status=$?
16125   echo "$as_me:16125: \$? = $ac_status" >&5
16126   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16127   { (eval echo "$as_me:16127: \"$ac_try\"") >&5
16128   (eval $ac_try) 2>&5
16129   ac_status=$?
16130   echo "$as_me:16130: \$? = $ac_status" >&5
16131   (exit $ac_status); }; }; then
16132   cf_cv_link_dataonly=yes
16133 else
16134   echo "$as_me: program exited with status $ac_status" >&5
16135 echo "$as_me: failed program was:" >&5
16136 cat conftest.$ac_ext >&5
16137 cf_cv_link_dataonly=no
16138 fi
16139 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16140 fi
16141         LIBS="$cf_saveLIBS"
16142
16143 fi
16144
16145 echo "$as_me:16145: result: $cf_cv_link_dataonly" >&5
16146 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16147
16148 if test "$cf_cv_link_dataonly" = no ; then
16149
16150 cat >>confdefs.h <<\EOF
16151 #define BROKEN_LINKER 1
16152 EOF
16153
16154         BROKEN_LINKER=1
16155 fi
16156
16157 ###     Checks for library functions.
16158
16159 for ac_func in \
16160 getcwd \
16161 getegid \
16162 geteuid \
16163 getopt \
16164 getttynam \
16165 issetugid \
16166 poll \
16167 putenv \
16168 remove \
16169 select \
16170 setbuf \
16171 setbuffer \
16172 setenv \
16173 setvbuf \
16174 sigaction \
16175 sigvec \
16176 strdup \
16177 strstr \
16178 tcgetpgrp \
16179 times \
16180 vsnprintf \
16181
16182 do
16183 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16184 echo "$as_me:16184: checking for $ac_func" >&5
16185 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16186 if eval "test \"\${$as_ac_var+set}\" = set"; then
16187   echo $ECHO_N "(cached) $ECHO_C" >&6
16188 else
16189   cat >conftest.$ac_ext <<_ACEOF
16190 #line 16190 "configure"
16191 #include "confdefs.h"
16192 /* System header to define __stub macros and hopefully few prototypes,
16193     which can conflict with char $ac_func (); below.  */
16194 #include <assert.h>
16195 /* Override any gcc2 internal prototype to avoid an error.  */
16196 #ifdef __cplusplus
16197 extern "C"
16198 #endif
16199 /* We use char because int might match the return type of a gcc2
16200    builtin and then its argument prototype would still apply.  */
16201 char $ac_func ();
16202 char (*f) ();
16203
16204 int
16205 main ()
16206 {
16207 /* The GNU C library defines this for functions which it implements
16208     to always fail with ENOSYS.  Some functions are actually named
16209     something starting with __ and the normal name is an alias.  */
16210 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16211 choke me
16212 #else
16213 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16214 #endif
16215
16216   ;
16217   return 0;
16218 }
16219 _ACEOF
16220 rm -f conftest.$ac_objext conftest$ac_exeext
16221 if { (eval echo "$as_me:16221: \"$ac_link\"") >&5
16222   (eval $ac_link) 2>&5
16223   ac_status=$?
16224   echo "$as_me:16224: \$? = $ac_status" >&5
16225   (exit $ac_status); } &&
16226          { ac_try='test -s conftest$ac_exeext'
16227   { (eval echo "$as_me:16227: \"$ac_try\"") >&5
16228   (eval $ac_try) 2>&5
16229   ac_status=$?
16230   echo "$as_me:16230: \$? = $ac_status" >&5
16231   (exit $ac_status); }; }; then
16232   eval "$as_ac_var=yes"
16233 else
16234   echo "$as_me: failed program was:" >&5
16235 cat conftest.$ac_ext >&5
16236 eval "$as_ac_var=no"
16237 fi
16238 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16239 fi
16240 echo "$as_me:16240: result: `eval echo '${'$as_ac_var'}'`" >&5
16241 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16242 if test `eval echo '${'$as_ac_var'}'` = yes; then
16243   cat >>confdefs.h <<EOF
16244 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16245 EOF
16246
16247 fi
16248 done
16249
16250 if test "x$ac_cv_func_getopt" = xno &&
16251    test "x$cf_with_progs$cf_with_tests" != xnono; then
16252         { { echo "$as_me:16252: error: getopt is required for building programs" >&5
16253 echo "$as_me: error: getopt is required for building programs" >&2;}
16254    { (exit 1); exit 1; }; }
16255 fi
16256
16257 if test "x$with_getcap" = "xyes" ; then
16258
16259 echo "$as_me:16259: checking for terminal-capability database functions" >&5
16260 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16261 if test "${cf_cv_cgetent+set}" = set; then
16262   echo $ECHO_N "(cached) $ECHO_C" >&6
16263 else
16264
16265 cat >conftest.$ac_ext <<_ACEOF
16266 #line 16266 "configure"
16267 #include "confdefs.h"
16268
16269 #include <stdlib.h>
16270 int
16271 main ()
16272 {
16273
16274         char temp[128];
16275         char *buf = temp;
16276         char *db_array = temp;
16277         cgetent(&buf, &db_array, "vt100");
16278         cgetcap(buf, "tc", '=');
16279         cgetmatch(buf, "tc");
16280
16281   ;
16282   return 0;
16283 }
16284 _ACEOF
16285 rm -f conftest.$ac_objext conftest$ac_exeext
16286 if { (eval echo "$as_me:16286: \"$ac_link\"") >&5
16287   (eval $ac_link) 2>&5
16288   ac_status=$?
16289   echo "$as_me:16289: \$? = $ac_status" >&5
16290   (exit $ac_status); } &&
16291          { ac_try='test -s conftest$ac_exeext'
16292   { (eval echo "$as_me:16292: \"$ac_try\"") >&5
16293   (eval $ac_try) 2>&5
16294   ac_status=$?
16295   echo "$as_me:16295: \$? = $ac_status" >&5
16296   (exit $ac_status); }; }; then
16297   cf_cv_cgetent=yes
16298 else
16299   echo "$as_me: failed program was:" >&5
16300 cat conftest.$ac_ext >&5
16301 cf_cv_cgetent=no
16302 fi
16303 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16304
16305 fi
16306 echo "$as_me:16306: result: $cf_cv_cgetent" >&5
16307 echo "${ECHO_T}$cf_cv_cgetent" >&6
16308
16309 if test "$cf_cv_cgetent" = yes
16310 then
16311
16312 cat >>confdefs.h <<\EOF
16313 #define HAVE_BSD_CGETENT 1
16314 EOF
16315
16316 echo "$as_me:16316: checking if cgetent uses const parameter" >&5
16317 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16318 if test "${cf_cv_cgetent_const+set}" = set; then
16319   echo $ECHO_N "(cached) $ECHO_C" >&6
16320 else
16321
16322 cat >conftest.$ac_ext <<_ACEOF
16323 #line 16323 "configure"
16324 #include "confdefs.h"
16325
16326 #include <stdlib.h>
16327 int
16328 main ()
16329 {
16330
16331         char temp[128];
16332         char *buf = temp;
16333 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16334         const char *db_array = temp;
16335         cgetent(&buf, &db_array, "vt100");
16336 #endif
16337         cgetcap(buf, "tc", '=');
16338         cgetmatch(buf, "tc");
16339
16340   ;
16341   return 0;
16342 }
16343 _ACEOF
16344 rm -f conftest.$ac_objext conftest$ac_exeext
16345 if { (eval echo "$as_me:16345: \"$ac_link\"") >&5
16346   (eval $ac_link) 2>&5
16347   ac_status=$?
16348   echo "$as_me:16348: \$? = $ac_status" >&5
16349   (exit $ac_status); } &&
16350          { ac_try='test -s conftest$ac_exeext'
16351   { (eval echo "$as_me:16351: \"$ac_try\"") >&5
16352   (eval $ac_try) 2>&5
16353   ac_status=$?
16354   echo "$as_me:16354: \$? = $ac_status" >&5
16355   (exit $ac_status); }; }; then
16356   cf_cv_cgetent_const=yes
16357 else
16358   echo "$as_me: failed program was:" >&5
16359 cat conftest.$ac_ext >&5
16360 cf_cv_cgetent_const=no
16361 fi
16362 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16363
16364 fi
16365 echo "$as_me:16365: result: $cf_cv_cgetent_const" >&5
16366 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16367         if test "$cf_cv_cgetent_const" = yes
16368         then
16369
16370 cat >>confdefs.h <<EOF
16371 #define CGETENT_CONST const
16372 EOF
16373
16374         fi
16375 fi
16376
16377 fi
16378
16379 echo "$as_me:16379: checking for isascii" >&5
16380 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16381 if test "${cf_cv_have_isascii+set}" = set; then
16382   echo $ECHO_N "(cached) $ECHO_C" >&6
16383 else
16384
16385         cat >conftest.$ac_ext <<_ACEOF
16386 #line 16386 "configure"
16387 #include "confdefs.h"
16388 #include <ctype.h>
16389 int
16390 main ()
16391 {
16392 int x = isascii(' ')
16393   ;
16394   return 0;
16395 }
16396 _ACEOF
16397 rm -f conftest.$ac_objext conftest$ac_exeext
16398 if { (eval echo "$as_me:16398: \"$ac_link\"") >&5
16399   (eval $ac_link) 2>&5
16400   ac_status=$?
16401   echo "$as_me:16401: \$? = $ac_status" >&5
16402   (exit $ac_status); } &&
16403          { ac_try='test -s conftest$ac_exeext'
16404   { (eval echo "$as_me:16404: \"$ac_try\"") >&5
16405   (eval $ac_try) 2>&5
16406   ac_status=$?
16407   echo "$as_me:16407: \$? = $ac_status" >&5
16408   (exit $ac_status); }; }; then
16409   cf_cv_have_isascii=yes
16410 else
16411   echo "$as_me: failed program was:" >&5
16412 cat conftest.$ac_ext >&5
16413 cf_cv_have_isascii=no
16414 fi
16415 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16416
16417 fi
16418 echo "$as_me:16418: result: $cf_cv_have_isascii" >&5
16419 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16420 test "$cf_cv_have_isascii" = yes &&
16421 cat >>confdefs.h <<\EOF
16422 #define HAVE_ISASCII 1
16423 EOF
16424
16425 if test "$ac_cv_func_sigaction" = yes; then
16426 echo "$as_me:16426: checking whether sigaction needs _POSIX_SOURCE" >&5
16427 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16428 cat >conftest.$ac_ext <<_ACEOF
16429 #line 16429 "configure"
16430 #include "confdefs.h"
16431
16432 #include <sys/types.h>
16433 #include <signal.h>
16434 int
16435 main ()
16436 {
16437 struct sigaction act
16438   ;
16439   return 0;
16440 }
16441 _ACEOF
16442 rm -f conftest.$ac_objext
16443 if { (eval echo "$as_me:16443: \"$ac_compile\"") >&5
16444   (eval $ac_compile) 2>&5
16445   ac_status=$?
16446   echo "$as_me:16446: \$? = $ac_status" >&5
16447   (exit $ac_status); } &&
16448          { ac_try='test -s conftest.$ac_objext'
16449   { (eval echo "$as_me:16449: \"$ac_try\"") >&5
16450   (eval $ac_try) 2>&5
16451   ac_status=$?
16452   echo "$as_me:16452: \$? = $ac_status" >&5
16453   (exit $ac_status); }; }; then
16454   sigact_bad=no
16455 else
16456   echo "$as_me: failed program was:" >&5
16457 cat conftest.$ac_ext >&5
16458
16459 cat >conftest.$ac_ext <<_ACEOF
16460 #line 16460 "configure"
16461 #include "confdefs.h"
16462
16463 #define _POSIX_SOURCE
16464 #include <sys/types.h>
16465 #include <signal.h>
16466 int
16467 main ()
16468 {
16469 struct sigaction act
16470   ;
16471   return 0;
16472 }
16473 _ACEOF
16474 rm -f conftest.$ac_objext
16475 if { (eval echo "$as_me:16475: \"$ac_compile\"") >&5
16476   (eval $ac_compile) 2>&5
16477   ac_status=$?
16478   echo "$as_me:16478: \$? = $ac_status" >&5
16479   (exit $ac_status); } &&
16480          { ac_try='test -s conftest.$ac_objext'
16481   { (eval echo "$as_me:16481: \"$ac_try\"") >&5
16482   (eval $ac_try) 2>&5
16483   ac_status=$?
16484   echo "$as_me:16484: \$? = $ac_status" >&5
16485   (exit $ac_status); }; }; then
16486   sigact_bad=yes
16487
16488 cat >>confdefs.h <<\EOF
16489 #define _POSIX_SOURCE 1
16490 EOF
16491
16492 else
16493   echo "$as_me: failed program was:" >&5
16494 cat conftest.$ac_ext >&5
16495 sigact_bad=unknown
16496 fi
16497 rm -f conftest.$ac_objext conftest.$ac_ext
16498 fi
16499 rm -f conftest.$ac_objext conftest.$ac_ext
16500 echo "$as_me:16500: result: $sigact_bad" >&5
16501 echo "${ECHO_T}$sigact_bad" >&6
16502 fi
16503
16504 echo "$as_me:16504: checking if nanosleep really works" >&5
16505 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16506 if test "${cf_cv_func_nanosleep+set}" = set; then
16507   echo $ECHO_N "(cached) $ECHO_C" >&6
16508 else
16509
16510 if test "$cross_compiling" = yes; then
16511   cf_cv_func_nanosleep=unknown
16512 else
16513   cat >conftest.$ac_ext <<_ACEOF
16514 #line 16514 "configure"
16515 #include "confdefs.h"
16516
16517 #include <stdio.h>
16518 #include <errno.h>
16519 #include <time.h>
16520
16521 #ifdef HAVE_SYS_TIME_H
16522 #include <sys/time.h>
16523 #endif
16524
16525 int main() {
16526         struct timespec ts1, ts2;
16527         int code;
16528         ts1.tv_sec  = 0;
16529         ts1.tv_nsec = 750000000;
16530         ts2.tv_sec  = 0;
16531         ts2.tv_nsec = 0;
16532         errno = 0;
16533         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16534         ${cf_cv_main_return:-return}(code != 0);
16535 }
16536
16537 _ACEOF
16538 rm -f conftest$ac_exeext
16539 if { (eval echo "$as_me:16539: \"$ac_link\"") >&5
16540   (eval $ac_link) 2>&5
16541   ac_status=$?
16542   echo "$as_me:16542: \$? = $ac_status" >&5
16543   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16544   { (eval echo "$as_me:16544: \"$ac_try\"") >&5
16545   (eval $ac_try) 2>&5
16546   ac_status=$?
16547   echo "$as_me:16547: \$? = $ac_status" >&5
16548   (exit $ac_status); }; }; then
16549   cf_cv_func_nanosleep=yes
16550 else
16551   echo "$as_me: program exited with status $ac_status" >&5
16552 echo "$as_me: failed program was:" >&5
16553 cat conftest.$ac_ext >&5
16554 cf_cv_func_nanosleep=no
16555 fi
16556 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16557 fi
16558 fi
16559 echo "$as_me:16559: result: $cf_cv_func_nanosleep" >&5
16560 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16561
16562 test "$cf_cv_func_nanosleep" = "yes" &&
16563 cat >>confdefs.h <<\EOF
16564 #define HAVE_NANOSLEEP 1
16565 EOF
16566
16567 for ac_header in \
16568 termio.h \
16569 termios.h \
16570 unistd.h \
16571
16572 do
16573 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16574 echo "$as_me:16574: checking for $ac_header" >&5
16575 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16576 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16577   echo $ECHO_N "(cached) $ECHO_C" >&6
16578 else
16579   cat >conftest.$ac_ext <<_ACEOF
16580 #line 16580 "configure"
16581 #include "confdefs.h"
16582 #include <$ac_header>
16583 _ACEOF
16584 if { (eval echo "$as_me:16584: \"$ac_cpp conftest.$ac_ext\"") >&5
16585   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16586   ac_status=$?
16587   egrep -v '^ *\+' conftest.er1 >conftest.err
16588   rm -f conftest.er1
16589   cat conftest.err >&5
16590   echo "$as_me:16590: \$? = $ac_status" >&5
16591   (exit $ac_status); } >/dev/null; then
16592   if test -s conftest.err; then
16593     ac_cpp_err=$ac_c_preproc_warn_flag
16594   else
16595     ac_cpp_err=
16596   fi
16597 else
16598   ac_cpp_err=yes
16599 fi
16600 if test -z "$ac_cpp_err"; then
16601   eval "$as_ac_Header=yes"
16602 else
16603   echo "$as_me: failed program was:" >&5
16604   cat conftest.$ac_ext >&5
16605   eval "$as_ac_Header=no"
16606 fi
16607 rm -f conftest.err conftest.$ac_ext
16608 fi
16609 echo "$as_me:16609: result: `eval echo '${'$as_ac_Header'}'`" >&5
16610 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16611 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16612   cat >>confdefs.h <<EOF
16613 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16614 EOF
16615
16616 fi
16617 done
16618
16619 if test "$ISC" = yes ; then
16620
16621 for ac_header in sys/termio.h
16622 do
16623 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16624 echo "$as_me:16624: checking for $ac_header" >&5
16625 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16626 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16627   echo $ECHO_N "(cached) $ECHO_C" >&6
16628 else
16629   cat >conftest.$ac_ext <<_ACEOF
16630 #line 16630 "configure"
16631 #include "confdefs.h"
16632 #include <$ac_header>
16633 _ACEOF
16634 if { (eval echo "$as_me:16634: \"$ac_cpp conftest.$ac_ext\"") >&5
16635   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16636   ac_status=$?
16637   egrep -v '^ *\+' conftest.er1 >conftest.err
16638   rm -f conftest.er1
16639   cat conftest.err >&5
16640   echo "$as_me:16640: \$? = $ac_status" >&5
16641   (exit $ac_status); } >/dev/null; then
16642   if test -s conftest.err; then
16643     ac_cpp_err=$ac_c_preproc_warn_flag
16644   else
16645     ac_cpp_err=
16646   fi
16647 else
16648   ac_cpp_err=yes
16649 fi
16650 if test -z "$ac_cpp_err"; then
16651   eval "$as_ac_Header=yes"
16652 else
16653   echo "$as_me: failed program was:" >&5
16654   cat conftest.$ac_ext >&5
16655   eval "$as_ac_Header=no"
16656 fi
16657 rm -f conftest.err conftest.$ac_ext
16658 fi
16659 echo "$as_me:16659: result: `eval echo '${'$as_ac_Header'}'`" >&5
16660 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16661 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16662   cat >>confdefs.h <<EOF
16663 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16664 EOF
16665
16666 fi
16667 done
16668
16669 fi
16670 if test "$ac_cv_header_termios_h" = yes ; then
16671         case "$CFLAGS $CPPFLAGS" in
16672         *-D_POSIX_SOURCE*)
16673                 termios_bad=dunno ;;
16674         *)      termios_bad=maybe ;;
16675         esac
16676         if test "$termios_bad" = maybe ; then
16677         echo "$as_me:16677: checking whether termios.h needs _POSIX_SOURCE" >&5
16678 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16679         cat >conftest.$ac_ext <<_ACEOF
16680 #line 16680 "configure"
16681 #include "confdefs.h"
16682 #include <termios.h>
16683 int
16684 main ()
16685 {
16686 struct termios foo; int x = foo.c_iflag
16687   ;
16688   return 0;
16689 }
16690 _ACEOF
16691 rm -f conftest.$ac_objext
16692 if { (eval echo "$as_me:16692: \"$ac_compile\"") >&5
16693   (eval $ac_compile) 2>&5
16694   ac_status=$?
16695   echo "$as_me:16695: \$? = $ac_status" >&5
16696   (exit $ac_status); } &&
16697          { ac_try='test -s conftest.$ac_objext'
16698   { (eval echo "$as_me:16698: \"$ac_try\"") >&5
16699   (eval $ac_try) 2>&5
16700   ac_status=$?
16701   echo "$as_me:16701: \$? = $ac_status" >&5
16702   (exit $ac_status); }; }; then
16703   termios_bad=no
16704 else
16705   echo "$as_me: failed program was:" >&5
16706 cat conftest.$ac_ext >&5
16707
16708                 cat >conftest.$ac_ext <<_ACEOF
16709 #line 16709 "configure"
16710 #include "confdefs.h"
16711
16712 #define _POSIX_SOURCE
16713 #include <termios.h>
16714 int
16715 main ()
16716 {
16717 struct termios foo; int x = foo.c_iflag
16718   ;
16719   return 0;
16720 }
16721 _ACEOF
16722 rm -f conftest.$ac_objext
16723 if { (eval echo "$as_me:16723: \"$ac_compile\"") >&5
16724   (eval $ac_compile) 2>&5
16725   ac_status=$?
16726   echo "$as_me:16726: \$? = $ac_status" >&5
16727   (exit $ac_status); } &&
16728          { ac_try='test -s conftest.$ac_objext'
16729   { (eval echo "$as_me:16729: \"$ac_try\"") >&5
16730   (eval $ac_try) 2>&5
16731   ac_status=$?
16732   echo "$as_me:16732: \$? = $ac_status" >&5
16733   (exit $ac_status); }; }; then
16734   termios_bad=unknown
16735 else
16736   echo "$as_me: failed program was:" >&5
16737 cat conftest.$ac_ext >&5
16738 termios_bad=yes
16739 cat >>confdefs.h <<\EOF
16740 #define _POSIX_SOURCE 1
16741 EOF
16742
16743 fi
16744 rm -f conftest.$ac_objext conftest.$ac_ext
16745
16746 fi
16747 rm -f conftest.$ac_objext conftest.$ac_ext
16748         echo "$as_me:16748: result: $termios_bad" >&5
16749 echo "${ECHO_T}$termios_bad" >&6
16750         fi
16751 fi
16752
16753 echo "$as_me:16753: checking for tcgetattr" >&5
16754 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16755 if test "${cf_cv_have_tcgetattr+set}" = set; then
16756   echo $ECHO_N "(cached) $ECHO_C" >&6
16757 else
16758
16759 cat >conftest.$ac_ext <<_ACEOF
16760 #line 16760 "configure"
16761 #include "confdefs.h"
16762
16763 #include <sys/types.h>
16764 #ifdef HAVE_UNISTD_H
16765 #include <unistd.h>
16766 #endif
16767 #ifdef HAVE_TERMIOS_H
16768 #include <termios.h>
16769 #define TTY struct termios
16770 #else
16771 #ifdef HAVE_TERMIO_H
16772 #include <termio.h>
16773 #define TTY struct termio
16774 #endif
16775 #endif
16776
16777 int
16778 main ()
16779 {
16780
16781 TTY foo;
16782 tcgetattr(1, &foo);
16783   ;
16784   return 0;
16785 }
16786 _ACEOF
16787 rm -f conftest.$ac_objext conftest$ac_exeext
16788 if { (eval echo "$as_me:16788: \"$ac_link\"") >&5
16789   (eval $ac_link) 2>&5
16790   ac_status=$?
16791   echo "$as_me:16791: \$? = $ac_status" >&5
16792   (exit $ac_status); } &&
16793          { ac_try='test -s conftest$ac_exeext'
16794   { (eval echo "$as_me:16794: \"$ac_try\"") >&5
16795   (eval $ac_try) 2>&5
16796   ac_status=$?
16797   echo "$as_me:16797: \$? = $ac_status" >&5
16798   (exit $ac_status); }; }; then
16799   cf_cv_have_tcgetattr=yes
16800 else
16801   echo "$as_me: failed program was:" >&5
16802 cat conftest.$ac_ext >&5
16803 cf_cv_have_tcgetattr=no
16804 fi
16805 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16806 fi
16807 echo "$as_me:16807: result: $cf_cv_have_tcgetattr" >&5
16808 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16809 test "$cf_cv_have_tcgetattr" = yes &&
16810 cat >>confdefs.h <<\EOF
16811 #define HAVE_TCGETATTR 1
16812 EOF
16813
16814 echo "$as_me:16814: checking for vsscanf function or workaround" >&5
16815 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16816 if test "${cf_cv_func_vsscanf+set}" = set; then
16817   echo $ECHO_N "(cached) $ECHO_C" >&6
16818 else
16819
16820 cat >conftest.$ac_ext <<_ACEOF
16821 #line 16821 "configure"
16822 #include "confdefs.h"
16823
16824 #include <stdarg.h>
16825 #include <stdio.h>
16826 int
16827 main ()
16828 {
16829
16830         va_list ap;
16831         vsscanf("from", "%d", ap)
16832   ;
16833   return 0;
16834 }
16835 _ACEOF
16836 rm -f conftest.$ac_objext conftest$ac_exeext
16837 if { (eval echo "$as_me:16837: \"$ac_link\"") >&5
16838   (eval $ac_link) 2>&5
16839   ac_status=$?
16840   echo "$as_me:16840: \$? = $ac_status" >&5
16841   (exit $ac_status); } &&
16842          { ac_try='test -s conftest$ac_exeext'
16843   { (eval echo "$as_me:16843: \"$ac_try\"") >&5
16844   (eval $ac_try) 2>&5
16845   ac_status=$?
16846   echo "$as_me:16846: \$? = $ac_status" >&5
16847   (exit $ac_status); }; }; then
16848   cf_cv_func_vsscanf=vsscanf
16849 else
16850   echo "$as_me: failed program was:" >&5
16851 cat conftest.$ac_ext >&5
16852
16853 cat >conftest.$ac_ext <<_ACEOF
16854 #line 16854 "configure"
16855 #include "confdefs.h"
16856
16857 #include <stdarg.h>
16858 #include <stdio.h>
16859 int
16860 main ()
16861 {
16862
16863     FILE strbuf;
16864     char *str = "from";
16865
16866     strbuf._flag = _IOREAD;
16867     strbuf._ptr = strbuf._base = (unsigned char *) str;
16868     strbuf._cnt = strlen(str);
16869     strbuf._file = _NFILE;
16870     return (vfscanf(&strbuf, "%d", ap))
16871   ;
16872   return 0;
16873 }
16874 _ACEOF
16875 rm -f conftest.$ac_objext conftest$ac_exeext
16876 if { (eval echo "$as_me:16876: \"$ac_link\"") >&5
16877   (eval $ac_link) 2>&5
16878   ac_status=$?
16879   echo "$as_me:16879: \$? = $ac_status" >&5
16880   (exit $ac_status); } &&
16881          { ac_try='test -s conftest$ac_exeext'
16882   { (eval echo "$as_me:16882: \"$ac_try\"") >&5
16883   (eval $ac_try) 2>&5
16884   ac_status=$?
16885   echo "$as_me:16885: \$? = $ac_status" >&5
16886   (exit $ac_status); }; }; then
16887   cf_cv_func_vsscanf=vfscanf
16888 else
16889   echo "$as_me: failed program was:" >&5
16890 cat conftest.$ac_ext >&5
16891
16892 cat >conftest.$ac_ext <<_ACEOF
16893 #line 16893 "configure"
16894 #include "confdefs.h"
16895
16896 #include <stdarg.h>
16897 #include <stdio.h>
16898 int
16899 main ()
16900 {
16901
16902     FILE strbuf;
16903     char *str = "from";
16904
16905     strbuf._flag = _IOREAD;
16906     strbuf._ptr = strbuf._base = (unsigned char *) str;
16907     strbuf._cnt = strlen(str);
16908     strbuf._file = _NFILE;
16909     return (_doscan(&strbuf, "%d", ap))
16910   ;
16911   return 0;
16912 }
16913 _ACEOF
16914 rm -f conftest.$ac_objext conftest$ac_exeext
16915 if { (eval echo "$as_me:16915: \"$ac_link\"") >&5
16916   (eval $ac_link) 2>&5
16917   ac_status=$?
16918   echo "$as_me:16918: \$? = $ac_status" >&5
16919   (exit $ac_status); } &&
16920          { ac_try='test -s conftest$ac_exeext'
16921   { (eval echo "$as_me:16921: \"$ac_try\"") >&5
16922   (eval $ac_try) 2>&5
16923   ac_status=$?
16924   echo "$as_me:16924: \$? = $ac_status" >&5
16925   (exit $ac_status); }; }; then
16926   cf_cv_func_vsscanf=_doscan
16927 else
16928   echo "$as_me: failed program was:" >&5
16929 cat conftest.$ac_ext >&5
16930
16931 cf_cv_func_vsscanf=no
16932 fi
16933 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16934 fi
16935 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16936 fi
16937 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16938 fi
16939 echo "$as_me:16939: result: $cf_cv_func_vsscanf" >&5
16940 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16941
16942 case $cf_cv_func_vsscanf in #(vi
16943 vsscanf)
16944 cat >>confdefs.h <<\EOF
16945 #define HAVE_VSSCANF 1
16946 EOF
16947 ;; #(vi
16948 vfscanf)
16949 cat >>confdefs.h <<\EOF
16950 #define HAVE_VFSCANF 1
16951 EOF
16952 ;; #(vi
16953 _doscan)
16954 cat >>confdefs.h <<\EOF
16955 #define HAVE__DOSCAN 1
16956 EOF
16957 ;;
16958 esac
16959
16960 echo "$as_me:16960: checking for working mkstemp" >&5
16961 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16962 if test "${cf_cv_func_mkstemp+set}" = set; then
16963   echo $ECHO_N "(cached) $ECHO_C" >&6
16964 else
16965
16966 rm -rf conftest*
16967 if test "$cross_compiling" = yes; then
16968   cf_cv_func_mkstemp=maybe
16969 else
16970   cat >conftest.$ac_ext <<_ACEOF
16971 #line 16971 "configure"
16972 #include "confdefs.h"
16973
16974 #include <sys/types.h>
16975 #include <stdlib.h>
16976 #include <stdio.h>
16977 #include <string.h>
16978 #include <sys/stat.h>
16979 int main()
16980 {
16981         char *tmpl = "conftestXXXXXX";
16982         char name[2][80];
16983         int n;
16984         int result = 0;
16985         int fd;
16986         struct stat sb;
16987
16988         umask(077);
16989         for (n = 0; n < 2; ++n) {
16990                 strcpy(name[n], tmpl);
16991                 if ((fd = mkstemp(name[n])) >= 0) {
16992                         if (!strcmp(name[n], tmpl)
16993                          || stat(name[n], &sb) != 0
16994                          || (sb.st_mode & S_IFMT) != S_IFREG
16995                          || (sb.st_mode & 077) != 0) {
16996                                 result = 1;
16997                         }
16998                         close(fd);
16999                 }
17000         }
17001         if (result == 0
17002          && !strcmp(name[0], name[1]))
17003                 result = 1;
17004         ${cf_cv_main_return:-return}(result);
17005 }
17006
17007 _ACEOF
17008 rm -f conftest$ac_exeext
17009 if { (eval echo "$as_me:17009: \"$ac_link\"") >&5
17010   (eval $ac_link) 2>&5
17011   ac_status=$?
17012   echo "$as_me:17012: \$? = $ac_status" >&5
17013   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17014   { (eval echo "$as_me:17014: \"$ac_try\"") >&5
17015   (eval $ac_try) 2>&5
17016   ac_status=$?
17017   echo "$as_me:17017: \$? = $ac_status" >&5
17018   (exit $ac_status); }; }; then
17019   cf_cv_func_mkstemp=yes
17020
17021 else
17022   echo "$as_me: program exited with status $ac_status" >&5
17023 echo "$as_me: failed program was:" >&5
17024 cat conftest.$ac_ext >&5
17025 cf_cv_func_mkstemp=no
17026
17027 fi
17028 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17029 fi
17030
17031 fi
17032 echo "$as_me:17032: result: $cf_cv_func_mkstemp" >&5
17033 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17034 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17035         echo "$as_me:17035: checking for mkstemp" >&5
17036 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17037 if test "${ac_cv_func_mkstemp+set}" = set; then
17038   echo $ECHO_N "(cached) $ECHO_C" >&6
17039 else
17040   cat >conftest.$ac_ext <<_ACEOF
17041 #line 17041 "configure"
17042 #include "confdefs.h"
17043 /* System header to define __stub macros and hopefully few prototypes,
17044     which can conflict with char mkstemp (); below.  */
17045 #include <assert.h>
17046 /* Override any gcc2 internal prototype to avoid an error.  */
17047 #ifdef __cplusplus
17048 extern "C"
17049 #endif
17050 /* We use char because int might match the return type of a gcc2
17051    builtin and then its argument prototype would still apply.  */
17052 char mkstemp ();
17053 char (*f) ();
17054
17055 int
17056 main ()
17057 {
17058 /* The GNU C library defines this for functions which it implements
17059     to always fail with ENOSYS.  Some functions are actually named
17060     something starting with __ and the normal name is an alias.  */
17061 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17062 choke me
17063 #else
17064 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17065 #endif
17066
17067   ;
17068   return 0;
17069 }
17070 _ACEOF
17071 rm -f conftest.$ac_objext conftest$ac_exeext
17072 if { (eval echo "$as_me:17072: \"$ac_link\"") >&5
17073   (eval $ac_link) 2>&5
17074   ac_status=$?
17075   echo "$as_me:17075: \$? = $ac_status" >&5
17076   (exit $ac_status); } &&
17077          { ac_try='test -s conftest$ac_exeext'
17078   { (eval echo "$as_me:17078: \"$ac_try\"") >&5
17079   (eval $ac_try) 2>&5
17080   ac_status=$?
17081   echo "$as_me:17081: \$? = $ac_status" >&5
17082   (exit $ac_status); }; }; then
17083   ac_cv_func_mkstemp=yes
17084 else
17085   echo "$as_me: failed program was:" >&5
17086 cat conftest.$ac_ext >&5
17087 ac_cv_func_mkstemp=no
17088 fi
17089 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17090 fi
17091 echo "$as_me:17091: result: $ac_cv_func_mkstemp" >&5
17092 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17093
17094 fi
17095 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17096
17097 cat >>confdefs.h <<\EOF
17098 #define HAVE_MKSTEMP 1
17099 EOF
17100
17101 fi
17102
17103 # setup for prototype of fallback for vsscanf()
17104
17105 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17106         HAVE_VSSCANF=1
17107 else
17108         HAVE_VSSCANF=0
17109 fi
17110
17111 if test "x$cross_compiling" = xyes ; then
17112         { echo "$as_me:17112: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17113 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17114 else
17115         echo "$as_me:17115: checking whether setvbuf arguments are reversed" >&5
17116 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17117 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17118   echo $ECHO_N "(cached) $ECHO_C" >&6
17119 else
17120   if test "$cross_compiling" = yes; then
17121   { { echo "$as_me:17121: error: cannot run test program while cross compiling" >&5
17122 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17123    { (exit 1); exit 1; }; }
17124 else
17125   cat >conftest.$ac_ext <<_ACEOF
17126 #line 17126 "configure"
17127 #include "confdefs.h"
17128 #include <stdio.h>
17129 /* If setvbuf has the reversed format, exit 0. */
17130 int
17131 main ()
17132 {
17133   /* This call has the arguments reversed.
17134      A reversed system may check and see that the address of main
17135      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17136   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17137     $ac_main_return(1);
17138   putc('\r', stdout);
17139   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17140 }
17141 _ACEOF
17142 rm -f conftest$ac_exeext
17143 if { (eval echo "$as_me:17143: \"$ac_link\"") >&5
17144   (eval $ac_link) 2>&5
17145   ac_status=$?
17146   echo "$as_me:17146: \$? = $ac_status" >&5
17147   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17148   { (eval echo "$as_me:17148: \"$ac_try\"") >&5
17149   (eval $ac_try) 2>&5
17150   ac_status=$?
17151   echo "$as_me:17151: \$? = $ac_status" >&5
17152   (exit $ac_status); }; }; then
17153   ac_cv_func_setvbuf_reversed=yes
17154 else
17155   echo "$as_me: program exited with status $ac_status" >&5
17156 echo "$as_me: failed program was:" >&5
17157 cat conftest.$ac_ext >&5
17158 ac_cv_func_setvbuf_reversed=no
17159 fi
17160 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17161 fi
17162 rm -f core core.* *.core
17163 fi
17164 echo "$as_me:17164: result: $ac_cv_func_setvbuf_reversed" >&5
17165 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17166 if test $ac_cv_func_setvbuf_reversed = yes; then
17167
17168 cat >>confdefs.h <<\EOF
17169 #define SETVBUF_REVERSED 1
17170 EOF
17171
17172 fi
17173
17174 fi
17175 echo "$as_me:17175: checking for intptr_t" >&5
17176 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17177 if test "${ac_cv_type_intptr_t+set}" = set; then
17178   echo $ECHO_N "(cached) $ECHO_C" >&6
17179 else
17180   cat >conftest.$ac_ext <<_ACEOF
17181 #line 17181 "configure"
17182 #include "confdefs.h"
17183 $ac_includes_default
17184 int
17185 main ()
17186 {
17187 if ((intptr_t *) 0)
17188   return 0;
17189 if (sizeof (intptr_t))
17190   return 0;
17191   ;
17192   return 0;
17193 }
17194 _ACEOF
17195 rm -f conftest.$ac_objext
17196 if { (eval echo "$as_me:17196: \"$ac_compile\"") >&5
17197   (eval $ac_compile) 2>&5
17198   ac_status=$?
17199   echo "$as_me:17199: \$? = $ac_status" >&5
17200   (exit $ac_status); } &&
17201          { ac_try='test -s conftest.$ac_objext'
17202   { (eval echo "$as_me:17202: \"$ac_try\"") >&5
17203   (eval $ac_try) 2>&5
17204   ac_status=$?
17205   echo "$as_me:17205: \$? = $ac_status" >&5
17206   (exit $ac_status); }; }; then
17207   ac_cv_type_intptr_t=yes
17208 else
17209   echo "$as_me: failed program was:" >&5
17210 cat conftest.$ac_ext >&5
17211 ac_cv_type_intptr_t=no
17212 fi
17213 rm -f conftest.$ac_objext conftest.$ac_ext
17214 fi
17215 echo "$as_me:17215: result: $ac_cv_type_intptr_t" >&5
17216 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17217 if test $ac_cv_type_intptr_t = yes; then
17218   :
17219 else
17220
17221 cat >>confdefs.h <<EOF
17222 #define intptr_t long
17223 EOF
17224
17225 fi
17226
17227 echo "$as_me:17227: checking for type sigaction_t" >&5
17228 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17229 if test "${cf_cv_type_sigaction+set}" = set; then
17230   echo $ECHO_N "(cached) $ECHO_C" >&6
17231 else
17232
17233         cat >conftest.$ac_ext <<_ACEOF
17234 #line 17234 "configure"
17235 #include "confdefs.h"
17236
17237 #include <signal.h>
17238 int
17239 main ()
17240 {
17241 sigaction_t x
17242   ;
17243   return 0;
17244 }
17245 _ACEOF
17246 rm -f conftest.$ac_objext
17247 if { (eval echo "$as_me:17247: \"$ac_compile\"") >&5
17248   (eval $ac_compile) 2>&5
17249   ac_status=$?
17250   echo "$as_me:17250: \$? = $ac_status" >&5
17251   (exit $ac_status); } &&
17252          { ac_try='test -s conftest.$ac_objext'
17253   { (eval echo "$as_me:17253: \"$ac_try\"") >&5
17254   (eval $ac_try) 2>&5
17255   ac_status=$?
17256   echo "$as_me:17256: \$? = $ac_status" >&5
17257   (exit $ac_status); }; }; then
17258   cf_cv_type_sigaction=yes
17259 else
17260   echo "$as_me: failed program was:" >&5
17261 cat conftest.$ac_ext >&5
17262 cf_cv_type_sigaction=no
17263 fi
17264 rm -f conftest.$ac_objext conftest.$ac_ext
17265 fi
17266
17267 echo "$as_me:17267: result: $cf_cv_type_sigaction" >&5
17268 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17269 test "$cf_cv_type_sigaction" = yes &&
17270 cat >>confdefs.h <<\EOF
17271 #define HAVE_TYPE_SIGACTION 1
17272 EOF
17273
17274 echo "$as_me:17274: checking declaration of size-change" >&5
17275 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17276 if test "${cf_cv_sizechange+set}" = set; then
17277   echo $ECHO_N "(cached) $ECHO_C" >&6
17278 else
17279
17280     cf_cv_sizechange=unknown
17281     cf_save_CPPFLAGS="$CPPFLAGS"
17282
17283 for cf_opts in "" "NEED_PTEM_H"
17284 do
17285
17286     CPPFLAGS="$cf_save_CPPFLAGS"
17287     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17288     cat >conftest.$ac_ext <<_ACEOF
17289 #line 17289 "configure"
17290 #include "confdefs.h"
17291 #include <sys/types.h>
17292 #ifdef HAVE_TERMIOS_H
17293 #include <termios.h>
17294 #else
17295 #ifdef HAVE_TERMIO_H
17296 #include <termio.h>
17297 #endif
17298 #endif
17299 #ifdef NEED_PTEM_H
17300 /* This is a workaround for SCO:  they neglected to define struct winsize in
17301  * termios.h -- it's only in termio.h and ptem.h
17302  */
17303 #include        <sys/stream.h>
17304 #include        <sys/ptem.h>
17305 #endif
17306 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17307 #include <sys/ioctl.h>
17308 #endif
17309
17310 int
17311 main ()
17312 {
17313
17314 #ifdef TIOCGSIZE
17315         struct ttysize win;     /* FIXME: what system is this? */
17316         int y = win.ts_lines;
17317         int x = win.ts_cols;
17318 #else
17319 #ifdef TIOCGWINSZ
17320         struct winsize win;
17321         int y = win.ws_row;
17322         int x = win.ws_col;
17323 #else
17324         no TIOCGSIZE or TIOCGWINSZ
17325 #endif /* TIOCGWINSZ */
17326 #endif /* TIOCGSIZE */
17327
17328   ;
17329   return 0;
17330 }
17331 _ACEOF
17332 rm -f conftest.$ac_objext
17333 if { (eval echo "$as_me:17333: \"$ac_compile\"") >&5
17334   (eval $ac_compile) 2>&5
17335   ac_status=$?
17336   echo "$as_me:17336: \$? = $ac_status" >&5
17337   (exit $ac_status); } &&
17338          { ac_try='test -s conftest.$ac_objext'
17339   { (eval echo "$as_me:17339: \"$ac_try\"") >&5
17340   (eval $ac_try) 2>&5
17341   ac_status=$?
17342   echo "$as_me:17342: \$? = $ac_status" >&5
17343   (exit $ac_status); }; }; then
17344   cf_cv_sizechange=yes
17345 else
17346   echo "$as_me: failed program was:" >&5
17347 cat conftest.$ac_ext >&5
17348 cf_cv_sizechange=no
17349 fi
17350 rm -f conftest.$ac_objext conftest.$ac_ext
17351
17352         CPPFLAGS="$cf_save_CPPFLAGS"
17353         if test "$cf_cv_sizechange" = yes ; then
17354                 echo "size-change succeeded ($cf_opts)" >&5
17355                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17356                 break
17357         fi
17358 done
17359
17360 fi
17361 echo "$as_me:17361: result: $cf_cv_sizechange" >&5
17362 echo "${ECHO_T}$cf_cv_sizechange" >&6
17363 if test "$cf_cv_sizechange" != no ; then
17364
17365 cat >>confdefs.h <<\EOF
17366 #define HAVE_SIZECHANGE 1
17367 EOF
17368
17369         case $cf_cv_sizechange in #(vi
17370         NEED*)
17371                 cat >>confdefs.h <<EOF
17372 #define $cf_cv_sizechange  1
17373 EOF
17374
17375                 ;;
17376         esac
17377 fi
17378
17379 echo "$as_me:17379: checking for memmove" >&5
17380 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17381 if test "${ac_cv_func_memmove+set}" = set; then
17382   echo $ECHO_N "(cached) $ECHO_C" >&6
17383 else
17384   cat >conftest.$ac_ext <<_ACEOF
17385 #line 17385 "configure"
17386 #include "confdefs.h"
17387 /* System header to define __stub macros and hopefully few prototypes,
17388     which can conflict with char memmove (); below.  */
17389 #include <assert.h>
17390 /* Override any gcc2 internal prototype to avoid an error.  */
17391 #ifdef __cplusplus
17392 extern "C"
17393 #endif
17394 /* We use char because int might match the return type of a gcc2
17395    builtin and then its argument prototype would still apply.  */
17396 char memmove ();
17397 char (*f) ();
17398
17399 int
17400 main ()
17401 {
17402 /* The GNU C library defines this for functions which it implements
17403     to always fail with ENOSYS.  Some functions are actually named
17404     something starting with __ and the normal name is an alias.  */
17405 #if defined (__stub_memmove) || defined (__stub___memmove)
17406 choke me
17407 #else
17408 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17409 #endif
17410
17411   ;
17412   return 0;
17413 }
17414 _ACEOF
17415 rm -f conftest.$ac_objext conftest$ac_exeext
17416 if { (eval echo "$as_me:17416: \"$ac_link\"") >&5
17417   (eval $ac_link) 2>&5
17418   ac_status=$?
17419   echo "$as_me:17419: \$? = $ac_status" >&5
17420   (exit $ac_status); } &&
17421          { ac_try='test -s conftest$ac_exeext'
17422   { (eval echo "$as_me:17422: \"$ac_try\"") >&5
17423   (eval $ac_try) 2>&5
17424   ac_status=$?
17425   echo "$as_me:17425: \$? = $ac_status" >&5
17426   (exit $ac_status); }; }; then
17427   ac_cv_func_memmove=yes
17428 else
17429   echo "$as_me: failed program was:" >&5
17430 cat conftest.$ac_ext >&5
17431 ac_cv_func_memmove=no
17432 fi
17433 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17434 fi
17435 echo "$as_me:17435: result: $ac_cv_func_memmove" >&5
17436 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17437 if test $ac_cv_func_memmove = yes; then
17438   :
17439 else
17440
17441 echo "$as_me:17441: checking for bcopy" >&5
17442 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17443 if test "${ac_cv_func_bcopy+set}" = set; then
17444   echo $ECHO_N "(cached) $ECHO_C" >&6
17445 else
17446   cat >conftest.$ac_ext <<_ACEOF
17447 #line 17447 "configure"
17448 #include "confdefs.h"
17449 /* System header to define __stub macros and hopefully few prototypes,
17450     which can conflict with char bcopy (); below.  */
17451 #include <assert.h>
17452 /* Override any gcc2 internal prototype to avoid an error.  */
17453 #ifdef __cplusplus
17454 extern "C"
17455 #endif
17456 /* We use char because int might match the return type of a gcc2
17457    builtin and then its argument prototype would still apply.  */
17458 char bcopy ();
17459 char (*f) ();
17460
17461 int
17462 main ()
17463 {
17464 /* The GNU C library defines this for functions which it implements
17465     to always fail with ENOSYS.  Some functions are actually named
17466     something starting with __ and the normal name is an alias.  */
17467 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17468 choke me
17469 #else
17470 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17471 #endif
17472
17473   ;
17474   return 0;
17475 }
17476 _ACEOF
17477 rm -f conftest.$ac_objext conftest$ac_exeext
17478 if { (eval echo "$as_me:17478: \"$ac_link\"") >&5
17479   (eval $ac_link) 2>&5
17480   ac_status=$?
17481   echo "$as_me:17481: \$? = $ac_status" >&5
17482   (exit $ac_status); } &&
17483          { ac_try='test -s conftest$ac_exeext'
17484   { (eval echo "$as_me:17484: \"$ac_try\"") >&5
17485   (eval $ac_try) 2>&5
17486   ac_status=$?
17487   echo "$as_me:17487: \$? = $ac_status" >&5
17488   (exit $ac_status); }; }; then
17489   ac_cv_func_bcopy=yes
17490 else
17491   echo "$as_me: failed program was:" >&5
17492 cat conftest.$ac_ext >&5
17493 ac_cv_func_bcopy=no
17494 fi
17495 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17496 fi
17497 echo "$as_me:17497: result: $ac_cv_func_bcopy" >&5
17498 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17499 if test $ac_cv_func_bcopy = yes; then
17500
17501         echo "$as_me:17501: checking if bcopy does overlapping moves" >&5
17502 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17503 if test "${cf_cv_good_bcopy+set}" = set; then
17504   echo $ECHO_N "(cached) $ECHO_C" >&6
17505 else
17506
17507                 if test "$cross_compiling" = yes; then
17508   cf_cv_good_bcopy=unknown
17509 else
17510   cat >conftest.$ac_ext <<_ACEOF
17511 #line 17511 "configure"
17512 #include "confdefs.h"
17513
17514 int main() {
17515         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17516         char temp[40];
17517         bcopy(data, temp, sizeof(data));
17518         bcopy(temp+10, temp, 15);
17519         bcopy(temp+5, temp+15, 10);
17520         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17521 }
17522
17523 _ACEOF
17524 rm -f conftest$ac_exeext
17525 if { (eval echo "$as_me:17525: \"$ac_link\"") >&5
17526   (eval $ac_link) 2>&5
17527   ac_status=$?
17528   echo "$as_me:17528: \$? = $ac_status" >&5
17529   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17530   { (eval echo "$as_me:17530: \"$ac_try\"") >&5
17531   (eval $ac_try) 2>&5
17532   ac_status=$?
17533   echo "$as_me:17533: \$? = $ac_status" >&5
17534   (exit $ac_status); }; }; then
17535   cf_cv_good_bcopy=yes
17536 else
17537   echo "$as_me: program exited with status $ac_status" >&5
17538 echo "$as_me: failed program was:" >&5
17539 cat conftest.$ac_ext >&5
17540 cf_cv_good_bcopy=no
17541 fi
17542 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17543 fi
17544
17545 fi
17546 echo "$as_me:17546: result: $cf_cv_good_bcopy" >&5
17547 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17548
17549 else
17550   cf_cv_good_bcopy=no
17551 fi
17552
17553         if test "$cf_cv_good_bcopy" = yes ; then
17554
17555 cat >>confdefs.h <<\EOF
17556 #define USE_OK_BCOPY 1
17557 EOF
17558
17559         else
17560
17561 cat >>confdefs.h <<\EOF
17562 #define USE_MY_MEMMOVE 1
17563 EOF
17564
17565         fi
17566
17567 fi
17568
17569 echo "$as_me:17569: checking if poll really works" >&5
17570 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17571 if test "${cf_cv_working_poll+set}" = set; then
17572   echo $ECHO_N "(cached) $ECHO_C" >&6
17573 else
17574
17575 if test "$cross_compiling" = yes; then
17576   cf_cv_working_poll=unknown
17577 else
17578   cat >conftest.$ac_ext <<_ACEOF
17579 #line 17579 "configure"
17580 #include "confdefs.h"
17581
17582 #include <stdlib.h>
17583 #include <stdio.h>
17584 #include <unistd.h>
17585 #include <fcntl.h>
17586 #ifdef HAVE_POLL_H
17587 #include <poll.h>
17588 #else
17589 #include <sys/poll.h>
17590 #endif
17591 int main() {
17592         struct pollfd myfds;
17593         int ret;
17594
17595         /* check for Darwin bug with respect to "devices" */
17596         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17597         if (myfds.fd < 0)
17598                 myfds.fd = 0;
17599         myfds.events = POLLIN;
17600         myfds.revents = 0;
17601
17602         ret = poll(&myfds, 1, 100);
17603
17604         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17605                 ret = -1;
17606         } else {
17607                 int fd = 0;
17608                 if (!isatty(fd)) {
17609                         fd = open("/dev/tty", 2);       /* O_RDWR */
17610                 }
17611
17612                 if (fd >= 0) {
17613                         /* also check with standard input */
17614                         myfds.fd = fd;
17615                         myfds.events = POLLIN;
17616                         myfds.revents = 0;
17617                         ret = poll(&myfds, 1, 100);
17618                 } else {
17619                         ret = -1;
17620                 }
17621         }
17622         ${cf_cv_main_return:-return}(ret < 0);
17623 }
17624 _ACEOF
17625 rm -f conftest$ac_exeext
17626 if { (eval echo "$as_me:17626: \"$ac_link\"") >&5
17627   (eval $ac_link) 2>&5
17628   ac_status=$?
17629   echo "$as_me:17629: \$? = $ac_status" >&5
17630   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17631   { (eval echo "$as_me:17631: \"$ac_try\"") >&5
17632   (eval $ac_try) 2>&5
17633   ac_status=$?
17634   echo "$as_me:17634: \$? = $ac_status" >&5
17635   (exit $ac_status); }; }; then
17636   cf_cv_working_poll=yes
17637 else
17638   echo "$as_me: program exited with status $ac_status" >&5
17639 echo "$as_me: failed program was:" >&5
17640 cat conftest.$ac_ext >&5
17641 cf_cv_working_poll=no
17642 fi
17643 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17644 fi
17645 fi
17646 echo "$as_me:17646: result: $cf_cv_working_poll" >&5
17647 echo "${ECHO_T}$cf_cv_working_poll" >&6
17648 test "$cf_cv_working_poll" = "yes" &&
17649 cat >>confdefs.h <<\EOF
17650 #define HAVE_WORKING_POLL 1
17651 EOF
17652
17653 echo "$as_me:17653: checking for va_copy" >&5
17654 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17655 if test "${cf_cv_have_va_copy+set}" = set; then
17656   echo $ECHO_N "(cached) $ECHO_C" >&6
17657 else
17658
17659 cat >conftest.$ac_ext <<_ACEOF
17660 #line 17660 "configure"
17661 #include "confdefs.h"
17662
17663 #include <stdarg.h>
17664
17665 int
17666 main ()
17667 {
17668
17669         static va_list dst;
17670         static va_list src;
17671         va_copy(dst, src)
17672   ;
17673   return 0;
17674 }
17675 _ACEOF
17676 rm -f conftest.$ac_objext conftest$ac_exeext
17677 if { (eval echo "$as_me:17677: \"$ac_link\"") >&5
17678   (eval $ac_link) 2>&5
17679   ac_status=$?
17680   echo "$as_me:17680: \$? = $ac_status" >&5
17681   (exit $ac_status); } &&
17682          { ac_try='test -s conftest$ac_exeext'
17683   { (eval echo "$as_me:17683: \"$ac_try\"") >&5
17684   (eval $ac_try) 2>&5
17685   ac_status=$?
17686   echo "$as_me:17686: \$? = $ac_status" >&5
17687   (exit $ac_status); }; }; then
17688   cf_cv_have_va_copy=yes
17689 else
17690   echo "$as_me: failed program was:" >&5
17691 cat conftest.$ac_ext >&5
17692 cf_cv_have_va_copy=no
17693 fi
17694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17695 fi
17696 echo "$as_me:17696: result: $cf_cv_have_va_copy" >&5
17697 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17698
17699 test "$cf_cv_have_va_copy" = yes &&
17700 cat >>confdefs.h <<\EOF
17701 #define HAVE_VA_COPY 1
17702 EOF
17703
17704 echo "$as_me:17704: checking for __va_copy" >&5
17705 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17706 if test "${cf_cv_have___va_copy+set}" = set; then
17707   echo $ECHO_N "(cached) $ECHO_C" >&6
17708 else
17709
17710 cat >conftest.$ac_ext <<_ACEOF
17711 #line 17711 "configure"
17712 #include "confdefs.h"
17713
17714 #include <stdarg.h>
17715
17716 int
17717 main ()
17718 {
17719
17720         static va_list dst;
17721         static va_list src;
17722         __va_copy(dst, src)
17723   ;
17724   return 0;
17725 }
17726 _ACEOF
17727 rm -f conftest.$ac_objext conftest$ac_exeext
17728 if { (eval echo "$as_me:17728: \"$ac_link\"") >&5
17729   (eval $ac_link) 2>&5
17730   ac_status=$?
17731   echo "$as_me:17731: \$? = $ac_status" >&5
17732   (exit $ac_status); } &&
17733          { ac_try='test -s conftest$ac_exeext'
17734   { (eval echo "$as_me:17734: \"$ac_try\"") >&5
17735   (eval $ac_try) 2>&5
17736   ac_status=$?
17737   echo "$as_me:17737: \$? = $ac_status" >&5
17738   (exit $ac_status); }; }; then
17739   cf_cv_have___va_copy=yes
17740 else
17741   echo "$as_me: failed program was:" >&5
17742 cat conftest.$ac_ext >&5
17743 cf_cv_have___va_copy=no
17744 fi
17745 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17746 fi
17747 echo "$as_me:17747: result: $cf_cv_have___va_copy" >&5
17748 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17749
17750 test "$cf_cv_have___va_copy" = yes &&
17751 cat >>confdefs.h <<\EOF
17752 #define HAVE___VA_COPY 1
17753 EOF
17754
17755 echo "$as_me:17755: checking for pid_t" >&5
17756 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17757 if test "${ac_cv_type_pid_t+set}" = set; then
17758   echo $ECHO_N "(cached) $ECHO_C" >&6
17759 else
17760   cat >conftest.$ac_ext <<_ACEOF
17761 #line 17761 "configure"
17762 #include "confdefs.h"
17763 $ac_includes_default
17764 int
17765 main ()
17766 {
17767 if ((pid_t *) 0)
17768   return 0;
17769 if (sizeof (pid_t))
17770   return 0;
17771   ;
17772   return 0;
17773 }
17774 _ACEOF
17775 rm -f conftest.$ac_objext
17776 if { (eval echo "$as_me:17776: \"$ac_compile\"") >&5
17777   (eval $ac_compile) 2>&5
17778   ac_status=$?
17779   echo "$as_me:17779: \$? = $ac_status" >&5
17780   (exit $ac_status); } &&
17781          { ac_try='test -s conftest.$ac_objext'
17782   { (eval echo "$as_me:17782: \"$ac_try\"") >&5
17783   (eval $ac_try) 2>&5
17784   ac_status=$?
17785   echo "$as_me:17785: \$? = $ac_status" >&5
17786   (exit $ac_status); }; }; then
17787   ac_cv_type_pid_t=yes
17788 else
17789   echo "$as_me: failed program was:" >&5
17790 cat conftest.$ac_ext >&5
17791 ac_cv_type_pid_t=no
17792 fi
17793 rm -f conftest.$ac_objext conftest.$ac_ext
17794 fi
17795 echo "$as_me:17795: result: $ac_cv_type_pid_t" >&5
17796 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17797 if test $ac_cv_type_pid_t = yes; then
17798   :
17799 else
17800
17801 cat >>confdefs.h <<EOF
17802 #define pid_t int
17803 EOF
17804
17805 fi
17806
17807 for ac_header in unistd.h vfork.h
17808 do
17809 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17810 echo "$as_me:17810: checking for $ac_header" >&5
17811 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17812 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17813   echo $ECHO_N "(cached) $ECHO_C" >&6
17814 else
17815   cat >conftest.$ac_ext <<_ACEOF
17816 #line 17816 "configure"
17817 #include "confdefs.h"
17818 #include <$ac_header>
17819 _ACEOF
17820 if { (eval echo "$as_me:17820: \"$ac_cpp conftest.$ac_ext\"") >&5
17821   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17822   ac_status=$?
17823   egrep -v '^ *\+' conftest.er1 >conftest.err
17824   rm -f conftest.er1
17825   cat conftest.err >&5
17826   echo "$as_me:17826: \$? = $ac_status" >&5
17827   (exit $ac_status); } >/dev/null; then
17828   if test -s conftest.err; then
17829     ac_cpp_err=$ac_c_preproc_warn_flag
17830   else
17831     ac_cpp_err=
17832   fi
17833 else
17834   ac_cpp_err=yes
17835 fi
17836 if test -z "$ac_cpp_err"; then
17837   eval "$as_ac_Header=yes"
17838 else
17839   echo "$as_me: failed program was:" >&5
17840   cat conftest.$ac_ext >&5
17841   eval "$as_ac_Header=no"
17842 fi
17843 rm -f conftest.err conftest.$ac_ext
17844 fi
17845 echo "$as_me:17845: result: `eval echo '${'$as_ac_Header'}'`" >&5
17846 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17847 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17848   cat >>confdefs.h <<EOF
17849 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17850 EOF
17851
17852 fi
17853 done
17854
17855 for ac_func in fork vfork
17856 do
17857 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17858 echo "$as_me:17858: checking for $ac_func" >&5
17859 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17860 if eval "test \"\${$as_ac_var+set}\" = set"; then
17861   echo $ECHO_N "(cached) $ECHO_C" >&6
17862 else
17863   cat >conftest.$ac_ext <<_ACEOF
17864 #line 17864 "configure"
17865 #include "confdefs.h"
17866 /* System header to define __stub macros and hopefully few prototypes,
17867     which can conflict with char $ac_func (); below.  */
17868 #include <assert.h>
17869 /* Override any gcc2 internal prototype to avoid an error.  */
17870 #ifdef __cplusplus
17871 extern "C"
17872 #endif
17873 /* We use char because int might match the return type of a gcc2
17874    builtin and then its argument prototype would still apply.  */
17875 char $ac_func ();
17876 char (*f) ();
17877
17878 int
17879 main ()
17880 {
17881 /* The GNU C library defines this for functions which it implements
17882     to always fail with ENOSYS.  Some functions are actually named
17883     something starting with __ and the normal name is an alias.  */
17884 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17885 choke me
17886 #else
17887 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17888 #endif
17889
17890   ;
17891   return 0;
17892 }
17893 _ACEOF
17894 rm -f conftest.$ac_objext conftest$ac_exeext
17895 if { (eval echo "$as_me:17895: \"$ac_link\"") >&5
17896   (eval $ac_link) 2>&5
17897   ac_status=$?
17898   echo "$as_me:17898: \$? = $ac_status" >&5
17899   (exit $ac_status); } &&
17900          { ac_try='test -s conftest$ac_exeext'
17901   { (eval echo "$as_me:17901: \"$ac_try\"") >&5
17902   (eval $ac_try) 2>&5
17903   ac_status=$?
17904   echo "$as_me:17904: \$? = $ac_status" >&5
17905   (exit $ac_status); }; }; then
17906   eval "$as_ac_var=yes"
17907 else
17908   echo "$as_me: failed program was:" >&5
17909 cat conftest.$ac_ext >&5
17910 eval "$as_ac_var=no"
17911 fi
17912 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17913 fi
17914 echo "$as_me:17914: result: `eval echo '${'$as_ac_var'}'`" >&5
17915 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17916 if test `eval echo '${'$as_ac_var'}'` = yes; then
17917   cat >>confdefs.h <<EOF
17918 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17919 EOF
17920
17921 fi
17922 done
17923
17924 ac_cv_func_fork_works=$ac_cv_func_fork
17925 if test "x$ac_cv_func_fork" = xyes; then
17926   echo "$as_me:17926: checking for working fork" >&5
17927 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17928 if test "${ac_cv_func_fork_works+set}" = set; then
17929   echo $ECHO_N "(cached) $ECHO_C" >&6
17930 else
17931   if test "$cross_compiling" = yes; then
17932   ac_cv_func_fork_works=cross
17933 else
17934   cat >conftest.$ac_ext <<_ACEOF
17935 /* By Rüdiger Kuhlmann. */
17936       #include <sys/types.h>
17937       #if HAVE_UNISTD_H
17938       # include <unistd.h>
17939       #endif
17940       /* Some systems only have a dummy stub for fork() */
17941       int main ()
17942       {
17943         if (fork() < 0)
17944           $ac_main_return (1);
17945         $ac_main_return (0);
17946       }
17947 _ACEOF
17948 rm -f conftest$ac_exeext
17949 if { (eval echo "$as_me:17949: \"$ac_link\"") >&5
17950   (eval $ac_link) 2>&5
17951   ac_status=$?
17952   echo "$as_me:17952: \$? = $ac_status" >&5
17953   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17954   { (eval echo "$as_me:17954: \"$ac_try\"") >&5
17955   (eval $ac_try) 2>&5
17956   ac_status=$?
17957   echo "$as_me:17957: \$? = $ac_status" >&5
17958   (exit $ac_status); }; }; then
17959   ac_cv_func_fork_works=yes
17960 else
17961   echo "$as_me: program exited with status $ac_status" >&5
17962 echo "$as_me: failed program was:" >&5
17963 cat conftest.$ac_ext >&5
17964 ac_cv_func_fork_works=no
17965 fi
17966 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17967 fi
17968 fi
17969 echo "$as_me:17969: result: $ac_cv_func_fork_works" >&5
17970 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17971
17972 fi
17973 if test "x$ac_cv_func_fork_works" = xcross; then
17974   case $host in
17975     *-*-amigaos* | *-*-msdosdjgpp*)
17976       # Override, as these systems have only a dummy fork() stub
17977       ac_cv_func_fork_works=no
17978       ;;
17979     *)
17980       ac_cv_func_fork_works=yes
17981       ;;
17982   esac
17983   { echo "$as_me:17983: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17984 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17985 fi
17986 ac_cv_func_vfork_works=$ac_cv_func_vfork
17987 if test "x$ac_cv_func_vfork" = xyes; then
17988   echo "$as_me:17988: checking for working vfork" >&5
17989 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17990 if test "${ac_cv_func_vfork_works+set}" = set; then
17991   echo $ECHO_N "(cached) $ECHO_C" >&6
17992 else
17993   if test "$cross_compiling" = yes; then
17994   ac_cv_func_vfork_works=cross
17995 else
17996   cat >conftest.$ac_ext <<_ACEOF
17997 #line 17997 "configure"
17998 #include "confdefs.h"
17999 /* Thanks to Paul Eggert for this test.  */
18000 #include <stdio.h>
18001 #include <sys/types.h>
18002 #include <sys/stat.h>
18003 #if HAVE_UNISTD_H
18004 # include <unistd.h>
18005 #endif
18006 #if HAVE_VFORK_H
18007 # include <vfork.h>
18008 #endif
18009 /* On some sparc systems, changes by the child to local and incoming
18010    argument registers are propagated back to the parent.  The compiler
18011    is told about this with #include <vfork.h>, but some compilers
18012    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18013    static variable whose address is put into a register that is
18014    clobbered by the vfork.  */
18015 static
18016 #ifdef __cplusplus
18017 sparc_address_test (int arg)
18018 # else
18019 sparc_address_test (arg) int arg;
18020 #endif
18021 {
18022   static pid_t child;
18023   if (!child) {
18024     child = vfork ();
18025     if (child < 0) {
18026       perror ("vfork");
18027       _exit(2);
18028     }
18029     if (!child) {
18030       arg = getpid();
18031       write(-1, "", 0);
18032       _exit (arg);
18033     }
18034   }
18035 }
18036
18037 int
18038 main ()
18039 {
18040   pid_t parent = getpid ();
18041   pid_t child;
18042
18043   sparc_address_test ();
18044
18045   child = vfork ();
18046
18047   if (child == 0) {
18048     /* Here is another test for sparc vfork register problems.  This
18049        test uses lots of local variables, at least as many local
18050        variables as main has allocated so far including compiler
18051        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18052        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18053        reuse the register of parent for one of the local variables,
18054        since it will think that parent can't possibly be used any more
18055        in this routine.  Assigning to the local variable will thus
18056        munge parent in the parent process.  */
18057     pid_t
18058       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18059       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18060     /* Convince the compiler that p..p7 are live; otherwise, it might
18061        use the same hardware register for all 8 local variables.  */
18062     if (p != p1 || p != p2 || p != p3 || p != p4
18063         || p != p5 || p != p6 || p != p7)
18064       _exit(1);
18065
18066     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18067        from child file descriptors.  If the child closes a descriptor
18068        before it execs or exits, this munges the parent's descriptor
18069        as well.  Test for this by closing stdout in the child.  */
18070     _exit(close(fileno(stdout)) != 0);
18071   } else {
18072     int status;
18073     struct stat st;
18074
18075     while (wait(&status) != child)
18076       ;
18077     $ac_main_return(
18078          /* Was there some problem with vforking?  */
18079          child < 0
18080
18081          /* Did the child fail?  (This shouldn't happen.)  */
18082          || status
18083
18084          /* Did the vfork/compiler bug occur?  */
18085          || parent != getpid()
18086
18087          /* Did the file descriptor bug occur?  */
18088          || fstat(fileno(stdout), &st) != 0
18089          );
18090   }
18091 }
18092 _ACEOF
18093 rm -f conftest$ac_exeext
18094 if { (eval echo "$as_me:18094: \"$ac_link\"") >&5
18095   (eval $ac_link) 2>&5
18096   ac_status=$?
18097   echo "$as_me:18097: \$? = $ac_status" >&5
18098   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18099   { (eval echo "$as_me:18099: \"$ac_try\"") >&5
18100   (eval $ac_try) 2>&5
18101   ac_status=$?
18102   echo "$as_me:18102: \$? = $ac_status" >&5
18103   (exit $ac_status); }; }; then
18104   ac_cv_func_vfork_works=yes
18105 else
18106   echo "$as_me: program exited with status $ac_status" >&5
18107 echo "$as_me: failed program was:" >&5
18108 cat conftest.$ac_ext >&5
18109 ac_cv_func_vfork_works=no
18110 fi
18111 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18112 fi
18113 fi
18114 echo "$as_me:18114: result: $ac_cv_func_vfork_works" >&5
18115 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18116
18117 fi;
18118 if test "x$ac_cv_func_fork_works" = xcross; then
18119   ac_cv_func_vfork_works=ac_cv_func_vfork
18120   { echo "$as_me:18120: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18121 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18122 fi
18123
18124 if test "x$ac_cv_func_vfork_works" = xyes; then
18125
18126 cat >>confdefs.h <<\EOF
18127 #define HAVE_WORKING_VFORK 1
18128 EOF
18129
18130 else
18131
18132 cat >>confdefs.h <<\EOF
18133 #define vfork fork
18134 EOF
18135
18136 fi
18137 if test "x$ac_cv_func_fork_works" = xyes; then
18138
18139 cat >>confdefs.h <<\EOF
18140 #define HAVE_WORKING_FORK 1
18141 EOF
18142
18143 fi
18144
18145 # special check for test/ditto.c
18146
18147 echo "$as_me:18147: checking for openpty in -lutil" >&5
18148 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18149 if test "${ac_cv_lib_util_openpty+set}" = set; then
18150   echo $ECHO_N "(cached) $ECHO_C" >&6
18151 else
18152   ac_check_lib_save_LIBS=$LIBS
18153 LIBS="-lutil  $LIBS"
18154 cat >conftest.$ac_ext <<_ACEOF
18155 #line 18155 "configure"
18156 #include "confdefs.h"
18157
18158 /* Override any gcc2 internal prototype to avoid an error.  */
18159 #ifdef __cplusplus
18160 extern "C"
18161 #endif
18162 /* We use char because int might match the return type of a gcc2
18163    builtin and then its argument prototype would still apply.  */
18164 char openpty ();
18165 int
18166 main ()
18167 {
18168 openpty ();
18169   ;
18170   return 0;
18171 }
18172 _ACEOF
18173 rm -f conftest.$ac_objext conftest$ac_exeext
18174 if { (eval echo "$as_me:18174: \"$ac_link\"") >&5
18175   (eval $ac_link) 2>&5
18176   ac_status=$?
18177   echo "$as_me:18177: \$? = $ac_status" >&5
18178   (exit $ac_status); } &&
18179          { ac_try='test -s conftest$ac_exeext'
18180   { (eval echo "$as_me:18180: \"$ac_try\"") >&5
18181   (eval $ac_try) 2>&5
18182   ac_status=$?
18183   echo "$as_me:18183: \$? = $ac_status" >&5
18184   (exit $ac_status); }; }; then
18185   ac_cv_lib_util_openpty=yes
18186 else
18187   echo "$as_me: failed program was:" >&5
18188 cat conftest.$ac_ext >&5
18189 ac_cv_lib_util_openpty=no
18190 fi
18191 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18192 LIBS=$ac_check_lib_save_LIBS
18193 fi
18194 echo "$as_me:18194: result: $ac_cv_lib_util_openpty" >&5
18195 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18196 if test $ac_cv_lib_util_openpty = yes; then
18197   cf_cv_lib_util=yes
18198 else
18199   cf_cv_lib_util=no
18200 fi
18201
18202 echo "$as_me:18202: checking for openpty header" >&5
18203 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18204 if test "${cf_cv_func_openpty+set}" = set; then
18205   echo $ECHO_N "(cached) $ECHO_C" >&6
18206 else
18207
18208     cf_save_LIBS="$LIBS"
18209     test $cf_cv_lib_util = yes &&
18210 cf_add_libs="-lutil"
18211 # Filter out duplicates - this happens with badly-designed ".pc" files...
18212 for cf_add_1lib in $LIBS
18213 do
18214         for cf_add_2lib in $cf_add_libs
18215         do
18216                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18217                 then
18218                         cf_add_1lib=
18219                         break
18220                 fi
18221         done
18222         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18223 done
18224 LIBS="$cf_add_libs"
18225
18226     for cf_header in pty.h libutil.h util.h
18227     do
18228     cat >conftest.$ac_ext <<_ACEOF
18229 #line 18229 "configure"
18230 #include "confdefs.h"
18231
18232 #include <$cf_header>
18233
18234 int
18235 main ()
18236 {
18237
18238     int x = openpty((int *)0, (int *)0, (char *)0,
18239                    (struct termios *)0, (struct winsize *)0);
18240
18241   ;
18242   return 0;
18243 }
18244 _ACEOF
18245 rm -f conftest.$ac_objext conftest$ac_exeext
18246 if { (eval echo "$as_me:18246: \"$ac_link\"") >&5
18247   (eval $ac_link) 2>&5
18248   ac_status=$?
18249   echo "$as_me:18249: \$? = $ac_status" >&5
18250   (exit $ac_status); } &&
18251          { ac_try='test -s conftest$ac_exeext'
18252   { (eval echo "$as_me:18252: \"$ac_try\"") >&5
18253   (eval $ac_try) 2>&5
18254   ac_status=$?
18255   echo "$as_me:18255: \$? = $ac_status" >&5
18256   (exit $ac_status); }; }; then
18257
18258         cf_cv_func_openpty=$cf_header
18259         break
18260
18261 else
18262   echo "$as_me: failed program was:" >&5
18263 cat conftest.$ac_ext >&5
18264
18265         cf_cv_func_openpty=no
18266
18267 fi
18268 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18269     done
18270     LIBS="$cf_save_LIBS"
18271
18272 fi
18273 echo "$as_me:18273: result: $cf_cv_func_openpty" >&5
18274 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18275
18276 if test "$cf_cv_func_openpty" != no ; then
18277
18278 cat >>confdefs.h <<EOF
18279 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18280 EOF
18281
18282 cat >>confdefs.h <<\EOF
18283 #define USE_XTERM_PTY 1
18284 EOF
18285
18286     if test "x$cf_cv_lib_util" = xyes ; then
18287
18288 cf_add_libs="-lutil"
18289 # Filter out duplicates - this happens with badly-designed ".pc" files...
18290 for cf_add_1lib in $TEST_LIBS
18291 do
18292         for cf_add_2lib in $cf_add_libs
18293         do
18294                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18295                 then
18296                         cf_add_1lib=
18297                         break
18298                 fi
18299         done
18300         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18301 done
18302 TEST_LIBS="$cf_add_libs"
18303
18304     fi
18305 fi
18306
18307 if test "$with_hashed_db" != no ; then
18308
18309 cat >>confdefs.h <<\EOF
18310 #define USE_HASHED_DB 1
18311 EOF
18312
18313 case $with_hashed_db in #(vi
18314 yes|*able*) #(vi
18315     ;;
18316 *)
18317     if test -d "$with_hashed_db" ; then
18318
18319 if test -n "$with_hashed_db/include" ; then
18320   for cf_add_incdir in $with_hashed_db/include
18321   do
18322         while test $cf_add_incdir != /usr/include
18323         do
18324           if test -d $cf_add_incdir
18325           then
18326                 cf_have_incdir=no
18327                 if test -n "$CFLAGS$CPPFLAGS" ; then
18328                   # a loop is needed to ensure we can add subdirs of existing dirs
18329                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18330                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18331                           cf_have_incdir=yes; break
18332                         fi
18333                   done
18334                 fi
18335
18336                 if test "$cf_have_incdir" = no ; then
18337                   if test "$cf_add_incdir" = /usr/local/include ; then
18338                         if test "$GCC" = yes
18339                         then
18340                           cf_save_CPPFLAGS=$CPPFLAGS
18341                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18342                           cat >conftest.$ac_ext <<_ACEOF
18343 #line 18343 "configure"
18344 #include "confdefs.h"
18345 #include <stdio.h>
18346 int
18347 main ()
18348 {
18349 printf("Hello")
18350   ;
18351   return 0;
18352 }
18353 _ACEOF
18354 rm -f conftest.$ac_objext
18355 if { (eval echo "$as_me:18355: \"$ac_compile\"") >&5
18356   (eval $ac_compile) 2>&5
18357   ac_status=$?
18358   echo "$as_me:18358: \$? = $ac_status" >&5
18359   (exit $ac_status); } &&
18360          { ac_try='test -s conftest.$ac_objext'
18361   { (eval echo "$as_me:18361: \"$ac_try\"") >&5
18362   (eval $ac_try) 2>&5
18363   ac_status=$?
18364   echo "$as_me:18364: \$? = $ac_status" >&5
18365   (exit $ac_status); }; }; then
18366   :
18367 else
18368   echo "$as_me: failed program was:" >&5
18369 cat conftest.$ac_ext >&5
18370 cf_have_incdir=yes
18371 fi
18372 rm -f conftest.$ac_objext conftest.$ac_ext
18373                           CPPFLAGS=$cf_save_CPPFLAGS
18374                         fi
18375                   fi
18376                 fi
18377
18378                 if test "$cf_have_incdir" = no ; then
18379                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18380
18381 echo "${as_me:-configure}:18381: testing adding $cf_add_incdir to include-path ..." 1>&5
18382
18383                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18384
18385                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18386                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18387                   cf_add_incdir="$cf_top_incdir"
18388                 else
18389                   break
18390                 fi
18391           fi
18392         done
18393   done
18394 fi
18395
18396 if test -n "$with_hashed_db/lib" ; then
18397   for cf_add_libdir in $with_hashed_db/lib
18398   do
18399     if test $cf_add_libdir = /usr/lib ; then
18400       :
18401     elif test -d $cf_add_libdir
18402     then
18403       cf_have_libdir=no
18404       if test -n "$LDFLAGS$LIBS" ; then
18405         # a loop is needed to ensure we can add subdirs of existing dirs
18406         for cf_test_libdir in $LDFLAGS $LIBS ; do
18407           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18408             cf_have_libdir=yes; break
18409           fi
18410         done
18411       fi
18412       if test "$cf_have_libdir" = no ; then
18413         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18414
18415 echo "${as_me:-configure}:18415: testing adding $cf_add_libdir to library-path ..." 1>&5
18416
18417         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18418       fi
18419     fi
18420   done
18421 fi
18422
18423         else
18424                 case "$with_hashed_db" in #(vi
18425                 ./*|../*|/*)
18426                         { echo "$as_me:18426: WARNING: no such directory $with_hashed_db" >&5
18427 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18428                         ;; #(vi
18429                 *)
18430
18431 cf_search=
18432
18433 test "x$prefix" != "xNONE" && \
18434 test -d "$prefix" && \
18435  {
18436         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18437         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18438         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18439         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18440         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18441         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18442 }
18443
18444 for cf_subdir_prefix in \
18445         /usr \
18446         /usr/local \
18447         /usr/pkg \
18448         /opt \
18449         /opt/local \
18450         $HOME
18451 do
18452
18453 test "x$cf_subdir_prefix" != "x$prefix" && \
18454 test -d "$cf_subdir_prefix" && \
18455 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18456         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
18457         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
18458         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
18459         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
18460         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
18461         test -d $cf_subdir_prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include/$with_hashed_db"
18462 }
18463
18464 done
18465
18466         for cf_item in $cf_search
18467         do
18468                 case $cf_item in #(vi
18469                 */$with_hashed_db)
18470
18471 if test -n "$cf_item" ; then
18472   for cf_add_incdir in $cf_item
18473   do
18474         while test $cf_add_incdir != /usr/include
18475         do
18476           if test -d $cf_add_incdir
18477           then
18478                 cf_have_incdir=no
18479                 if test -n "$CFLAGS$CPPFLAGS" ; then
18480                   # a loop is needed to ensure we can add subdirs of existing dirs
18481                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18482                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18483                           cf_have_incdir=yes; break
18484                         fi
18485                   done
18486                 fi
18487
18488                 if test "$cf_have_incdir" = no ; then
18489                   if test "$cf_add_incdir" = /usr/local/include ; then
18490                         if test "$GCC" = yes
18491                         then
18492                           cf_save_CPPFLAGS=$CPPFLAGS
18493                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18494                           cat >conftest.$ac_ext <<_ACEOF
18495 #line 18495 "configure"
18496 #include "confdefs.h"
18497 #include <stdio.h>
18498 int
18499 main ()
18500 {
18501 printf("Hello")
18502   ;
18503   return 0;
18504 }
18505 _ACEOF
18506 rm -f conftest.$ac_objext
18507 if { (eval echo "$as_me:18507: \"$ac_compile\"") >&5
18508   (eval $ac_compile) 2>&5
18509   ac_status=$?
18510   echo "$as_me:18510: \$? = $ac_status" >&5
18511   (exit $ac_status); } &&
18512          { ac_try='test -s conftest.$ac_objext'
18513   { (eval echo "$as_me:18513: \"$ac_try\"") >&5
18514   (eval $ac_try) 2>&5
18515   ac_status=$?
18516   echo "$as_me:18516: \$? = $ac_status" >&5
18517   (exit $ac_status); }; }; then
18518   :
18519 else
18520   echo "$as_me: failed program was:" >&5
18521 cat conftest.$ac_ext >&5
18522 cf_have_incdir=yes
18523 fi
18524 rm -f conftest.$ac_objext conftest.$ac_ext
18525                           CPPFLAGS=$cf_save_CPPFLAGS
18526                         fi
18527                   fi
18528                 fi
18529
18530                 if test "$cf_have_incdir" = no ; then
18531                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18532
18533 echo "${as_me:-configure}:18533: testing adding $cf_add_incdir to include-path ..." 1>&5
18534
18535                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18536
18537                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18538                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18539                   cf_add_incdir="$cf_top_incdir"
18540                 else
18541                   break
18542                 fi
18543           fi
18544         done
18545   done
18546 fi
18547
18548                         ;;
18549                 esac
18550         done
18551
18552 cf_search=
18553
18554 test "x$prefix" != "xNONE" && \
18555 test -d "$prefix" && \
18556  {
18557         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18558         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18559         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18560         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18561         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18562         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18563 }
18564
18565 for cf_subdir_prefix in \
18566         /usr \
18567         /usr/local \
18568         /usr/pkg \
18569         /opt \
18570         /opt/local \
18571         $HOME
18572 do
18573
18574 test "x$cf_subdir_prefix" != "x$prefix" && \
18575 test -d "$cf_subdir_prefix" && \
18576 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18577         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
18578         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
18579         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
18580         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
18581         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
18582         test -d $cf_subdir_prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib/$with_hashed_db"
18583 }
18584
18585 done
18586
18587         for cf_item in $cf_search
18588         do
18589                 case $cf_item in #(vi
18590                 */$with_hashed_db)
18591
18592 if test -n "$cf_item" ; then
18593   for cf_add_libdir in $cf_item
18594   do
18595     if test $cf_add_libdir = /usr/lib ; then
18596       :
18597     elif test -d $cf_add_libdir
18598     then
18599       cf_have_libdir=no
18600       if test -n "$LDFLAGS$LIBS" ; then
18601         # a loop is needed to ensure we can add subdirs of existing dirs
18602         for cf_test_libdir in $LDFLAGS $LIBS ; do
18603           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18604             cf_have_libdir=yes; break
18605           fi
18606         done
18607       fi
18608       if test "$cf_have_libdir" = no ; then
18609         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18610
18611 echo "${as_me:-configure}:18611: testing adding $cf_add_libdir to library-path ..." 1>&5
18612
18613         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18614       fi
18615     fi
18616   done
18617 fi
18618
18619                         ;;
18620                 esac
18621         done
18622
18623                         ;;
18624                 esac
18625     fi
18626 esac
18627
18628 echo "$as_me:18628: checking for db.h" >&5
18629 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18630 if test "${ac_cv_header_db_h+set}" = set; then
18631   echo $ECHO_N "(cached) $ECHO_C" >&6
18632 else
18633   cat >conftest.$ac_ext <<_ACEOF
18634 #line 18634 "configure"
18635 #include "confdefs.h"
18636 #include <db.h>
18637 _ACEOF
18638 if { (eval echo "$as_me:18638: \"$ac_cpp conftest.$ac_ext\"") >&5
18639   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18640   ac_status=$?
18641   egrep -v '^ *\+' conftest.er1 >conftest.err
18642   rm -f conftest.er1
18643   cat conftest.err >&5
18644   echo "$as_me:18644: \$? = $ac_status" >&5
18645   (exit $ac_status); } >/dev/null; then
18646   if test -s conftest.err; then
18647     ac_cpp_err=$ac_c_preproc_warn_flag
18648   else
18649     ac_cpp_err=
18650   fi
18651 else
18652   ac_cpp_err=yes
18653 fi
18654 if test -z "$ac_cpp_err"; then
18655   ac_cv_header_db_h=yes
18656 else
18657   echo "$as_me: failed program was:" >&5
18658   cat conftest.$ac_ext >&5
18659   ac_cv_header_db_h=no
18660 fi
18661 rm -f conftest.err conftest.$ac_ext
18662 fi
18663 echo "$as_me:18663: result: $ac_cv_header_db_h" >&5
18664 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18665 if test $ac_cv_header_db_h = yes; then
18666
18667 echo "$as_me:18667: checking for version of db" >&5
18668 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18669 if test "${cf_cv_hashed_db_version+set}" = set; then
18670   echo $ECHO_N "(cached) $ECHO_C" >&6
18671 else
18672
18673 cf_cv_hashed_db_version=unknown
18674
18675 for cf_db_version in 1 2 3 4 5 6
18676 do
18677
18678 echo "${as_me:-configure}:18678: testing checking for db version $cf_db_version ..." 1>&5
18679
18680         cat >conftest.$ac_ext <<_ACEOF
18681 #line 18681 "configure"
18682 #include "confdefs.h"
18683
18684 $ac_includes_default
18685 #include <db.h>
18686
18687 #ifdef DB_VERSION_MAJOR
18688         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18689 #if $cf_db_version == DB_VERSION_MAJOR
18690         /* ok */
18691 #else
18692         make an error
18693 #endif
18694 #else
18695 #if $cf_db_version == 1
18696         /* ok: assuming this is DB 1.8.5 */
18697 #else
18698         make an error
18699 #endif
18700 #endif
18701
18702 int
18703 main ()
18704 {
18705 DBT *foo = 0
18706   ;
18707   return 0;
18708 }
18709 _ACEOF
18710 rm -f conftest.$ac_objext
18711 if { (eval echo "$as_me:18711: \"$ac_compile\"") >&5
18712   (eval $ac_compile) 2>&5
18713   ac_status=$?
18714   echo "$as_me:18714: \$? = $ac_status" >&5
18715   (exit $ac_status); } &&
18716          { ac_try='test -s conftest.$ac_objext'
18717   { (eval echo "$as_me:18717: \"$ac_try\"") >&5
18718   (eval $ac_try) 2>&5
18719   ac_status=$?
18720   echo "$as_me:18720: \$? = $ac_status" >&5
18721   (exit $ac_status); }; }; then
18722
18723         cf_cv_hashed_db_version=$cf_db_version
18724         break
18725
18726 else
18727   echo "$as_me: failed program was:" >&5
18728 cat conftest.$ac_ext >&5
18729 fi
18730 rm -f conftest.$ac_objext conftest.$ac_ext
18731 done
18732
18733 fi
18734 echo "$as_me:18734: result: $cf_cv_hashed_db_version" >&5
18735 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
18736
18737 if test "$cf_cv_hashed_db_version" = unknown ; then
18738         { { echo "$as_me:18738: error: Cannot determine version of db" >&5
18739 echo "$as_me: error: Cannot determine version of db" >&2;}
18740    { (exit 1); exit 1; }; }
18741 else
18742
18743 echo "$as_me:18743: checking for db libraries" >&5
18744 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
18745 if test "${cf_cv_hashed_db_libs+set}" = set; then
18746   echo $ECHO_N "(cached) $ECHO_C" >&6
18747 else
18748
18749 cf_cv_hashed_db_libs=unknown
18750 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
18751 do
18752         cf_save_libs="$LIBS"
18753         if test -n "$cf_db_libs"; then
18754
18755 cf_add_libs="-l$cf_db_libs"
18756 # Filter out duplicates - this happens with badly-designed ".pc" files...
18757 for cf_add_1lib in $LIBS
18758 do
18759         for cf_add_2lib in $cf_add_libs
18760         do
18761                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18762                 then
18763                         cf_add_1lib=
18764                         break
18765                 fi
18766         done
18767         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18768 done
18769 LIBS="$cf_add_libs"
18770
18771         fi
18772
18773 echo "${as_me:-configure}:18773: testing checking for library "$cf_db_libs" ..." 1>&5
18774
18775         cat >conftest.$ac_ext <<_ACEOF
18776 #line 18776 "configure"
18777 #include "confdefs.h"
18778
18779 $ac_includes_default
18780 #include <db.h>
18781
18782 int
18783 main ()
18784 {
18785
18786         char *path = "/tmp/foo";
18787 #ifdef DB_VERSION_MAJOR
18788 #if DB_VERSION_MAJOR >= 4
18789         DB *result = 0;
18790         db_create(&result, NULL, 0);
18791         result->open(result,
18792                 NULL,
18793                 path,
18794                 path,
18795                 DB_HASH,
18796                 DB_CREATE,
18797                 0644);
18798 #elif DB_VERSION_MAJOR >= 3
18799         DB *result = 0;
18800         db_create(&result, NULL, 0);
18801         result->open(result,
18802                 path,
18803                 path,
18804                 DB_HASH,
18805                 DB_CREATE,
18806                 0644);
18807 #elif DB_VERSION_MAJOR >= 2
18808         DB *result = 0;
18809         db_open(path,
18810                 DB_HASH,
18811                 DB_CREATE,
18812                 0644,
18813                 (DB_ENV *) 0,
18814                 (DB_INFO *) 0,
18815                 &result);
18816 #endif /* DB_VERSION_MAJOR */
18817 #else
18818         DB *result = dbopen(path,
18819                      2,
18820                      0644,
18821                      DB_HASH,
18822                      0);
18823 #endif
18824         ${cf_cv_main_return:-return}(result != 0)
18825
18826   ;
18827   return 0;
18828 }
18829 _ACEOF
18830 rm -f conftest.$ac_objext conftest$ac_exeext
18831 if { (eval echo "$as_me:18831: \"$ac_link\"") >&5
18832   (eval $ac_link) 2>&5
18833   ac_status=$?
18834   echo "$as_me:18834: \$? = $ac_status" >&5
18835   (exit $ac_status); } &&
18836          { ac_try='test -s conftest$ac_exeext'
18837   { (eval echo "$as_me:18837: \"$ac_try\"") >&5
18838   (eval $ac_try) 2>&5
18839   ac_status=$?
18840   echo "$as_me:18840: \$? = $ac_status" >&5
18841   (exit $ac_status); }; }; then
18842
18843         if test -n "$cf_db_libs" ; then
18844                 cf_cv_hashed_db_libs=$cf_db_libs
18845         else
18846                 cf_cv_hashed_db_libs=default
18847         fi
18848         LIBS="$cf_save_libs"
18849         break
18850
18851 else
18852   echo "$as_me: failed program was:" >&5
18853 cat conftest.$ac_ext >&5
18854 fi
18855 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18856         LIBS="$cf_save_libs"
18857 done
18858
18859 fi
18860 echo "$as_me:18860: result: $cf_cv_hashed_db_libs" >&5
18861 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
18862
18863         if test "$cf_cv_hashed_db_libs" = unknown ; then
18864                 { { echo "$as_me:18864: error: Cannot determine library for db" >&5
18865 echo "$as_me: error: Cannot determine library for db" >&2;}
18866    { (exit 1); exit 1; }; }
18867         elif test "$cf_cv_hashed_db_libs" != default ; then
18868
18869 cf_add_libs="-l$cf_cv_hashed_db_libs"
18870 # Filter out duplicates - this happens with badly-designed ".pc" files...
18871 for cf_add_1lib in $LIBS
18872 do
18873         for cf_add_2lib in $cf_add_libs
18874         do
18875                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18876                 then
18877                         cf_add_1lib=
18878                         break
18879                 fi
18880         done
18881         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18882 done
18883 LIBS="$cf_add_libs"
18884
18885         fi
18886 fi
18887
18888 else
18889
18890         { { echo "$as_me:18890: error: Cannot find db.h" >&5
18891 echo "$as_me: error: Cannot find db.h" >&2;}
18892    { (exit 1); exit 1; }; }
18893
18894 fi
18895
18896 fi
18897
18898 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
18899         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18900         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18901 fi
18902
18903 # Just in case, check if the C compiler has a bool type.
18904
18905 echo "$as_me:18905: checking if we should include stdbool.h" >&5
18906 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18907
18908 if test "${cf_cv_header_stdbool_h+set}" = set; then
18909   echo $ECHO_N "(cached) $ECHO_C" >&6
18910 else
18911
18912         cat >conftest.$ac_ext <<_ACEOF
18913 #line 18913 "configure"
18914 #include "confdefs.h"
18915
18916 int
18917 main ()
18918 {
18919 bool foo = false
18920   ;
18921   return 0;
18922 }
18923 _ACEOF
18924 rm -f conftest.$ac_objext
18925 if { (eval echo "$as_me:18925: \"$ac_compile\"") >&5
18926   (eval $ac_compile) 2>&5
18927   ac_status=$?
18928   echo "$as_me:18928: \$? = $ac_status" >&5
18929   (exit $ac_status); } &&
18930          { ac_try='test -s conftest.$ac_objext'
18931   { (eval echo "$as_me:18931: \"$ac_try\"") >&5
18932   (eval $ac_try) 2>&5
18933   ac_status=$?
18934   echo "$as_me:18934: \$? = $ac_status" >&5
18935   (exit $ac_status); }; }; then
18936   cf_cv_header_stdbool_h=0
18937 else
18938   echo "$as_me: failed program was:" >&5
18939 cat conftest.$ac_ext >&5
18940 cat >conftest.$ac_ext <<_ACEOF
18941 #line 18941 "configure"
18942 #include "confdefs.h"
18943
18944 #ifndef __BEOS__
18945 #include <stdbool.h>
18946 #endif
18947
18948 int
18949 main ()
18950 {
18951 bool foo = false
18952   ;
18953   return 0;
18954 }
18955 _ACEOF
18956 rm -f conftest.$ac_objext
18957 if { (eval echo "$as_me:18957: \"$ac_compile\"") >&5
18958   (eval $ac_compile) 2>&5
18959   ac_status=$?
18960   echo "$as_me:18960: \$? = $ac_status" >&5
18961   (exit $ac_status); } &&
18962          { ac_try='test -s conftest.$ac_objext'
18963   { (eval echo "$as_me:18963: \"$ac_try\"") >&5
18964   (eval $ac_try) 2>&5
18965   ac_status=$?
18966   echo "$as_me:18966: \$? = $ac_status" >&5
18967   (exit $ac_status); }; }; then
18968   cf_cv_header_stdbool_h=1
18969 else
18970   echo "$as_me: failed program was:" >&5
18971 cat conftest.$ac_ext >&5
18972 cf_cv_header_stdbool_h=0
18973 fi
18974 rm -f conftest.$ac_objext conftest.$ac_ext
18975 fi
18976 rm -f conftest.$ac_objext conftest.$ac_ext
18977 fi
18978
18979 if test "$cf_cv_header_stdbool_h" = 1
18980 then    echo "$as_me:18980: result: yes" >&5
18981 echo "${ECHO_T}yes" >&6
18982 else    echo "$as_me:18982: result: no" >&5
18983 echo "${ECHO_T}no" >&6
18984 fi
18985
18986 echo "$as_me:18986: checking for builtin bool type" >&5
18987 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18988
18989 if test "${cf_cv_cc_bool_type+set}" = set; then
18990   echo $ECHO_N "(cached) $ECHO_C" >&6
18991 else
18992
18993         cat >conftest.$ac_ext <<_ACEOF
18994 #line 18994 "configure"
18995 #include "confdefs.h"
18996
18997 #include <stdio.h>
18998 #include <sys/types.h>
18999
19000 int
19001 main ()
19002 {
19003 bool x = false
19004   ;
19005   return 0;
19006 }
19007 _ACEOF
19008 rm -f conftest.$ac_objext
19009 if { (eval echo "$as_me:19009: \"$ac_compile\"") >&5
19010   (eval $ac_compile) 2>&5
19011   ac_status=$?
19012   echo "$as_me:19012: \$? = $ac_status" >&5
19013   (exit $ac_status); } &&
19014          { ac_try='test -s conftest.$ac_objext'
19015   { (eval echo "$as_me:19015: \"$ac_try\"") >&5
19016   (eval $ac_try) 2>&5
19017   ac_status=$?
19018   echo "$as_me:19018: \$? = $ac_status" >&5
19019   (exit $ac_status); }; }; then
19020   cf_cv_cc_bool_type=1
19021 else
19022   echo "$as_me: failed program was:" >&5
19023 cat conftest.$ac_ext >&5
19024 cf_cv_cc_bool_type=0
19025 fi
19026 rm -f conftest.$ac_objext conftest.$ac_ext
19027
19028 fi
19029
19030 if test "$cf_cv_cc_bool_type" = 1
19031 then    echo "$as_me:19031: result: yes" >&5
19032 echo "${ECHO_T}yes" >&6
19033 else    echo "$as_me:19033: result: no" >&5
19034 echo "${ECHO_T}no" >&6
19035 fi
19036
19037 # Check for C++ compiler characteristics (and ensure that it's there!)
19038 if test -n "$CXX" ; then
19039         ac_ext=cc
19040 ac_cpp='$CXXCPP $CPPFLAGS'
19041 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19042 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19043 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19044 ac_main_return=return
19045
19046 if test -n "$GXX" ; then
19047 case $cf_cv_system_name in #(vi
19048 os2*) #(vi
19049         cf_stdcpp_libname=stdcpp
19050         ;;
19051 *)
19052         cf_stdcpp_libname=stdc++
19053         ;;
19054 esac
19055 echo "$as_me:19055: checking for library $cf_stdcpp_libname" >&5
19056 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19057 if test "${cf_cv_libstdcpp+set}" = set; then
19058   echo $ECHO_N "(cached) $ECHO_C" >&6
19059 else
19060
19061         cf_save="$LIBS"
19062
19063 cf_add_libs="-l$cf_stdcpp_libname"
19064 # Filter out duplicates - this happens with badly-designed ".pc" files...
19065 for cf_add_1lib in $LIBS
19066 do
19067         for cf_add_2lib in $cf_add_libs
19068         do
19069                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19070                 then
19071                         cf_add_1lib=
19072                         break
19073                 fi
19074         done
19075         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19076 done
19077 LIBS="$cf_add_libs"
19078
19079 cat >conftest.$ac_ext <<_ACEOF
19080 #line 19080 "configure"
19081 #include "confdefs.h"
19082
19083 #include <strstream.h>
19084 int
19085 main ()
19086 {
19087
19088 char buf[80];
19089 strstreambuf foo(buf, sizeof(buf))
19090
19091   ;
19092   return 0;
19093 }
19094 _ACEOF
19095 rm -f conftest.$ac_objext conftest$ac_exeext
19096 if { (eval echo "$as_me:19096: \"$ac_link\"") >&5
19097   (eval $ac_link) 2>&5
19098   ac_status=$?
19099   echo "$as_me:19099: \$? = $ac_status" >&5
19100   (exit $ac_status); } &&
19101          { ac_try='test -s conftest$ac_exeext'
19102   { (eval echo "$as_me:19102: \"$ac_try\"") >&5
19103   (eval $ac_try) 2>&5
19104   ac_status=$?
19105   echo "$as_me:19105: \$? = $ac_status" >&5
19106   (exit $ac_status); }; }; then
19107   cf_cv_libstdcpp=yes
19108 else
19109   echo "$as_me: failed program was:" >&5
19110 cat conftest.$ac_ext >&5
19111 cf_cv_libstdcpp=no
19112 fi
19113 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19114         LIBS="$cf_save"
19115
19116 fi
19117 echo "$as_me:19117: result: $cf_cv_libstdcpp" >&5
19118 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19119 test "$cf_cv_libstdcpp" = yes &&
19120 cf_add_libs="-l$cf_stdcpp_libname"
19121 # Filter out duplicates - this happens with badly-designed ".pc" files...
19122 for cf_add_1lib in $CXXLIBS
19123 do
19124         for cf_add_2lib in $cf_add_libs
19125         do
19126                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19127                 then
19128                         cf_add_1lib=
19129                         break
19130                 fi
19131         done
19132         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19133 done
19134 CXXLIBS="$cf_add_libs"
19135
19136 fi
19137
19138         echo "$as_me:19138: checking whether $CXX understands -c and -o together" >&5
19139 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19140 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19141   echo $ECHO_N "(cached) $ECHO_C" >&6
19142 else
19143
19144 cat > conftest.$ac_ext <<CF_EOF
19145 #include <stdio.h>
19146 int main()
19147 {
19148         ${cf_cv_main_return:-return}(0);
19149 }
19150 CF_EOF
19151 # We do the test twice because some compilers refuse to overwrite an
19152 # existing .o file with -o, though they will create one.
19153 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19154 if { (eval echo "$as_me:19154: \"$ac_try\"") >&5
19155   (eval $ac_try) 2>&5
19156   ac_status=$?
19157   echo "$as_me:19157: \$? = $ac_status" >&5
19158   (exit $ac_status); } &&
19159   test -f conftest2.$ac_objext && { (eval echo "$as_me:19159: \"$ac_try\"") >&5
19160   (eval $ac_try) 2>&5
19161   ac_status=$?
19162   echo "$as_me:19162: \$? = $ac_status" >&5
19163   (exit $ac_status); };
19164 then
19165   eval cf_cv_prog_CXX_c_o=yes
19166 else
19167   eval cf_cv_prog_CXX_c_o=no
19168 fi
19169 rm -rf conftest*
19170
19171 fi
19172 if test $cf_cv_prog_CXX_c_o = yes; then
19173   echo "$as_me:19173: result: yes" >&5
19174 echo "${ECHO_T}yes" >&6
19175 else
19176   echo "$as_me:19176: result: no" >&5
19177 echo "${ECHO_T}no" >&6
19178 fi
19179
19180         case $GXX_VERSION in
19181         1*|2.0-6*)
19182                 cf_cxx_library=yes
19183                 ;;
19184         *-2.7*|2.7*)
19185
19186 cf_cxx_library=unknown
19187 case $cf_cv_system_name in #(vi
19188 os2*) #(vi
19189         cf_gpp_libname=gpp
19190         ;;
19191 *)
19192         cf_gpp_libname=g++
19193         ;;
19194 esac
19195 if test "$GXX" = yes; then
19196         echo "$as_me:19196: checking for lib$cf_gpp_libname" >&5
19197 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19198         cf_save="$LIBS"
19199
19200 cf_add_libs="-l$cf_gpp_libname"
19201 # Filter out duplicates - this happens with badly-designed ".pc" files...
19202 for cf_add_1lib in $LIBS
19203 do
19204         for cf_add_2lib in $cf_add_libs
19205         do
19206                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19207                 then
19208                         cf_add_1lib=
19209                         break
19210                 fi
19211         done
19212         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19213 done
19214 LIBS="$cf_add_libs"
19215
19216         cat >conftest.$ac_ext <<_ACEOF
19217 #line 19217 "configure"
19218 #include "confdefs.h"
19219
19220 #include <$cf_gpp_libname/builtin.h>
19221
19222 int
19223 main ()
19224 {
19225 two_arg_error_handler_t foo2 = lib_error_handler
19226   ;
19227   return 0;
19228 }
19229 _ACEOF
19230 rm -f conftest.$ac_objext conftest$ac_exeext
19231 if { (eval echo "$as_me:19231: \"$ac_link\"") >&5
19232   (eval $ac_link) 2>&5
19233   ac_status=$?
19234   echo "$as_me:19234: \$? = $ac_status" >&5
19235   (exit $ac_status); } &&
19236          { ac_try='test -s conftest$ac_exeext'
19237   { (eval echo "$as_me:19237: \"$ac_try\"") >&5
19238   (eval $ac_try) 2>&5
19239   ac_status=$?
19240   echo "$as_me:19240: \$? = $ac_status" >&5
19241   (exit $ac_status); }; }; then
19242   cf_cxx_library=yes
19243
19244 cf_add_libs="-l$cf_gpp_libname"
19245 # Filter out duplicates - this happens with badly-designed ".pc" files...
19246 for cf_add_1lib in $CXXLIBS
19247 do
19248         for cf_add_2lib in $cf_add_libs
19249         do
19250                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19251                 then
19252                         cf_add_1lib=
19253                         break
19254                 fi
19255         done
19256         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19257 done
19258 CXXLIBS="$cf_add_libs"
19259
19260          if test "$cf_gpp_libname" = cpp ; then
19261
19262 cat >>confdefs.h <<\EOF
19263 #define HAVE_GPP_BUILTIN_H 1
19264 EOF
19265
19266          else
19267
19268 cat >>confdefs.h <<\EOF
19269 #define HAVE_GXX_BUILTIN_H 1
19270 EOF
19271
19272          fi
19273 else
19274   echo "$as_me: failed program was:" >&5
19275 cat conftest.$ac_ext >&5
19276 cat >conftest.$ac_ext <<_ACEOF
19277 #line 19277 "configure"
19278 #include "confdefs.h"
19279
19280 #include <builtin.h>
19281
19282 int
19283 main ()
19284 {
19285 two_arg_error_handler_t foo2 = lib_error_handler
19286   ;
19287   return 0;
19288 }
19289 _ACEOF
19290 rm -f conftest.$ac_objext conftest$ac_exeext
19291 if { (eval echo "$as_me:19291: \"$ac_link\"") >&5
19292   (eval $ac_link) 2>&5
19293   ac_status=$?
19294   echo "$as_me:19294: \$? = $ac_status" >&5
19295   (exit $ac_status); } &&
19296          { ac_try='test -s conftest$ac_exeext'
19297   { (eval echo "$as_me:19297: \"$ac_try\"") >&5
19298   (eval $ac_try) 2>&5
19299   ac_status=$?
19300   echo "$as_me:19300: \$? = $ac_status" >&5
19301   (exit $ac_status); }; }; then
19302   cf_cxx_library=yes
19303
19304 cf_add_libs="-l$cf_gpp_libname"
19305 # Filter out duplicates - this happens with badly-designed ".pc" files...
19306 for cf_add_1lib in $CXXLIBS
19307 do
19308         for cf_add_2lib in $cf_add_libs
19309         do
19310                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19311                 then
19312                         cf_add_1lib=
19313                         break
19314                 fi
19315         done
19316         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19317 done
19318 CXXLIBS="$cf_add_libs"
19319
19320 cat >>confdefs.h <<\EOF
19321 #define HAVE_BUILTIN_H 1
19322 EOF
19323
19324 else
19325   echo "$as_me: failed program was:" >&5
19326 cat conftest.$ac_ext >&5
19327 cf_cxx_library=no
19328 fi
19329 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19330 fi
19331 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19332         LIBS="$cf_save"
19333         echo "$as_me:19333: result: $cf_cxx_library" >&5
19334 echo "${ECHO_T}$cf_cxx_library" >&6
19335 fi
19336
19337                 ;;
19338         *)
19339                 cf_cxx_library=no
19340                 ;;
19341         esac
19342
19343         ac_ext=cc
19344 ac_cpp='$CXXCPP $CPPFLAGS'
19345 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19346 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19347 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19348 ac_main_return=return
19349 echo "$as_me:19349: checking how to run the C++ preprocessor" >&5
19350 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19351 if test -z "$CXXCPP"; then
19352   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19353   echo $ECHO_N "(cached) $ECHO_C" >&6
19354 else
19355       # Double quotes because CXXCPP needs to be expanded
19356     for CXXCPP in "$CXX -E" "/lib/cpp"
19357     do
19358       ac_preproc_ok=false
19359 for ac_cxx_preproc_warn_flag in '' yes
19360 do
19361   # Use a header file that comes with gcc, so configuring glibc
19362   # with a fresh cross-compiler works.
19363   # On the NeXT, cc -E runs the code through the compiler's parser,
19364   # not just through cpp. "Syntax error" is here to catch this case.
19365   cat >conftest.$ac_ext <<_ACEOF
19366 #line 19366 "configure"
19367 #include "confdefs.h"
19368 #include <assert.h>
19369                      Syntax error
19370 _ACEOF
19371 if { (eval echo "$as_me:19371: \"$ac_cpp conftest.$ac_ext\"") >&5
19372   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19373   ac_status=$?
19374   egrep -v '^ *\+' conftest.er1 >conftest.err
19375   rm -f conftest.er1
19376   cat conftest.err >&5
19377   echo "$as_me:19377: \$? = $ac_status" >&5
19378   (exit $ac_status); } >/dev/null; then
19379   if test -s conftest.err; then
19380     ac_cpp_err=$ac_cxx_preproc_warn_flag
19381   else
19382     ac_cpp_err=
19383   fi
19384 else
19385   ac_cpp_err=yes
19386 fi
19387 if test -z "$ac_cpp_err"; then
19388   :
19389 else
19390   echo "$as_me: failed program was:" >&5
19391   cat conftest.$ac_ext >&5
19392   # Broken: fails on valid input.
19393 continue
19394 fi
19395 rm -f conftest.err conftest.$ac_ext
19396
19397   # OK, works on sane cases.  Now check whether non-existent headers
19398   # can be detected and how.
19399   cat >conftest.$ac_ext <<_ACEOF
19400 #line 19400 "configure"
19401 #include "confdefs.h"
19402 #include <ac_nonexistent.h>
19403 _ACEOF
19404 if { (eval echo "$as_me:19404: \"$ac_cpp conftest.$ac_ext\"") >&5
19405   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19406   ac_status=$?
19407   egrep -v '^ *\+' conftest.er1 >conftest.err
19408   rm -f conftest.er1
19409   cat conftest.err >&5
19410   echo "$as_me:19410: \$? = $ac_status" >&5
19411   (exit $ac_status); } >/dev/null; then
19412   if test -s conftest.err; then
19413     ac_cpp_err=$ac_cxx_preproc_warn_flag
19414   else
19415     ac_cpp_err=
19416   fi
19417 else
19418   ac_cpp_err=yes
19419 fi
19420 if test -z "$ac_cpp_err"; then
19421   # Broken: success on invalid input.
19422 continue
19423 else
19424   echo "$as_me: failed program was:" >&5
19425   cat conftest.$ac_ext >&5
19426   # Passes both tests.
19427 ac_preproc_ok=:
19428 break
19429 fi
19430 rm -f conftest.err conftest.$ac_ext
19431
19432 done
19433 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19434 rm -f conftest.err conftest.$ac_ext
19435 if $ac_preproc_ok; then
19436   break
19437 fi
19438
19439     done
19440     ac_cv_prog_CXXCPP=$CXXCPP
19441
19442 fi
19443   CXXCPP=$ac_cv_prog_CXXCPP
19444 else
19445   ac_cv_prog_CXXCPP=$CXXCPP
19446 fi
19447 echo "$as_me:19447: result: $CXXCPP" >&5
19448 echo "${ECHO_T}$CXXCPP" >&6
19449 ac_preproc_ok=false
19450 for ac_cxx_preproc_warn_flag in '' yes
19451 do
19452   # Use a header file that comes with gcc, so configuring glibc
19453   # with a fresh cross-compiler works.
19454   # On the NeXT, cc -E runs the code through the compiler's parser,
19455   # not just through cpp. "Syntax error" is here to catch this case.
19456   cat >conftest.$ac_ext <<_ACEOF
19457 #line 19457 "configure"
19458 #include "confdefs.h"
19459 #include <assert.h>
19460                      Syntax error
19461 _ACEOF
19462 if { (eval echo "$as_me:19462: \"$ac_cpp conftest.$ac_ext\"") >&5
19463   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19464   ac_status=$?
19465   egrep -v '^ *\+' conftest.er1 >conftest.err
19466   rm -f conftest.er1
19467   cat conftest.err >&5
19468   echo "$as_me:19468: \$? = $ac_status" >&5
19469   (exit $ac_status); } >/dev/null; then
19470   if test -s conftest.err; then
19471     ac_cpp_err=$ac_cxx_preproc_warn_flag
19472   else
19473     ac_cpp_err=
19474   fi
19475 else
19476   ac_cpp_err=yes
19477 fi
19478 if test -z "$ac_cpp_err"; then
19479   :
19480 else
19481   echo "$as_me: failed program was:" >&5
19482   cat conftest.$ac_ext >&5
19483   # Broken: fails on valid input.
19484 continue
19485 fi
19486 rm -f conftest.err conftest.$ac_ext
19487
19488   # OK, works on sane cases.  Now check whether non-existent headers
19489   # can be detected and how.
19490   cat >conftest.$ac_ext <<_ACEOF
19491 #line 19491 "configure"
19492 #include "confdefs.h"
19493 #include <ac_nonexistent.h>
19494 _ACEOF
19495 if { (eval echo "$as_me:19495: \"$ac_cpp conftest.$ac_ext\"") >&5
19496   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19497   ac_status=$?
19498   egrep -v '^ *\+' conftest.er1 >conftest.err
19499   rm -f conftest.er1
19500   cat conftest.err >&5
19501   echo "$as_me:19501: \$? = $ac_status" >&5
19502   (exit $ac_status); } >/dev/null; then
19503   if test -s conftest.err; then
19504     ac_cpp_err=$ac_cxx_preproc_warn_flag
19505   else
19506     ac_cpp_err=
19507   fi
19508 else
19509   ac_cpp_err=yes
19510 fi
19511 if test -z "$ac_cpp_err"; then
19512   # Broken: success on invalid input.
19513 continue
19514 else
19515   echo "$as_me: failed program was:" >&5
19516   cat conftest.$ac_ext >&5
19517   # Passes both tests.
19518 ac_preproc_ok=:
19519 break
19520 fi
19521 rm -f conftest.err conftest.$ac_ext
19522
19523 done
19524 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19525 rm -f conftest.err conftest.$ac_ext
19526 if $ac_preproc_ok; then
19527   :
19528 else
19529   { { echo "$as_me:19529: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19530 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19531    { (exit 1); exit 1; }; }
19532 fi
19533
19534 ac_ext=cc
19535 ac_cpp='$CXXCPP $CPPFLAGS'
19536 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19537 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19538 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19539 ac_main_return=return
19540
19541 for ac_header in typeinfo
19542 do
19543 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19544 echo "$as_me:19544: checking for $ac_header" >&5
19545 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19546 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19547   echo $ECHO_N "(cached) $ECHO_C" >&6
19548 else
19549   cat >conftest.$ac_ext <<_ACEOF
19550 #line 19550 "configure"
19551 #include "confdefs.h"
19552 #include <$ac_header>
19553 _ACEOF
19554 if { (eval echo "$as_me:19554: \"$ac_cpp conftest.$ac_ext\"") >&5
19555   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19556   ac_status=$?
19557   egrep -v '^ *\+' conftest.er1 >conftest.err
19558   rm -f conftest.er1
19559   cat conftest.err >&5
19560   echo "$as_me:19560: \$? = $ac_status" >&5
19561   (exit $ac_status); } >/dev/null; then
19562   if test -s conftest.err; then
19563     ac_cpp_err=$ac_cxx_preproc_warn_flag
19564   else
19565     ac_cpp_err=
19566   fi
19567 else
19568   ac_cpp_err=yes
19569 fi
19570 if test -z "$ac_cpp_err"; then
19571   eval "$as_ac_Header=yes"
19572 else
19573   echo "$as_me: failed program was:" >&5
19574   cat conftest.$ac_ext >&5
19575   eval "$as_ac_Header=no"
19576 fi
19577 rm -f conftest.err conftest.$ac_ext
19578 fi
19579 echo "$as_me:19579: result: `eval echo '${'$as_ac_Header'}'`" >&5
19580 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19581 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19582   cat >>confdefs.h <<EOF
19583 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19584 EOF
19585
19586 fi
19587 done
19588
19589 for ac_header in iostream
19590 do
19591 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19592 echo "$as_me:19592: checking for $ac_header" >&5
19593 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19594 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19595   echo $ECHO_N "(cached) $ECHO_C" >&6
19596 else
19597   cat >conftest.$ac_ext <<_ACEOF
19598 #line 19598 "configure"
19599 #include "confdefs.h"
19600 #include <$ac_header>
19601 _ACEOF
19602 if { (eval echo "$as_me:19602: \"$ac_cpp conftest.$ac_ext\"") >&5
19603   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19604   ac_status=$?
19605   egrep -v '^ *\+' conftest.er1 >conftest.err
19606   rm -f conftest.er1
19607   cat conftest.err >&5
19608   echo "$as_me:19608: \$? = $ac_status" >&5
19609   (exit $ac_status); } >/dev/null; then
19610   if test -s conftest.err; then
19611     ac_cpp_err=$ac_cxx_preproc_warn_flag
19612   else
19613     ac_cpp_err=
19614   fi
19615 else
19616   ac_cpp_err=yes
19617 fi
19618 if test -z "$ac_cpp_err"; then
19619   eval "$as_ac_Header=yes"
19620 else
19621   echo "$as_me: failed program was:" >&5
19622   cat conftest.$ac_ext >&5
19623   eval "$as_ac_Header=no"
19624 fi
19625 rm -f conftest.err conftest.$ac_ext
19626 fi
19627 echo "$as_me:19627: result: `eval echo '${'$as_ac_Header'}'`" >&5
19628 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19629 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19630   cat >>confdefs.h <<EOF
19631 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19632 EOF
19633
19634 fi
19635 done
19636
19637 if test x"$ac_cv_header_iostream" = xyes ; then
19638         echo "$as_me:19638: checking if iostream uses std-namespace" >&5
19639 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
19640         cat >conftest.$ac_ext <<_ACEOF
19641 #line 19641 "configure"
19642 #include "confdefs.h"
19643
19644 #include <iostream>
19645 using std::endl;
19646 using std::cerr;
19647 int
19648 main ()
19649 {
19650
19651 cerr << "testing" << endl;
19652
19653   ;
19654   return 0;
19655 }
19656 _ACEOF
19657 rm -f conftest.$ac_objext
19658 if { (eval echo "$as_me:19658: \"$ac_compile\"") >&5
19659   (eval $ac_compile) 2>&5
19660   ac_status=$?
19661   echo "$as_me:19661: \$? = $ac_status" >&5
19662   (exit $ac_status); } &&
19663          { ac_try='test -s conftest.$ac_objext'
19664   { (eval echo "$as_me:19664: \"$ac_try\"") >&5
19665   (eval $ac_try) 2>&5
19666   ac_status=$?
19667   echo "$as_me:19667: \$? = $ac_status" >&5
19668   (exit $ac_status); }; }; then
19669   cf_iostream_namespace=yes
19670 else
19671   echo "$as_me: failed program was:" >&5
19672 cat conftest.$ac_ext >&5
19673 cf_iostream_namespace=no
19674 fi
19675 rm -f conftest.$ac_objext conftest.$ac_ext
19676         echo "$as_me:19676: result: $cf_iostream_namespace" >&5
19677 echo "${ECHO_T}$cf_iostream_namespace" >&6
19678         if test "$cf_iostream_namespace" = yes ; then
19679
19680 cat >>confdefs.h <<\EOF
19681 #define IOSTREAM_NAMESPACE 1
19682 EOF
19683
19684         fi
19685 fi
19686
19687 echo "$as_me:19687: checking if we should include stdbool.h" >&5
19688 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19689
19690 if test "${cf_cv_header_stdbool_h+set}" = set; then
19691   echo $ECHO_N "(cached) $ECHO_C" >&6
19692 else
19693
19694         cat >conftest.$ac_ext <<_ACEOF
19695 #line 19695 "configure"
19696 #include "confdefs.h"
19697
19698 int
19699 main ()
19700 {
19701 bool foo = false
19702   ;
19703   return 0;
19704 }
19705 _ACEOF
19706 rm -f conftest.$ac_objext
19707 if { (eval echo "$as_me:19707: \"$ac_compile\"") >&5
19708   (eval $ac_compile) 2>&5
19709   ac_status=$?
19710   echo "$as_me:19710: \$? = $ac_status" >&5
19711   (exit $ac_status); } &&
19712          { ac_try='test -s conftest.$ac_objext'
19713   { (eval echo "$as_me:19713: \"$ac_try\"") >&5
19714   (eval $ac_try) 2>&5
19715   ac_status=$?
19716   echo "$as_me:19716: \$? = $ac_status" >&5
19717   (exit $ac_status); }; }; then
19718   cf_cv_header_stdbool_h=0
19719 else
19720   echo "$as_me: failed program was:" >&5
19721 cat conftest.$ac_ext >&5
19722 cat >conftest.$ac_ext <<_ACEOF
19723 #line 19723 "configure"
19724 #include "confdefs.h"
19725
19726 #ifndef __BEOS__
19727 #include <stdbool.h>
19728 #endif
19729
19730 int
19731 main ()
19732 {
19733 bool foo = false
19734   ;
19735   return 0;
19736 }
19737 _ACEOF
19738 rm -f conftest.$ac_objext
19739 if { (eval echo "$as_me:19739: \"$ac_compile\"") >&5
19740   (eval $ac_compile) 2>&5
19741   ac_status=$?
19742   echo "$as_me:19742: \$? = $ac_status" >&5
19743   (exit $ac_status); } &&
19744          { ac_try='test -s conftest.$ac_objext'
19745   { (eval echo "$as_me:19745: \"$ac_try\"") >&5
19746   (eval $ac_try) 2>&5
19747   ac_status=$?
19748   echo "$as_me:19748: \$? = $ac_status" >&5
19749   (exit $ac_status); }; }; then
19750   cf_cv_header_stdbool_h=1
19751 else
19752   echo "$as_me: failed program was:" >&5
19753 cat conftest.$ac_ext >&5
19754 cf_cv_header_stdbool_h=0
19755 fi
19756 rm -f conftest.$ac_objext conftest.$ac_ext
19757 fi
19758 rm -f conftest.$ac_objext conftest.$ac_ext
19759 fi
19760
19761 if test "$cf_cv_header_stdbool_h" = 1
19762 then    echo "$as_me:19762: result: yes" >&5
19763 echo "${ECHO_T}yes" >&6
19764 else    echo "$as_me:19764: result: no" >&5
19765 echo "${ECHO_T}no" >&6
19766 fi
19767
19768 echo "$as_me:19768: checking for builtin bool type" >&5
19769 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19770
19771 if test "${cf_cv_builtin_bool+set}" = set; then
19772   echo $ECHO_N "(cached) $ECHO_C" >&6
19773 else
19774
19775         cat >conftest.$ac_ext <<_ACEOF
19776 #line 19776 "configure"
19777 #include "confdefs.h"
19778
19779 #include <stdio.h>
19780 #include <sys/types.h>
19781
19782 int
19783 main ()
19784 {
19785 bool x = false
19786   ;
19787   return 0;
19788 }
19789 _ACEOF
19790 rm -f conftest.$ac_objext
19791 if { (eval echo "$as_me:19791: \"$ac_compile\"") >&5
19792   (eval $ac_compile) 2>&5
19793   ac_status=$?
19794   echo "$as_me:19794: \$? = $ac_status" >&5
19795   (exit $ac_status); } &&
19796          { ac_try='test -s conftest.$ac_objext'
19797   { (eval echo "$as_me:19797: \"$ac_try\"") >&5
19798   (eval $ac_try) 2>&5
19799   ac_status=$?
19800   echo "$as_me:19800: \$? = $ac_status" >&5
19801   (exit $ac_status); }; }; then
19802   cf_cv_builtin_bool=1
19803 else
19804   echo "$as_me: failed program was:" >&5
19805 cat conftest.$ac_ext >&5
19806 cf_cv_builtin_bool=0
19807 fi
19808 rm -f conftest.$ac_objext conftest.$ac_ext
19809
19810 fi
19811
19812 if test "$cf_cv_builtin_bool" = 1
19813 then    echo "$as_me:19813: result: yes" >&5
19814 echo "${ECHO_T}yes" >&6
19815 else    echo "$as_me:19815: result: no" >&5
19816 echo "${ECHO_T}no" >&6
19817 fi
19818
19819 echo "$as_me:19819: checking for size of bool" >&5
19820 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19821 if test "${cf_cv_type_of_bool+set}" = set; then
19822   echo $ECHO_N "(cached) $ECHO_C" >&6
19823 else
19824
19825         rm -f cf_test.out
19826         if test "$cross_compiling" = yes; then
19827   cf_cv_type_of_bool=unknown
19828 else
19829   cat >conftest.$ac_ext <<_ACEOF
19830 #line 19830 "configure"
19831 #include "confdefs.h"
19832
19833 #include <stdlib.h>
19834 #include <stdio.h>
19835
19836 #if defined(__cplusplus)
19837
19838 #ifdef HAVE_GXX_BUILTIN_H
19839 #include <g++/builtin.h>
19840 #elif HAVE_GPP_BUILTIN_H
19841 #include <gpp/builtin.h>
19842 #elif HAVE_BUILTIN_H
19843 #include <builtin.h>
19844 #endif
19845
19846 #else
19847
19848 #if $cf_cv_header_stdbool_h
19849 #include <stdbool.h>
19850 #endif
19851
19852 #endif
19853
19854 int main()
19855 {
19856         FILE *fp = fopen("cf_test.out", "w");
19857         if (fp != 0) {
19858                 bool x = true;
19859                 if ((bool)(-x) >= 0)
19860                         fputs("unsigned ", fp);
19861                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19862                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19863                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19864                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19865                 fclose(fp);
19866         }
19867         ${cf_cv_main_return:-return}(0);
19868 }
19869
19870 _ACEOF
19871 rm -f conftest$ac_exeext
19872 if { (eval echo "$as_me:19872: \"$ac_link\"") >&5
19873   (eval $ac_link) 2>&5
19874   ac_status=$?
19875   echo "$as_me:19875: \$? = $ac_status" >&5
19876   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19877   { (eval echo "$as_me:19877: \"$ac_try\"") >&5
19878   (eval $ac_try) 2>&5
19879   ac_status=$?
19880   echo "$as_me:19880: \$? = $ac_status" >&5
19881   (exit $ac_status); }; }; then
19882   cf_cv_type_of_bool=`cat cf_test.out`
19883                  if test -z "$cf_cv_type_of_bool"; then
19884                    cf_cv_type_of_bool=unknown
19885                  fi
19886 else
19887   echo "$as_me: program exited with status $ac_status" >&5
19888 echo "$as_me: failed program was:" >&5
19889 cat conftest.$ac_ext >&5
19890 cf_cv_type_of_bool=unknown
19891 fi
19892 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19893 fi
19894
19895 fi
19896
19897         rm -f cf_test.out
19898 echo "$as_me:19898: result: $cf_cv_type_of_bool" >&5
19899 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19900 if test "$cf_cv_type_of_bool" = unknown ; then
19901         case .$NCURSES_BOOL in #(vi
19902         .auto|.) NCURSES_BOOL=unsigned;;
19903         esac
19904         { echo "$as_me:19904: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19905 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19906         cf_cv_type_of_bool=$NCURSES_BOOL
19907 fi
19908
19909 echo "$as_me:19909: checking for special defines needed for etip.h" >&5
19910 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
19911 cf_save_CXXFLAGS="$CXXFLAGS"
19912 cf_result="none"
19913
19914 # etip.h includes ncurses.h which includes ncurses_dll.h
19915 # But ncurses_dll.h is generated - fix here.
19916 test -d include || mkdir include
19917 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
19918
19919 for cf_math in "" MATH_H
19920 do
19921 for cf_excp in "" MATH_EXCEPTION
19922 do
19923         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
19924         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
19925         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
19926 cat >conftest.$ac_ext <<_ACEOF
19927 #line 19927 "configure"
19928 #include "confdefs.h"
19929
19930 #include <etip.h.in>
19931
19932 int
19933 main ()
19934 {
19935
19936   ;
19937   return 0;
19938 }
19939 _ACEOF
19940 rm -f conftest.$ac_objext
19941 if { (eval echo "$as_me:19941: \"$ac_compile\"") >&5
19942   (eval $ac_compile) 2>&5
19943   ac_status=$?
19944   echo "$as_me:19944: \$? = $ac_status" >&5
19945   (exit $ac_status); } &&
19946          { ac_try='test -s conftest.$ac_objext'
19947   { (eval echo "$as_me:19947: \"$ac_try\"") >&5
19948   (eval $ac_try) 2>&5
19949   ac_status=$?
19950   echo "$as_me:19950: \$? = $ac_status" >&5
19951   (exit $ac_status); }; }; then
19952
19953         test -n "$cf_math" && cat >>confdefs.h <<EOF
19954 #define ETIP_NEEDS_${cf_math} 1
19955 EOF
19956
19957         test -n "$cf_excp" && cat >>confdefs.h <<EOF
19958 #define ETIP_NEEDS_${cf_excp} 1
19959 EOF
19960
19961         cf_result="$cf_math $cf_excp"
19962         break 2
19963
19964 else
19965   echo "$as_me: failed program was:" >&5
19966 cat conftest.$ac_ext >&5
19967 fi
19968 rm -f conftest.$ac_objext conftest.$ac_ext
19969 done
19970 done
19971 echo "$as_me:19971: result: $cf_result" >&5
19972 echo "${ECHO_T}$cf_result" >&6
19973 CXXFLAGS="$cf_save_CXXFLAGS"
19974
19975 if test -n "$CXX"; then
19976 echo "$as_me:19976: checking if $CXX accepts parameter initialization" >&5
19977 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
19978 if test "${cf_cv_cpp_param_init+set}" = set; then
19979   echo $ECHO_N "(cached) $ECHO_C" >&6
19980 else
19981
19982         ac_ext=cc
19983 ac_cpp='$CXXCPP $CPPFLAGS'
19984 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19985 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19986 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19987 ac_main_return=return
19988
19989         if test "$cross_compiling" = yes; then
19990   cf_cv_cpp_param_init=unknown
19991 else
19992   cat >conftest.$ac_ext <<_ACEOF
19993 #line 19993 "configure"
19994 #include "confdefs.h"
19995
19996 class TEST {
19997 private:
19998         int value;
19999 public:
20000         TEST(int x = 1);
20001         ~TEST();
20002 };
20003
20004 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20005 {
20006         value = x;
20007 }
20008 int main() { }
20009
20010 _ACEOF
20011 rm -f conftest$ac_exeext
20012 if { (eval echo "$as_me:20012: \"$ac_link\"") >&5
20013   (eval $ac_link) 2>&5
20014   ac_status=$?
20015   echo "$as_me:20015: \$? = $ac_status" >&5
20016   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20017   { (eval echo "$as_me:20017: \"$ac_try\"") >&5
20018   (eval $ac_try) 2>&5
20019   ac_status=$?
20020   echo "$as_me:20020: \$? = $ac_status" >&5
20021   (exit $ac_status); }; }; then
20022   cf_cv_cpp_param_init=yes
20023 else
20024   echo "$as_me: program exited with status $ac_status" >&5
20025 echo "$as_me: failed program was:" >&5
20026 cat conftest.$ac_ext >&5
20027 cf_cv_cpp_param_init=no
20028 fi
20029 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20030 fi
20031         ac_ext=cc
20032 ac_cpp='$CXXCPP $CPPFLAGS'
20033 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20034 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20035 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20036 ac_main_return=return
20037
20038 fi
20039 echo "$as_me:20039: result: $cf_cv_cpp_param_init" >&5
20040 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20041 fi
20042 test "$cf_cv_cpp_param_init" = yes &&
20043 cat >>confdefs.h <<\EOF
20044 #define CPP_HAS_PARAM_INIT 1
20045 EOF
20046
20047 if test -n "$CXX"; then
20048
20049 echo "$as_me:20049: checking if $CXX accepts static_cast" >&5
20050 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20051 if test "${cf_cv_cpp_static_cast+set}" = set; then
20052   echo $ECHO_N "(cached) $ECHO_C" >&6
20053 else
20054
20055         ac_ext=cc
20056 ac_cpp='$CXXCPP $CPPFLAGS'
20057 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20058 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20059 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20060 ac_main_return=return
20061
20062         cat >conftest.$ac_ext <<_ACEOF
20063 #line 20063 "configure"
20064 #include "confdefs.h"
20065
20066 class NCursesPanel
20067 {
20068 public:
20069   NCursesPanel(int nlines,
20070                int ncols,
20071                int begin_y = 0,
20072                int begin_x = 0)
20073   {
20074   }
20075   NCursesPanel();
20076   ~NCursesPanel();
20077 };
20078
20079 template<class T> class NCursesUserPanel : public NCursesPanel
20080 {
20081 public:
20082   NCursesUserPanel (int nlines,
20083                     int ncols,
20084                     int begin_y = 0,
20085                     int begin_x = 0,
20086                     const T* p_UserData = static_cast<T*>(0))
20087     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20088   {
20089   };
20090   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20091   {
20092   };
20093
20094   virtual ~NCursesUserPanel() {};
20095 };
20096
20097 int
20098 main ()
20099 {
20100
20101         const char* p_UserData = static_cast<char*>(0)
20102   ;
20103   return 0;
20104 }
20105 _ACEOF
20106 rm -f conftest.$ac_objext
20107 if { (eval echo "$as_me:20107: \"$ac_compile\"") >&5
20108   (eval $ac_compile) 2>&5
20109   ac_status=$?
20110   echo "$as_me:20110: \$? = $ac_status" >&5
20111   (exit $ac_status); } &&
20112          { ac_try='test -s conftest.$ac_objext'
20113   { (eval echo "$as_me:20113: \"$ac_try\"") >&5
20114   (eval $ac_try) 2>&5
20115   ac_status=$?
20116   echo "$as_me:20116: \$? = $ac_status" >&5
20117   (exit $ac_status); }; }; then
20118   cf_cv_cpp_static_cast=yes
20119 else
20120   echo "$as_me: failed program was:" >&5
20121 cat conftest.$ac_ext >&5
20122 cf_cv_cpp_static_cast=no
20123 fi
20124 rm -f conftest.$ac_objext conftest.$ac_ext
20125
20126         ac_ext=cc
20127 ac_cpp='$CXXCPP $CPPFLAGS'
20128 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20129 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20130 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20131 ac_main_return=return
20132
20133 fi
20134 echo "$as_me:20134: result: $cf_cv_cpp_static_cast" >&5
20135 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20136
20137 fi
20138
20139 test "$cf_cv_cpp_static_cast" = yes &&
20140 cat >>confdefs.h <<\EOF
20141 #define CPP_HAS_STATIC_CAST 1
20142 EOF
20143
20144         CXX_AR='$(AR)'
20145         CXX_ARFLAGS='$(ARFLAGS)'
20146         case $cf_cv_system_name in #(vi
20147         irix*) #(vi
20148             if test "$GXX" != yes ; then
20149                 CXX_AR='$(CXX)'
20150                 CXX_ARFLAGS='-ar -o'
20151             fi
20152             ;;
20153         sco3.2v5*) #(vi
20154             CXXLDFLAGS="-u main"
20155             ;;
20156         solaris2*)
20157             if test "$GXX" != yes ; then
20158                 CXX_AR='$(CXX)'
20159                 CXX_ARFLAGS='-xar -o'
20160             fi
20161             ;;
20162         esac
20163
20164 else
20165         cf_cxx_library=no
20166         cf_cv_builtin_bool=1
20167
20168         # Just because we are not configuring against C++ right now does not
20169         # mean that a user will not want to use C++.  Some distributors disable
20170         # the C++ portion of this configuration as a shortcut (or just to avoid
20171         # compiling the demo in the c++ directory).  So we need a reasonable
20172         # default for the 'bool' type.
20173         #
20174         # Caveat: since the storage of the bool type is not standardized, it
20175         # may change.
20176
20177         if test "$NCURSES_BOOL" != auto ; then
20178                 cf_cv_type_of_bool=$NCURSES_BOOL
20179                 cf_cv_header_stdbool_h=0
20180         else
20181                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20182
20183 echo "$as_me:20183: checking for size of bool" >&5
20184 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20185 if test "${cf_cv_type_of_bool+set}" = set; then
20186   echo $ECHO_N "(cached) $ECHO_C" >&6
20187 else
20188
20189         rm -f cf_test.out
20190         if test "$cross_compiling" = yes; then
20191   cf_cv_type_of_bool=unknown
20192 else
20193   cat >conftest.$ac_ext <<_ACEOF
20194 #line 20194 "configure"
20195 #include "confdefs.h"
20196
20197 #include <stdlib.h>
20198 #include <stdio.h>
20199
20200 #if defined(__cplusplus)
20201
20202 #ifdef HAVE_GXX_BUILTIN_H
20203 #include <g++/builtin.h>
20204 #elif HAVE_GPP_BUILTIN_H
20205 #include <gpp/builtin.h>
20206 #elif HAVE_BUILTIN_H
20207 #include <builtin.h>
20208 #endif
20209
20210 #else
20211
20212 #if $cf_cv_header_stdbool_h
20213 #include <stdbool.h>
20214 #endif
20215
20216 #endif
20217
20218 int main()
20219 {
20220         FILE *fp = fopen("cf_test.out", "w");
20221         if (fp != 0) {
20222                 bool x = true;
20223                 if ((bool)(-x) >= 0)
20224                         fputs("unsigned ", fp);
20225                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20226                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20227                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20228                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20229                 fclose(fp);
20230         }
20231         ${cf_cv_main_return:-return}(0);
20232 }
20233
20234 _ACEOF
20235 rm -f conftest$ac_exeext
20236 if { (eval echo "$as_me:20236: \"$ac_link\"") >&5
20237   (eval $ac_link) 2>&5
20238   ac_status=$?
20239   echo "$as_me:20239: \$? = $ac_status" >&5
20240   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20241   { (eval echo "$as_me:20241: \"$ac_try\"") >&5
20242   (eval $ac_try) 2>&5
20243   ac_status=$?
20244   echo "$as_me:20244: \$? = $ac_status" >&5
20245   (exit $ac_status); }; }; then
20246   cf_cv_type_of_bool=`cat cf_test.out`
20247                  if test -z "$cf_cv_type_of_bool"; then
20248                    cf_cv_type_of_bool=unknown
20249                  fi
20250 else
20251   echo "$as_me: program exited with status $ac_status" >&5
20252 echo "$as_me: failed program was:" >&5
20253 cat conftest.$ac_ext >&5
20254 cf_cv_type_of_bool=unknown
20255 fi
20256 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20257 fi
20258
20259 fi
20260
20261         rm -f cf_test.out
20262 echo "$as_me:20262: result: $cf_cv_type_of_bool" >&5
20263 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20264 if test "$cf_cv_type_of_bool" = unknown ; then
20265         case .$NCURSES_BOOL in #(vi
20266         .auto|.) NCURSES_BOOL=unsigned;;
20267         esac
20268         { echo "$as_me:20268: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20269 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20270         cf_cv_type_of_bool=$NCURSES_BOOL
20271 fi
20272
20273                 else
20274                         echo "$as_me:20274: checking for fallback type of bool" >&5
20275 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20276                         case "$host_cpu" in #(vi
20277                         i?86)   cf_cv_type_of_bool=char ;; #(vi
20278                         *)      cf_cv_type_of_bool=int  ;;
20279                         esac
20280                         echo "$as_me:20280: result: $cf_cv_type_of_bool" >&5
20281 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20282                 fi
20283         fi
20284 fi
20285
20286 # If the C compiler did not declare bool, and we did not determine that the C++
20287 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20288 # ncurses library use the same type as C++ bool.  Note that this allows one to
20289 # specify the type of bool in a configure-script option and postpone
20290 # integration with the C++ compiler provided that the types are compatible.
20291 USE_CXX_BOOL=1
20292 if test $cf_cv_cc_bool_type = 1
20293 then
20294         # oops: C has a bool.  Unlikely, but C++ could differ.
20295         USE_CXX_BOOL=0
20296 elif test $cf_cv_builtin_bool = 0
20297 then
20298         # C++ has no bool
20299         USE_CXX_BOOL=0
20300 else
20301         # this is the normal case
20302         USE_CXX_BOOL='defined(__cplusplus)'
20303 fi
20304
20305 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20306
20307         if test "$cf_with_ada" != "no" ; then
20308                 if test "$with_libtool" != "no"; then
20309                         { echo "$as_me:20309: WARNING: libtool does not support Ada - disabling feature" >&5
20310 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20311                         cf_with_ada=no
20312                 fi
20313         fi
20314
20315         if test "$cf_with_ada" != "no" ; then
20316
20317 cf_ada_make=gnatmake
20318 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20319 set dummy $cf_ada_make; ac_word=$2
20320 echo "$as_me:20320: checking for $ac_word" >&5
20321 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20322 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20323   echo $ECHO_N "(cached) $ECHO_C" >&6
20324 else
20325   if test -n "$gnat_exists"; then
20326   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20327 else
20328   ac_save_IFS=$IFS; IFS=$ac_path_separator
20329 ac_dummy="$PATH"
20330 for ac_dir in $ac_dummy; do
20331   IFS=$ac_save_IFS
20332   test -z "$ac_dir" && ac_dir=.
20333   $as_executable_p "$ac_dir/$ac_word" || continue
20334 ac_cv_prog_gnat_exists="yes"
20335 echo "$as_me:20335: found $ac_dir/$ac_word" >&5
20336 break
20337 done
20338
20339   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20340 fi
20341 fi
20342 gnat_exists=$ac_cv_prog_gnat_exists
20343 if test -n "$gnat_exists"; then
20344   echo "$as_me:20344: result: $gnat_exists" >&5
20345 echo "${ECHO_T}$gnat_exists" >&6
20346 else
20347   echo "$as_me:20347: result: no" >&5
20348 echo "${ECHO_T}no" >&6
20349 fi
20350
20351 if test "$ac_cv_prog_gnat_exists" = no; then
20352    cf_ada_make=
20353    cf_cv_prog_gnat_correct=no
20354 else
20355
20356 echo "$as_me:20356: checking for gnat version" >&5
20357 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20358 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20359         grep '[0-9].[0-9][0-9]*' |\
20360     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20361 echo "$as_me:20361: result: $cf_gnat_version" >&5
20362 echo "${ECHO_T}$cf_gnat_version" >&6
20363
20364 case $cf_gnat_version in #(vi
20365 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
20366         cf_cv_prog_gnat_correct=yes
20367         ;;
20368 *)
20369         { echo "$as_me:20369: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20370 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20371         cf_cv_prog_gnat_correct=no
20372         ;;
20373 esac
20374
20375    # Extract the first word of "m4", so it can be a program name with args.
20376 set dummy m4; ac_word=$2
20377 echo "$as_me:20377: checking for $ac_word" >&5
20378 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20379 if test "${ac_cv_prog_M4_exists+set}" = set; then
20380   echo $ECHO_N "(cached) $ECHO_C" >&6
20381 else
20382   if test -n "$M4_exists"; then
20383   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20384 else
20385   ac_save_IFS=$IFS; IFS=$ac_path_separator
20386 ac_dummy="$PATH"
20387 for ac_dir in $ac_dummy; do
20388   IFS=$ac_save_IFS
20389   test -z "$ac_dir" && ac_dir=.
20390   $as_executable_p "$ac_dir/$ac_word" || continue
20391 ac_cv_prog_M4_exists="yes"
20392 echo "$as_me:20392: found $ac_dir/$ac_word" >&5
20393 break
20394 done
20395
20396   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20397 fi
20398 fi
20399 M4_exists=$ac_cv_prog_M4_exists
20400 if test -n "$M4_exists"; then
20401   echo "$as_me:20401: result: $M4_exists" >&5
20402 echo "${ECHO_T}$M4_exists" >&6
20403 else
20404   echo "$as_me:20404: result: no" >&5
20405 echo "${ECHO_T}no" >&6
20406 fi
20407
20408    if test "$ac_cv_prog_M4_exists" = no; then
20409       cf_cv_prog_gnat_correct=no
20410       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20411    fi
20412    if test "$cf_cv_prog_gnat_correct" = yes; then
20413       echo "$as_me:20413: checking if GNAT works" >&5
20414 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20415
20416 rm -rf conftest* *~conftest*
20417 cat >>conftest.ads <<CF_EOF
20418 procedure conftest;
20419 CF_EOF
20420 cat >>conftest.adb <<CF_EOF
20421 with Text_IO;
20422 with GNAT.OS_Lib;
20423 procedure conftest is
20424 begin
20425    Text_IO.Put ("Hello World");
20426    Text_IO.New_Line;
20427    GNAT.OS_Lib.OS_Exit (0);
20428 end conftest;
20429 CF_EOF
20430 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20431    if ( ./conftest 1>&5 2>&1 ) ; then
20432       cf_cv_prog_gnat_correct=yes
20433    else
20434       cf_cv_prog_gnat_correct=no
20435    fi
20436 else
20437    cf_cv_prog_gnat_correct=no
20438 fi
20439 rm -rf conftest* *~conftest*
20440
20441       echo "$as_me:20441: result: $cf_cv_prog_gnat_correct" >&5
20442 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20443    fi
20444 fi
20445
20446                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20447
20448         ADAFLAGS="$ADAFLAGS -gnatpn"
20449
20450         echo "$as_me:20450: checking optimization options for ADAFLAGS" >&5
20451 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20452         case "$CFLAGS" in
20453         *-g*)
20454
20455         ADAFLAGS="$ADAFLAGS -g"
20456
20457                 ;;
20458         esac
20459         case "$CFLAGS" in
20460         *-O*)
20461                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20462
20463         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20464
20465                 ;;
20466         esac
20467         echo "$as_me:20467: result: $ADAFLAGS" >&5
20468 echo "${ECHO_T}$ADAFLAGS" >&6
20469
20470 echo "$as_me:20470: checking if GNATPREP supports -T option" >&5
20471 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20472 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20473   echo $ECHO_N "(cached) $ECHO_C" >&6
20474 else
20475
20476 cf_cv_gnatprep_opt_t=no
20477 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20478
20479 fi
20480 echo "$as_me:20480: result: $cf_cv_gnatprep_opt_t" >&5
20481 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20482 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20483
20484 echo "$as_me:20484: checking if GNAT supports generics" >&5
20485 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20486 case $cf_gnat_version in #(vi
20487 3.[1-9]*|[4-9].*) #(vi
20488         cf_gnat_generics=yes
20489         ;;
20490 *)
20491         cf_gnat_generics=no
20492         ;;
20493 esac
20494 echo "$as_me:20494: result: $cf_gnat_generics" >&5
20495 echo "${ECHO_T}$cf_gnat_generics" >&6
20496
20497 if test "$cf_gnat_generics" = yes
20498 then
20499         cf_compile_generics=generics
20500         cf_generic_objects="\${GENOBJS}"
20501 else
20502         cf_compile_generics=
20503         cf_generic_objects=
20504 fi
20505
20506 echo "$as_me:20506: checking if GNAT supports SIGINT" >&5
20507 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20508 if test "${cf_cv_gnat_sigint+set}" = set; then
20509   echo $ECHO_N "(cached) $ECHO_C" >&6
20510 else
20511
20512 rm -rf conftest* *~conftest*
20513 cat >>conftest.ads <<CF_EOF
20514 with Ada.Interrupts.Names;
20515
20516 package ConfTest is
20517
20518    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20519    pragma Unreserve_All_Interrupts;
20520    pragma Warnings (On);
20521
20522    protected Process is
20523       procedure Stop;
20524       function Continue return Boolean;
20525       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20526    private
20527       Done : Boolean := False;
20528    end Process;
20529
20530 end ConfTest;
20531 CF_EOF
20532 cat >>conftest.adb <<CF_EOF
20533 package body ConfTest is
20534    protected body Process is
20535       procedure Stop is
20536       begin
20537          Done := True;
20538       end Stop;
20539       function Continue return Boolean is
20540       begin
20541          return not Done;
20542       end Continue;
20543    end Process;
20544 end ConfTest;
20545 CF_EOF
20546 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20547       cf_cv_gnat_sigint=yes
20548 else
20549    cf_cv_gnat_sigint=no
20550 fi
20551 rm -rf conftest* *~conftest*
20552
20553 fi
20554 echo "$as_me:20554: result: $cf_cv_gnat_sigint" >&5
20555 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20556
20557 if test $cf_cv_gnat_sigint = yes ; then
20558         USE_GNAT_SIGINT=""
20559 else
20560         USE_GNAT_SIGINT="#"
20561 fi
20562
20563 cf_gnat_libraries=no
20564 cf_gnat_projects=no
20565
20566 if test "$enable_gnat_projects" != no ; then
20567 echo "$as_me:20567: checking if GNAT supports project files" >&5
20568 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20569 case $cf_gnat_version in #(vi
20570 3.[0-9]*) #(vi
20571         ;;
20572 *)
20573         case $cf_cv_system_name in #(vi
20574         cygwin*|msys*) #(vi
20575                 ;;
20576         *)
20577                 mkdir conftest.src conftest.bin conftest.lib
20578                 cd conftest.src
20579                 rm -rf conftest* *~conftest*
20580                 cat >>library.gpr <<CF_EOF
20581 project Library is
20582   Kind := External ("LIB_KIND");
20583   for Library_Name use "ConfTest";
20584   for Object_Dir use ".";
20585   for Library_ALI_Dir use External("LIBRARY_DIR");
20586   for Library_Version use External ("SONAME");
20587   for Library_Kind use Kind;
20588   for Library_Dir use External("BUILD_DIR");
20589   Source_Dir := External ("SOURCE_DIR");
20590   for Source_Dirs use (Source_Dir);
20591 end Library;
20592 CF_EOF
20593                 cat >>confpackage.ads <<CF_EOF
20594 package ConfPackage is
20595    procedure conftest;
20596 end ConfPackage;
20597 CF_EOF
20598                 cat >>confpackage.adb <<CF_EOF
20599 with Text_IO;
20600 package body ConfPackage is
20601    procedure conftest is
20602    begin
20603       Text_IO.Put ("Hello World");
20604       Text_IO.New_Line;
20605    end conftest;
20606 end ConfPackage;
20607 CF_EOF
20608                 if ( $cf_ada_make $ADAFLAGS \
20609                                 -Plibrary.gpr \
20610                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
20611                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
20612                                 -XSOURCE_DIR=`pwd` \
20613                                 -XSONAME=libConfTest.so.1 \
20614                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
20615                         cf_gnat_projects=yes
20616                 fi
20617                 cd ..
20618                 if test -f conftest.lib/confpackage.ali
20619                 then
20620                         cf_gnat_libraries=yes
20621                 fi
20622                 rm -rf conftest* *~conftest*
20623                 ;;
20624         esac
20625         ;;
20626 esac
20627 echo "$as_me:20627: result: $cf_gnat_projects" >&5
20628 echo "${ECHO_T}$cf_gnat_projects" >&6
20629 fi # enable_gnat_projects
20630
20631 if test $cf_gnat_projects = yes
20632 then
20633         echo "$as_me:20633: checking if GNAT supports libraries" >&5
20634 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
20635         echo "$as_me:20635: result: $cf_gnat_libraries" >&5
20636 echo "${ECHO_T}$cf_gnat_libraries" >&6
20637 fi
20638
20639 if test "$cf_gnat_projects" = yes
20640 then
20641         USE_OLD_MAKERULES="#"
20642         USE_GNAT_PROJECTS=""
20643 else
20644         USE_OLD_MAKERULES=""
20645         USE_GNAT_PROJECTS="#"
20646 fi
20647
20648 if test "$cf_gnat_libraries" = yes
20649 then
20650         USE_GNAT_LIBRARIES=""
20651 else
20652         USE_GNAT_LIBRARIES="#"
20653 fi
20654
20655 echo "$as_me:20655: checking for ada-compiler" >&5
20656 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
20657
20658 # Check whether --with-ada-compiler or --without-ada-compiler was given.
20659 if test "${with_ada_compiler+set}" = set; then
20660   withval="$with_ada_compiler"
20661   cf_ada_compiler=$withval
20662 else
20663   cf_ada_compiler=gnatmake
20664 fi;
20665
20666 echo "$as_me:20666: result: $cf_ada_compiler" >&5
20667 echo "${ECHO_T}$cf_ada_compiler" >&6
20668
20669                         cf_ada_package=terminal_interface
20670
20671 echo "$as_me:20671: checking for ada-include" >&5
20672 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
20673
20674 # Check whether --with-ada-include or --without-ada-include was given.
20675 if test "${with_ada_include+set}" = set; then
20676   withval="$with_ada_include"
20677
20678 else
20679   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20680 fi; if test -n "$prefix/share/ada/adainclude" ; then
20681
20682 if test "x$prefix" != xNONE; then
20683   cf_path_syntax="$prefix"
20684 else
20685   cf_path_syntax="$ac_default_prefix"
20686 fi
20687
20688 case ".$withval" in #(vi
20689 .\$\(*\)*|.\'*\'*) #(vi
20690   ;;
20691 ..|./*|.\\*) #(vi
20692   ;;
20693 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20694   ;;
20695 .\${*prefix}*|.\${*dir}*) #(vi
20696   eval withval="$withval"
20697   case ".$withval" in #(vi
20698   .NONE/*)
20699     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20700     ;;
20701   esac
20702   ;; #(vi
20703 .no|.NONE/*)
20704   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20705   ;;
20706 *)
20707   { { echo "$as_me:20707: error: expected a pathname, not \"$withval\"" >&5
20708 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20709    { (exit 1); exit 1; }; }
20710   ;;
20711 esac
20712
20713 fi
20714 eval ADA_INCLUDE="$withval"
20715
20716 echo "$as_me:20716: result: $ADA_INCLUDE" >&5
20717 echo "${ECHO_T}$ADA_INCLUDE" >&6
20718
20719 echo "$as_me:20719: checking for ada-objects" >&5
20720 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
20721
20722 # Check whether --with-ada-objects or --without-ada-objects was given.
20723 if test "${with_ada_objects+set}" = set; then
20724   withval="$with_ada_objects"
20725
20726 else
20727   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
20728 fi; if test -n "$prefix/lib/ada/adalib" ; then
20729
20730 if test "x$prefix" != xNONE; then
20731   cf_path_syntax="$prefix"
20732 else
20733   cf_path_syntax="$ac_default_prefix"
20734 fi
20735
20736 case ".$withval" in #(vi
20737 .\$\(*\)*|.\'*\'*) #(vi
20738   ;;
20739 ..|./*|.\\*) #(vi
20740   ;;
20741 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20742   ;;
20743 .\${*prefix}*|.\${*dir}*) #(vi
20744   eval withval="$withval"
20745   case ".$withval" in #(vi
20746   .NONE/*)
20747     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20748     ;;
20749   esac
20750   ;; #(vi
20751 .no|.NONE/*)
20752   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20753   ;;
20754 *)
20755   { { echo "$as_me:20755: error: expected a pathname, not \"$withval\"" >&5
20756 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20757    { (exit 1); exit 1; }; }
20758   ;;
20759 esac
20760
20761 fi
20762 eval ADA_OBJECTS="$withval"
20763
20764 echo "$as_me:20764: result: $ADA_OBJECTS" >&5
20765 echo "${ECHO_T}$ADA_OBJECTS" >&6
20766
20767 echo "$as_me:20767: checking if an Ada95 shared-library should be built" >&5
20768 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
20769
20770 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
20771 if test "${with_ada_sharedlib+set}" = set; then
20772   withval="$with_ada_sharedlib"
20773   with_ada_sharedlib=$withval
20774 else
20775   with_ada_sharedlib=no
20776 fi;
20777 echo "$as_me:20777: result: $with_ada_sharedlib" >&5
20778 echo "${ECHO_T}$with_ada_sharedlib" >&6
20779
20780 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
20781 MAKE_ADA_SHAREDLIB="#"
20782
20783 if test "x$with_ada_sharedlib" != xno
20784 then
20785         MAKE_ADA_SHAREDLIB=
20786         if test "x$with_ada_sharedlib" != xyes
20787         then
20788                 ADA_SHAREDLIB="$with_ada_sharedlib"
20789         fi
20790 fi
20791
20792                 fi
20793         fi
20794 else
20795         cf_with_ada=no
20796 fi
20797
20798 # do this "late" to avoid conflict with header-checks
20799 if test "x$with_widec" = xyes ; then
20800         echo "$as_me:20800: checking for wchar_t" >&5
20801 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
20802 if test "${ac_cv_type_wchar_t+set}" = set; then
20803   echo $ECHO_N "(cached) $ECHO_C" >&6
20804 else
20805   cat >conftest.$ac_ext <<_ACEOF
20806 #line 20806 "configure"
20807 #include "confdefs.h"
20808 $ac_includes_default
20809 int
20810 main ()
20811 {
20812 if ((wchar_t *) 0)
20813   return 0;
20814 if (sizeof (wchar_t))
20815   return 0;
20816   ;
20817   return 0;
20818 }
20819 _ACEOF
20820 rm -f conftest.$ac_objext
20821 if { (eval echo "$as_me:20821: \"$ac_compile\"") >&5
20822   (eval $ac_compile) 2>&5
20823   ac_status=$?
20824   echo "$as_me:20824: \$? = $ac_status" >&5
20825   (exit $ac_status); } &&
20826          { ac_try='test -s conftest.$ac_objext'
20827   { (eval echo "$as_me:20827: \"$ac_try\"") >&5
20828   (eval $ac_try) 2>&5
20829   ac_status=$?
20830   echo "$as_me:20830: \$? = $ac_status" >&5
20831   (exit $ac_status); }; }; then
20832   ac_cv_type_wchar_t=yes
20833 else
20834   echo "$as_me: failed program was:" >&5
20835 cat conftest.$ac_ext >&5
20836 ac_cv_type_wchar_t=no
20837 fi
20838 rm -f conftest.$ac_objext conftest.$ac_ext
20839 fi
20840 echo "$as_me:20840: result: $ac_cv_type_wchar_t" >&5
20841 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
20842
20843 echo "$as_me:20843: checking size of wchar_t" >&5
20844 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
20845 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
20846   echo $ECHO_N "(cached) $ECHO_C" >&6
20847 else
20848   if test "$ac_cv_type_wchar_t" = yes; then
20849   if test "$cross_compiling" = yes; then
20850   # Depending upon the size, compute the lo and hi bounds.
20851 cat >conftest.$ac_ext <<_ACEOF
20852 #line 20852 "configure"
20853 #include "confdefs.h"
20854 $ac_includes_default
20855 int
20856 main ()
20857 {
20858 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
20859   ;
20860   return 0;
20861 }
20862 _ACEOF
20863 rm -f conftest.$ac_objext
20864 if { (eval echo "$as_me:20864: \"$ac_compile\"") >&5
20865   (eval $ac_compile) 2>&5
20866   ac_status=$?
20867   echo "$as_me:20867: \$? = $ac_status" >&5
20868   (exit $ac_status); } &&
20869          { ac_try='test -s conftest.$ac_objext'
20870   { (eval echo "$as_me:20870: \"$ac_try\"") >&5
20871   (eval $ac_try) 2>&5
20872   ac_status=$?
20873   echo "$as_me:20873: \$? = $ac_status" >&5
20874   (exit $ac_status); }; }; then
20875   ac_lo=0 ac_mid=0
20876   while :; do
20877     cat >conftest.$ac_ext <<_ACEOF
20878 #line 20878 "configure"
20879 #include "confdefs.h"
20880 $ac_includes_default
20881 int
20882 main ()
20883 {
20884 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20885   ;
20886   return 0;
20887 }
20888 _ACEOF
20889 rm -f conftest.$ac_objext
20890 if { (eval echo "$as_me:20890: \"$ac_compile\"") >&5
20891   (eval $ac_compile) 2>&5
20892   ac_status=$?
20893   echo "$as_me:20893: \$? = $ac_status" >&5
20894   (exit $ac_status); } &&
20895          { ac_try='test -s conftest.$ac_objext'
20896   { (eval echo "$as_me:20896: \"$ac_try\"") >&5
20897   (eval $ac_try) 2>&5
20898   ac_status=$?
20899   echo "$as_me:20899: \$? = $ac_status" >&5
20900   (exit $ac_status); }; }; then
20901   ac_hi=$ac_mid; break
20902 else
20903   echo "$as_me: failed program was:" >&5
20904 cat conftest.$ac_ext >&5
20905 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
20906 fi
20907 rm -f conftest.$ac_objext conftest.$ac_ext
20908   done
20909 else
20910   echo "$as_me: failed program was:" >&5
20911 cat conftest.$ac_ext >&5
20912 ac_hi=-1 ac_mid=-1
20913   while :; do
20914     cat >conftest.$ac_ext <<_ACEOF
20915 #line 20915 "configure"
20916 #include "confdefs.h"
20917 $ac_includes_default
20918 int
20919 main ()
20920 {
20921 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
20922   ;
20923   return 0;
20924 }
20925 _ACEOF
20926 rm -f conftest.$ac_objext
20927 if { (eval echo "$as_me:20927: \"$ac_compile\"") >&5
20928   (eval $ac_compile) 2>&5
20929   ac_status=$?
20930   echo "$as_me:20930: \$? = $ac_status" >&5
20931   (exit $ac_status); } &&
20932          { ac_try='test -s conftest.$ac_objext'
20933   { (eval echo "$as_me:20933: \"$ac_try\"") >&5
20934   (eval $ac_try) 2>&5
20935   ac_status=$?
20936   echo "$as_me:20936: \$? = $ac_status" >&5
20937   (exit $ac_status); }; }; then
20938   ac_lo=$ac_mid; break
20939 else
20940   echo "$as_me: failed program was:" >&5
20941 cat conftest.$ac_ext >&5
20942 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
20943 fi
20944 rm -f conftest.$ac_objext conftest.$ac_ext
20945   done
20946 fi
20947 rm -f conftest.$ac_objext conftest.$ac_ext
20948 # Binary search between lo and hi bounds.
20949 while test "x$ac_lo" != "x$ac_hi"; do
20950   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20951   cat >conftest.$ac_ext <<_ACEOF
20952 #line 20952 "configure"
20953 #include "confdefs.h"
20954 $ac_includes_default
20955 int
20956 main ()
20957 {
20958 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20959   ;
20960   return 0;
20961 }
20962 _ACEOF
20963 rm -f conftest.$ac_objext
20964 if { (eval echo "$as_me:20964: \"$ac_compile\"") >&5
20965   (eval $ac_compile) 2>&5
20966   ac_status=$?
20967   echo "$as_me:20967: \$? = $ac_status" >&5
20968   (exit $ac_status); } &&
20969          { ac_try='test -s conftest.$ac_objext'
20970   { (eval echo "$as_me:20970: \"$ac_try\"") >&5
20971   (eval $ac_try) 2>&5
20972   ac_status=$?
20973   echo "$as_me:20973: \$? = $ac_status" >&5
20974   (exit $ac_status); }; }; then
20975   ac_hi=$ac_mid
20976 else
20977   echo "$as_me: failed program was:" >&5
20978 cat conftest.$ac_ext >&5
20979 ac_lo=`expr $ac_mid + 1`
20980 fi
20981 rm -f conftest.$ac_objext conftest.$ac_ext
20982 done
20983 ac_cv_sizeof_wchar_t=$ac_lo
20984 else
20985   if test "$cross_compiling" = yes; then
20986   { { echo "$as_me:20986: error: cannot run test program while cross compiling" >&5
20987 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20988    { (exit 1); exit 1; }; }
20989 else
20990   cat >conftest.$ac_ext <<_ACEOF
20991 #line 20991 "configure"
20992 #include "confdefs.h"
20993 $ac_includes_default
20994 int
20995 main ()
20996 {
20997 FILE *f = fopen ("conftest.val", "w");
20998 if (!f)
20999   $ac_main_return (1);
21000 fprintf (f, "%d", (sizeof (wchar_t)));
21001 fclose (f);
21002   ;
21003   return 0;
21004 }
21005 _ACEOF
21006 rm -f conftest$ac_exeext
21007 if { (eval echo "$as_me:21007: \"$ac_link\"") >&5
21008   (eval $ac_link) 2>&5
21009   ac_status=$?
21010   echo "$as_me:21010: \$? = $ac_status" >&5
21011   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21012   { (eval echo "$as_me:21012: \"$ac_try\"") >&5
21013   (eval $ac_try) 2>&5
21014   ac_status=$?
21015   echo "$as_me:21015: \$? = $ac_status" >&5
21016   (exit $ac_status); }; }; then
21017   ac_cv_sizeof_wchar_t=`cat conftest.val`
21018 else
21019   echo "$as_me: program exited with status $ac_status" >&5
21020 echo "$as_me: failed program was:" >&5
21021 cat conftest.$ac_ext >&5
21022 fi
21023 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21024 fi
21025 fi
21026 rm -f conftest.val
21027 else
21028   ac_cv_sizeof_wchar_t=0
21029 fi
21030 fi
21031 echo "$as_me:21031: result: $ac_cv_sizeof_wchar_t" >&5
21032 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21033 cat >>confdefs.h <<EOF
21034 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21035 EOF
21036
21037 fi
21038
21039 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21040 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21041 ###
21042 ### ticlib modules may be a separate library, otherwise contained in termlib.
21043 ### termlib modules may be a separate library, otherwise contained in ncurses.
21044 ###
21045 ### The of "+" or " " between the tokens controls the way the script
21046 ### chooses to split module lists into libraries.
21047 ###
21048 ### (see CF_LIB_RULES).
21049 echo "$as_me:21049: checking for library subsets" >&5
21050 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21051 LIB_SUBSETS=
21052
21053 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21054         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21055         if test "$with_ticlib" != no ; then
21056                 LIB_SUBSETS="${LIB_SUBSETS} "
21057         else
21058                 LIB_SUBSETS="${LIB_SUBSETS}+"
21059         fi
21060 fi
21061
21062 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21063 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21064
21065 if test "$with_termlib" != no ; then
21066         LIB_SUBSETS="${LIB_SUBSETS} "
21067 else
21068         LIB_SUBSETS="${LIB_SUBSETS}+"
21069 fi
21070
21071 LIB_SUBSETS="${LIB_SUBSETS}base"
21072
21073 # Most term-driver calls are to tinfo, but some like init_pair are to the
21074 # base library (so it resides in base).
21075 if test "$with_term_driver" != no ; then
21076         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21077         case $cf_cv_system_name in #(vi
21078         *mingw32*|*mingw64*) #(vi
21079                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21080                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21081                 ;;
21082         *) #(vi
21083                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21084                 ;;
21085         esac
21086 fi
21087
21088 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21089 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21090
21091 echo "$as_me:21091: result: $LIB_SUBSETS" >&5
21092 echo "${ECHO_T}$LIB_SUBSETS" >&6
21093
21094 ### Construct the list of include-directories to be generated
21095
21096 if test "$srcdir" != "."; then
21097         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21098 fi
21099 CPPFLAGS="-I../include $CPPFLAGS"
21100 if test "$srcdir" != "."; then
21101         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21102 fi
21103 CPPFLAGS="-I. $CPPFLAGS"
21104
21105 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21106 if test "$srcdir" != "."; then
21107         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21108 fi
21109 if test "$GCC" != yes; then
21110         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21111 elif test "$includedir" != "/usr/include"; then
21112         if test "$includedir" = '${prefix}/include' ; then
21113                 if test x$prefix != x/usr ; then
21114                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21115                 fi
21116         else
21117                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21118         fi
21119 fi
21120
21121 ### Build up pieces for makefile rules
21122 echo "$as_me:21122: checking default library suffix" >&5
21123 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21124
21125         case $DFT_LWR_MODEL in
21126         libtool) DFT_ARG_SUFFIX=''   ;;
21127         normal)  DFT_ARG_SUFFIX=''   ;;
21128         debug)   DFT_ARG_SUFFIX='_g' ;;
21129         profile) DFT_ARG_SUFFIX='_p' ;;
21130         shared)  DFT_ARG_SUFFIX=''   ;;
21131         esac
21132         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21133 echo "$as_me:21133: result: $DFT_ARG_SUFFIX" >&5
21134 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21135
21136 echo "$as_me:21136: checking default library-dependency suffix" >&5
21137 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21138
21139         case X$DFT_LWR_MODEL in #(vi
21140         Xlibtool) #(vi
21141                 DFT_LIB_SUFFIX='.la'
21142                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21143                 ;;
21144         Xdebug) #(vi
21145                 DFT_LIB_SUFFIX='_g.a'
21146                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21147                 ;;
21148         Xprofile) #(vi
21149                 DFT_LIB_SUFFIX='_p.a'
21150                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21151                 ;;
21152         Xshared) #(vi
21153                 case $cf_cv_system_name in
21154                 aix[5-7]*) #(vi
21155                         DFT_LIB_SUFFIX='.so'
21156                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21157                         ;;
21158                 cygwin*|msys*|mingw*) #(vi
21159                         DFT_LIB_SUFFIX='.dll'
21160                         DFT_DEP_SUFFIX='.dll.a'
21161                         ;;
21162                 darwin*) #(vi
21163                         DFT_LIB_SUFFIX='.dylib'
21164                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21165                         ;;
21166                 hpux*) #(vi
21167                         case $target in
21168                         ia64*) #(vi
21169                                 DFT_LIB_SUFFIX='.so'
21170                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21171                                 ;;
21172                         *) #(vi
21173                                 DFT_LIB_SUFFIX='.sl'
21174                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21175                                 ;;
21176                         esac
21177                         ;;
21178                 *) #(vi
21179                         DFT_LIB_SUFFIX='.so'
21180                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21181                         ;;
21182                 esac
21183                 ;;
21184         *)
21185                 DFT_LIB_SUFFIX='.a'
21186                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21187                 ;;
21188         esac
21189         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
21190         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
21191 echo "$as_me:21191: result: $DFT_DEP_SUFFIX" >&5
21192 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21193
21194 echo "$as_me:21194: checking default object directory" >&5
21195 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21196
21197         case $DFT_LWR_MODEL in
21198         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21199         normal)  DFT_OBJ_SUBDIR='objects' ;;
21200         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21201         profile) DFT_OBJ_SUBDIR='obj_p' ;;
21202         shared)
21203                 case $cf_cv_system_name in #(vi
21204                 cygwin|msys) #(vi
21205                         DFT_OBJ_SUBDIR='objects' ;;
21206                 *)
21207                         DFT_OBJ_SUBDIR='obj_s' ;;
21208                 esac
21209         esac
21210 echo "$as_me:21210: result: $DFT_OBJ_SUBDIR" >&5
21211 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21212
21213 if test "x$cf_with_cxx" = xyes ; then
21214 echo "$as_me:21214: checking c++ library-dependency suffix" >&5
21215 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21216 if test "$with_libtool" != "no"; then
21217         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21218         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21219 elif test "$with_shared_cxx" != "no"; then
21220         # also for g++ users...
21221         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21222 else
21223         # we normally make a static library because C/C++ library rules differ
21224
21225         case Xnormal in #(vi
21226         Xlibtool) #(vi
21227                 CXX_LIB_SUFFIX='.la'
21228                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21229                 ;;
21230         Xdebug) #(vi
21231                 CXX_LIB_SUFFIX='_g.a'
21232                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21233                 ;;
21234         Xprofile) #(vi
21235                 CXX_LIB_SUFFIX='_p.a'
21236                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21237                 ;;
21238         Xshared) #(vi
21239                 case $cf_cv_system_name in
21240                 aix[5-7]*) #(vi
21241                         CXX_LIB_SUFFIX='.so'
21242                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21243                         ;;
21244                 cygwin*|msys*|mingw*) #(vi
21245                         CXX_LIB_SUFFIX='.dll'
21246                         CXX_DEP_SUFFIX='.dll.a'
21247                         ;;
21248                 darwin*) #(vi
21249                         CXX_LIB_SUFFIX='.dylib'
21250                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21251                         ;;
21252                 hpux*) #(vi
21253                         case $target in
21254                         ia64*) #(vi
21255                                 CXX_LIB_SUFFIX='.so'
21256                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21257                                 ;;
21258                         *) #(vi
21259                                 CXX_LIB_SUFFIX='.sl'
21260                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21261                                 ;;
21262                         esac
21263                         ;;
21264                 *) #(vi
21265                         CXX_LIB_SUFFIX='.so'
21266                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21267                         ;;
21268                 esac
21269                 ;;
21270         *)
21271                 CXX_LIB_SUFFIX='.a'
21272                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21273                 ;;
21274         esac
21275         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
21276         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
21277
21278 fi
21279 echo "$as_me:21279: result: $CXX_LIB_SUFFIX" >&5
21280 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21281
21282 fi
21283
21284 # do not want -ldl in build except as needed for -lncurses dependency
21285 if test "x$with_dlsym" = xyes ; then
21286 if test $DFT_LWR_MODEL = shared || \
21287    test $DFT_LWR_MODEL = libtool ; then
21288
21289 # remove dl library from $LIBS
21290 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21291
21292 fi
21293 fi
21294 ### Set up low-level terminfo dependencies for makefiles.
21295
21296 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21297 # do not need libdl
21298 TICS_LIST=
21299 if test "x$with_dlsym" = xyes ; then
21300
21301 # remove dl library from $SHLIB_LIST
21302 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21303
21304 fi
21305
21306 if test "$with_ticlib" != no ; then
21307
21308         if test "x$with_ticlib" != xyes ; then
21309                 TICS_NAME=$with_ticlib
21310                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21311                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21312                 TICS_LIB_SUFFIX="${with_ticlib}"
21313         else
21314                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
21315                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21316                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
21317         fi
21318         TICS_LDFLAGS="-L${LIB_DIR}"
21319         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21320 else
21321         TICS_LDFLAGS="-L${LIB_DIR}"
21322         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21323 fi
21324
21325 if test "$with_termlib" != no ; then
21326
21327         if test "x$with_termlib" != xyes ; then
21328                 TINFO_NAME=$with_termlib
21329                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21330                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21331                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21332                 TINFO_LIB_SUFFIX="${with_termlib}"
21333         else
21334                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21335                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
21336                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21337                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
21338         fi
21339
21340         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21341         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21342         if test "$DFT_LWR_MODEL" = "libtool"; then
21343                 TEST_ARGS="${TEST_DEPS}"
21344                 TEST_ARG2="${TEST_DEP2}"
21345                 TINFO_LDFLAGS="-L${LIB_DIR}"
21346                 TINFO_LIBS="$TEST_ARGS"
21347                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21348                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21349         else
21350                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21351                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21352                 if test "x$with_term_driver" != xno ; then
21353                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21354                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21355                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21356                 else
21357                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21358                         TINFO_LIBS="$TEST_ARGS"
21359                 fi
21360                 TINFO_LDFLAGS="-L${LIB_DIR}"
21361                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21362         fi
21363 else
21364         # the next lines are needed for linking libtic over libncurses
21365         TINFO_NAME=${LIB_NAME}
21366         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21367         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
21368         if test "x$with_tic_depends" = xyes ; then
21369                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21370         else
21371                 TICS_LIST="$SHLIB_LIST"
21372         fi
21373
21374         TINFO_LDFLAGS="-L${LIB_DIR}"
21375         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21376 fi
21377
21378 if test "$DFT_LWR_MODEL" = shared ; then
21379         case $cf_cv_system_name in #(vi
21380         cygwin*|msys*)
21381                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21382                 TINFO_SUFFIX=.dll
21383                 ;;
21384         esac
21385 fi
21386
21387 if test "x$with_dlsym" = xyes ; then
21388
21389 # remove dl library from $TICS_LIST
21390 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21391
21392 fi
21393
21394 if test "$DFT_LWR_MODEL" = "libtool"; then
21395     OBJEXT=lo
21396 fi
21397
21398 # needed for Ada95
21399 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21400
21401 case $DFT_LWR_MODEL in
21402 normal|debug|profile)
21403
21404 if test "$GCC" = yes ; then
21405         case $cf_cv_system_name in #(
21406         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
21407                 LDFLAGS_STATIC=
21408                 LDFLAGS_SHARED=
21409                 ;;
21410     *)  #( normally, except when broken
21411         LDFLAGS_STATIC=-static
21412         LDFLAGS_SHARED=-dynamic
21413         ;;
21414     esac
21415 else
21416         case $cf_cv_system_name in #(
21417         aix[4-7]*)      #( from ld manpage
21418                 LDFLAGS_STATIC=-bstatic
21419                 LDFLAGS_SHARED=-bdynamic
21420                 ;;
21421         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
21422                 # We could also use just "archive" and "shared".
21423                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21424                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21425                 ;;
21426         irix*)          #( from ld manpage IRIX64
21427                 LDFLAGS_STATIC=-Bstatic
21428                 LDFLAGS_SHARED=-Bdynamic
21429                 ;;
21430         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
21431                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21432                 LDFLAGS_STATIC=-noso
21433                 LDFLAGS_SHARED=-so_archive
21434                 ;;
21435         solaris2*)
21436                 LDFLAGS_STATIC=-Bstatic
21437                 LDFLAGS_SHARED=-Bdynamic
21438                 ;;
21439         esac
21440 fi
21441
21442 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21443 then
21444         echo "$as_me:21444: checking if linker supports switching between static/dynamic" >&5
21445 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21446
21447         rm -f libconftest.a
21448         cat >conftest.$ac_ext <<EOF
21449 #line 21449 "configure"
21450 #include <stdio.h>
21451 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21452 EOF
21453         if { (eval echo "$as_me:21453: \"$ac_compile\"") >&5
21454   (eval $ac_compile) 2>&5
21455   ac_status=$?
21456   echo "$as_me:21456: \$? = $ac_status" >&5
21457   (exit $ac_status); } ; then
21458                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21459                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21460         fi
21461         rm -f conftest.*
21462
21463         cf_save_LIBS="$LIBS"
21464
21465         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21466         cat >conftest.$ac_ext <<_ACEOF
21467 #line 21467 "configure"
21468 #include "confdefs.h"
21469
21470 #line 21470 "configure"
21471 #include <stdio.h>
21472 int cf_ldflags_static(FILE *fp);
21473
21474 int
21475 main ()
21476 {
21477
21478         return cf_ldflags_static(stdin);
21479
21480   ;
21481   return 0;
21482 }
21483 _ACEOF
21484 rm -f conftest.$ac_objext conftest$ac_exeext
21485 if { (eval echo "$as_me:21485: \"$ac_link\"") >&5
21486   (eval $ac_link) 2>&5
21487   ac_status=$?
21488   echo "$as_me:21488: \$? = $ac_status" >&5
21489   (exit $ac_status); } &&
21490          { ac_try='test -s conftest$ac_exeext'
21491   { (eval echo "$as_me:21491: \"$ac_try\"") >&5
21492   (eval $ac_try) 2>&5
21493   ac_status=$?
21494   echo "$as_me:21494: \$? = $ac_status" >&5
21495   (exit $ac_status); }; }; then
21496
21497         # some linkers simply ignore the -dynamic
21498         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
21499         *static*) # (vi
21500                 cf_ldflags_static=no
21501                 ;;
21502         *)
21503                 cf_ldflags_static=yes
21504                 ;;
21505         esac
21506
21507 else
21508   echo "$as_me: failed program was:" >&5
21509 cat conftest.$ac_ext >&5
21510 cf_ldflags_static=no
21511 fi
21512 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21513
21514         rm -f libconftest.*
21515         LIBS="$cf_save_LIBS"
21516
21517         echo "$as_me:21517: result: $cf_ldflags_static" >&5
21518 echo "${ECHO_T}$cf_ldflags_static" >&6
21519
21520         if test $cf_ldflags_static != yes
21521         then
21522                 LDFLAGS_STATIC=
21523                 LDFLAGS_SHARED=
21524         fi
21525 else
21526         LDFLAGS_STATIC=
21527         LDFLAGS_SHARED=
21528 fi
21529
21530         ;;
21531 esac
21532
21533 echo "$as_me:21533: checking where we will install curses.h" >&5
21534 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21535
21536 includesubdir=
21537 if test "$with_overwrite" = no && \
21538  ( test "x$includedir" = 'x${prefix}/include' || \
21539    test "x$includedir" = "x${prefix}/include" )
21540 then
21541         includesubdir="/ncurses${LIB_SUFFIX}"
21542 fi
21543 echo "$as_me:21543: result: ${includedir}${includesubdir}" >&5
21544 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21545
21546 ### Resolve a conflict between normal and wide-curses by forcing applications
21547 ### that will need libutf8 to add it to their configure script.
21548 if test "$with_overwrite" != no ; then
21549 if test "$NCURSES_LIBUTF8" = 1 ; then
21550         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21551         { echo "$as_me:21551: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21552 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21553 fi
21554 fi
21555 WITH_OVERWRITE=$with_overwrite
21556
21557 # used to separate tack out of the tree
21558 NCURSES_TREE=
21559
21560 ### predefined stuff for the test programs
21561
21562 cat >>confdefs.h <<\EOF
21563 #define HAVE_SLK_COLOR 1
21564 EOF
21565
21566 ### Construct the list of subdirectories for which we'll customize makefiles
21567 ### with the appropriate compile-rules.
21568
21569 echo "$as_me:21569: checking for src modules" >&5
21570 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21571
21572 # dependencies and linker-arguments for test-programs
21573 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21574 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21575 if test "$DFT_LWR_MODEL" = "libtool"; then
21576         TEST_ARGS="${TEST_DEPS}"
21577         TEST_ARG2="${TEST_DEP2}"
21578 else
21579         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21580         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
21581 fi
21582
21583 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
21584 cf_cv_src_modules=
21585 for cf_dir in $modules_to_build
21586 do
21587         if test -f $srcdir/$cf_dir/modules; then
21588
21589                 # We may/may not have tack in the distribution, though the
21590                 # makefile is.
21591                 if test $cf_dir = tack ; then
21592                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
21593                                 continue
21594                         fi
21595                 fi
21596
21597                 if test -z "$cf_cv_src_modules"; then
21598                         cf_cv_src_modules=$cf_dir
21599                 else
21600                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
21601                 fi
21602
21603                 # Make the ncurses_cfg.h file record the library interface files as
21604                 # well.  These are header files that are the same name as their
21605                 # directory.  Ncurses is the only library that does not follow
21606                 # that pattern.
21607                 if test $cf_dir = tack ; then
21608                         continue
21609                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
21610
21611 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21612
21613                         cat >>confdefs.h <<EOF
21614 #define HAVE_${cf_have_include}_H 1
21615 EOF
21616
21617                         cat >>confdefs.h <<EOF
21618 #define HAVE_LIB${cf_have_include} 1
21619 EOF
21620
21621                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
21622                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
21623                         if test "$DFT_LWR_MODEL" = "libtool"; then
21624                                 TEST_ARGS="${TEST_DEPS}"
21625                                 TEST_ARG2="${TEST_DEP2}"
21626                         else
21627                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
21628                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
21629                         fi
21630                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
21631                 fi
21632         fi
21633 done
21634 echo "$as_me:21634: result: $cf_cv_src_modules" >&5
21635 echo "${ECHO_T}$cf_cv_src_modules" >&6
21636
21637 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21638 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21639
21640 SRC_SUBDIRS=
21641 if test "x$cf_with_manpages" != xno ; then
21642         SRC_SUBDIRS="$SRC_SUBDIRS man"
21643 fi
21644 SRC_SUBDIRS="$SRC_SUBDIRS include"
21645 for cf_dir in $cf_cv_src_modules
21646 do
21647         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21648 done
21649 if test "x$cf_with_tests" != "xno" ; then
21650         SRC_SUBDIRS="$SRC_SUBDIRS test"
21651 fi
21652 # always make this, to install the ncurses-config script
21653 SRC_SUBDIRS="$SRC_SUBDIRS misc"
21654 if test "$cf_with_cxx_binding" != no; then
21655         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
21656         SRC_SUBDIRS="$SRC_SUBDIRS c++"
21657 fi
21658
21659 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21660 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
21661
21662 ADA_SUBDIRS=
21663 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
21664         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
21665         ADA_SUBDIRS="gen src"
21666         if test "x$cf_with_tests" != "xno" ; then
21667                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
21668         fi
21669 fi
21670
21671 SUB_MAKEFILES=
21672 for cf_dir in $SRC_SUBDIRS
21673 do
21674         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
21675 done
21676
21677 if test -n "$ADA_SUBDIRS"; then
21678         for cf_dir in $ADA_SUBDIRS
21679         do
21680                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
21681         done
21682
21683 fi
21684
21685 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21686    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
21687    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
21688 fi
21689
21690 DIRS_TO_MAKE="lib"
21691 for cf_item in $cf_list_models
21692 do
21693
21694         case $cf_item in
21695         libtool) cf_subdir='obj_lo'  ;;
21696         normal)  cf_subdir='objects' ;;
21697         debug)   cf_subdir='obj_g' ;;
21698         profile) cf_subdir='obj_p' ;;
21699         shared)
21700                 case $cf_cv_system_name in #(vi
21701                 cygwin|msys) #(vi
21702                         cf_subdir='objects' ;;
21703                 *)
21704                         cf_subdir='obj_s' ;;
21705                 esac
21706         esac
21707
21708         for cf_item2 in $DIRS_TO_MAKE
21709         do
21710                 test $cf_item2 = $cf_subdir && break
21711         done
21712         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21713 done
21714 for cf_dir in $DIRS_TO_MAKE
21715 do
21716         test ! -d $cf_dir && mkdir $cf_dir
21717 done
21718
21719 # symbols that differ when compiling Ada95 by itself.
21720 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
21721
21722 # values to use as strings
21723
21724 cat >>confdefs.h <<EOF
21725 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
21726 EOF
21727
21728 cat >>confdefs.h <<EOF
21729 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
21730 EOF
21731
21732 ### Now that we're done running tests, add the compiler-warnings, if any
21733
21734 cf_fix_cppflags=no
21735 cf_new_cflags=
21736 cf_new_cppflags=
21737 cf_new_extra_cppflags=
21738
21739 for cf_add_cflags in $EXTRA_CFLAGS
21740 do
21741 case $cf_fix_cppflags in
21742 no)
21743         case $cf_add_cflags in #(vi
21744         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
21745                 case $cf_add_cflags in
21746                 -D*)
21747                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21748
21749                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21750                                 && test -z "${cf_tst_cflags}" \
21751                                 && cf_fix_cppflags=yes
21752
21753                         if test $cf_fix_cppflags = yes ; then
21754                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21755                                 continue
21756                         elif test "${cf_tst_cflags}" = "\"'" ; then
21757                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21758                                 continue
21759                         fi
21760                         ;;
21761                 esac
21762                 case "$CPPFLAGS" in
21763                 *$cf_add_cflags) #(vi
21764                         ;;
21765                 *) #(vi
21766                         case $cf_add_cflags in #(vi
21767                         -D*)
21768                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21769
21770 CPPFLAGS=`echo "$CPPFLAGS" | \
21771         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21772                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21773
21774                                 ;;
21775                         esac
21776                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
21777                         ;;
21778                 esac
21779                 ;;
21780         *)
21781                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
21782                 ;;
21783         esac
21784         ;;
21785 yes)
21786         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21787
21788         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21789
21790         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21791                 && test -z "${cf_tst_cflags}" \
21792                 && cf_fix_cppflags=no
21793         ;;
21794 esac
21795 done
21796
21797 if test -n "$cf_new_cflags" ; then
21798
21799         CFLAGS="$CFLAGS $cf_new_cflags"
21800 fi
21801
21802 if test -n "$cf_new_cppflags" ; then
21803
21804         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
21805 fi
21806
21807 if test -n "$cf_new_extra_cppflags" ; then
21808
21809         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
21810 fi
21811
21812 ### Define substitutions for header files to avoid name-pollution
21813
21814 if test "x$cf_cv_have_tcgetattr" = xyes ; then
21815         HAVE_TCGETATTR=1
21816 else
21817         HAVE_TCGETATTR=0
21818 fi
21819
21820 if test "x$ac_cv_header_stdint_h" = xyes ; then
21821         HAVE_STDINT_H=1
21822 else
21823         HAVE_STDINT_H=0
21824 fi
21825
21826 if test "x$ac_cv_header_termio_h" = xyes ; then
21827         HAVE_TERMIO_H=1
21828 else
21829         HAVE_TERMIO_H=0
21830 fi
21831
21832 if test "x$ac_cv_header_termios_h" = xyes ; then
21833         HAVE_TERMIOS_H=1
21834 else
21835         HAVE_TERMIOS_H=0
21836 fi
21837
21838 ################################################################################
21839 test "x$use_database" = xyes && \
21840 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
21841
21842 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
21843 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
21844
21845 if test "x$enable_pc_files" = xyes ; then \
21846 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
21847 MAKE_PC_FILES=
21848 else
21849 MAKE_PC_FILES="#"
21850 fi
21851
21852 # Extract the first word of "tic", so it can be a program name with args.
21853 set dummy tic; ac_word=$2
21854 echo "$as_me:21854: checking for $ac_word" >&5
21855 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21856 if test "${ac_cv_path_TIC_PATH+set}" = set; then
21857   echo $ECHO_N "(cached) $ECHO_C" >&6
21858 else
21859   case $TIC_PATH in
21860   [\\/]* | ?:[\\/]*)
21861   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
21862   ;;
21863   *)
21864   ac_save_IFS=$IFS; IFS=$ac_path_separator
21865 ac_dummy="$PATH:/usr/local/ncurses/bin"
21866 for ac_dir in $ac_dummy; do
21867   IFS=$ac_save_IFS
21868   test -z "$ac_dir" && ac_dir=.
21869   if $as_executable_p "$ac_dir/$ac_word"; then
21870    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
21871    echo "$as_me:21871: found $ac_dir/$ac_word" >&5
21872    break
21873 fi
21874 done
21875
21876   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
21877   ;;
21878 esac
21879 fi
21880 TIC_PATH=$ac_cv_path_TIC_PATH
21881
21882 if test -n "$TIC_PATH"; then
21883   echo "$as_me:21883: result: $TIC_PATH" >&5
21884 echo "${ECHO_T}$TIC_PATH" >&6
21885 else
21886   echo "$as_me:21886: result: no" >&5
21887 echo "${ECHO_T}no" >&6
21888 fi
21889
21890 if test -n "$FALLBACK_LIST"
21891 then
21892         if test "$TIC_PATH" = unknown
21893         then
21894                 { echo "$as_me:21894: WARNING: no tic program found for fallbacks" >&5
21895 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
21896         fi
21897 fi
21898
21899 if test "x$cf_with_tests" != xno ; then
21900         MAKE_TESTS=
21901 else
21902         MAKE_TESTS="#"
21903 fi
21904
21905 ADAHTML_DIR=../../doc/html/ada
21906
21907 # these could be configurable, but are not currently
21908 PANEL_NAME=panel
21909 MENU_NAME=menu
21910 FORM_NAME=form
21911 CXX_NAME=ncurses++
21912
21913 # workaround for g++ versus Solaris (20131116)
21914 case $cf_cv_system_name in #(vi
21915 solaris2*) #(vi
21916         case "x$CPPFLAGS" in #(vi
21917         *-D_XOPEN_SOURCE_EXTENDED*)
21918                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
21919
21920 echo "${as_me:-configure}:21920: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
21921
21922                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
21923                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
21924                 ;;
21925         esac
21926         ;;
21927 esac
21928
21929 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
21930 case "x$NCURSES_OSPEED" in #(vi
21931 *short*) #(vi
21932         cf_compatible=1
21933         ;;
21934 *)
21935         cf_compatible=0
21936         ;;
21937 esac
21938
21939 cat >>confdefs.h <<EOF
21940 #define NCURSES_OSPEED_COMPAT $cf_compatible
21941 EOF
21942
21943 case "x$cf_cv_typeof_chtype" in
21944 xshort|xint|xlong)
21945         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
21946         ;;
21947 esac
21948
21949 case "x$cf_cv_typeof_mmask_t" in
21950 xshort|xint|xlong)
21951         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
21952         ;;
21953 esac
21954
21955 # substitute into misc/Makefile to suppress
21956 # (un)install.data from the
21957 # (un)install rules.
21958 if test "x$cf_with_db_install" = "xno"; then
21959         MISC_INSTALL_DATA=
21960         MISC_UNINSTALL_DATA=
21961 else
21962         MISC_INSTALL_DATA=install.data
21963         MISC_UNINSTALL_DATA=uninstall.data
21964 fi
21965
21966 SUB_SCRIPTS=
21967
21968 if test -n "$PACKAGE"
21969 then
21970         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
21971         export PACKAGE
21972         echo "package: $PACKAGE"
21973 fi
21974
21975 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"
21976 ac_config_commands="$ac_config_commands default"
21977 cat >confcache <<\_ACEOF
21978 # This file is a shell script that caches the results of configure
21979 # tests run on this system so they can be shared between configure
21980 # scripts and configure runs, see configure's option --config-cache.
21981 # It is not useful on other systems.  If it contains results you don't
21982 # want to keep, you may remove or edit it.
21983 #
21984 # config.status only pays attention to the cache file if you give it
21985 # the --recheck option to rerun configure.
21986 #
21987 # `ac_cv_env_foo' variables (set or unset) will be overriden when
21988 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21989 # following values.
21990
21991 _ACEOF
21992
21993 # The following way of writing the cache mishandles newlines in values,
21994 # but we know of no workaround that is simple, portable, and efficient.
21995 # So, don't put newlines in cache variables' values.
21996 # Ultrix sh set writes to stderr and can't be redirected directly,
21997 # and sets the high bit in the cache file unless we assign to the vars.
21998 {
21999   (set) 2>&1 |
22000     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22001     *ac_space=\ *)
22002       # `set' does not quote correctly, so add quotes (double-quote
22003       # substitution turns \\\\ into \\, and sed turns \\ into \).
22004       sed -n \
22005         "s/'/'\\\\''/g;
22006           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22007       ;;
22008     *)
22009       # `set' quotes correctly as required by POSIX, so do not add quotes.
22010       sed -n \
22011         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22012       ;;
22013     esac;
22014 } |
22015   sed '
22016      t clear
22017      : clear
22018      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22019      t end
22020      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22021      : end' >>confcache
22022 if cmp -s $cache_file confcache; then :; else
22023   if test -w $cache_file; then
22024     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22025     cat confcache >$cache_file
22026   else
22027     echo "not updating unwritable cache $cache_file"
22028   fi
22029 fi
22030 rm -f confcache
22031
22032 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22033 # Let make expand exec_prefix.
22034 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22035
22036 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22037 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22038 # trailing colons and then remove the whole line if VPATH becomes empty
22039 # (actually we leave an empty line to preserve line numbers).
22040 if test "x$srcdir" = x.; then
22041   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22042 s/:*\$(srcdir):*/:/;
22043 s/:*\${srcdir}:*/:/;
22044 s/:*@srcdir@:*/:/;
22045 s/^\([^=]*=[    ]*\):*/\1/;
22046 s/:*$//;
22047 s/^[^=]*=[      ]*$//;
22048 }'
22049 fi
22050
22051 DEFS=-DHAVE_CONFIG_H
22052
22053 : ${CONFIG_STATUS=./config.status}
22054 ac_clean_files_save=$ac_clean_files
22055 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22056 { echo "$as_me:22056: creating $CONFIG_STATUS" >&5
22057 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22058 cat >$CONFIG_STATUS <<_ACEOF
22059 #! $SHELL
22060 # Generated automatically by configure.
22061 # Run this file to recreate the current configuration.
22062 # Compiler output produced by configure, useful for debugging
22063 # configure, is in config.log if it exists.
22064
22065 debug=false
22066 SHELL=\${CONFIG_SHELL-$SHELL}
22067 ac_cs_invocation="\$0 \$@"
22068
22069 _ACEOF
22070
22071 cat >>$CONFIG_STATUS <<\_ACEOF
22072 # Be Bourne compatible
22073 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22074   emulate sh
22075   NULLCMD=:
22076 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22077   set -o posix
22078 fi
22079
22080 # Name of the executable.
22081 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22082
22083 if expr a : '\(a\)' >/dev/null 2>&1; then
22084   as_expr=expr
22085 else
22086   as_expr=false
22087 fi
22088
22089 rm -f conf$$ conf$$.exe conf$$.file
22090 echo >conf$$.file
22091 if ln -s conf$$.file conf$$ 2>/dev/null; then
22092   # We could just check for DJGPP; but this test a) works b) is more generic
22093   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22094   if test -f conf$$.exe; then
22095     # Don't use ln at all; we don't have any links
22096     as_ln_s='cp -p'
22097   else
22098     as_ln_s='ln -s'
22099   fi
22100 elif ln conf$$.file conf$$ 2>/dev/null; then
22101   as_ln_s=ln
22102 else
22103   as_ln_s='cp -p'
22104 fi
22105 rm -f conf$$ conf$$.exe conf$$.file
22106
22107 as_executable_p="test -f"
22108
22109 # Support unset when possible.
22110 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22111   as_unset=unset
22112 else
22113   as_unset=false
22114 fi
22115
22116 # NLS nuisances.
22117 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22118 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22119 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22120 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22121 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22122 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22123 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22124 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22125
22126 # IFS
22127 # We need space, tab and new line, in precisely that order.
22128 as_nl='
22129 '
22130 IFS="   $as_nl"
22131
22132 # CDPATH.
22133 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22134
22135 exec 6>&1
22136
22137 _ACEOF
22138
22139 # Files that config.status was made for.
22140 if test -n "$ac_config_files"; then
22141   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22142 fi
22143
22144 if test -n "$ac_config_headers"; then
22145   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22146 fi
22147
22148 if test -n "$ac_config_links"; then
22149   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22150 fi
22151
22152 if test -n "$ac_config_commands"; then
22153   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22154 fi
22155
22156 cat >>$CONFIG_STATUS <<\EOF
22157
22158 ac_cs_usage="\
22159 \`$as_me' instantiates files from templates according to the
22160 current configuration.
22161
22162 Usage: $0 [OPTIONS] [FILE]...
22163
22164   -h, --help       print this help, then exit
22165   -V, --version    print version number, then exit
22166   -d, --debug      don't remove temporary files
22167       --recheck    update $as_me by reconfiguring in the same conditions
22168   --file=FILE[:TEMPLATE]
22169                    instantiate the configuration file FILE
22170   --header=FILE[:TEMPLATE]
22171                    instantiate the configuration header FILE
22172
22173 Configuration files:
22174 $config_files
22175
22176 Configuration headers:
22177 $config_headers
22178
22179 Configuration commands:
22180 $config_commands
22181
22182 Report bugs to <dickey@invisible-island.net>."
22183 EOF
22184
22185 cat >>$CONFIG_STATUS <<EOF
22186 ac_cs_version="\\
22187 config.status
22188 configured by $0, generated by GNU Autoconf 2.52.20141204,
22189   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22190
22191 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22192 Free Software Foundation, Inc.
22193 This config.status script is free software; the Free Software Foundation
22194 gives unlimited permission to copy, distribute and modify it."
22195 srcdir=$srcdir
22196 INSTALL="$INSTALL"
22197 EOF
22198
22199 cat >>$CONFIG_STATUS <<\EOF
22200 # If no file are specified by the user, then we need to provide default
22201 # value.  By we need to know if files were specified by the user.
22202 ac_need_defaults=:
22203 while test $# != 0
22204 do
22205   case $1 in
22206   --*=*)
22207     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22208     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22209     shift
22210     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22211     shift
22212     ;;
22213   -*);;
22214   *) # This is not an option, so the user has probably given explicit
22215      # arguments.
22216      ac_need_defaults=false;;
22217   esac
22218
22219   case $1 in
22220   # Handling of the options.
22221 EOF
22222 cat >>$CONFIG_STATUS <<EOF
22223   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22224     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22225     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22226 EOF
22227 cat >>$CONFIG_STATUS <<\EOF
22228   --version | --vers* | -V )
22229     echo "$ac_cs_version"; exit 0 ;;
22230   --he | --h)
22231     # Conflict between --help and --header
22232     { { echo "$as_me:22232: error: ambiguous option: $1
22233 Try \`$0 --help' for more information." >&5
22234 echo "$as_me: error: ambiguous option: $1
22235 Try \`$0 --help' for more information." >&2;}
22236    { (exit 1); exit 1; }; };;
22237   --help | --hel | -h )
22238     echo "$ac_cs_usage"; exit 0 ;;
22239   --debug | --d* | -d )
22240     debug=: ;;
22241   --file | --fil | --fi | --f )
22242     shift
22243     CONFIG_FILES="$CONFIG_FILES $1"
22244     ac_need_defaults=false;;
22245   --header | --heade | --head | --hea )
22246     shift
22247     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22248     ac_need_defaults=false;;
22249
22250   # This is an error.
22251   -*) { { echo "$as_me:22251: error: unrecognized option: $1
22252 Try \`$0 --help' for more information." >&5
22253 echo "$as_me: error: unrecognized option: $1
22254 Try \`$0 --help' for more information." >&2;}
22255    { (exit 1); exit 1; }; } ;;
22256
22257   *) ac_config_targets="$ac_config_targets $1" ;;
22258
22259   esac
22260   shift
22261 done
22262
22263 exec 5>>config.log
22264 cat >&5 << _ACEOF
22265
22266 ## ----------------------- ##
22267 ## Running config.status.  ##
22268 ## ----------------------- ##
22269
22270 This file was extended by $as_me 2.52.20141204, executed with
22271   CONFIG_FILES    = $CONFIG_FILES
22272   CONFIG_HEADERS  = $CONFIG_HEADERS
22273   CONFIG_LINKS    = $CONFIG_LINKS
22274   CONFIG_COMMANDS = $CONFIG_COMMANDS
22275   > $ac_cs_invocation
22276 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22277
22278 _ACEOF
22279 EOF
22280
22281 cat >>$CONFIG_STATUS <<EOF
22282 #
22283 # INIT-COMMANDS section.
22284 #
22285
22286 ### Special initialization commands, used to pass information from the
22287 ### configuration-run into config.status
22288
22289 AWK="$AWK"
22290 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22291 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22292 ECHO_LD="$ECHO_LD"
22293 LDCONFIG="$LDCONFIG"
22294 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22295 LIB_NAME="$LIB_NAME"
22296 LIB_PREFIX="$LIB_PREFIX"
22297 LIB_SUBSETS="$LIB_SUBSETS"
22298 LIB_SUFFIX="$LIB_SUFFIX"
22299 LIB_TRACING="$LIB_TRACING"
22300 LN_S="$LN_S"
22301 MAKE_TERMINFO="$MAKE_TERMINFO"
22302 NCURSES_MAJOR="$NCURSES_MAJOR"
22303 NCURSES_MINOR="$NCURSES_MINOR"
22304 NCURSES_OSPEED="$NCURSES_OSPEED"
22305 NCURSES_PATCH="$NCURSES_PATCH"
22306 SRC_SUBDIRS="$SRC_SUBDIRS"
22307 TERMINFO="$TERMINFO"
22308 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22309 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22310 TICS_NAME="$TICS_NAME"
22311 TIC_PATH="$TIC_PATH"
22312 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22313 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22314 TINFO_NAME="$TINFO_NAME"
22315 TINFO_SUFFIX="$TINFO_SUFFIX"
22316 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22317 WITH_CURSES_H="$with_curses_h"
22318 WITH_ECHO="${enable_echo:=yes}"
22319 WITH_OVERWRITE="$with_overwrite"
22320 cf_LIST_MODELS="$cf_list_models"
22321 cf_cv_abi_version="$cf_cv_abi_version"
22322 cf_cv_do_relink="$cf_cv_do_relink"
22323 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22324 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22325 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22326 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22327 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22328 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22329 cf_cv_rel_version="$cf_cv_rel_version"
22330 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22331 cf_cv_shared_soname='$cf_cv_shared_soname'
22332 cf_cv_shlib_version="$cf_cv_shlib_version"
22333 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22334 cf_cv_system_name="$cf_cv_system_name"
22335 cf_cv_term_driver="$with_term_driver"
22336 cf_with_ada="$cf_with_ada"
22337 cf_with_cxx_binding="$cf_with_cxx_binding"
22338 cf_with_db_install="$cf_with_db_install"
22339 cf_with_manpages="$cf_with_manpages"
22340 cf_with_tests="$cf_with_tests"
22341 with_shared_cxx="$with_shared_cxx"
22342 host="$host"
22343 target="$target"
22344
22345 EOF
22346
22347 cat >>$CONFIG_STATUS <<\EOF
22348 for ac_config_target in $ac_config_targets
22349 do
22350   case "$ac_config_target" in
22351   # Handling of arguments.
22352   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22353   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22354   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22355   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22356   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22357   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22358   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22359   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22360   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22361   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22362   *) { { echo "$as_me:22362: error: invalid argument: $ac_config_target" >&5
22363 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22364    { (exit 1); exit 1; }; };;
22365   esac
22366 done
22367
22368 # If the user did not use the arguments to specify the items to instantiate,
22369 # then the envvar interface is used.  Set only those that are not.
22370 # We use the long form for the default assignment because of an extremely
22371 # bizarre bug on SunOS 4.1.3.
22372 if $ac_need_defaults; then
22373   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22374   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22375   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22376 fi
22377
22378 # Create a temporary directory, and hook for its removal unless debugging.
22379 $debug ||
22380 {
22381   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22382   trap '{ (exit 1); exit 1; }' 1 2 13 15
22383 }
22384
22385 # Create a (secure) tmp directory for tmp files.
22386 : ${TMPDIR=/tmp}
22387 {
22388   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22389   test -n "$tmp" && test -d "$tmp"
22390 }  ||
22391 {
22392   tmp=$TMPDIR/cs$$-$RANDOM
22393   (umask 077 && mkdir $tmp)
22394 } ||
22395 {
22396    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22397    { (exit 1); exit 1; }
22398 }
22399
22400 EOF
22401
22402 cat >>$CONFIG_STATUS <<EOF
22403
22404 #
22405 # CONFIG_FILES section.
22406 #
22407
22408 # No need to generate the scripts if there are no CONFIG_FILES.
22409 # This happens for instance when ./config.status config.h
22410 if test -n "\$CONFIG_FILES"; then
22411   # Protect against being on the right side of a sed subst in config.status.
22412   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22413    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22414 s,@SHELL@,$SHELL,;t t
22415 s,@exec_prefix@,$exec_prefix,;t t
22416 s,@prefix@,$prefix,;t t
22417 s,@program_transform_name@,$program_transform_name,;t t
22418 s,@bindir@,$bindir,;t t
22419 s,@sbindir@,$sbindir,;t t
22420 s,@libexecdir@,$libexecdir,;t t
22421 s,@datarootdir@,$datarootdir,;t t
22422 s,@datadir@,$datadir,;t t
22423 s,@sysconfdir@,$sysconfdir,;t t
22424 s,@sharedstatedir@,$sharedstatedir,;t t
22425 s,@localstatedir@,$localstatedir,;t t
22426 s,@libdir@,$libdir,;t t
22427 s,@includedir@,$includedir,;t t
22428 s,@oldincludedir@,$oldincludedir,;t t
22429 s,@infodir@,$infodir,;t t
22430 s,@mandir@,$mandir,;t t
22431 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22432 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22433 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22434 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22435 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22436 s,@build_alias@,$build_alias,;t t
22437 s,@host_alias@,$host_alias,;t t
22438 s,@target_alias@,$target_alias,;t t
22439 s,@ECHO_C@,$ECHO_C,;t t
22440 s,@ECHO_N@,$ECHO_N,;t t
22441 s,@ECHO_T@,$ECHO_T,;t t
22442 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22443 s,@DEFS@,$DEFS,;t t
22444 s,@LIBS@,$LIBS,;t t
22445 s,@top_builddir@,$top_builddir,;t t
22446 s,@EGREP@,$EGREP,;t t
22447 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22448 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22449 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22450 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22451 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22452 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22453 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22454 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22455 s,@VERSION@,$VERSION,;t t
22456 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
22457 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
22458 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
22459 s,@PACKAGE@,$PACKAGE,;t t
22460 s,@build@,$build,;t t
22461 s,@build_cpu@,$build_cpu,;t t
22462 s,@build_vendor@,$build_vendor,;t t
22463 s,@build_os@,$build_os,;t t
22464 s,@host@,$host,;t t
22465 s,@host_cpu@,$host_cpu,;t t
22466 s,@host_vendor@,$host_vendor,;t t
22467 s,@host_os@,$host_os,;t t
22468 s,@target@,$target,;t t
22469 s,@target_cpu@,$target_cpu,;t t
22470 s,@target_vendor@,$target_vendor,;t t
22471 s,@target_os@,$target_os,;t t
22472 s,@CC@,$CC,;t t
22473 s,@CFLAGS@,$CFLAGS,;t t
22474 s,@LDFLAGS@,$LDFLAGS,;t t
22475 s,@CPPFLAGS@,$CPPFLAGS,;t t
22476 s,@ac_ct_CC@,$ac_ct_CC,;t t
22477 s,@EXEEXT@,$EXEEXT,;t t
22478 s,@OBJEXT@,$OBJEXT,;t t
22479 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22480 s,@CPP@,$CPP,;t t
22481 s,@LDCONFIG@,$LDCONFIG,;t t
22482 s,@CXX@,$CXX,;t t
22483 s,@CXXFLAGS@,$CXXFLAGS,;t t
22484 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22485 s,@AWK@,$AWK,;t t
22486 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22487 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22488 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22489 s,@LINT@,$LINT,;t t
22490 s,@LINT_OPTS@,$LINT_OPTS,;t t
22491 s,@LN_S@,$LN_S,;t t
22492 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22493 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22494 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22495 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22496 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
22497 s,@SET_MAKE@,$SET_MAKE,;t t
22498 s,@CTAGS@,$CTAGS,;t t
22499 s,@ETAGS@,$ETAGS,;t t
22500 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22501 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22502 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22503 s,@RANLIB@,$RANLIB,;t t
22504 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22505 s,@LD@,$LD,;t t
22506 s,@ac_ct_LD@,$ac_ct_LD,;t t
22507 s,@AR@,$AR,;t t
22508 s,@ac_ct_AR@,$ac_ct_AR,;t t
22509 s,@NM@,$NM,;t t
22510 s,@ac_ct_NM@,$ac_ct_NM,;t t
22511 s,@ARFLAGS@,$ARFLAGS,;t t
22512 s,@DESTDIR@,$DESTDIR,;t t
22513 s,@BUILD_CC@,$BUILD_CC,;t t
22514 s,@BUILD_CPP@,$BUILD_CPP,;t t
22515 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22516 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22517 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22518 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22519 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22520 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22521 s,@cf_list_models@,$cf_list_models,;t t
22522 s,@ABI_VERSION@,$ABI_VERSION,;t t
22523 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
22524 s,@LIBTOOL@,$LIBTOOL,;t t
22525 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22526 s,@LT_UNDEF@,$LT_UNDEF,;t t
22527 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22528 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22529 s,@LIB_CREATE@,$LIB_CREATE,;t t
22530 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22531 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22532 s,@LIB_PREP@,$LIB_PREP,;t t
22533 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22534 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22535 s,@LIB_LINK@,$LIB_LINK,;t t
22536 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22537 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
22538 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
22539 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
22540 s,@TICS_NAME@,$TICS_NAME,;t t
22541 s,@TINFO_NAME@,$TINFO_NAME,;t t
22542 s,@LIB_NAME@,$LIB_NAME,;t t
22543 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
22544 s,@CC_G_OPT@,$CC_G_OPT,;t t
22545 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
22546 s,@LD_MODEL@,$LD_MODEL,;t t
22547 s,@shlibdir@,$shlibdir,;t t
22548 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
22549 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
22550 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
22551 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
22552 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
22553 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
22554 s,@LINK_PROGS@,$LINK_PROGS,;t t
22555 s,@LINK_TESTS@,$LINK_TESTS,;t t
22556 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22557 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
22558 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
22559 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
22560 s,@RPATH_LIST@,$RPATH_LIST,;t t
22561 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
22562 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
22563 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22564 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
22565 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
22566 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
22567 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
22568 s,@XTERM_KBS@,$XTERM_KBS,;t t
22569 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
22570 s,@TERMINFO@,$TERMINFO,;t t
22571 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
22572 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
22573 s,@TERMPATH@,$TERMPATH,;t t
22574 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
22575 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
22576 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
22577 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
22578 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
22579 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
22580 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
22581 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
22582 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
22583 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
22584 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
22585 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
22586 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
22587 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
22588 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
22589 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
22590 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
22591 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
22592 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
22593 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
22594 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
22595 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
22596 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
22597 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
22598 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
22599 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
22600 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
22601 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
22602 s,@PTHREAD@,$PTHREAD,;t t
22603 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
22604 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
22605 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
22606 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
22607 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
22608 s,@ECHO_LT@,$ECHO_LT,;t t
22609 s,@ECHO_LD@,$ECHO_LD,;t t
22610 s,@RULE_CC@,$RULE_CC,;t t
22611 s,@SHOW_CC@,$SHOW_CC,;t t
22612 s,@ECHO_CC@,$ECHO_CC,;t t
22613 s,@ECHO_LINK@,$ECHO_LINK,;t t
22614 s,@ADAFLAGS@,$ADAFLAGS,;t t
22615 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
22616 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
22617 s,@ADA_TRACE@,$ADA_TRACE,;t t
22618 s,@MATH_LIB@,$MATH_LIB,;t t
22619 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
22620 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
22621 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
22622 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
22623 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
22624 s,@TEST_LIBS@,$TEST_LIBS,;t t
22625 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
22626 s,@CXXCPP@,$CXXCPP,;t t
22627 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
22628 s,@CXX_AR@,$CXX_AR,;t t
22629 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
22630 s,@CXXLIBS@,$CXXLIBS,;t t
22631 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
22632 s,@gnat_exists@,$gnat_exists,;t t
22633 s,@M4_exists@,$M4_exists,;t t
22634 s,@cf_ada_make@,$cf_ada_make,;t t
22635 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
22636 s,@cf_compile_generics@,$cf_compile_generics,;t t
22637 s,@cf_generic_objects@,$cf_generic_objects,;t t
22638 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
22639 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
22640 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
22641 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
22642 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
22643 s,@cf_ada_package@,$cf_ada_package,;t t
22644 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
22645 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
22646 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
22647 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
22648 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
22649 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
22650 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
22651 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
22652 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
22653 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
22654 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
22655 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
22656 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
22657 s,@TICS_LIBS@,$TICS_LIBS,;t t
22658 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
22659 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
22660 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
22661 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
22662 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
22663 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
22664 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
22665 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
22666 s,@includesubdir@,$includesubdir,;t t
22667 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
22668 s,@TICS_LIST@,$TICS_LIST,;t t
22669 s,@TINFO_LIST@,$TINFO_LIST,;t t
22670 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
22671 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
22672 s,@TEST_ARGS@,$TEST_ARGS,;t t
22673 s,@TEST_DEPS@,$TEST_DEPS,;t t
22674 s,@TEST_ARG2@,$TEST_ARG2,;t t
22675 s,@TEST_DEP2@,$TEST_DEP2,;t t
22676 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
22677 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
22678 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
22679 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
22680 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
22681 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
22682 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
22683 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
22684 s,@cross_compiling@,$cross_compiling,;t t
22685 s,@TIC_PATH@,$TIC_PATH,;t t
22686 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
22687 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
22688 s,@PANEL_NAME@,$PANEL_NAME,;t t
22689 s,@MENU_NAME@,$MENU_NAME,;t t
22690 s,@FORM_NAME@,$FORM_NAME,;t t
22691 s,@CXX_NAME@,$CXX_NAME,;t t
22692 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
22693 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
22694 CEOF
22695
22696 EOF
22697
22698   cat >>$CONFIG_STATUS <<\EOF
22699   # Split the substitutions into bite-sized pieces for seds with
22700   # small command number limits, like on Digital OSF/1 and HP-UX.
22701   ac_max_sed_lines=48
22702   ac_sed_frag=1 # Number of current file.
22703   ac_beg=1 # First line for current file.
22704   ac_end=$ac_max_sed_lines # Line after last line for current file.
22705   ac_more_lines=:
22706   ac_sed_cmds=
22707   while $ac_more_lines; do
22708     if test $ac_beg -gt 1; then
22709       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22710     else
22711       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22712     fi
22713     if test ! -s $tmp/subs.frag; then
22714       ac_more_lines=false
22715     else
22716       # The purpose of the label and of the branching condition is to
22717       # speed up the sed processing (if there are no `@' at all, there
22718       # is no need to browse any of the substitutions).
22719       # These are the two extra sed commands mentioned above.
22720       (echo ':t
22721   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22722       if test -z "$ac_sed_cmds"; then
22723         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
22724       else
22725         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22726       fi
22727       ac_sed_frag=`expr $ac_sed_frag + 1`
22728       ac_beg=$ac_end
22729       ac_end=`expr $ac_end + $ac_max_sed_lines`
22730     fi
22731   done
22732   if test -z "$ac_sed_cmds"; then
22733     ac_sed_cmds=cat
22734   fi
22735 fi # test -n "$CONFIG_FILES"
22736
22737 EOF
22738 cat >>$CONFIG_STATUS <<\EOF
22739 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22740   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22741   case $ac_file in
22742   - | *:- | *:-:* ) # input from stdin
22743         cat >$tmp/stdin
22744         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22745         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22746   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22747         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22748   * )   ac_file_in=$ac_file.in ;;
22749   esac
22750
22751   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22752   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22753          X"$ac_file" : 'X\(//\)[^/]' \| \
22754          X"$ac_file" : 'X\(//\)$' \| \
22755          X"$ac_file" : 'X\(/\)' \| \
22756          .     : '\(.\)' 2>/dev/null ||
22757 echo X"$ac_file" |
22758     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22759           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22760           /^X\(\/\/\)$/{ s//\1/; q; }
22761           /^X\(\/\).*/{ s//\1/; q; }
22762           s/.*/./; q'`
22763   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22764     { case "$ac_dir" in
22765   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22766   *)                      as_incr_dir=.;;
22767 esac
22768 as_dummy="$ac_dir"
22769 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22770   case $as_mkdir_dir in
22771     # Skip DOS drivespec
22772     ?:) as_incr_dir=$as_mkdir_dir ;;
22773     *)
22774       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22775       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22776     ;;
22777   esac
22778 done; }
22779
22780     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
22781     # A "../" for each directory in $ac_dir_suffix.
22782     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
22783   else
22784     ac_dir_suffix= ac_dots=
22785   fi
22786
22787   case $srcdir in
22788   .)  ac_srcdir=.
22789       if test -z "$ac_dots"; then
22790          ac_top_srcdir=.
22791       else
22792          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
22793       fi ;;
22794   [\\/]* | ?:[\\/]* )
22795       ac_srcdir=$srcdir$ac_dir_suffix;
22796       ac_top_srcdir=$srcdir ;;
22797   *) # Relative path.
22798     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
22799     ac_top_srcdir=$ac_dots$srcdir ;;
22800   esac
22801
22802   case $INSTALL in
22803   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22804   *) ac_INSTALL=$ac_dots$INSTALL ;;
22805   esac
22806
22807   if test x"$ac_file" != x-; then
22808     { echo "$as_me:22808: creating $ac_file" >&5
22809 echo "$as_me: creating $ac_file" >&6;}
22810     rm -f "$ac_file"
22811   fi
22812   # Let's still pretend it is `configure' which instantiates (i.e., don't
22813   # use $as_me), people would be surprised to read:
22814   #    /* config.h.  Generated automatically by config.status.  */
22815   configure_input="Generated automatically from `echo $ac_file_in |
22816                                                  sed 's,.*/,,'` by configure."
22817
22818   # First look for the input files in the build tree, otherwise in the
22819   # src tree.
22820   ac_file_inputs=`IFS=:
22821     for f in $ac_file_in; do
22822       case $f in
22823       -) echo $tmp/stdin ;;
22824       [\\/$]*)
22825          # Absolute (can't be DOS-style, as IFS=:)
22826          test -f "$f" || { { echo "$as_me:22826: error: cannot find input file: $f" >&5
22827 echo "$as_me: error: cannot find input file: $f" >&2;}
22828    { (exit 1); exit 1; }; }
22829          echo $f;;
22830       *) # Relative
22831          if test -f "$f"; then
22832            # Build tree
22833            echo $f
22834          elif test -f "$srcdir/$f"; then
22835            # Source tree
22836            echo $srcdir/$f
22837          else
22838            # /dev/null tree
22839            { { echo "$as_me:22839: error: cannot find input file: $f" >&5
22840 echo "$as_me: error: cannot find input file: $f" >&2;}
22841    { (exit 1); exit 1; }; }
22842          fi;;
22843       esac
22844     done` || { (exit 1); exit 1; }
22845 EOF
22846 cat >>$CONFIG_STATUS <<\EOF
22847   ac_warn_datarootdir=no
22848   if test x"$ac_file" != x-; then
22849     for ac_item in $ac_file_inputs
22850     do
22851       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
22852       if test -n "$ac_seen"; then
22853         ac_used=`grep '@datarootdir@' $ac_item`
22854         if test -z "$ac_used"; then
22855           { echo "$as_me:22855: WARNING: datarootdir was used implicitly but not set:
22856 $ac_seen" >&5
22857 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
22858 $ac_seen" >&2;}
22859           ac_warn_datarootdir=yes
22860         fi
22861       fi
22862       ac_seen=`grep '${datarootdir}' $ac_item`
22863       if test -n "$ac_seen"; then
22864         { echo "$as_me:22864: WARNING: datarootdir was used explicitly but not set:
22865 $ac_seen" >&5
22866 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
22867 $ac_seen" >&2;}
22868         ac_warn_datarootdir=yes
22869       fi
22870     done
22871   fi
22872
22873 if test "x$ac_warn_datarootdir" = xyes; then
22874   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
22875 fi
22876
22877 EOF
22878 cat >>$CONFIG_STATUS <<EOF
22879   sed "$ac_vpsub
22880 $extrasub
22881 EOF
22882 cat >>$CONFIG_STATUS <<\EOF
22883 :t
22884 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22885 s,@configure_input@,$configure_input,;t t
22886 s,@srcdir@,$ac_srcdir,;t t
22887 s,@top_srcdir@,$ac_top_srcdir,;t t
22888 s,@INSTALL@,$ac_INSTALL,;t t
22889 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22890   rm -f $tmp/stdin
22891   if test x"$ac_file" != x-; then
22892     cp $tmp/out $ac_file
22893
22894     for ac_name in prefix exec_prefix datarootdir
22895     do
22896         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
22897         if test -n "$ac_seen"; then
22898             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
22899             if test -z "$ac_init"; then
22900               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
22901               { echo "$as_me:22901: WARNING: Variable $ac_name is used but was not set:
22902 $ac_seen" >&5
22903 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
22904 $ac_seen" >&2;}
22905             fi
22906         fi
22907     done
22908     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
22909     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
22910     if test -s $tmp/out; then
22911       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
22912       { echo "$as_me:22912: WARNING: Some variables may not be substituted:
22913 $ac_seen" >&5
22914 echo "$as_me: WARNING: Some variables may not be substituted:
22915 $ac_seen" >&2;}
22916     fi
22917   else
22918     cat $tmp/out
22919   fi
22920   rm -f $tmp/out
22921
22922 done
22923 EOF
22924 cat >>$CONFIG_STATUS <<\EOF
22925
22926 #
22927 # CONFIG_HEADER section.
22928 #
22929
22930 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22931 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22932 #
22933 # ac_d sets the value in "#define NAME VALUE" lines.
22934 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22935 ac_dB='[        ].*$,\1#\2'
22936 ac_dC=' '
22937 ac_dD=',;t'
22938 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22939 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22940 ac_iB='\([      ]\),\1#\2define\3'
22941 ac_iC=' '
22942 ac_iD='\4,;t'
22943 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22944 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22945 ac_uB='$,\1#\2define\3'
22946 ac_uC=' '
22947 ac_uD=',;t'
22948
22949 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22950   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22951   case $ac_file in
22952   - | *:- | *:-:* ) # input from stdin
22953         cat >$tmp/stdin
22954         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22955         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22956   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22957         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22958   * )   ac_file_in=$ac_file.in ;;
22959   esac
22960
22961   test x"$ac_file" != x- && { echo "$as_me:22961: creating $ac_file" >&5
22962 echo "$as_me: creating $ac_file" >&6;}
22963
22964   # First look for the input files in the build tree, otherwise in the
22965   # src tree.
22966   ac_file_inputs=`IFS=:
22967     for f in $ac_file_in; do
22968       case $f in
22969       -) echo $tmp/stdin ;;
22970       [\\/$]*)
22971          # Absolute (can't be DOS-style, as IFS=:)
22972          test -f "$f" || { { echo "$as_me:22972: error: cannot find input file: $f" >&5
22973 echo "$as_me: error: cannot find input file: $f" >&2;}
22974    { (exit 1); exit 1; }; }
22975          echo $f;;
22976       *) # Relative
22977          if test -f "$f"; then
22978            # Build tree
22979            echo $f
22980          elif test -f "$srcdir/$f"; then
22981            # Source tree
22982            echo $srcdir/$f
22983          else
22984            # /dev/null tree
22985            { { echo "$as_me:22985: error: cannot find input file: $f" >&5
22986 echo "$as_me: error: cannot find input file: $f" >&2;}
22987    { (exit 1); exit 1; }; }
22988          fi;;
22989       esac
22990     done` || { (exit 1); exit 1; }
22991   # Remove the trailing spaces.
22992   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
22993
22994 EOF
22995
22996 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
22997 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
22998 # be either 'cat' or 'sort'.
22999 cat confdefs.h | uniq >conftest.vals
23000
23001 # Break up conftest.vals because some shells have a limit on
23002 # the size of here documents, and old seds have small limits too.
23003
23004 rm -f conftest.tail
23005 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23006 while grep . conftest.vals >/dev/null
23007 do
23008   # Write chunks of a limited-size here document to conftest.frag.
23009   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23010   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23011   echo 'CEOF' >> $CONFIG_STATUS
23012   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23013   rm -f conftest.vals
23014   mv conftest.tail conftest.vals
23015 done
23016 rm -f conftest.vals
23017
23018 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23019 # marker @DEFS@.
23020 echo '  cat >> conftest.edit <<CEOF
23021 /@DEFS@/r conftest.frag
23022 /@DEFS@/d
23023 CEOF
23024 sed -f conftest.edit $tmp/in > $tmp/out
23025 rm -f $tmp/in
23026 mv $tmp/out $tmp/in
23027 rm -f conftest.edit conftest.frag
23028 ' >> $CONFIG_STATUS
23029
23030 cat >>$CONFIG_STATUS <<\EOF
23031   # Let's still pretend it is `configure' which instantiates (i.e., don't
23032   # use $as_me), people would be surprised to read:
23033   #    /* config.h.  Generated automatically by config.status.  */
23034   if test x"$ac_file" = x-; then
23035     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23036   else
23037     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23038   fi
23039   cat $tmp/in >>$tmp/config.h
23040   rm -f $tmp/in
23041   if test x"$ac_file" != x-; then
23042     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23043       { echo "$as_me:23043: $ac_file is unchanged" >&5
23044 echo "$as_me: $ac_file is unchanged" >&6;}
23045     else
23046       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23047          X"$ac_file" : 'X\(//\)[^/]' \| \
23048          X"$ac_file" : 'X\(//\)$' \| \
23049          X"$ac_file" : 'X\(/\)' \| \
23050          .     : '\(.\)' 2>/dev/null ||
23051 echo X"$ac_file" |
23052     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23053           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23054           /^X\(\/\/\)$/{ s//\1/; q; }
23055           /^X\(\/\).*/{ s//\1/; q; }
23056           s/.*/./; q'`
23057       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23058         { case "$ac_dir" in
23059   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23060   *)                      as_incr_dir=.;;
23061 esac
23062 as_dummy="$ac_dir"
23063 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23064   case $as_mkdir_dir in
23065     # Skip DOS drivespec
23066     ?:) as_incr_dir=$as_mkdir_dir ;;
23067     *)
23068       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23069       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23070     ;;
23071   esac
23072 done; }
23073
23074       fi
23075       rm -f $ac_file
23076       mv $tmp/config.h $ac_file
23077     fi
23078   else
23079     cat $tmp/config.h
23080     rm -f $tmp/config.h
23081   fi
23082 done
23083 EOF
23084 cat >>$CONFIG_STATUS <<\EOF
23085 #
23086 # CONFIG_COMMANDS section.
23087 #
23088 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23089   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23090   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23091
23092   case $ac_dest in
23093     default )
23094 if test "x$cf_with_tests" != xno ; then
23095
23096 for cf_dir in test
23097 do
23098         if test ! -d $srcdir/$cf_dir; then
23099                 continue
23100         elif test -f $srcdir/$cf_dir/programs; then
23101                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23102         fi
23103 done
23104
23105 fi
23106
23107 cf_prefix=$LIB_PREFIX
23108
23109 case $cf_cv_shlib_version in #(vi
23110 cygdll|msysdll|mingw)
23111         TINFO_NAME=$TINFO_ARG_SUFFIX
23112         TINFO_SUFFIX=.dll
23113         ;;
23114 esac
23115
23116 if test -n "$TINFO_SUFFIX" ; then
23117         case $TINFO_SUFFIX in
23118         tw*)
23119                 TINFO_NAME="${TINFO_NAME}tw"
23120                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
23121                 ;;
23122         t*)
23123                 TINFO_NAME="${TINFO_NAME}t"
23124                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
23125                 ;;
23126         w*)
23127                 TINFO_NAME="${TINFO_NAME}w"
23128                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
23129                 ;;
23130         esac
23131 fi
23132
23133 for cf_dir in $SRC_SUBDIRS
23134 do
23135         if test ! -d $srcdir/$cf_dir ; then
23136                 continue
23137         elif test -f $srcdir/$cf_dir/modules; then
23138
23139                 SHARED_LIB=
23140                 Libs_To_Make=
23141                 for cf_item in $cf_LIST_MODELS
23142                 do
23143
23144         case X$cf_item in #(vi
23145         Xlibtool) #(vi
23146                 cf_suffix='.la'
23147                 cf_depsuf=$cf_suffix
23148                 ;;
23149         Xdebug) #(vi
23150                 cf_suffix='_g.a'
23151                 cf_depsuf=$cf_suffix
23152                 ;;
23153         Xprofile) #(vi
23154                 cf_suffix='_p.a'
23155                 cf_depsuf=$cf_suffix
23156                 ;;
23157         Xshared) #(vi
23158                 case $cf_cv_system_name in
23159                 aix[5-7]*) #(vi
23160                         cf_suffix='.so'
23161                         cf_depsuf=$cf_suffix
23162                         ;;
23163                 cygwin*|msys*|mingw*) #(vi
23164                         cf_suffix='.dll'
23165                         cf_depsuf='.dll.a'
23166                         ;;
23167                 darwin*) #(vi
23168                         cf_suffix='.dylib'
23169                         cf_depsuf=$cf_suffix
23170                         ;;
23171                 hpux*) #(vi
23172                         case $target in
23173                         ia64*) #(vi
23174                                 cf_suffix='.so'
23175                                 cf_depsuf=$cf_suffix
23176                                 ;;
23177                         *) #(vi
23178                                 cf_suffix='.sl'
23179                                 cf_depsuf=$cf_suffix
23180                                 ;;
23181                         esac
23182                         ;;
23183                 *) #(vi
23184                         cf_suffix='.so'
23185                         cf_depsuf=$cf_suffix
23186                         ;;
23187                 esac
23188                 ;;
23189         *)
23190                 cf_suffix='.a'
23191                 cf_depsuf=$cf_suffix
23192                 ;;
23193         esac
23194         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23195         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23196
23197                         cf_libname=$cf_dir
23198                         test "$cf_dir" = c++ && cf_libname=ncurses++
23199                         if test $cf_item = shared ; then
23200                                 if test -n "${LIB_SUFFIX}"
23201                                 then
23202                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
23203                                 else
23204                                         cf_shared_suffix="$cf_suffix"
23205                                 fi
23206                                 if test "$cf_cv_do_symlinks" = yes ; then
23207                                         cf_version_name=
23208
23209                                         case "$cf_cv_shlib_version" in #(vi
23210                                         rel) #(vi
23211                                                 cf_version_name=REL_VERSION
23212                                                 ;;
23213                                         abi)
23214                                                 cf_version_name=ABI_VERSION
23215                                                 ;;
23216                                         esac
23217
23218                                         if test -n "$cf_version_name"
23219                                         then
23220                                                 case "$cf_cv_system_name" in #(vi
23221                                                 darwin*)
23222                                                         # "w", etc?
23223                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23224                                                         ;; #(vi
23225                                                 *)
23226                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23227                                                         ;;
23228                                                 esac
23229                                         fi
23230                                         if test -n "${LIB_SUFFIX}"
23231                                         then
23232                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
23233                                         else
23234                                                 cf_shared_suffix="$cf_suffix"
23235                                         fi
23236                                 fi
23237                                 # cygwin needs import library, and has unique naming convention
23238                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23239                                 # use 'cyg' prefix for shared lib.
23240                                 case $cf_cv_shlib_version in #(vi
23241                                 cygdll) #(vi
23242                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23243                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
23244                                         continue
23245                                         ;;
23246                                 msysdll) #(vi
23247                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23248                                         Libs_To_Make="$Libs_To_Make ../lib/msys-${cf_libname}${cf_cygsuf}"
23249                                         continue
23250                                         ;;
23251                                 mingw)
23252                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23253                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
23254                                         continue
23255                                         ;;
23256                                 esac
23257                         fi
23258                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23259                 done
23260
23261                 if test $cf_dir = ncurses ; then
23262                         cf_subsets="$LIB_SUBSETS"
23263                         cf_r_parts="$cf_subsets"
23264                         cf_liblist="$Libs_To_Make"
23265
23266                         while test -n "$cf_r_parts"
23267                         do
23268                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
23269                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
23270                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
23271                                         cf_item=
23272                                         case $cf_l_parts in #(vi
23273                                         *termlib*) #(vi
23274                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
23275                                                 ;;
23276                                         *ticlib*)
23277                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
23278                                                 ;;
23279                                         *)
23280                                                 break
23281                                                 ;;
23282                                         esac
23283                                         if test -n "$cf_item"; then
23284                                                 Libs_To_Make="$cf_item $Libs_To_Make"
23285                                         fi
23286                                 else
23287                                         break
23288                                 fi
23289                         done
23290                 else
23291                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23292                 fi
23293
23294                 if test $cf_dir = c++; then
23295                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23296                                 cf_list=
23297                                 for cf_item in $Libs_To_Make
23298                                 do
23299                                         case $cf_item in
23300                                         *.a)
23301                                                 ;;
23302                                         *)
23303                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23304                                                 ;;
23305                                         esac
23306                                         for cf_test in $cf_list
23307                                         do
23308                                                 if test "$cf_test" = "$cf_item"
23309                                                 then
23310                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23311                                                         cf_item=
23312                                                         break
23313                                                 fi
23314                                         done
23315                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
23316                                 done
23317                                 Libs_To_Make="$cf_list"
23318                         fi
23319                 fi
23320
23321                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23322                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23323                         $cf_dir/Makefile >$cf_dir/Makefile.out
23324                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23325
23326                 $AWK -f $srcdir/mk-0th.awk \
23327                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23328                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23329
23330                 for cf_subset in $cf_subsets
23331                 do
23332                         cf_subdirs=
23333                         for cf_item in $cf_LIST_MODELS
23334                         do
23335
23336                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23337
23338 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23339
23340                         CXX_MODEL=$cf_ITEM
23341                         if test "$CXX_MODEL" = SHARED; then
23342                                 case $cf_cv_shlib_version in #(vi
23343                                 cygdll|msysdll|mingw) #(vi
23344                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23345
23346 echo "${as_me:-configure}:23346: testing overriding CXX_MODEL to SHARED ..." 1>&5
23347
23348                                         with_shared_cxx=yes
23349                                         ;;
23350                                 *)
23351                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23352                                         ;;
23353                                 esac
23354                         fi
23355
23356         case X$cf_item in #(vi
23357         Xlibtool) #(vi
23358                 cf_suffix='.la'
23359                 cf_depsuf=$cf_suffix
23360                 ;;
23361         Xdebug) #(vi
23362                 cf_suffix='_g.a'
23363                 cf_depsuf=$cf_suffix
23364                 ;;
23365         Xprofile) #(vi
23366                 cf_suffix='_p.a'
23367                 cf_depsuf=$cf_suffix
23368                 ;;
23369         Xshared) #(vi
23370                 case $cf_cv_system_name in
23371                 aix[5-7]*) #(vi
23372                         cf_suffix='.so'
23373                         cf_depsuf=$cf_suffix
23374                         ;;
23375                 cygwin*|msys*|mingw*) #(vi
23376                         cf_suffix='.dll'
23377                         cf_depsuf='.dll.a'
23378                         ;;
23379                 darwin*) #(vi
23380                         cf_suffix='.dylib'
23381                         cf_depsuf=$cf_suffix
23382                         ;;
23383                 hpux*) #(vi
23384                         case $target in
23385                         ia64*) #(vi
23386                                 cf_suffix='.so'
23387                                 cf_depsuf=$cf_suffix
23388                                 ;;
23389                         *) #(vi
23390                                 cf_suffix='.sl'
23391                                 cf_depsuf=$cf_suffix
23392                                 ;;
23393                         esac
23394                         ;;
23395                 *) #(vi
23396                         cf_suffix='.so'
23397                         cf_depsuf=$cf_suffix
23398                         ;;
23399                 esac
23400                 ;;
23401         *)
23402                 cf_suffix='.a'
23403                 cf_depsuf=$cf_suffix
23404                 ;;
23405         esac
23406         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23407         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23408
23409         case $cf_item in
23410         libtool) cf_subdir='obj_lo'  ;;
23411         normal)  cf_subdir='objects' ;;
23412         debug)   cf_subdir='obj_g' ;;
23413         profile) cf_subdir='obj_p' ;;
23414         shared)
23415                 case $cf_cv_system_name in #(vi
23416                 cygwin|msys) #(vi
23417                         cf_subdir='objects' ;;
23418                 *)
23419                         cf_subdir='obj_s' ;;
23420                 esac
23421         esac
23422
23423                         # Test for case where we build libtinfo with a different name.
23424                         cf_libname=$cf_dir
23425                         if test $cf_dir = ncurses ; then
23426                                 case $cf_subset in
23427                                 *base*)
23428                                         cf_libname=${cf_libname}$LIB_SUFFIX
23429                                         ;;
23430                                 *termlib*)
23431                                         cf_libname=$TINFO_LIB_SUFFIX
23432                                         ;;
23433                                 ticlib*)
23434                                         cf_libname=$TICS_LIB_SUFFIX
23435                                         ;;
23436                                 esac
23437                         elif test $cf_dir = c++ ; then
23438                                 cf_libname=ncurses++$LIB_SUFFIX
23439                         else
23440                                 cf_libname=${cf_libname}$LIB_SUFFIX
23441                         fi
23442                         if test -n "${DFT_ARG_SUFFIX}" ; then
23443                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
23444                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
23445                         fi
23446
23447                         # These dependencies really are for development, not
23448                         # builds, but they are useful in porting, too.
23449                         cf_depend="../include/ncurses_cfg.h"
23450                         if test "$srcdir" = "."; then
23451                                 cf_reldir="."
23452                         else
23453                                 cf_reldir="\${srcdir}"
23454                         fi
23455
23456                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
23457                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
23458                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
23459                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
23460                         fi
23461
23462                         cf_dir_suffix=
23463                         old_cf_suffix="$cf_suffix"
23464                         if test "$cf_cv_shlib_version_infix" = yes ; then
23465                         if test -n "$LIB_SUFFIX" ; then
23466                                 case $LIB_SUFFIX in
23467                                 tw*)
23468                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
23469                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
23470                                         cf_dir_suffix=tw
23471                                         ;;
23472                                 t*)
23473                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
23474                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
23475                                         cf_dir_suffix=t
23476                                         ;;
23477                                 w*)
23478                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
23479                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
23480                                         cf_dir_suffix=w
23481                                         ;;
23482                                 esac
23483                         fi
23484                         fi
23485
23486                         $AWK -f $srcdir/mk-1st.awk \
23487                                 name=${cf_libname}${cf_dir_suffix} \
23488                                 traces=$LIB_TRACING \
23489                                 MODEL=$cf_ITEM \
23490                                 CXX_MODEL=$CXX_MODEL \
23491                                 model=$cf_subdir \
23492                                 prefix=$cf_prefix \
23493                                 suffix=$cf_suffix \
23494                                 subset=$cf_subset \
23495                                 driver=$cf_cv_term_driver \
23496                                 SymLink="$LN_S" \
23497                                 TermlibRoot=$TINFO_NAME \
23498                                 TermlibSuffix=$TINFO_SUFFIX \
23499                                 ShlibVer=$cf_cv_shlib_version \
23500                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
23501                                 ReLink=${cf_cv_do_relink:-no} \
23502                                 DoLinks=$cf_cv_do_symlinks \
23503                                 rmSoLocs=$cf_cv_rm_so_locs \
23504                                 ldconfig="$LDCONFIG" \
23505                                 overwrite=$WITH_OVERWRITE \
23506                                 depend="$cf_depend" \
23507                                 host="$host" \
23508                                 libtool_version="$LIBTOOL_VERSION" \
23509                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23510
23511                         cf_suffix="$old_cf_suffix"
23512
23513                         for cf_subdir2 in $cf_subdirs lib
23514                         do
23515                                 test $cf_subdir = $cf_subdir2 && break
23516                         done
23517                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
23518                         $AWK -f $srcdir/mk-2nd.awk \
23519                                 name=$cf_dir \
23520                                 traces=$LIB_TRACING \
23521                                 MODEL=$cf_ITEM \
23522                                 model=$cf_subdir \
23523                                 subset=$cf_subset \
23524                                 srcdir=$srcdir \
23525                                 echo=$WITH_ECHO \
23526                                 crenames=$cf_cv_prog_CC_c_o \
23527                                 cxxrenames=$cf_cv_prog_CXX_c_o \
23528                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23529                         cf_subdirs="$cf_subdirs $cf_subdir"
23530                         done
23531                 done
23532         fi
23533
23534         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
23535 done
23536
23537 for cf_dir in $SRC_SUBDIRS
23538 do
23539         if test ! -d $srcdir/$cf_dir ; then
23540                 continue
23541         fi
23542
23543         if test -f $cf_dir/Makefile ; then
23544                 case "$cf_dir" in
23545                 Ada95) #(vi
23546                         echo 'libs \' >> Makefile
23547                         echo 'install.libs \' >> Makefile
23548                         echo 'uninstall.libs ::' >> Makefile
23549                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
23550                         ;;
23551                 esac
23552         fi
23553
23554         if test -f $srcdir/$cf_dir/modules; then
23555                 echo >> Makefile
23556                 if test -f $srcdir/$cf_dir/headers; then
23557 cat >> Makefile <<CF_EOF
23558 install.includes \\
23559 uninstall.includes \\
23560 CF_EOF
23561                 fi
23562 if test "$cf_dir" != "c++" ; then
23563 echo 'lint \' >> Makefile
23564 fi
23565 cat >> Makefile <<CF_EOF
23566 libs \\
23567 lintlib \\
23568 install.libs \\
23569 uninstall.libs \\
23570 install.$cf_dir \\
23571 uninstall.$cf_dir ::
23572         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23573 CF_EOF
23574         elif test -f $srcdir/$cf_dir/headers; then
23575 cat >> Makefile <<CF_EOF
23576
23577 libs \\
23578 install.libs \\
23579 uninstall.libs \\
23580 install.includes \\
23581 uninstall.includes ::
23582         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23583 CF_EOF
23584 fi
23585 done
23586
23587 if test "x$cf_with_db_install" = xyes; then
23588 cat >> Makefile <<CF_EOF
23589
23590 install.libs uninstall.libs \\
23591 install.data uninstall.data ::
23592 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23593 CF_EOF
23594 else
23595 cat >> Makefile <<CF_EOF
23596
23597 install.libs uninstall.libs ::
23598         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23599 CF_EOF
23600 fi
23601
23602 if test "x$cf_with_manpages" = xyes; then
23603 cat >> Makefile <<CF_EOF
23604
23605 install.man \\
23606 uninstall.man ::
23607         cd man && \${MAKE} \${TOP_MFLAGS} \$@
23608 CF_EOF
23609 fi
23610
23611 cat >> Makefile <<CF_EOF
23612
23613 distclean ::
23614         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
23615         rm -f headers.sh headers.sed mk_shared_lib.sh
23616         rm -f edit_man.* man_alias.*
23617         rm -rf \${DIRS_TO_MAKE}
23618 CF_EOF
23619
23620 # Special case: tack's manpage lives in its own directory.
23621 if test "x$cf_with_manpages" = xyes; then
23622 if test -d tack ; then
23623 if test -f $srcdir/$tack.h; then
23624 cat >> Makefile <<CF_EOF
23625
23626 install.man \\
23627 uninstall.man ::
23628         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
23629 CF_EOF
23630 fi
23631 fi
23632 fi
23633
23634 rm -f headers.sed headers.sh
23635
23636 echo creating headers.sh
23637 cat >headers.sh <<CF_EOF
23638 #! /bin/sh
23639 # This shell script is generated by the 'configure' script.  It is invoked in a
23640 # subdirectory of the build tree.  It generates a sed-script in the parent
23641 # directory that is used to adjust includes for header files that reside in a
23642 # subdirectory of /usr/include, etc.
23643 PRG=""
23644 while test \$# != 3
23645 do
23646 PRG="\$PRG \$1"; shift
23647 done
23648 DST=\$1
23649 REF=\$2
23650 SRC=\$3
23651 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
23652 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
23653 echo installing \$SRC in \$DST
23654 CF_EOF
23655
23656 if test $WITH_CURSES_H = yes; then
23657         cat >>headers.sh <<CF_EOF
23658 case \$DST in
23659 /*/include/*)
23660         END=\`basename \$DST\`
23661         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23662         do
23663                 NAME=\`basename \$i\`
23664                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23665         done
23666         ;;
23667 *)
23668         echo "" >> \$TMPSED
23669         ;;
23670 esac
23671 CF_EOF
23672
23673 else
23674         cat >>headers.sh <<CF_EOF
23675 case \$DST in
23676 /*/include/*)
23677         END=\`basename \$DST\`
23678         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23679         do
23680                 NAME=\`basename \$i\`
23681                 if test "\$NAME" = "curses.h"
23682                 then
23683                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23684                         NAME=ncurses.h
23685                 fi
23686                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23687         done
23688         ;;
23689 *)
23690         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23691         ;;
23692 esac
23693 CF_EOF
23694 fi
23695 cat >>headers.sh <<CF_EOF
23696 rm -f \$TMPSRC
23697 sed -f \$TMPSED \$SRC > \$TMPSRC
23698 NAME=\`basename \$SRC\`
23699 CF_EOF
23700 if test $WITH_CURSES_H != yes; then
23701         cat >>headers.sh <<CF_EOF
23702 test "\$NAME" = "curses.h" && NAME=ncurses.h
23703 CF_EOF
23704 fi
23705 cat >>headers.sh <<CF_EOF
23706 # Just in case someone gzip'd manpages, remove the conflicting copy.
23707 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
23708
23709 eval \$PRG \$TMPSRC \$DST/\$NAME
23710 rm -f \$TMPSRC \$TMPSED
23711 CF_EOF
23712
23713 chmod 0755 headers.sh
23714
23715 for cf_dir in $SRC_SUBDIRS
23716 do
23717         if test ! -d $srcdir/$cf_dir ; then
23718                 continue
23719         fi
23720
23721         if test -f $srcdir/$cf_dir/headers; then
23722                 $AWK -f $srcdir/mk-hdr.awk \
23723                         subset="$LIB_SUBSETS" \
23724                         compat="$WITH_CURSES_H" \
23725                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
23726         fi
23727
23728         if test -f $srcdir/$cf_dir/modules; then
23729                 if test "$cf_dir" != "c++" ; then
23730                         cat >>$cf_dir/Makefile <<"CF_EOF"
23731 depend : ${AUTO_SRC}
23732         makedepend -- ${CPPFLAGS} -- ${C_SRC}
23733
23734 # DO NOT DELETE THIS LINE -- make depend depends on it.
23735 CF_EOF
23736                 fi
23737         fi
23738 done
23739
23740 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23741 if test -z "$USE_OLD_MAKERULES" ; then
23742         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
23743 fi
23744 fi
23745  ;;
23746   esac
23747 done
23748 EOF
23749
23750 cat >>$CONFIG_STATUS <<\EOF
23751
23752 { (exit 0); exit 0; }
23753 EOF
23754 chmod +x $CONFIG_STATUS
23755 ac_clean_files=$ac_clean_files_save
23756
23757 # configure is writing to config.log, and then calls config.status.
23758 # config.status does its own redirection, appending to config.log.
23759 # Unfortunately, on DOS this fails, as config.log is still kept open
23760 # by configure, so config.status won't be able to write to it; its
23761 # output is simply discarded.  So we exec the FD to /dev/null,
23762 # effectively closing config.log, so it can be properly (re)opened and
23763 # appended to by config.status.  When coming back to configure, we
23764 # need to make the FD available again.
23765 if test "$no_create" != yes; then
23766   ac_cs_success=:
23767   exec 5>/dev/null
23768   $SHELL $CONFIG_STATUS || ac_cs_success=false
23769   exec 5>>config.log
23770   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23771   # would make configure fail if this is the last instruction.
23772   $ac_cs_success || { (exit 1); exit 1; }
23773 fi
23774 ${MAKE:-make} preinstall