]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20141220
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.594 .
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-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 RESULTING_SYMS=
6482 VERSIONED_SYMS=
6483
6484 if test "x$with_versioned_syms" != xno
6485 then
6486         RESULTING_SYMS=$with_versioned_syms
6487         case "x$MK_SHARED_LIB" in
6488         *-Wl,*) #(vi
6489                 VERSIONED_SYMS="-Wl,--version-script,\$(RESULTING_SYMS)"
6490                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6491                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6492
6493 echo "${as_me:-configure}:6493: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6494
6495                 ;;
6496         *-dy*) #(vi
6497                 VERSIONED_SYMS="-Wl,-M,\$(RESULTING_SYMS)"
6498                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6499                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6500
6501 echo "${as_me:-configure}:6501: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6502
6503                 ;;
6504         *)
6505                 { echo "$as_me:6505: WARNING: this system does not support versioned-symbols" >&5
6506 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6507                 ;;
6508         esac
6509 fi
6510
6511                 ;;
6512         esac
6513 done
6514
6515 # pretend that ncurses==ncursesw==ncursest
6516 echo "$as_me:6516: checking if you want to disable library suffixes" >&5
6517 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6518
6519 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6520 if test "${enable_lib_suffixes+set}" = set; then
6521   enableval="$enable_lib_suffixes"
6522   disable_lib_suffixes=$enableval
6523 else
6524   disable_lib_suffixes=no
6525 fi;
6526 echo "$as_me:6526: result: $disable_lib_suffixes" >&5
6527 echo "${ECHO_T}$disable_lib_suffixes" >&6
6528
6529 ### If we're building with rpath, try to link non-standard libs that way too.
6530 if test "$DFT_LWR_MODEL" = "shared"; then
6531
6532 echo "$as_me:6532: checking if rpath-hack should be disabled" >&5
6533 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6534
6535 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6536 if test "${enable_rpath_hack+set}" = set; then
6537   enableval="$enable_rpath_hack"
6538   test "$enableval" != no && enableval=yes
6539   if test "$enableval" != "yes" ; then
6540     cf_disable_rpath_hack=yes
6541   else
6542     cf_disable_rpath_hack=no
6543   fi
6544 else
6545   enableval=yes
6546   cf_disable_rpath_hack=no
6547
6548 fi;
6549 echo "$as_me:6549: result: $cf_disable_rpath_hack" >&5
6550 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6551 if test "$cf_disable_rpath_hack" = no ; then
6552
6553 echo "$as_me:6553: checking for updated LDFLAGS" >&5
6554 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6555 if test -n "$LD_RPATH_OPT" ; then
6556         echo "$as_me:6556: result: maybe" >&5
6557 echo "${ECHO_T}maybe" >&6
6558
6559         for ac_prog in ldd
6560 do
6561   # Extract the first word of "$ac_prog", so it can be a program name with args.
6562 set dummy $ac_prog; ac_word=$2
6563 echo "$as_me:6563: checking for $ac_word" >&5
6564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6565 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6566   echo $ECHO_N "(cached) $ECHO_C" >&6
6567 else
6568   if test -n "$cf_ldd_prog"; then
6569   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6570 else
6571   ac_save_IFS=$IFS; IFS=$ac_path_separator
6572 ac_dummy="$PATH"
6573 for ac_dir in $ac_dummy; do
6574   IFS=$ac_save_IFS
6575   test -z "$ac_dir" && ac_dir=.
6576   $as_executable_p "$ac_dir/$ac_word" || continue
6577 ac_cv_prog_cf_ldd_prog="$ac_prog"
6578 echo "$as_me:6578: found $ac_dir/$ac_word" >&5
6579 break
6580 done
6581
6582 fi
6583 fi
6584 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6585 if test -n "$cf_ldd_prog"; then
6586   echo "$as_me:6586: result: $cf_ldd_prog" >&5
6587 echo "${ECHO_T}$cf_ldd_prog" >&6
6588 else
6589   echo "$as_me:6589: result: no" >&5
6590 echo "${ECHO_T}no" >&6
6591 fi
6592
6593   test -n "$cf_ldd_prog" && break
6594 done
6595 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6596
6597         cf_rpath_list="/usr/lib /lib"
6598         if test "$cf_ldd_prog" != no
6599         then
6600                 cf_rpath_oops=
6601
6602 cat >conftest.$ac_ext <<_ACEOF
6603 #line 6603 "configure"
6604 #include "confdefs.h"
6605 #include <stdio.h>
6606 int
6607 main ()
6608 {
6609 printf("Hello");
6610   ;
6611   return 0;
6612 }
6613 _ACEOF
6614 rm -f conftest.$ac_objext conftest$ac_exeext
6615 if { (eval echo "$as_me:6615: \"$ac_link\"") >&5
6616   (eval $ac_link) 2>&5
6617   ac_status=$?
6618   echo "$as_me:6618: \$? = $ac_status" >&5
6619   (exit $ac_status); } &&
6620          { ac_try='test -s conftest$ac_exeext'
6621   { (eval echo "$as_me:6621: \"$ac_try\"") >&5
6622   (eval $ac_try) 2>&5
6623   ac_status=$?
6624   echo "$as_me:6624: \$? = $ac_status" >&5
6625   (exit $ac_status); }; }; then
6626   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6627                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6628 else
6629   echo "$as_me: failed program was:" >&5
6630 cat conftest.$ac_ext >&5
6631 fi
6632 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6633
6634                 # If we passed the link-test, but get a "not found" on a given library,
6635                 # this could be due to inept reconfiguration of gcc to make it only
6636                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6637                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6638                 # /usr/local libraries.
6639                 if test -n "$cf_rpath_oops"
6640                 then
6641                         for cf_rpath_src in $cf_rpath_oops
6642                         do
6643                                 for cf_rpath_dir in \
6644                                         /usr/local \
6645                                         /usr/pkg \
6646                                         /opt/sfw
6647                                 do
6648                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6649                                         then
6650                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6651
6652 echo "${as_me:-configure}:6652: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6653
6654                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6655                                                 break
6656                                         fi
6657                                 done
6658                         done
6659                 fi
6660         fi
6661
6662         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6663
6664 echo "${as_me:-configure}:6664: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6665
6666 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6667
6668 echo "${as_me:-configure}:6668: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6669
6670 cf_rpath_dst=
6671 for cf_rpath_src in $LDFLAGS
6672 do
6673         case $cf_rpath_src in #(vi
6674         -L*) #(vi
6675
6676                 # check if this refers to a directory which we will ignore
6677                 cf_rpath_skip=no
6678                 if test -n "$cf_rpath_list"
6679                 then
6680                         for cf_rpath_item in $cf_rpath_list
6681                         do
6682                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6683                                 then
6684                                         cf_rpath_skip=yes
6685                                         break
6686                                 fi
6687                         done
6688                 fi
6689
6690                 if test "$cf_rpath_skip" = no
6691                 then
6692                         # transform the option
6693                         if test "$LD_RPATH_OPT" = "-R " ; then
6694                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6695                         else
6696                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6697                         fi
6698
6699                         # if we have not already added this, add it now
6700                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6701                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6702                         then
6703                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6704
6705 echo "${as_me:-configure}:6705: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6706
6707                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6708                         fi
6709                 fi
6710                 ;;
6711         esac
6712         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6713 done
6714 LDFLAGS=$cf_rpath_dst
6715
6716 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6717
6718 echo "${as_me:-configure}:6718: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6719
6720 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6721
6722 echo "${as_me:-configure}:6722: testing ...checking LIBS $LIBS ..." 1>&5
6723
6724 cf_rpath_dst=
6725 for cf_rpath_src in $LIBS
6726 do
6727         case $cf_rpath_src in #(vi
6728         -L*) #(vi
6729
6730                 # check if this refers to a directory which we will ignore
6731                 cf_rpath_skip=no
6732                 if test -n "$cf_rpath_list"
6733                 then
6734                         for cf_rpath_item in $cf_rpath_list
6735                         do
6736                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6737                                 then
6738                                         cf_rpath_skip=yes
6739                                         break
6740                                 fi
6741                         done
6742                 fi
6743
6744                 if test "$cf_rpath_skip" = no
6745                 then
6746                         # transform the option
6747                         if test "$LD_RPATH_OPT" = "-R " ; then
6748                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6749                         else
6750                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6751                         fi
6752
6753                         # if we have not already added this, add it now
6754                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6755                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6756                         then
6757                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6758
6759 echo "${as_me:-configure}:6759: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6760
6761                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6762                         fi
6763                 fi
6764                 ;;
6765         esac
6766         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6767 done
6768 LIBS=$cf_rpath_dst
6769
6770 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6771
6772 echo "${as_me:-configure}:6772: testing ...checked LIBS $LIBS ..." 1>&5
6773
6774         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6775
6776 echo "${as_me:-configure}:6776: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6777
6778 else
6779         echo "$as_me:6779: result: no" >&5
6780 echo "${ECHO_T}no" >&6
6781 fi
6782
6783 fi
6784
6785 fi
6786
6787 ###############################################################################
6788
6789 ###     use option --disable-overwrite to leave out the link to -lcurses
6790 echo "$as_me:6790: checking if you wish to install ncurses overwriting curses" >&5
6791 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6792
6793 # Check whether --enable-overwrite or --disable-overwrite was given.
6794 if test "${enable_overwrite+set}" = set; then
6795   enableval="$enable_overwrite"
6796   with_overwrite=$enableval
6797 else
6798   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6799 fi;
6800 echo "$as_me:6800: result: $with_overwrite" >&5
6801 echo "${ECHO_T}$with_overwrite" >&6
6802
6803 echo "$as_me:6803: checking if external terminfo-database is used" >&5
6804 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6805
6806 # Check whether --enable-database or --disable-database was given.
6807 if test "${enable_database+set}" = set; then
6808   enableval="$enable_database"
6809   use_database=$enableval
6810 else
6811   use_database=yes
6812 fi;
6813 echo "$as_me:6813: result: $use_database" >&5
6814 echo "${ECHO_T}$use_database" >&6
6815
6816 case $host_os in #(vi
6817 os2*) #(vi
6818         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6819         ;;
6820 *) #(vi
6821         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6822         ;;
6823 esac
6824
6825 NCURSES_USE_DATABASE=0
6826 if test "$use_database" != no ; then
6827         NCURSES_USE_DATABASE=1
6828
6829         echo "$as_me:6829: checking which terminfo source-file will be installed" >&5
6830 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6831
6832 # Check whether --with-database or --without-database was given.
6833 if test "${with_database+set}" = set; then
6834   withval="$with_database"
6835   TERMINFO_SRC=$withval
6836 fi;
6837         echo "$as_me:6837: result: $TERMINFO_SRC" >&5
6838 echo "${ECHO_T}$TERMINFO_SRC" >&6
6839
6840         echo "$as_me:6840: checking whether to use hashed database instead of directory/tree" >&5
6841 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6842
6843 # Check whether --with-hashed-db or --without-hashed-db was given.
6844 if test "${with_hashed_db+set}" = set; then
6845   withval="$with_hashed_db"
6846
6847 else
6848   with_hashed_db=no
6849 fi;
6850         echo "$as_me:6850: result: $with_hashed_db" >&5
6851 echo "${ECHO_T}$with_hashed_db" >&6
6852 else
6853         with_hashed_db=no
6854 fi
6855
6856 echo "$as_me:6856: checking for list of fallback descriptions" >&5
6857 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6858
6859 # Check whether --with-fallbacks or --without-fallbacks was given.
6860 if test "${with_fallbacks+set}" = set; then
6861   withval="$with_fallbacks"
6862   with_fallback=$withval
6863 else
6864   with_fallback=
6865 fi;
6866 echo "$as_me:6866: result: $with_fallback" >&5
6867 echo "${ECHO_T}$with_fallback" >&6
6868 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6869
6870 echo "$as_me:6870: checking if you want modern xterm or antique" >&5
6871 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6872
6873 # Check whether --with-xterm-new or --without-xterm-new was given.
6874 if test "${with_xterm_new+set}" = set; then
6875   withval="$with_xterm_new"
6876   with_xterm_new=$withval
6877 else
6878   with_xterm_new=yes
6879 fi;
6880 case $with_xterm_new in
6881 no)     with_xterm_new=xterm-old;;
6882 *)      with_xterm_new=xterm-new;;
6883 esac
6884 echo "$as_me:6884: result: $with_xterm_new" >&5
6885 echo "${ECHO_T}$with_xterm_new" >&6
6886 WHICH_XTERM=$with_xterm_new
6887
6888 echo "$as_me:6888: checking if xterm backspace sends BS or DEL" >&5
6889 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6890
6891 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6892 if test "${with_xterm_kbs+set}" = set; then
6893   withval="$with_xterm_kbs"
6894   with_xterm_kbs=$withval
6895 else
6896   with_xterm_kbs=BS
6897 fi;
6898 case x$with_xterm_kbs in
6899 xyes|xno|xBS|xbs|x8)
6900         with_xterm_kbs=BS
6901         ;;
6902 xDEL|xdel|x127)
6903         with_xterm_kbs=DEL
6904         ;;
6905 *)
6906         with_xterm_kbs=$withval
6907         ;;
6908 esac
6909 echo "$as_me:6909: result: $with_xterm_kbs" >&5
6910 echo "${ECHO_T}$with_xterm_kbs" >&6
6911 XTERM_KBS=$with_xterm_kbs
6912
6913 MAKE_TERMINFO=
6914 if test "$use_database" = no ; then
6915         TERMINFO="${datadir}/terminfo"
6916         MAKE_TERMINFO="#"
6917 else
6918
6919 echo "$as_me:6919: checking for list of terminfo directories" >&5
6920 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6921
6922 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6923 if test "${with_terminfo_dirs+set}" = set; then
6924   withval="$with_terminfo_dirs"
6925
6926 else
6927   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6928 fi;
6929 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6930 cf_dst_path=
6931 for cf_src_path in $withval
6932 do
6933
6934 if test "x$prefix" != xNONE; then
6935   cf_path_syntax="$prefix"
6936 else
6937   cf_path_syntax="$ac_default_prefix"
6938 fi
6939
6940 case ".$cf_src_path" in #(vi
6941 .\$\(*\)*|.\'*\'*) #(vi
6942   ;;
6943 ..|./*|.\\*) #(vi
6944   ;;
6945 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6946   ;;
6947 .\${*prefix}*|.\${*dir}*) #(vi
6948   eval cf_src_path="$cf_src_path"
6949   case ".$cf_src_path" in #(vi
6950   .NONE/*)
6951     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6952     ;;
6953   esac
6954   ;; #(vi
6955 .no|.NONE/*)
6956   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6957   ;;
6958 *)
6959   { { echo "$as_me:6959: error: expected a pathname, not \"$cf_src_path\"" >&5
6960 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6961    { (exit 1); exit 1; }; }
6962   ;;
6963 esac
6964
6965   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6966   cf_dst_path="${cf_dst_path}${cf_src_path}"
6967 done
6968 IFS="$ac_save_ifs"
6969
6970 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6971 # so we have to check/work around.  We do prefer the result of "eval"...
6972 eval cf_dst_eval="$cf_dst_path"
6973 case "x$cf_dst_eval" in #(vi
6974 xNONE*) #(vi
6975         TERMINFO_DIRS=$cf_dst_path
6976         ;;
6977 *)
6978         TERMINFO_DIRS="$cf_dst_eval"
6979         ;;
6980 esac
6981
6982 echo "$as_me:6982: result: $TERMINFO_DIRS" >&5
6983 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6984 test -n "$TERMINFO_DIRS" &&
6985 cat >>confdefs.h <<EOF
6986 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6987 EOF
6988
6989 echo "$as_me:6989: checking for default terminfo directory" >&5
6990 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6991
6992 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6993 if test "${with_default_terminfo_dir+set}" = set; then
6994   withval="$with_default_terminfo_dir"
6995
6996 else
6997   withval="${TERMINFO:-${datadir}/terminfo}"
6998 fi; if test -n "${datadir}/terminfo" ; then
6999
7000 if test "x$prefix" != xNONE; then
7001   cf_path_syntax="$prefix"
7002 else
7003   cf_path_syntax="$ac_default_prefix"
7004 fi
7005
7006 case ".$withval" in #(vi
7007 .\$\(*\)*|.\'*\'*) #(vi
7008   ;;
7009 ..|./*|.\\*) #(vi
7010   ;;
7011 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
7012   ;;
7013 .\${*prefix}*|.\${*dir}*) #(vi
7014   eval withval="$withval"
7015   case ".$withval" in #(vi
7016   .NONE/*)
7017     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7018     ;;
7019   esac
7020   ;; #(vi
7021 .no|.NONE/*)
7022   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7023   ;;
7024 *)
7025   { { echo "$as_me:7025: error: expected a pathname, not \"$withval\"" >&5
7026 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7027    { (exit 1); exit 1; }; }
7028   ;;
7029 esac
7030
7031 fi
7032 eval TERMINFO="$withval"
7033
7034 echo "$as_me:7034: result: $TERMINFO" >&5
7035 echo "${ECHO_T}$TERMINFO" >&6
7036
7037 cat >>confdefs.h <<EOF
7038 #define TERMINFO "$TERMINFO"
7039 EOF
7040
7041 fi
7042
7043 ###     use option --disable-big-core to make tic run on small machines
7044 ###     We need 4Mb, check if we can allocate 50% more than that.
7045 echo "$as_me:7045: checking if big-core option selected" >&5
7046 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7047
7048 # Check whether --enable-big-core or --disable-big-core was given.
7049 if test "${enable_big_core+set}" = set; then
7050   enableval="$enable_big_core"
7051   with_big_core=$enableval
7052 else
7053   if test "$cross_compiling" = yes; then
7054   with_big_core=no
7055 else
7056   cat >conftest.$ac_ext <<_ACEOF
7057 #line 7057 "configure"
7058 #include "confdefs.h"
7059
7060 #include <stdlib.h>
7061 #include <string.h>
7062 int main() {
7063         unsigned long n = 6000000L;
7064         char *s = malloc(n);
7065         if (s != 0)
7066                 s[0] = s[n-1] = 0;
7067         ${cf_cv_main_return:-return}(s == 0);
7068 }
7069 _ACEOF
7070 rm -f conftest$ac_exeext
7071 if { (eval echo "$as_me:7071: \"$ac_link\"") >&5
7072   (eval $ac_link) 2>&5
7073   ac_status=$?
7074   echo "$as_me:7074: \$? = $ac_status" >&5
7075   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7076   { (eval echo "$as_me:7076: \"$ac_try\"") >&5
7077   (eval $ac_try) 2>&5
7078   ac_status=$?
7079   echo "$as_me:7079: \$? = $ac_status" >&5
7080   (exit $ac_status); }; }; then
7081   with_big_core=yes
7082 else
7083   echo "$as_me: program exited with status $ac_status" >&5
7084 echo "$as_me: failed program was:" >&5
7085 cat conftest.$ac_ext >&5
7086 with_big_core=no
7087 fi
7088 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7089 fi
7090 fi;
7091 echo "$as_me:7091: result: $with_big_core" >&5
7092 echo "${ECHO_T}$with_big_core" >&6
7093 test "x$with_big_core" = "xyes" &&
7094 cat >>confdefs.h <<\EOF
7095 #define HAVE_BIG_CORE 1
7096 EOF
7097
7098 ### ISO C only guarantees 512-char strings, we have tables which load faster
7099 ### when constructed using "big" strings.  More than the C compiler, the awk
7100 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7101 echo "$as_me:7101: checking if big-strings option selected" >&5
7102 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7103
7104 # Check whether --enable-big-strings or --disable-big-strings was given.
7105 if test "${enable_big_strings+set}" = set; then
7106   enableval="$enable_big_strings"
7107   with_big_strings=$enableval
7108 else
7109
7110         case x$AWK in #(vi
7111         x)
7112                 eval with_big_strings=no
7113                 ;;
7114         *) #(vi
7115                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7116                         | $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
7117                         eval with_big_strings=yes
7118                 else
7119                         eval with_big_strings=no
7120                 fi
7121                 ;;
7122         esac
7123
7124 fi;
7125 echo "$as_me:7125: result: $with_big_strings" >&5
7126 echo "${ECHO_T}$with_big_strings" >&6
7127
7128 USE_BIG_STRINGS=0
7129 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7130
7131 ###     use option --enable-termcap to compile in the termcap fallback support
7132 echo "$as_me:7132: checking if you want termcap-fallback support" >&5
7133 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7134
7135 # Check whether --enable-termcap or --disable-termcap was given.
7136 if test "${enable_termcap+set}" = set; then
7137   enableval="$enable_termcap"
7138   with_termcap=$enableval
7139 else
7140   with_termcap=no
7141 fi;
7142 echo "$as_me:7142: result: $with_termcap" >&5
7143 echo "${ECHO_T}$with_termcap" >&6
7144
7145 NCURSES_USE_TERMCAP=0
7146 if test "x$with_termcap" != "xyes" ; then
7147         if test "$use_database" = no ; then
7148                 if test -z "$with_fallback" ; then
7149                         { { echo "$as_me:7149: error: You have disabled the database w/o specifying fallbacks" >&5
7150 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7151    { (exit 1); exit 1; }; }
7152                 fi
7153         fi
7154
7155 cat >>confdefs.h <<\EOF
7156 #define PURE_TERMINFO 1
7157 EOF
7158
7159 else
7160
7161         if test "$with_ticlib" != no ; then
7162                 { { echo "$as_me:7162: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7163 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7164    { (exit 1); exit 1; }; }
7165         fi
7166
7167         NCURSES_USE_TERMCAP=1
7168         echo "$as_me:7168: checking for list of termcap files" >&5
7169 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7170
7171 # Check whether --with-termpath or --without-termpath was given.
7172 if test "${with_termpath+set}" = set; then
7173   withval="$with_termpath"
7174
7175 else
7176   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7177 fi;
7178 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7179 cf_dst_path=
7180 for cf_src_path in $withval
7181 do
7182
7183 if test "x$prefix" != xNONE; then
7184   cf_path_syntax="$prefix"
7185 else
7186   cf_path_syntax="$ac_default_prefix"
7187 fi
7188
7189 case ".$cf_src_path" in #(vi
7190 .\$\(*\)*|.\'*\'*) #(vi
7191   ;;
7192 ..|./*|.\\*) #(vi
7193   ;;
7194 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
7195   ;;
7196 .\${*prefix}*|.\${*dir}*) #(vi
7197   eval cf_src_path="$cf_src_path"
7198   case ".$cf_src_path" in #(vi
7199   .NONE/*)
7200     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7201     ;;
7202   esac
7203   ;; #(vi
7204 .no|.NONE/*)
7205   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7206   ;;
7207 *)
7208   { { echo "$as_me:7208: error: expected a pathname, not \"$cf_src_path\"" >&5
7209 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7210    { (exit 1); exit 1; }; }
7211   ;;
7212 esac
7213
7214   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7215   cf_dst_path="${cf_dst_path}${cf_src_path}"
7216 done
7217 IFS="$ac_save_ifs"
7218
7219 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7220 # so we have to check/work around.  We do prefer the result of "eval"...
7221 eval cf_dst_eval="$cf_dst_path"
7222 case "x$cf_dst_eval" in #(vi
7223 xNONE*) #(vi
7224         TERMPATH=$cf_dst_path
7225         ;;
7226 *)
7227         TERMPATH="$cf_dst_eval"
7228         ;;
7229 esac
7230
7231         echo "$as_me:7231: result: $TERMPATH" >&5
7232 echo "${ECHO_T}$TERMPATH" >&6
7233         test -n "$TERMPATH" &&
7234 cat >>confdefs.h <<EOF
7235 #define TERMPATH "$TERMPATH"
7236 EOF
7237
7238         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7239         echo "$as_me:7239: checking if fast termcap-loader is needed" >&5
7240 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7241
7242 # Check whether --enable-getcap or --disable-getcap was given.
7243 if test "${enable_getcap+set}" = set; then
7244   enableval="$enable_getcap"
7245   with_getcap=$enableval
7246 else
7247   with_getcap=no
7248 fi;
7249         echo "$as_me:7249: result: $with_getcap" >&5
7250 echo "${ECHO_T}$with_getcap" >&6
7251         test "x$with_getcap" = "xyes" &&
7252 cat >>confdefs.h <<\EOF
7253 #define USE_GETCAP 1
7254 EOF
7255
7256         echo "$as_me:7256: checking if translated termcaps will be cached in ~/.terminfo" >&5
7257 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7258
7259 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7260 if test "${enable_getcap_cache+set}" = set; then
7261   enableval="$enable_getcap_cache"
7262   with_getcap_cache=$enableval
7263 else
7264   with_getcap_cache=no
7265 fi;
7266         echo "$as_me:7266: result: $with_getcap_cache" >&5
7267 echo "${ECHO_T}$with_getcap_cache" >&6
7268         test "x$with_getcap_cache" = "xyes" &&
7269 cat >>confdefs.h <<\EOF
7270 #define USE_GETCAP_CACHE 1
7271 EOF
7272
7273 fi
7274
7275 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7276 echo "$as_me:7276: checking if ~/.terminfo is wanted" >&5
7277 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7278
7279 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7280 if test "${enable_home_terminfo+set}" = set; then
7281   enableval="$enable_home_terminfo"
7282   with_home_terminfo=$enableval
7283 else
7284   with_home_terminfo=yes
7285 fi;
7286 echo "$as_me:7286: result: $with_home_terminfo" >&5
7287 echo "${ECHO_T}$with_home_terminfo" >&6
7288 test "x$with_home_terminfo" = "xyes" &&
7289 cat >>confdefs.h <<\EOF
7290 #define USE_HOME_TERMINFO 1
7291 EOF
7292
7293 echo "$as_me:7293: checking if you want to use restricted environment when running as root" >&5
7294 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7295
7296 # Check whether --enable-root-environ or --disable-root-environ was given.
7297 if test "${enable_root_environ+set}" = set; then
7298   enableval="$enable_root_environ"
7299   with_root_environ=$enableval
7300 else
7301   with_root_environ=yes
7302 fi;
7303 echo "$as_me:7303: result: $with_root_environ" >&5
7304 echo "${ECHO_T}$with_root_environ" >&6
7305 test "x$with_root_environ" = xyes &&
7306 cat >>confdefs.h <<\EOF
7307 #define USE_ROOT_ENVIRON 1
7308 EOF
7309
7310 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7311 ###   to reduce storage requirements for the terminfo database.
7312
7313 for ac_func in \
7314         remove \
7315         unlink
7316 do
7317 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7318 echo "$as_me:7318: checking for $ac_func" >&5
7319 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7320 if eval "test \"\${$as_ac_var+set}\" = set"; then
7321   echo $ECHO_N "(cached) $ECHO_C" >&6
7322 else
7323   cat >conftest.$ac_ext <<_ACEOF
7324 #line 7324 "configure"
7325 #include "confdefs.h"
7326 /* System header to define __stub macros and hopefully few prototypes,
7327     which can conflict with char $ac_func (); below.  */
7328 #include <assert.h>
7329 /* Override any gcc2 internal prototype to avoid an error.  */
7330 #ifdef __cplusplus
7331 extern "C"
7332 #endif
7333 /* We use char because int might match the return type of a gcc2
7334    builtin and then its argument prototype would still apply.  */
7335 char $ac_func ();
7336 char (*f) ();
7337
7338 int
7339 main ()
7340 {
7341 /* The GNU C library defines this for functions which it implements
7342     to always fail with ENOSYS.  Some functions are actually named
7343     something starting with __ and the normal name is an alias.  */
7344 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7345 choke me
7346 #else
7347 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7348 #endif
7349
7350   ;
7351   return 0;
7352 }
7353 _ACEOF
7354 rm -f conftest.$ac_objext conftest$ac_exeext
7355 if { (eval echo "$as_me:7355: \"$ac_link\"") >&5
7356   (eval $ac_link) 2>&5
7357   ac_status=$?
7358   echo "$as_me:7358: \$? = $ac_status" >&5
7359   (exit $ac_status); } &&
7360          { ac_try='test -s conftest$ac_exeext'
7361   { (eval echo "$as_me:7361: \"$ac_try\"") >&5
7362   (eval $ac_try) 2>&5
7363   ac_status=$?
7364   echo "$as_me:7364: \$? = $ac_status" >&5
7365   (exit $ac_status); }; }; then
7366   eval "$as_ac_var=yes"
7367 else
7368   echo "$as_me: failed program was:" >&5
7369 cat conftest.$ac_ext >&5
7370 eval "$as_ac_var=no"
7371 fi
7372 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7373 fi
7374 echo "$as_me:7374: result: `eval echo '${'$as_ac_var'}'`" >&5
7375 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7376 if test `eval echo '${'$as_ac_var'}'` = yes; then
7377   cat >>confdefs.h <<EOF
7378 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7379 EOF
7380
7381 fi
7382 done
7383
7384 if test "$cross_compiling" = yes ; then
7385
7386 for ac_func in \
7387                 link \
7388                 symlink
7389 do
7390 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7391 echo "$as_me:7391: checking for $ac_func" >&5
7392 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7393 if eval "test \"\${$as_ac_var+set}\" = set"; then
7394   echo $ECHO_N "(cached) $ECHO_C" >&6
7395 else
7396   cat >conftest.$ac_ext <<_ACEOF
7397 #line 7397 "configure"
7398 #include "confdefs.h"
7399 /* System header to define __stub macros and hopefully few prototypes,
7400     which can conflict with char $ac_func (); below.  */
7401 #include <assert.h>
7402 /* Override any gcc2 internal prototype to avoid an error.  */
7403 #ifdef __cplusplus
7404 extern "C"
7405 #endif
7406 /* We use char because int might match the return type of a gcc2
7407    builtin and then its argument prototype would still apply.  */
7408 char $ac_func ();
7409 char (*f) ();
7410
7411 int
7412 main ()
7413 {
7414 /* The GNU C library defines this for functions which it implements
7415     to always fail with ENOSYS.  Some functions are actually named
7416     something starting with __ and the normal name is an alias.  */
7417 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7418 choke me
7419 #else
7420 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7421 #endif
7422
7423   ;
7424   return 0;
7425 }
7426 _ACEOF
7427 rm -f conftest.$ac_objext conftest$ac_exeext
7428 if { (eval echo "$as_me:7428: \"$ac_link\"") >&5
7429   (eval $ac_link) 2>&5
7430   ac_status=$?
7431   echo "$as_me:7431: \$? = $ac_status" >&5
7432   (exit $ac_status); } &&
7433          { ac_try='test -s conftest$ac_exeext'
7434   { (eval echo "$as_me:7434: \"$ac_try\"") >&5
7435   (eval $ac_try) 2>&5
7436   ac_status=$?
7437   echo "$as_me:7437: \$? = $ac_status" >&5
7438   (exit $ac_status); }; }; then
7439   eval "$as_ac_var=yes"
7440 else
7441   echo "$as_me: failed program was:" >&5
7442 cat conftest.$ac_ext >&5
7443 eval "$as_ac_var=no"
7444 fi
7445 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7446 fi
7447 echo "$as_me:7447: result: `eval echo '${'$as_ac_var'}'`" >&5
7448 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7449 if test `eval echo '${'$as_ac_var'}'` = yes; then
7450   cat >>confdefs.h <<EOF
7451 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7452 EOF
7453
7454 fi
7455 done
7456
7457 else
7458         echo "$as_me:7458: checking if link/symlink functions work" >&5
7459 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7460 if test "${cf_cv_link_funcs+set}" = set; then
7461   echo $ECHO_N "(cached) $ECHO_C" >&6
7462 else
7463
7464                 cf_cv_link_funcs=
7465                 for cf_func in link symlink ; do
7466                         if test "$cross_compiling" = yes; then
7467
7468                         eval 'ac_cv_func_'$cf_func'=error'
7469 else
7470   cat >conftest.$ac_ext <<_ACEOF
7471 #line 7471 "configure"
7472 #include "confdefs.h"
7473
7474 #include <sys/types.h>
7475 #include <sys/stat.h>
7476 #ifdef HAVE_UNISTD_H
7477 #include <unistd.h>
7478 #endif
7479 int main()
7480 {
7481         int fail = 0;
7482         char *src = "config.log";
7483         char *dst = "conftest.chk";
7484         struct stat src_sb;
7485         struct stat dst_sb;
7486
7487         stat(src, &src_sb);
7488         fail = ($cf_func("config.log", "conftest.chk") < 0)
7489             || (stat(dst, &dst_sb) < 0)
7490             || (dst_sb.st_mtime != src_sb.st_mtime);
7491 #ifdef HAVE_UNLINK
7492         unlink(dst);
7493 #else
7494         remove(dst);
7495 #endif
7496         ${cf_cv_main_return:-return} (fail);
7497 }
7498
7499 _ACEOF
7500 rm -f conftest$ac_exeext
7501 if { (eval echo "$as_me:7501: \"$ac_link\"") >&5
7502   (eval $ac_link) 2>&5
7503   ac_status=$?
7504   echo "$as_me:7504: \$? = $ac_status" >&5
7505   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7506   { (eval echo "$as_me:7506: \"$ac_try\"") >&5
7507   (eval $ac_try) 2>&5
7508   ac_status=$?
7509   echo "$as_me:7509: \$? = $ac_status" >&5
7510   (exit $ac_status); }; }; then
7511
7512                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7513                         eval 'ac_cv_func_'$cf_func'=yes'
7514 else
7515   echo "$as_me: program exited with status $ac_status" >&5
7516 echo "$as_me: failed program was:" >&5
7517 cat conftest.$ac_ext >&5
7518
7519                         eval 'ac_cv_func_'$cf_func'=no'
7520 fi
7521 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7522 fi
7523                 done
7524                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7525
7526 fi
7527 echo "$as_me:7527: result: $cf_cv_link_funcs" >&5
7528 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7529         test "$ac_cv_func_link"    = yes &&
7530 cat >>confdefs.h <<\EOF
7531 #define HAVE_LINK 1
7532 EOF
7533
7534         test "$ac_cv_func_symlink" = yes &&
7535 cat >>confdefs.h <<\EOF
7536 #define HAVE_SYMLINK 1
7537 EOF
7538
7539 fi
7540
7541 with_links=no
7542 with_symlinks=no
7543
7544 # soft links (symbolic links) are useful for some systems where hard links do
7545 # not work, or to make it simpler to copy terminfo trees around.
7546 if test "x$ac_cv_func_symlink" = xyes ; then
7547     echo "$as_me:7547: checking if tic should use symbolic links" >&5
7548 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7549
7550 # Check whether --enable-symlinks or --disable-symlinks was given.
7551 if test "${enable_symlinks+set}" = set; then
7552   enableval="$enable_symlinks"
7553   with_symlinks=$enableval
7554 else
7555   with_symlinks=no
7556 fi;
7557     echo "$as_me:7557: result: $with_symlinks" >&5
7558 echo "${ECHO_T}$with_symlinks" >&6
7559 fi
7560
7561 # If we have hard links and did not choose to use soft links instead, there is
7562 # no reason to make this choice optional - use the hard links.
7563 if test "$with_symlinks" = no ; then
7564     echo "$as_me:7564: checking if tic should use hard links" >&5
7565 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7566     if test "x$ac_cv_func_link" = xyes ; then
7567         with_links=yes
7568     else
7569         with_links=no
7570     fi
7571     echo "$as_me:7571: result: $with_links" >&5
7572 echo "${ECHO_T}$with_links" >&6
7573 fi
7574
7575 test "x$with_links" = xyes &&
7576 cat >>confdefs.h <<\EOF
7577 #define USE_LINKS 1
7578 EOF
7579
7580 test "x$with_symlinks" = xyes &&
7581 cat >>confdefs.h <<\EOF
7582 #define USE_SYMLINKS 1
7583 EOF
7584
7585 ###   use option --enable-broken-linker to force on use of broken-linker support
7586 echo "$as_me:7586: checking if you want broken-linker support code" >&5
7587 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7588
7589 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7590 if test "${enable_broken_linker+set}" = set; then
7591   enableval="$enable_broken_linker"
7592   with_broken_linker=$enableval
7593 else
7594   with_broken_linker=${BROKEN_LINKER:-no}
7595 fi;
7596 echo "$as_me:7596: result: $with_broken_linker" >&5
7597 echo "${ECHO_T}$with_broken_linker" >&6
7598
7599 BROKEN_LINKER=0
7600 if test "x$with_broken_linker" = xyes ; then
7601
7602 cat >>confdefs.h <<\EOF
7603 #define BROKEN_LINKER 1
7604 EOF
7605
7606         BROKEN_LINKER=1
7607 elif test "$DFT_LWR_MODEL" = shared ; then
7608         case $cf_cv_system_name in #(vi
7609         cygwin*)
7610
7611 cat >>confdefs.h <<\EOF
7612 #define BROKEN_LINKER 1
7613 EOF
7614
7615                 BROKEN_LINKER=1
7616                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7617
7618 echo "${as_me:-configure}:7618: testing cygwin linker is broken anyway ..." 1>&5
7619
7620                 ;;
7621         esac
7622 fi
7623
7624 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7625 echo "$as_me:7625: checking if tputs should process BSD-style prefix padding" >&5
7626 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7627
7628 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7629 if test "${enable_bsdpad+set}" = set; then
7630   enableval="$enable_bsdpad"
7631   with_bsdpad=$enableval
7632 else
7633   with_bsdpad=no
7634 fi;
7635 echo "$as_me:7635: result: $with_bsdpad" >&5
7636 echo "${ECHO_T}$with_bsdpad" >&6
7637 test "x$with_bsdpad" = xyes &&
7638 cat >>confdefs.h <<\EOF
7639 #define BSD_TPUTS 1
7640 EOF
7641
7642 ###   use option --enable-widec to turn on use of wide-character support
7643 NCURSES_CH_T=chtype
7644 NCURSES_LIBUTF8=0
7645
7646 NEED_WCHAR_H=0
7647 NCURSES_MBSTATE_T=0
7648 NCURSES_WCHAR_T=0
7649 NCURSES_WINT_T=0
7650
7651 # Check to define _XOPEN_SOURCE "automatically"
7652
7653 cf_XOPEN_SOURCE=500
7654 cf_POSIX_C_SOURCE=199506L
7655 cf_xopen_source=
7656
7657 case $host_os in #(vi
7658 aix[4-7]*) #(vi
7659         cf_xopen_source="-D_ALL_SOURCE"
7660         ;;
7661 cygwin|msys) #(vi
7662         cf_XOPEN_SOURCE=600
7663         ;;
7664 darwin[0-8].*) #(vi
7665         cf_xopen_source="-D_APPLE_C_SOURCE"
7666         ;;
7667 darwin*) #(vi
7668         cf_xopen_source="-D_DARWIN_C_SOURCE"
7669         cf_XOPEN_SOURCE=
7670         ;;
7671 freebsd*|dragonfly*) #(vi
7672         # 5.x headers associate
7673         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7674         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7675         cf_POSIX_C_SOURCE=200112L
7676         cf_XOPEN_SOURCE=600
7677         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7678         ;;
7679 hpux11*) #(vi
7680         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7681         ;;
7682 hpux*) #(vi
7683         cf_xopen_source="-D_HPUX_SOURCE"
7684         ;;
7685 irix[56].*) #(vi
7686         cf_xopen_source="-D_SGI_SOURCE"
7687         cf_XOPEN_SOURCE=
7688         ;;
7689 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7690
7691 echo "$as_me:7691: checking if we must define _GNU_SOURCE" >&5
7692 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7693 if test "${cf_cv_gnu_source+set}" = set; then
7694   echo $ECHO_N "(cached) $ECHO_C" >&6
7695 else
7696
7697 cat >conftest.$ac_ext <<_ACEOF
7698 #line 7698 "configure"
7699 #include "confdefs.h"
7700 #include <sys/types.h>
7701 int
7702 main ()
7703 {
7704
7705 #ifndef _XOPEN_SOURCE
7706 make an error
7707 #endif
7708   ;
7709   return 0;
7710 }
7711 _ACEOF
7712 rm -f conftest.$ac_objext
7713 if { (eval echo "$as_me:7713: \"$ac_compile\"") >&5
7714   (eval $ac_compile) 2>&5
7715   ac_status=$?
7716   echo "$as_me:7716: \$? = $ac_status" >&5
7717   (exit $ac_status); } &&
7718          { ac_try='test -s conftest.$ac_objext'
7719   { (eval echo "$as_me:7719: \"$ac_try\"") >&5
7720   (eval $ac_try) 2>&5
7721   ac_status=$?
7722   echo "$as_me:7722: \$? = $ac_status" >&5
7723   (exit $ac_status); }; }; then
7724   cf_cv_gnu_source=no
7725 else
7726   echo "$as_me: failed program was:" >&5
7727 cat conftest.$ac_ext >&5
7728 cf_save="$CPPFLAGS"
7729          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7730          cat >conftest.$ac_ext <<_ACEOF
7731 #line 7731 "configure"
7732 #include "confdefs.h"
7733 #include <sys/types.h>
7734 int
7735 main ()
7736 {
7737
7738 #ifdef _XOPEN_SOURCE
7739 make an error
7740 #endif
7741   ;
7742   return 0;
7743 }
7744 _ACEOF
7745 rm -f conftest.$ac_objext
7746 if { (eval echo "$as_me:7746: \"$ac_compile\"") >&5
7747   (eval $ac_compile) 2>&5
7748   ac_status=$?
7749   echo "$as_me:7749: \$? = $ac_status" >&5
7750   (exit $ac_status); } &&
7751          { ac_try='test -s conftest.$ac_objext'
7752   { (eval echo "$as_me:7752: \"$ac_try\"") >&5
7753   (eval $ac_try) 2>&5
7754   ac_status=$?
7755   echo "$as_me:7755: \$? = $ac_status" >&5
7756   (exit $ac_status); }; }; then
7757   cf_cv_gnu_source=no
7758 else
7759   echo "$as_me: failed program was:" >&5
7760 cat conftest.$ac_ext >&5
7761 cf_cv_gnu_source=yes
7762 fi
7763 rm -f conftest.$ac_objext conftest.$ac_ext
7764         CPPFLAGS="$cf_save"
7765
7766 fi
7767 rm -f conftest.$ac_objext conftest.$ac_ext
7768
7769 fi
7770 echo "$as_me:7770: result: $cf_cv_gnu_source" >&5
7771 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7772 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7773
7774         ;;
7775 minix*) #(vi
7776         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7777         ;;
7778 mirbsd*) #(vi
7779         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7780         cf_XOPEN_SOURCE=
7781
7782 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7783
7784 cf_save_CFLAGS="$CFLAGS"
7785 cf_save_CPPFLAGS="$CPPFLAGS"
7786
7787 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7788         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7789                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7790
7791 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7792         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7793                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7794
7795 echo "$as_me:7795: checking if we should define _POSIX_C_SOURCE" >&5
7796 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7797 if test "${cf_cv_posix_c_source+set}" = set; then
7798   echo $ECHO_N "(cached) $ECHO_C" >&6
7799 else
7800
7801 echo "${as_me:-configure}:7801: testing if the symbol is already defined go no further ..." 1>&5
7802
7803         cat >conftest.$ac_ext <<_ACEOF
7804 #line 7804 "configure"
7805 #include "confdefs.h"
7806 #include <sys/types.h>
7807 int
7808 main ()
7809 {
7810
7811 #ifndef _POSIX_C_SOURCE
7812 make an error
7813 #endif
7814   ;
7815   return 0;
7816 }
7817 _ACEOF
7818 rm -f conftest.$ac_objext
7819 if { (eval echo "$as_me:7819: \"$ac_compile\"") >&5
7820   (eval $ac_compile) 2>&5
7821   ac_status=$?
7822   echo "$as_me:7822: \$? = $ac_status" >&5
7823   (exit $ac_status); } &&
7824          { ac_try='test -s conftest.$ac_objext'
7825   { (eval echo "$as_me:7825: \"$ac_try\"") >&5
7826   (eval $ac_try) 2>&5
7827   ac_status=$?
7828   echo "$as_me:7828: \$? = $ac_status" >&5
7829   (exit $ac_status); }; }; then
7830   cf_cv_posix_c_source=no
7831 else
7832   echo "$as_me: failed program was:" >&5
7833 cat conftest.$ac_ext >&5
7834 cf_want_posix_source=no
7835          case .$cf_POSIX_C_SOURCE in #(vi
7836          .[12]??*) #(vi
7837                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7838                 ;;
7839          .2) #(vi
7840                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7841                 cf_want_posix_source=yes
7842                 ;;
7843          .*)
7844                 cf_want_posix_source=yes
7845                 ;;
7846          esac
7847          if test "$cf_want_posix_source" = yes ; then
7848                 cat >conftest.$ac_ext <<_ACEOF
7849 #line 7849 "configure"
7850 #include "confdefs.h"
7851 #include <sys/types.h>
7852 int
7853 main ()
7854 {
7855
7856 #ifdef _POSIX_SOURCE
7857 make an error
7858 #endif
7859   ;
7860   return 0;
7861 }
7862 _ACEOF
7863 rm -f conftest.$ac_objext
7864 if { (eval echo "$as_me:7864: \"$ac_compile\"") >&5
7865   (eval $ac_compile) 2>&5
7866   ac_status=$?
7867   echo "$as_me:7867: \$? = $ac_status" >&5
7868   (exit $ac_status); } &&
7869          { ac_try='test -s conftest.$ac_objext'
7870   { (eval echo "$as_me:7870: \"$ac_try\"") >&5
7871   (eval $ac_try) 2>&5
7872   ac_status=$?
7873   echo "$as_me:7873: \$? = $ac_status" >&5
7874   (exit $ac_status); }; }; then
7875   :
7876 else
7877   echo "$as_me: failed program was:" >&5
7878 cat conftest.$ac_ext >&5
7879 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7880 fi
7881 rm -f conftest.$ac_objext conftest.$ac_ext
7882          fi
7883
7884 echo "${as_me:-configure}:7884: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7885
7886          CFLAGS="$cf_trim_CFLAGS"
7887          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7888
7889 echo "${as_me:-configure}:7889: testing if the second compile does not leave our definition intact error ..." 1>&5
7890
7891          cat >conftest.$ac_ext <<_ACEOF
7892 #line 7892 "configure"
7893 #include "confdefs.h"
7894 #include <sys/types.h>
7895 int
7896 main ()
7897 {
7898
7899 #ifndef _POSIX_C_SOURCE
7900 make an error
7901 #endif
7902   ;
7903   return 0;
7904 }
7905 _ACEOF
7906 rm -f conftest.$ac_objext
7907 if { (eval echo "$as_me:7907: \"$ac_compile\"") >&5
7908   (eval $ac_compile) 2>&5
7909   ac_status=$?
7910   echo "$as_me:7910: \$? = $ac_status" >&5
7911   (exit $ac_status); } &&
7912          { ac_try='test -s conftest.$ac_objext'
7913   { (eval echo "$as_me:7913: \"$ac_try\"") >&5
7914   (eval $ac_try) 2>&5
7915   ac_status=$?
7916   echo "$as_me:7916: \$? = $ac_status" >&5
7917   (exit $ac_status); }; }; then
7918   :
7919 else
7920   echo "$as_me: failed program was:" >&5
7921 cat conftest.$ac_ext >&5
7922 cf_cv_posix_c_source=no
7923 fi
7924 rm -f conftest.$ac_objext conftest.$ac_ext
7925          CFLAGS="$cf_save_CFLAGS"
7926          CPPFLAGS="$cf_save_CPPFLAGS"
7927
7928 fi
7929 rm -f conftest.$ac_objext conftest.$ac_ext
7930
7931 fi
7932 echo "$as_me:7932: result: $cf_cv_posix_c_source" >&5
7933 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7934
7935 if test "$cf_cv_posix_c_source" != no ; then
7936         CFLAGS="$cf_trim_CFLAGS"
7937         CPPFLAGS="$cf_trim_CPPFLAGS"
7938
7939 cf_fix_cppflags=no
7940 cf_new_cflags=
7941 cf_new_cppflags=
7942 cf_new_extra_cppflags=
7943
7944 for cf_add_cflags in $cf_cv_posix_c_source
7945 do
7946 case $cf_fix_cppflags in
7947 no)
7948         case $cf_add_cflags in #(vi
7949         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7950                 case $cf_add_cflags in
7951                 -D*)
7952                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7953
7954                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7955                                 && test -z "${cf_tst_cflags}" \
7956                                 && cf_fix_cppflags=yes
7957
7958                         if test $cf_fix_cppflags = yes ; then
7959                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7960                                 continue
7961                         elif test "${cf_tst_cflags}" = "\"'" ; then
7962                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7963                                 continue
7964                         fi
7965                         ;;
7966                 esac
7967                 case "$CPPFLAGS" in
7968                 *$cf_add_cflags) #(vi
7969                         ;;
7970                 *) #(vi
7971                         case $cf_add_cflags in #(vi
7972                         -D*)
7973                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7974
7975 CPPFLAGS=`echo "$CPPFLAGS" | \
7976         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7977                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7978
7979                                 ;;
7980                         esac
7981                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7982                         ;;
7983                 esac
7984                 ;;
7985         *)
7986                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7987                 ;;
7988         esac
7989         ;;
7990 yes)
7991         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7992
7993         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7994
7995         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7996                 && test -z "${cf_tst_cflags}" \
7997                 && cf_fix_cppflags=no
7998         ;;
7999 esac
8000 done
8001
8002 if test -n "$cf_new_cflags" ; then
8003
8004         CFLAGS="$CFLAGS $cf_new_cflags"
8005 fi
8006
8007 if test -n "$cf_new_cppflags" ; then
8008
8009         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8010 fi
8011
8012 if test -n "$cf_new_extra_cppflags" ; then
8013
8014         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8015 fi
8016
8017 fi
8018
8019         ;;
8020 netbsd*) #(vi
8021         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8022         ;;
8023 openbsd[4-9]*) #(vi
8024         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8025         cf_xopen_source="-D_BSD_SOURCE"
8026         cf_XOPEN_SOURCE=600
8027         ;;
8028 openbsd*) #(vi
8029         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8030         ;;
8031 osf[45]*) #(vi
8032         cf_xopen_source="-D_OSF_SOURCE"
8033         ;;
8034 nto-qnx*) #(vi
8035         cf_xopen_source="-D_QNX_SOURCE"
8036         ;;
8037 sco*) #(vi
8038         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8039         ;;
8040 solaris2.*) #(vi
8041         cf_xopen_source="-D__EXTENSIONS__"
8042         cf_cv_xopen_source=broken
8043         ;;
8044 sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8045         cf_XOPEN_SOURCE=
8046         cf_POSIX_C_SOURCE=
8047         ;;
8048 *)
8049
8050 echo "$as_me:8050: checking if we should define _XOPEN_SOURCE" >&5
8051 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8052 if test "${cf_cv_xopen_source+set}" = set; then
8053   echo $ECHO_N "(cached) $ECHO_C" >&6
8054 else
8055
8056         cat >conftest.$ac_ext <<_ACEOF
8057 #line 8057 "configure"
8058 #include "confdefs.h"
8059
8060 #include <stdlib.h>
8061 #include <string.h>
8062 #include <sys/types.h>
8063
8064 int
8065 main ()
8066 {
8067
8068 #ifndef _XOPEN_SOURCE
8069 make an error
8070 #endif
8071   ;
8072   return 0;
8073 }
8074 _ACEOF
8075 rm -f conftest.$ac_objext
8076 if { (eval echo "$as_me:8076: \"$ac_compile\"") >&5
8077   (eval $ac_compile) 2>&5
8078   ac_status=$?
8079   echo "$as_me:8079: \$? = $ac_status" >&5
8080   (exit $ac_status); } &&
8081          { ac_try='test -s conftest.$ac_objext'
8082   { (eval echo "$as_me:8082: \"$ac_try\"") >&5
8083   (eval $ac_try) 2>&5
8084   ac_status=$?
8085   echo "$as_me:8085: \$? = $ac_status" >&5
8086   (exit $ac_status); }; }; then
8087   cf_cv_xopen_source=no
8088 else
8089   echo "$as_me: failed program was:" >&5
8090 cat conftest.$ac_ext >&5
8091 cf_save="$CPPFLAGS"
8092          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8093          cat >conftest.$ac_ext <<_ACEOF
8094 #line 8094 "configure"
8095 #include "confdefs.h"
8096
8097 #include <stdlib.h>
8098 #include <string.h>
8099 #include <sys/types.h>
8100
8101 int
8102 main ()
8103 {
8104
8105 #ifdef _XOPEN_SOURCE
8106 make an error
8107 #endif
8108   ;
8109   return 0;
8110 }
8111 _ACEOF
8112 rm -f conftest.$ac_objext
8113 if { (eval echo "$as_me:8113: \"$ac_compile\"") >&5
8114   (eval $ac_compile) 2>&5
8115   ac_status=$?
8116   echo "$as_me:8116: \$? = $ac_status" >&5
8117   (exit $ac_status); } &&
8118          { ac_try='test -s conftest.$ac_objext'
8119   { (eval echo "$as_me:8119: \"$ac_try\"") >&5
8120   (eval $ac_try) 2>&5
8121   ac_status=$?
8122   echo "$as_me:8122: \$? = $ac_status" >&5
8123   (exit $ac_status); }; }; then
8124   cf_cv_xopen_source=no
8125 else
8126   echo "$as_me: failed program was:" >&5
8127 cat conftest.$ac_ext >&5
8128 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8129 fi
8130 rm -f conftest.$ac_objext conftest.$ac_ext
8131         CPPFLAGS="$cf_save"
8132
8133 fi
8134 rm -f conftest.$ac_objext conftest.$ac_ext
8135
8136 fi
8137 echo "$as_me:8137: result: $cf_cv_xopen_source" >&5
8138 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8139
8140 if test "$cf_cv_xopen_source" != no ; then
8141
8142 CFLAGS=`echo "$CFLAGS" | \
8143         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8144                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8145
8146 CPPFLAGS=`echo "$CPPFLAGS" | \
8147         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8148                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8149
8150         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8151
8152 cf_fix_cppflags=no
8153 cf_new_cflags=
8154 cf_new_cppflags=
8155 cf_new_extra_cppflags=
8156
8157 for cf_add_cflags in $cf_temp_xopen_source
8158 do
8159 case $cf_fix_cppflags in
8160 no)
8161         case $cf_add_cflags in #(vi
8162         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8163                 case $cf_add_cflags in
8164                 -D*)
8165                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8166
8167                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8168                                 && test -z "${cf_tst_cflags}" \
8169                                 && cf_fix_cppflags=yes
8170
8171                         if test $cf_fix_cppflags = yes ; then
8172                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8173                                 continue
8174                         elif test "${cf_tst_cflags}" = "\"'" ; then
8175                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8176                                 continue
8177                         fi
8178                         ;;
8179                 esac
8180                 case "$CPPFLAGS" in
8181                 *$cf_add_cflags) #(vi
8182                         ;;
8183                 *) #(vi
8184                         case $cf_add_cflags in #(vi
8185                         -D*)
8186                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8187
8188 CPPFLAGS=`echo "$CPPFLAGS" | \
8189         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8190                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8191
8192                                 ;;
8193                         esac
8194                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8195                         ;;
8196                 esac
8197                 ;;
8198         *)
8199                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8200                 ;;
8201         esac
8202         ;;
8203 yes)
8204         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8205
8206         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8207
8208         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8209                 && test -z "${cf_tst_cflags}" \
8210                 && cf_fix_cppflags=no
8211         ;;
8212 esac
8213 done
8214
8215 if test -n "$cf_new_cflags" ; then
8216
8217         CFLAGS="$CFLAGS $cf_new_cflags"
8218 fi
8219
8220 if test -n "$cf_new_cppflags" ; then
8221
8222         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8223 fi
8224
8225 if test -n "$cf_new_extra_cppflags" ; then
8226
8227         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8228 fi
8229
8230 fi
8231
8232 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8233
8234 cf_save_CFLAGS="$CFLAGS"
8235 cf_save_CPPFLAGS="$CPPFLAGS"
8236
8237 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8238         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8239                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8240
8241 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8242         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8243                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8244
8245 echo "$as_me:8245: checking if we should define _POSIX_C_SOURCE" >&5
8246 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8247 if test "${cf_cv_posix_c_source+set}" = set; then
8248   echo $ECHO_N "(cached) $ECHO_C" >&6
8249 else
8250
8251 echo "${as_me:-configure}:8251: testing if the symbol is already defined go no further ..." 1>&5
8252
8253         cat >conftest.$ac_ext <<_ACEOF
8254 #line 8254 "configure"
8255 #include "confdefs.h"
8256 #include <sys/types.h>
8257 int
8258 main ()
8259 {
8260
8261 #ifndef _POSIX_C_SOURCE
8262 make an error
8263 #endif
8264   ;
8265   return 0;
8266 }
8267 _ACEOF
8268 rm -f conftest.$ac_objext
8269 if { (eval echo "$as_me:8269: \"$ac_compile\"") >&5
8270   (eval $ac_compile) 2>&5
8271   ac_status=$?
8272   echo "$as_me:8272: \$? = $ac_status" >&5
8273   (exit $ac_status); } &&
8274          { ac_try='test -s conftest.$ac_objext'
8275   { (eval echo "$as_me:8275: \"$ac_try\"") >&5
8276   (eval $ac_try) 2>&5
8277   ac_status=$?
8278   echo "$as_me:8278: \$? = $ac_status" >&5
8279   (exit $ac_status); }; }; then
8280   cf_cv_posix_c_source=no
8281 else
8282   echo "$as_me: failed program was:" >&5
8283 cat conftest.$ac_ext >&5
8284 cf_want_posix_source=no
8285          case .$cf_POSIX_C_SOURCE in #(vi
8286          .[12]??*) #(vi
8287                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8288                 ;;
8289          .2) #(vi
8290                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8291                 cf_want_posix_source=yes
8292                 ;;
8293          .*)
8294                 cf_want_posix_source=yes
8295                 ;;
8296          esac
8297          if test "$cf_want_posix_source" = yes ; then
8298                 cat >conftest.$ac_ext <<_ACEOF
8299 #line 8299 "configure"
8300 #include "confdefs.h"
8301 #include <sys/types.h>
8302 int
8303 main ()
8304 {
8305
8306 #ifdef _POSIX_SOURCE
8307 make an error
8308 #endif
8309   ;
8310   return 0;
8311 }
8312 _ACEOF
8313 rm -f conftest.$ac_objext
8314 if { (eval echo "$as_me:8314: \"$ac_compile\"") >&5
8315   (eval $ac_compile) 2>&5
8316   ac_status=$?
8317   echo "$as_me:8317: \$? = $ac_status" >&5
8318   (exit $ac_status); } &&
8319          { ac_try='test -s conftest.$ac_objext'
8320   { (eval echo "$as_me:8320: \"$ac_try\"") >&5
8321   (eval $ac_try) 2>&5
8322   ac_status=$?
8323   echo "$as_me:8323: \$? = $ac_status" >&5
8324   (exit $ac_status); }; }; then
8325   :
8326 else
8327   echo "$as_me: failed program was:" >&5
8328 cat conftest.$ac_ext >&5
8329 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8330 fi
8331 rm -f conftest.$ac_objext conftest.$ac_ext
8332          fi
8333
8334 echo "${as_me:-configure}:8334: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8335
8336          CFLAGS="$cf_trim_CFLAGS"
8337          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8338
8339 echo "${as_me:-configure}:8339: testing if the second compile does not leave our definition intact error ..." 1>&5
8340
8341          cat >conftest.$ac_ext <<_ACEOF
8342 #line 8342 "configure"
8343 #include "confdefs.h"
8344 #include <sys/types.h>
8345 int
8346 main ()
8347 {
8348
8349 #ifndef _POSIX_C_SOURCE
8350 make an error
8351 #endif
8352   ;
8353   return 0;
8354 }
8355 _ACEOF
8356 rm -f conftest.$ac_objext
8357 if { (eval echo "$as_me:8357: \"$ac_compile\"") >&5
8358   (eval $ac_compile) 2>&5
8359   ac_status=$?
8360   echo "$as_me:8360: \$? = $ac_status" >&5
8361   (exit $ac_status); } &&
8362          { ac_try='test -s conftest.$ac_objext'
8363   { (eval echo "$as_me:8363: \"$ac_try\"") >&5
8364   (eval $ac_try) 2>&5
8365   ac_status=$?
8366   echo "$as_me:8366: \$? = $ac_status" >&5
8367   (exit $ac_status); }; }; then
8368   :
8369 else
8370   echo "$as_me: failed program was:" >&5
8371 cat conftest.$ac_ext >&5
8372 cf_cv_posix_c_source=no
8373 fi
8374 rm -f conftest.$ac_objext conftest.$ac_ext
8375          CFLAGS="$cf_save_CFLAGS"
8376          CPPFLAGS="$cf_save_CPPFLAGS"
8377
8378 fi
8379 rm -f conftest.$ac_objext conftest.$ac_ext
8380
8381 fi
8382 echo "$as_me:8382: result: $cf_cv_posix_c_source" >&5
8383 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8384
8385 if test "$cf_cv_posix_c_source" != no ; then
8386         CFLAGS="$cf_trim_CFLAGS"
8387         CPPFLAGS="$cf_trim_CPPFLAGS"
8388
8389 cf_fix_cppflags=no
8390 cf_new_cflags=
8391 cf_new_cppflags=
8392 cf_new_extra_cppflags=
8393
8394 for cf_add_cflags in $cf_cv_posix_c_source
8395 do
8396 case $cf_fix_cppflags in
8397 no)
8398         case $cf_add_cflags in #(vi
8399         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8400                 case $cf_add_cflags in
8401                 -D*)
8402                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8403
8404                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8405                                 && test -z "${cf_tst_cflags}" \
8406                                 && cf_fix_cppflags=yes
8407
8408                         if test $cf_fix_cppflags = yes ; then
8409                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8410                                 continue
8411                         elif test "${cf_tst_cflags}" = "\"'" ; then
8412                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8413                                 continue
8414                         fi
8415                         ;;
8416                 esac
8417                 case "$CPPFLAGS" in
8418                 *$cf_add_cflags) #(vi
8419                         ;;
8420                 *) #(vi
8421                         case $cf_add_cflags in #(vi
8422                         -D*)
8423                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8424
8425 CPPFLAGS=`echo "$CPPFLAGS" | \
8426         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8427                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8428
8429                                 ;;
8430                         esac
8431                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8432                         ;;
8433                 esac
8434                 ;;
8435         *)
8436                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8437                 ;;
8438         esac
8439         ;;
8440 yes)
8441         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8442
8443         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8444
8445         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8446                 && test -z "${cf_tst_cflags}" \
8447                 && cf_fix_cppflags=no
8448         ;;
8449 esac
8450 done
8451
8452 if test -n "$cf_new_cflags" ; then
8453
8454         CFLAGS="$CFLAGS $cf_new_cflags"
8455 fi
8456
8457 if test -n "$cf_new_cppflags" ; then
8458
8459         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8460 fi
8461
8462 if test -n "$cf_new_extra_cppflags" ; then
8463
8464         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8465 fi
8466
8467 fi
8468
8469         ;;
8470 esac
8471
8472 if test -n "$cf_xopen_source" ; then
8473
8474 cf_fix_cppflags=no
8475 cf_new_cflags=
8476 cf_new_cppflags=
8477 cf_new_extra_cppflags=
8478
8479 for cf_add_cflags in $cf_xopen_source
8480 do
8481 case $cf_fix_cppflags in
8482 no)
8483         case $cf_add_cflags in #(vi
8484         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8485                 case $cf_add_cflags in
8486                 -D*)
8487                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8488
8489                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8490                                 && test -z "${cf_tst_cflags}" \
8491                                 && cf_fix_cppflags=yes
8492
8493                         if test $cf_fix_cppflags = yes ; then
8494                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8495                                 continue
8496                         elif test "${cf_tst_cflags}" = "\"'" ; then
8497                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8498                                 continue
8499                         fi
8500                         ;;
8501                 esac
8502                 case "$CPPFLAGS" in
8503                 *$cf_add_cflags) #(vi
8504                         ;;
8505                 *) #(vi
8506                         case $cf_add_cflags in #(vi
8507                         -D*)
8508                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8509
8510 CPPFLAGS=`echo "$CPPFLAGS" | \
8511         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8512                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8513
8514                                 ;;
8515                         esac
8516                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8517                         ;;
8518                 esac
8519                 ;;
8520         *)
8521                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8522                 ;;
8523         esac
8524         ;;
8525 yes)
8526         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8527
8528         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8529
8530         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8531                 && test -z "${cf_tst_cflags}" \
8532                 && cf_fix_cppflags=no
8533         ;;
8534 esac
8535 done
8536
8537 if test -n "$cf_new_cflags" ; then
8538         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8539
8540 echo "${as_me:-configure}:8540: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8541
8542         CFLAGS="$CFLAGS $cf_new_cflags"
8543 fi
8544
8545 if test -n "$cf_new_cppflags" ; then
8546         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8547
8548 echo "${as_me:-configure}:8548: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8549
8550         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8551 fi
8552
8553 if test -n "$cf_new_extra_cppflags" ; then
8554         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8555
8556 echo "${as_me:-configure}:8556: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8557
8558         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8559 fi
8560
8561 fi
8562
8563 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8564         echo "$as_me:8564: checking if _XOPEN_SOURCE really is set" >&5
8565 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8566         cat >conftest.$ac_ext <<_ACEOF
8567 #line 8567 "configure"
8568 #include "confdefs.h"
8569 #include <stdlib.h>
8570 int
8571 main ()
8572 {
8573
8574 #ifndef _XOPEN_SOURCE
8575 make an error
8576 #endif
8577   ;
8578   return 0;
8579 }
8580 _ACEOF
8581 rm -f conftest.$ac_objext
8582 if { (eval echo "$as_me:8582: \"$ac_compile\"") >&5
8583   (eval $ac_compile) 2>&5
8584   ac_status=$?
8585   echo "$as_me:8585: \$? = $ac_status" >&5
8586   (exit $ac_status); } &&
8587          { ac_try='test -s conftest.$ac_objext'
8588   { (eval echo "$as_me:8588: \"$ac_try\"") >&5
8589   (eval $ac_try) 2>&5
8590   ac_status=$?
8591   echo "$as_me:8591: \$? = $ac_status" >&5
8592   (exit $ac_status); }; }; then
8593   cf_XOPEN_SOURCE_set=yes
8594 else
8595   echo "$as_me: failed program was:" >&5
8596 cat conftest.$ac_ext >&5
8597 cf_XOPEN_SOURCE_set=no
8598 fi
8599 rm -f conftest.$ac_objext conftest.$ac_ext
8600         echo "$as_me:8600: result: $cf_XOPEN_SOURCE_set" >&5
8601 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8602         if test $cf_XOPEN_SOURCE_set = yes
8603         then
8604                 cat >conftest.$ac_ext <<_ACEOF
8605 #line 8605 "configure"
8606 #include "confdefs.h"
8607 #include <stdlib.h>
8608 int
8609 main ()
8610 {
8611
8612 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8613 make an error
8614 #endif
8615   ;
8616   return 0;
8617 }
8618 _ACEOF
8619 rm -f conftest.$ac_objext
8620 if { (eval echo "$as_me:8620: \"$ac_compile\"") >&5
8621   (eval $ac_compile) 2>&5
8622   ac_status=$?
8623   echo "$as_me:8623: \$? = $ac_status" >&5
8624   (exit $ac_status); } &&
8625          { ac_try='test -s conftest.$ac_objext'
8626   { (eval echo "$as_me:8626: \"$ac_try\"") >&5
8627   (eval $ac_try) 2>&5
8628   ac_status=$?
8629   echo "$as_me:8629: \$? = $ac_status" >&5
8630   (exit $ac_status); }; }; then
8631   cf_XOPEN_SOURCE_set_ok=yes
8632 else
8633   echo "$as_me: failed program was:" >&5
8634 cat conftest.$ac_ext >&5
8635 cf_XOPEN_SOURCE_set_ok=no
8636 fi
8637 rm -f conftest.$ac_objext conftest.$ac_ext
8638                 if test $cf_XOPEN_SOURCE_set_ok = no
8639                 then
8640                         { echo "$as_me:8640: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8641 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8642                 fi
8643         else
8644
8645 echo "$as_me:8645: checking if we should define _XOPEN_SOURCE" >&5
8646 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8647 if test "${cf_cv_xopen_source+set}" = set; then
8648   echo $ECHO_N "(cached) $ECHO_C" >&6
8649 else
8650
8651         cat >conftest.$ac_ext <<_ACEOF
8652 #line 8652 "configure"
8653 #include "confdefs.h"
8654
8655 #include <stdlib.h>
8656 #include <string.h>
8657 #include <sys/types.h>
8658
8659 int
8660 main ()
8661 {
8662
8663 #ifndef _XOPEN_SOURCE
8664 make an error
8665 #endif
8666   ;
8667   return 0;
8668 }
8669 _ACEOF
8670 rm -f conftest.$ac_objext
8671 if { (eval echo "$as_me:8671: \"$ac_compile\"") >&5
8672   (eval $ac_compile) 2>&5
8673   ac_status=$?
8674   echo "$as_me:8674: \$? = $ac_status" >&5
8675   (exit $ac_status); } &&
8676          { ac_try='test -s conftest.$ac_objext'
8677   { (eval echo "$as_me:8677: \"$ac_try\"") >&5
8678   (eval $ac_try) 2>&5
8679   ac_status=$?
8680   echo "$as_me:8680: \$? = $ac_status" >&5
8681   (exit $ac_status); }; }; then
8682   cf_cv_xopen_source=no
8683 else
8684   echo "$as_me: failed program was:" >&5
8685 cat conftest.$ac_ext >&5
8686 cf_save="$CPPFLAGS"
8687          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8688          cat >conftest.$ac_ext <<_ACEOF
8689 #line 8689 "configure"
8690 #include "confdefs.h"
8691
8692 #include <stdlib.h>
8693 #include <string.h>
8694 #include <sys/types.h>
8695
8696 int
8697 main ()
8698 {
8699
8700 #ifdef _XOPEN_SOURCE
8701 make an error
8702 #endif
8703   ;
8704   return 0;
8705 }
8706 _ACEOF
8707 rm -f conftest.$ac_objext
8708 if { (eval echo "$as_me:8708: \"$ac_compile\"") >&5
8709   (eval $ac_compile) 2>&5
8710   ac_status=$?
8711   echo "$as_me:8711: \$? = $ac_status" >&5
8712   (exit $ac_status); } &&
8713          { ac_try='test -s conftest.$ac_objext'
8714   { (eval echo "$as_me:8714: \"$ac_try\"") >&5
8715   (eval $ac_try) 2>&5
8716   ac_status=$?
8717   echo "$as_me:8717: \$? = $ac_status" >&5
8718   (exit $ac_status); }; }; then
8719   cf_cv_xopen_source=no
8720 else
8721   echo "$as_me: failed program was:" >&5
8722 cat conftest.$ac_ext >&5
8723 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8724 fi
8725 rm -f conftest.$ac_objext conftest.$ac_ext
8726         CPPFLAGS="$cf_save"
8727
8728 fi
8729 rm -f conftest.$ac_objext conftest.$ac_ext
8730
8731 fi
8732 echo "$as_me:8732: result: $cf_cv_xopen_source" >&5
8733 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8734
8735 if test "$cf_cv_xopen_source" != no ; then
8736
8737 CFLAGS=`echo "$CFLAGS" | \
8738         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8739                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8740
8741 CPPFLAGS=`echo "$CPPFLAGS" | \
8742         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8743                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8744
8745         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8746
8747 cf_fix_cppflags=no
8748 cf_new_cflags=
8749 cf_new_cppflags=
8750 cf_new_extra_cppflags=
8751
8752 for cf_add_cflags in $cf_temp_xopen_source
8753 do
8754 case $cf_fix_cppflags in
8755 no)
8756         case $cf_add_cflags in #(vi
8757         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8758                 case $cf_add_cflags in
8759                 -D*)
8760                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8761
8762                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8763                                 && test -z "${cf_tst_cflags}" \
8764                                 && cf_fix_cppflags=yes
8765
8766                         if test $cf_fix_cppflags = yes ; then
8767                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8768                                 continue
8769                         elif test "${cf_tst_cflags}" = "\"'" ; then
8770                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8771                                 continue
8772                         fi
8773                         ;;
8774                 esac
8775                 case "$CPPFLAGS" in
8776                 *$cf_add_cflags) #(vi
8777                         ;;
8778                 *) #(vi
8779                         case $cf_add_cflags in #(vi
8780                         -D*)
8781                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8782
8783 CPPFLAGS=`echo "$CPPFLAGS" | \
8784         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8785                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8786
8787                                 ;;
8788                         esac
8789                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8790                         ;;
8791                 esac
8792                 ;;
8793         *)
8794                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8795                 ;;
8796         esac
8797         ;;
8798 yes)
8799         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8800
8801         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8802
8803         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8804                 && test -z "${cf_tst_cflags}" \
8805                 && cf_fix_cppflags=no
8806         ;;
8807 esac
8808 done
8809
8810 if test -n "$cf_new_cflags" ; then
8811
8812         CFLAGS="$CFLAGS $cf_new_cflags"
8813 fi
8814
8815 if test -n "$cf_new_cppflags" ; then
8816
8817         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8818 fi
8819
8820 if test -n "$cf_new_extra_cppflags" ; then
8821
8822         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8823 fi
8824
8825 fi
8826
8827         fi
8828 fi
8829
8830 # Work around breakage on OS X
8831
8832 echo "$as_me:8832: checking if SIGWINCH is defined" >&5
8833 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8834 if test "${cf_cv_define_sigwinch+set}" = set; then
8835   echo $ECHO_N "(cached) $ECHO_C" >&6
8836 else
8837
8838         cat >conftest.$ac_ext <<_ACEOF
8839 #line 8839 "configure"
8840 #include "confdefs.h"
8841
8842 #include <sys/types.h>
8843 #include <sys/signal.h>
8844
8845 int
8846 main ()
8847 {
8848 int x = SIGWINCH
8849   ;
8850   return 0;
8851 }
8852 _ACEOF
8853 rm -f conftest.$ac_objext
8854 if { (eval echo "$as_me:8854: \"$ac_compile\"") >&5
8855   (eval $ac_compile) 2>&5
8856   ac_status=$?
8857   echo "$as_me:8857: \$? = $ac_status" >&5
8858   (exit $ac_status); } &&
8859          { ac_try='test -s conftest.$ac_objext'
8860   { (eval echo "$as_me:8860: \"$ac_try\"") >&5
8861   (eval $ac_try) 2>&5
8862   ac_status=$?
8863   echo "$as_me:8863: \$? = $ac_status" >&5
8864   (exit $ac_status); }; }; then
8865   cf_cv_define_sigwinch=yes
8866 else
8867   echo "$as_me: failed program was:" >&5
8868 cat conftest.$ac_ext >&5
8869 cat >conftest.$ac_ext <<_ACEOF
8870 #line 8870 "configure"
8871 #include "confdefs.h"
8872
8873 #undef _XOPEN_SOURCE
8874 #undef _POSIX_SOURCE
8875 #undef _POSIX_C_SOURCE
8876 #include <sys/types.h>
8877 #include <sys/signal.h>
8878
8879 int
8880 main ()
8881 {
8882 int x = SIGWINCH
8883   ;
8884   return 0;
8885 }
8886 _ACEOF
8887 rm -f conftest.$ac_objext
8888 if { (eval echo "$as_me:8888: \"$ac_compile\"") >&5
8889   (eval $ac_compile) 2>&5
8890   ac_status=$?
8891   echo "$as_me:8891: \$? = $ac_status" >&5
8892   (exit $ac_status); } &&
8893          { ac_try='test -s conftest.$ac_objext'
8894   { (eval echo "$as_me:8894: \"$ac_try\"") >&5
8895   (eval $ac_try) 2>&5
8896   ac_status=$?
8897   echo "$as_me:8897: \$? = $ac_status" >&5
8898   (exit $ac_status); }; }; then
8899   cf_cv_define_sigwinch=maybe
8900 else
8901   echo "$as_me: failed program was:" >&5
8902 cat conftest.$ac_ext >&5
8903 cf_cv_define_sigwinch=no
8904 fi
8905 rm -f conftest.$ac_objext conftest.$ac_ext
8906
8907 fi
8908 rm -f conftest.$ac_objext conftest.$ac_ext
8909
8910 fi
8911 echo "$as_me:8911: result: $cf_cv_define_sigwinch" >&5
8912 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8913
8914 if test "$cf_cv_define_sigwinch" = maybe ; then
8915 echo "$as_me:8915: checking for actual SIGWINCH definition" >&5
8916 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8917 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8918   echo $ECHO_N "(cached) $ECHO_C" >&6
8919 else
8920
8921 cf_cv_fixup_sigwinch=unknown
8922 cf_sigwinch=32
8923 while test $cf_sigwinch != 1
8924 do
8925         cat >conftest.$ac_ext <<_ACEOF
8926 #line 8926 "configure"
8927 #include "confdefs.h"
8928
8929 #undef _XOPEN_SOURCE
8930 #undef _POSIX_SOURCE
8931 #undef _POSIX_C_SOURCE
8932 #include <sys/types.h>
8933 #include <sys/signal.h>
8934
8935 int
8936 main ()
8937 {
8938
8939 #if SIGWINCH != $cf_sigwinch
8940 make an error
8941 #endif
8942 int x = SIGWINCH
8943   ;
8944   return 0;
8945 }
8946 _ACEOF
8947 rm -f conftest.$ac_objext
8948 if { (eval echo "$as_me:8948: \"$ac_compile\"") >&5
8949   (eval $ac_compile) 2>&5
8950   ac_status=$?
8951   echo "$as_me:8951: \$? = $ac_status" >&5
8952   (exit $ac_status); } &&
8953          { ac_try='test -s conftest.$ac_objext'
8954   { (eval echo "$as_me:8954: \"$ac_try\"") >&5
8955   (eval $ac_try) 2>&5
8956   ac_status=$?
8957   echo "$as_me:8957: \$? = $ac_status" >&5
8958   (exit $ac_status); }; }; then
8959   cf_cv_fixup_sigwinch=$cf_sigwinch
8960          break
8961 else
8962   echo "$as_me: failed program was:" >&5
8963 cat conftest.$ac_ext >&5
8964 fi
8965 rm -f conftest.$ac_objext conftest.$ac_ext
8966
8967 cf_sigwinch=`expr $cf_sigwinch - 1`
8968 done
8969
8970 fi
8971 echo "$as_me:8971: result: $cf_cv_fixup_sigwinch" >&5
8972 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8973
8974         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8975                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8976         fi
8977 fi
8978
8979 # Checks for CODESET support.
8980
8981   echo "$as_me:8981: checking for nl_langinfo and CODESET" >&5
8982 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8983 if test "${am_cv_langinfo_codeset+set}" = set; then
8984   echo $ECHO_N "(cached) $ECHO_C" >&6
8985 else
8986   cat >conftest.$ac_ext <<_ACEOF
8987 #line 8987 "configure"
8988 #include "confdefs.h"
8989 #include <langinfo.h>
8990 int
8991 main ()
8992 {
8993 char* cs = nl_langinfo(CODESET);
8994   ;
8995   return 0;
8996 }
8997 _ACEOF
8998 rm -f conftest.$ac_objext conftest$ac_exeext
8999 if { (eval echo "$as_me:8999: \"$ac_link\"") >&5
9000   (eval $ac_link) 2>&5
9001   ac_status=$?
9002   echo "$as_me:9002: \$? = $ac_status" >&5
9003   (exit $ac_status); } &&
9004          { ac_try='test -s conftest$ac_exeext'
9005   { (eval echo "$as_me:9005: \"$ac_try\"") >&5
9006   (eval $ac_try) 2>&5
9007   ac_status=$?
9008   echo "$as_me:9008: \$? = $ac_status" >&5
9009   (exit $ac_status); }; }; then
9010   am_cv_langinfo_codeset=yes
9011 else
9012   echo "$as_me: failed program was:" >&5
9013 cat conftest.$ac_ext >&5
9014 am_cv_langinfo_codeset=no
9015 fi
9016 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9017
9018 fi
9019 echo "$as_me:9019: result: $am_cv_langinfo_codeset" >&5
9020 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9021   if test $am_cv_langinfo_codeset = yes; then
9022
9023 cat >>confdefs.h <<\EOF
9024 #define HAVE_LANGINFO_CODESET 1
9025 EOF
9026
9027   fi
9028
9029 # use these variables to work around a defect in gcc's fixincludes.
9030 NCURSES_OK_WCHAR_T=
9031 NCURSES_OK_WINT_T=
9032
9033 echo "$as_me:9033: checking if you want wide-character code" >&5
9034 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9035
9036 # Check whether --enable-widec or --disable-widec was given.
9037 if test "${enable_widec+set}" = set; then
9038   enableval="$enable_widec"
9039   with_widec=$enableval
9040 else
9041   with_widec=no
9042 fi;
9043 echo "$as_me:9043: result: $with_widec" >&5
9044 echo "${ECHO_T}$with_widec" >&6
9045 if test "x$with_widec" = xyes ; then
9046         if test "x$disable_lib_suffixes" = xno ; then
9047                 LIB_SUFFIX="w${LIB_SUFFIX}"
9048         fi
9049
9050 cat >>confdefs.h <<\EOF
9051 #define USE_WIDEC_SUPPORT 1
9052 EOF
9053
9054 cat >>confdefs.h <<\EOF
9055 #define NCURSES_WIDECHAR 1
9056 EOF
9057
9058 echo "$as_me:9058: checking if wchar.h can be used as is" >&5
9059 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9060 if test "${cf_cv_wchar_h_okay+set}" = set; then
9061   echo $ECHO_N "(cached) $ECHO_C" >&6
9062 else
9063
9064 cat >conftest.$ac_ext <<_ACEOF
9065 #line 9065 "configure"
9066 #include "confdefs.h"
9067
9068 #include <stdlib.h>
9069 #include <wchar.h>
9070
9071 int
9072 main ()
9073 {
9074
9075         wint_t foo = 0;
9076         int bar = iswpunct(foo)
9077   ;
9078   return 0;
9079 }
9080 _ACEOF
9081 rm -f conftest.$ac_objext
9082 if { (eval echo "$as_me:9082: \"$ac_compile\"") >&5
9083   (eval $ac_compile) 2>&5
9084   ac_status=$?
9085   echo "$as_me:9085: \$? = $ac_status" >&5
9086   (exit $ac_status); } &&
9087          { ac_try='test -s conftest.$ac_objext'
9088   { (eval echo "$as_me:9088: \"$ac_try\"") >&5
9089   (eval $ac_try) 2>&5
9090   ac_status=$?
9091   echo "$as_me:9091: \$? = $ac_status" >&5
9092   (exit $ac_status); }; }; then
9093   cf_cv_wchar_h_okay=yes
9094 else
9095   echo "$as_me: failed program was:" >&5
9096 cat conftest.$ac_ext >&5
9097 cf_cv_wchar_h_okay=no
9098 fi
9099 rm -f conftest.$ac_objext conftest.$ac_ext
9100 fi
9101 echo "$as_me:9101: result: $cf_cv_wchar_h_okay" >&5
9102 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9103
9104 if test $cf_cv_wchar_h_okay = no
9105 then
9106
9107 echo "$as_me:9107: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9108 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9109 cat >conftest.$ac_ext <<_ACEOF
9110 #line 9110 "configure"
9111 #include "confdefs.h"
9112 #include <sys/types.h>
9113
9114 int
9115 main ()
9116 {
9117
9118 #ifndef _XOPEN_SOURCE_EXTENDED
9119 make an error
9120 #endif
9121   ;
9122   return 0;
9123 }
9124 _ACEOF
9125 rm -f conftest.$ac_objext
9126 if { (eval echo "$as_me:9126: \"$ac_compile\"") >&5
9127   (eval $ac_compile) 2>&5
9128   ac_status=$?
9129   echo "$as_me:9129: \$? = $ac_status" >&5
9130   (exit $ac_status); } &&
9131          { ac_try='test -s conftest.$ac_objext'
9132   { (eval echo "$as_me:9132: \"$ac_try\"") >&5
9133   (eval $ac_try) 2>&5
9134   ac_status=$?
9135   echo "$as_me:9135: \$? = $ac_status" >&5
9136   (exit $ac_status); }; }; then
9137   cf_result=no
9138 else
9139   echo "$as_me: failed program was:" >&5
9140 cat conftest.$ac_ext >&5
9141 cf_result=yes
9142 fi
9143 rm -f conftest.$ac_objext conftest.$ac_ext
9144 echo "$as_me:9144: result: $cf_result" >&5
9145 echo "${ECHO_T}$cf_result" >&6
9146
9147 if test "$cf_result" = yes ; then
9148         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9149 elif test "x" != "x" ; then
9150         echo "$as_me:9150: checking checking for compatible value versus " >&5
9151 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9152         cat >conftest.$ac_ext <<_ACEOF
9153 #line 9153 "configure"
9154 #include "confdefs.h"
9155 #include <sys/types.h>
9156
9157 int
9158 main ()
9159 {
9160
9161 #if _XOPEN_SOURCE_EXTENDED- < 0
9162 make an error
9163 #endif
9164   ;
9165   return 0;
9166 }
9167 _ACEOF
9168 rm -f conftest.$ac_objext
9169 if { (eval echo "$as_me:9169: \"$ac_compile\"") >&5
9170   (eval $ac_compile) 2>&5
9171   ac_status=$?
9172   echo "$as_me:9172: \$? = $ac_status" >&5
9173   (exit $ac_status); } &&
9174          { ac_try='test -s conftest.$ac_objext'
9175   { (eval echo "$as_me:9175: \"$ac_try\"") >&5
9176   (eval $ac_try) 2>&5
9177   ac_status=$?
9178   echo "$as_me:9178: \$? = $ac_status" >&5
9179   (exit $ac_status); }; }; then
9180   cf_result=yes
9181 else
9182   echo "$as_me: failed program was:" >&5
9183 cat conftest.$ac_ext >&5
9184 cf_result=no
9185 fi
9186 rm -f conftest.$ac_objext conftest.$ac_ext
9187         echo "$as_me:9187: result: $cf_result" >&5
9188 echo "${ECHO_T}$cf_result" >&6
9189         if test "$cf_result" = no ; then
9190                 # perhaps we can override it - try...
9191                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9192         fi
9193 fi
9194
9195 fi
9196
9197         # with_overwrite=no
9198         NCURSES_CH_T=cchar_t
9199
9200 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9201 do
9202 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9203 echo "$as_me:9203: checking for $ac_func" >&5
9204 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9205 if eval "test \"\${$as_ac_var+set}\" = set"; then
9206   echo $ECHO_N "(cached) $ECHO_C" >&6
9207 else
9208   cat >conftest.$ac_ext <<_ACEOF
9209 #line 9209 "configure"
9210 #include "confdefs.h"
9211 /* System header to define __stub macros and hopefully few prototypes,
9212     which can conflict with char $ac_func (); below.  */
9213 #include <assert.h>
9214 /* Override any gcc2 internal prototype to avoid an error.  */
9215 #ifdef __cplusplus
9216 extern "C"
9217 #endif
9218 /* We use char because int might match the return type of a gcc2
9219    builtin and then its argument prototype would still apply.  */
9220 char $ac_func ();
9221 char (*f) ();
9222
9223 int
9224 main ()
9225 {
9226 /* The GNU C library defines this for functions which it implements
9227     to always fail with ENOSYS.  Some functions are actually named
9228     something starting with __ and the normal name is an alias.  */
9229 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9230 choke me
9231 #else
9232 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9233 #endif
9234
9235   ;
9236   return 0;
9237 }
9238 _ACEOF
9239 rm -f conftest.$ac_objext conftest$ac_exeext
9240 if { (eval echo "$as_me:9240: \"$ac_link\"") >&5
9241   (eval $ac_link) 2>&5
9242   ac_status=$?
9243   echo "$as_me:9243: \$? = $ac_status" >&5
9244   (exit $ac_status); } &&
9245          { ac_try='test -s conftest$ac_exeext'
9246   { (eval echo "$as_me:9246: \"$ac_try\"") >&5
9247   (eval $ac_try) 2>&5
9248   ac_status=$?
9249   echo "$as_me:9249: \$? = $ac_status" >&5
9250   (exit $ac_status); }; }; then
9251   eval "$as_ac_var=yes"
9252 else
9253   echo "$as_me: failed program was:" >&5
9254 cat conftest.$ac_ext >&5
9255 eval "$as_ac_var=no"
9256 fi
9257 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9258 fi
9259 echo "$as_me:9259: result: `eval echo '${'$as_ac_var'}'`" >&5
9260 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9261 if test `eval echo '${'$as_ac_var'}'` = yes; then
9262   cat >>confdefs.h <<EOF
9263 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9264 EOF
9265
9266 fi
9267 done
9268
9269         if test "x$ac_cv_func_putwc" != xyes ; then
9270
9271 echo "$as_me:9271: checking for multibyte character support" >&5
9272 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9273 if test "${cf_cv_utf8_lib+set}" = set; then
9274   echo $ECHO_N "(cached) $ECHO_C" >&6
9275 else
9276
9277         cf_save_LIBS="$LIBS"
9278         cat >conftest.$ac_ext <<_ACEOF
9279 #line 9279 "configure"
9280 #include "confdefs.h"
9281
9282 #include <stdlib.h>
9283 int
9284 main ()
9285 {
9286 putwc(0,0);
9287   ;
9288   return 0;
9289 }
9290 _ACEOF
9291 rm -f conftest.$ac_objext conftest$ac_exeext
9292 if { (eval echo "$as_me:9292: \"$ac_link\"") >&5
9293   (eval $ac_link) 2>&5
9294   ac_status=$?
9295   echo "$as_me:9295: \$? = $ac_status" >&5
9296   (exit $ac_status); } &&
9297          { ac_try='test -s conftest$ac_exeext'
9298   { (eval echo "$as_me:9298: \"$ac_try\"") >&5
9299   (eval $ac_try) 2>&5
9300   ac_status=$?
9301   echo "$as_me:9301: \$? = $ac_status" >&5
9302   (exit $ac_status); }; }; then
9303   cf_cv_utf8_lib=yes
9304 else
9305   echo "$as_me: failed program was:" >&5
9306 cat conftest.$ac_ext >&5
9307
9308 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9309 # will be set on completion of the AC_TRY_LINK below.
9310 cf_cv_header_path_utf8=
9311 cf_cv_library_path_utf8=
9312
9313 echo "${as_me:-configure}:9313: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9314
9315 cf_save_LIBS="$LIBS"
9316
9317 cat >conftest.$ac_ext <<_ACEOF
9318 #line 9318 "configure"
9319 #include "confdefs.h"
9320
9321 #include <libutf8.h>
9322 int
9323 main ()
9324 {
9325 putwc(0,0);
9326   ;
9327   return 0;
9328 }
9329 _ACEOF
9330 rm -f conftest.$ac_objext conftest$ac_exeext
9331 if { (eval echo "$as_me:9331: \"$ac_link\"") >&5
9332   (eval $ac_link) 2>&5
9333   ac_status=$?
9334   echo "$as_me:9334: \$? = $ac_status" >&5
9335   (exit $ac_status); } &&
9336          { ac_try='test -s conftest$ac_exeext'
9337   { (eval echo "$as_me:9337: \"$ac_try\"") >&5
9338   (eval $ac_try) 2>&5
9339   ac_status=$?
9340   echo "$as_me:9340: \$? = $ac_status" >&5
9341   (exit $ac_status); }; }; then
9342
9343         cf_cv_find_linkage_utf8=yes
9344         cf_cv_header_path_utf8=/usr/include
9345         cf_cv_library_path_utf8=/usr/lib
9346
9347 else
9348   echo "$as_me: failed program was:" >&5
9349 cat conftest.$ac_ext >&5
9350
9351 LIBS="-lutf8  $cf_save_LIBS"
9352
9353 cat >conftest.$ac_ext <<_ACEOF
9354 #line 9354 "configure"
9355 #include "confdefs.h"
9356
9357 #include <libutf8.h>
9358 int
9359 main ()
9360 {
9361 putwc(0,0);
9362   ;
9363   return 0;
9364 }
9365 _ACEOF
9366 rm -f conftest.$ac_objext conftest$ac_exeext
9367 if { (eval echo "$as_me:9367: \"$ac_link\"") >&5
9368   (eval $ac_link) 2>&5
9369   ac_status=$?
9370   echo "$as_me:9370: \$? = $ac_status" >&5
9371   (exit $ac_status); } &&
9372          { ac_try='test -s conftest$ac_exeext'
9373   { (eval echo "$as_me:9373: \"$ac_try\"") >&5
9374   (eval $ac_try) 2>&5
9375   ac_status=$?
9376   echo "$as_me:9376: \$? = $ac_status" >&5
9377   (exit $ac_status); }; }; then
9378
9379         cf_cv_find_linkage_utf8=yes
9380         cf_cv_header_path_utf8=/usr/include
9381         cf_cv_library_path_utf8=/usr/lib
9382         cf_cv_library_file_utf8="-lutf8"
9383
9384 else
9385   echo "$as_me: failed program was:" >&5
9386 cat conftest.$ac_ext >&5
9387
9388         cf_cv_find_linkage_utf8=no
9389         LIBS="$cf_save_LIBS"
9390
9391     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
9392
9393 echo "${as_me:-configure}:9393: testing find linkage for utf8 library ..." 1>&5
9394
9395 echo "${as_me:-configure}:9395: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9396
9397     cf_save_CPPFLAGS="$CPPFLAGS"
9398     cf_test_CPPFLAGS="$CPPFLAGS"
9399
9400 cf_search=
9401
9402 # collect the current set of include-directories from compiler flags
9403 cf_header_path_list=""
9404 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9405         for cf_header_path in $CPPFLAGS $CFLAGS
9406         do
9407                 case $cf_header_path in #(vi
9408                 -I*)
9409                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9410
9411 test "x$cf_header_path" != "xNONE" && \
9412 test -d "$cf_header_path" && \
9413  {
9414         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9415         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9416         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9417         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9418         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9419         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9420 }
9421
9422                         cf_header_path_list="$cf_header_path_list $cf_search"
9423                         ;;
9424                 esac
9425         done
9426 fi
9427
9428 # add the variations for the package we are looking for
9429
9430 cf_search=
9431
9432 test "x$prefix" != "xNONE" && \
9433 test -d "$prefix" && \
9434  {
9435         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9436         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9437         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9438         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9439         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9440         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9441 }
9442
9443 for cf_subdir_prefix in \
9444         /usr \
9445         /usr/local \
9446         /usr/pkg \
9447         /opt \
9448         /opt/local \
9449         $HOME
9450 do
9451
9452 test "x$cf_subdir_prefix" != "x$prefix" && \
9453 test -d "$cf_subdir_prefix" && \
9454 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9455         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9456         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9457         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9458         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9459         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9460         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9461 }
9462
9463 done
9464
9465 test "$includedir" != NONE && \
9466 test "$includedir" != "/usr/include" && \
9467 test -d "$includedir" && {
9468         test -d $includedir &&    cf_search="$cf_search $includedir"
9469         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9470 }
9471
9472 test "$oldincludedir" != NONE && \
9473 test "$oldincludedir" != "/usr/include" && \
9474 test -d "$oldincludedir" && {
9475         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9476         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9477 }
9478
9479 cf_search="$cf_search $cf_header_path_list"
9480
9481     for cf_cv_header_path_utf8 in $cf_search
9482     do
9483       if test -d $cf_cv_header_path_utf8 ; then
9484         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9485
9486 echo "${as_me:-configure}:9486: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9487
9488         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9489         cat >conftest.$ac_ext <<_ACEOF
9490 #line 9490 "configure"
9491 #include "confdefs.h"
9492
9493 #include <libutf8.h>
9494 int
9495 main ()
9496 {
9497 putwc(0,0);
9498   ;
9499   return 0;
9500 }
9501 _ACEOF
9502 rm -f conftest.$ac_objext
9503 if { (eval echo "$as_me:9503: \"$ac_compile\"") >&5
9504   (eval $ac_compile) 2>&5
9505   ac_status=$?
9506   echo "$as_me:9506: \$? = $ac_status" >&5
9507   (exit $ac_status); } &&
9508          { ac_try='test -s conftest.$ac_objext'
9509   { (eval echo "$as_me:9509: \"$ac_try\"") >&5
9510   (eval $ac_try) 2>&5
9511   ac_status=$?
9512   echo "$as_me:9512: \$? = $ac_status" >&5
9513   (exit $ac_status); }; }; then
9514
9515             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9516
9517 echo "${as_me:-configure}:9517: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9518
9519             cf_cv_find_linkage_utf8=maybe
9520             cf_test_CPPFLAGS="$CPPFLAGS"
9521             break
9522 else
9523   echo "$as_me: failed program was:" >&5
9524 cat conftest.$ac_ext >&5
9525
9526             CPPFLAGS="$cf_save_CPPFLAGS"
9527
9528 fi
9529 rm -f conftest.$ac_objext conftest.$ac_ext
9530       fi
9531     done
9532
9533     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9534
9535 echo "${as_me:-configure}:9535: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9536
9537       cf_save_LIBS="$LIBS"
9538       cf_save_LDFLAGS="$LDFLAGS"
9539
9540       if test "$cf_cv_find_linkage_utf8" != yes ; then
9541
9542 cf_search=
9543 cf_library_path_list=""
9544 if test -n "${LDFLAGS}${LIBS}" ; then
9545         for cf_library_path in $LDFLAGS $LIBS
9546         do
9547                 case $cf_library_path in #(vi
9548                 -L*)
9549                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9550
9551 test "x$cf_library_path" != "xNONE" && \
9552 test -d "$cf_library_path" && \
9553  {
9554         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9555         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9556         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9557         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9558         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9559         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9560 }
9561
9562                         cf_library_path_list="$cf_library_path_list $cf_search"
9563                         ;;
9564                 esac
9565         done
9566 fi
9567
9568 cf_search=
9569
9570 test "x$prefix" != "xNONE" && \
9571 test -d "$prefix" && \
9572  {
9573         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9574         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9575         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9576         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9577         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9578         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9579 }
9580
9581 for cf_subdir_prefix in \
9582         /usr \
9583         /usr/local \
9584         /usr/pkg \
9585         /opt \
9586         /opt/local \
9587         $HOME
9588 do
9589
9590 test "x$cf_subdir_prefix" != "x$prefix" && \
9591 test -d "$cf_subdir_prefix" && \
9592 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9593         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
9594         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9595         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
9596         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
9597         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
9598         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
9599 }
9600
9601 done
9602
9603 cf_search="$cf_library_path_list $cf_search"
9604
9605         for cf_cv_library_path_utf8 in $cf_search
9606         do
9607           if test -d $cf_cv_library_path_utf8 ; then
9608             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9609
9610 echo "${as_me:-configure}:9610: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9611
9612             CPPFLAGS="$cf_test_CPPFLAGS"
9613             LIBS="-lutf8  $cf_save_LIBS"
9614             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9615             cat >conftest.$ac_ext <<_ACEOF
9616 #line 9616 "configure"
9617 #include "confdefs.h"
9618
9619 #include <libutf8.h>
9620 int
9621 main ()
9622 {
9623 putwc(0,0);
9624   ;
9625   return 0;
9626 }
9627 _ACEOF
9628 rm -f conftest.$ac_objext conftest$ac_exeext
9629 if { (eval echo "$as_me:9629: \"$ac_link\"") >&5
9630   (eval $ac_link) 2>&5
9631   ac_status=$?
9632   echo "$as_me:9632: \$? = $ac_status" >&5
9633   (exit $ac_status); } &&
9634          { ac_try='test -s conftest$ac_exeext'
9635   { (eval echo "$as_me:9635: \"$ac_try\"") >&5
9636   (eval $ac_try) 2>&5
9637   ac_status=$?
9638   echo "$as_me:9638: \$? = $ac_status" >&5
9639   (exit $ac_status); }; }; then
9640
9641                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9642
9643 echo "${as_me:-configure}:9643: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9644
9645                 cf_cv_find_linkage_utf8=yes
9646                 cf_cv_library_file_utf8="-lutf8"
9647                 break
9648 else
9649   echo "$as_me: failed program was:" >&5
9650 cat conftest.$ac_ext >&5
9651
9652                 CPPFLAGS="$cf_save_CPPFLAGS"
9653                 LIBS="$cf_save_LIBS"
9654                 LDFLAGS="$cf_save_LDFLAGS"
9655
9656 fi
9657 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9658           fi
9659         done
9660         CPPFLAGS="$cf_save_CPPFLAGS"
9661         LDFLAGS="$cf_save_LDFLAGS"
9662       fi
9663
9664     else
9665       cf_cv_find_linkage_utf8=no
9666     fi
9667
9668 fi
9669 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9670
9671 fi
9672 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9673
9674 LIBS="$cf_save_LIBS"
9675
9676 if test "$cf_cv_find_linkage_utf8" = yes ; then
9677 cf_cv_utf8_lib=add-on
9678 else
9679 cf_cv_utf8_lib=no
9680 fi
9681
9682 fi
9683 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9684 fi
9685 echo "$as_me:9685: result: $cf_cv_utf8_lib" >&5
9686 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9687
9688 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9689 # ncurses/ncursesw:
9690 if test "$cf_cv_utf8_lib" = "add-on" ; then
9691
9692 cat >>confdefs.h <<\EOF
9693 #define HAVE_LIBUTF8_H 1
9694 EOF
9695
9696 if test -n "$cf_cv_header_path_utf8" ; then
9697   for cf_add_incdir in $cf_cv_header_path_utf8
9698   do
9699         while test $cf_add_incdir != /usr/include
9700         do
9701           if test -d $cf_add_incdir
9702           then
9703                 cf_have_incdir=no
9704                 if test -n "$CFLAGS$CPPFLAGS" ; then
9705                   # a loop is needed to ensure we can add subdirs of existing dirs
9706                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9707                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9708                           cf_have_incdir=yes; break
9709                         fi
9710                   done
9711                 fi
9712
9713                 if test "$cf_have_incdir" = no ; then
9714                   if test "$cf_add_incdir" = /usr/local/include ; then
9715                         if test "$GCC" = yes
9716                         then
9717                           cf_save_CPPFLAGS=$CPPFLAGS
9718                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9719                           cat >conftest.$ac_ext <<_ACEOF
9720 #line 9720 "configure"
9721 #include "confdefs.h"
9722 #include <stdio.h>
9723 int
9724 main ()
9725 {
9726 printf("Hello")
9727   ;
9728   return 0;
9729 }
9730 _ACEOF
9731 rm -f conftest.$ac_objext
9732 if { (eval echo "$as_me:9732: \"$ac_compile\"") >&5
9733   (eval $ac_compile) 2>&5
9734   ac_status=$?
9735   echo "$as_me:9735: \$? = $ac_status" >&5
9736   (exit $ac_status); } &&
9737          { ac_try='test -s conftest.$ac_objext'
9738   { (eval echo "$as_me:9738: \"$ac_try\"") >&5
9739   (eval $ac_try) 2>&5
9740   ac_status=$?
9741   echo "$as_me:9741: \$? = $ac_status" >&5
9742   (exit $ac_status); }; }; then
9743   :
9744 else
9745   echo "$as_me: failed program was:" >&5
9746 cat conftest.$ac_ext >&5
9747 cf_have_incdir=yes
9748 fi
9749 rm -f conftest.$ac_objext conftest.$ac_ext
9750                           CPPFLAGS=$cf_save_CPPFLAGS
9751                         fi
9752                   fi
9753                 fi
9754
9755                 if test "$cf_have_incdir" = no ; then
9756                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9757
9758 echo "${as_me:-configure}:9758: testing adding $cf_add_incdir to include-path ..." 1>&5
9759
9760                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9761
9762                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9763                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9764                   cf_add_incdir="$cf_top_incdir"
9765                 else
9766                   break
9767                 fi
9768           fi
9769         done
9770   done
9771 fi
9772
9773 if test -n "$cf_cv_library_path_utf8" ; then
9774   for cf_add_libdir in $cf_cv_library_path_utf8
9775   do
9776     if test $cf_add_libdir = /usr/lib ; then
9777       :
9778     elif test -d $cf_add_libdir
9779     then
9780       cf_have_libdir=no
9781       if test -n "$LDFLAGS$LIBS" ; then
9782         # a loop is needed to ensure we can add subdirs of existing dirs
9783         for cf_test_libdir in $LDFLAGS $LIBS ; do
9784           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9785             cf_have_libdir=yes; break
9786           fi
9787         done
9788       fi
9789       if test "$cf_have_libdir" = no ; then
9790         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9791
9792 echo "${as_me:-configure}:9792: testing adding $cf_add_libdir to library-path ..." 1>&5
9793
9794         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9795       fi
9796     fi
9797   done
9798 fi
9799
9800 cf_add_libs="$cf_cv_library_file_utf8"
9801 # Filter out duplicates - this happens with badly-designed ".pc" files...
9802 for cf_add_1lib in $LIBS
9803 do
9804         for cf_add_2lib in $cf_add_libs
9805         do
9806                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9807                 then
9808                         cf_add_1lib=
9809                         break
9810                 fi
9811         done
9812         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9813 done
9814 LIBS="$cf_add_libs"
9815
9816 fi
9817
9818                 if test "$cf_cv_utf8_lib" != no ; then
9819                         NCURSES_LIBUTF8=1
9820                 fi
9821         fi
9822
9823 # This is needed on Tru64 5.0 to declare mbstate_t
9824 echo "$as_me:9824: checking if we must include wchar.h to declare mbstate_t" >&5
9825 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9826 if test "${cf_cv_mbstate_t+set}" = set; then
9827   echo $ECHO_N "(cached) $ECHO_C" >&6
9828 else
9829
9830 cat >conftest.$ac_ext <<_ACEOF
9831 #line 9831 "configure"
9832 #include "confdefs.h"
9833
9834 #include <stdlib.h>
9835 #include <stdarg.h>
9836 #include <stdio.h>
9837 #ifdef HAVE_LIBUTF8_H
9838 #include <libutf8.h>
9839 #endif
9840 int
9841 main ()
9842 {
9843 mbstate_t state
9844   ;
9845   return 0;
9846 }
9847 _ACEOF
9848 rm -f conftest.$ac_objext
9849 if { (eval echo "$as_me:9849: \"$ac_compile\"") >&5
9850   (eval $ac_compile) 2>&5
9851   ac_status=$?
9852   echo "$as_me:9852: \$? = $ac_status" >&5
9853   (exit $ac_status); } &&
9854          { ac_try='test -s conftest.$ac_objext'
9855   { (eval echo "$as_me:9855: \"$ac_try\"") >&5
9856   (eval $ac_try) 2>&5
9857   ac_status=$?
9858   echo "$as_me:9858: \$? = $ac_status" >&5
9859   (exit $ac_status); }; }; then
9860   cf_cv_mbstate_t=no
9861 else
9862   echo "$as_me: failed program was:" >&5
9863 cat conftest.$ac_ext >&5
9864 cat >conftest.$ac_ext <<_ACEOF
9865 #line 9865 "configure"
9866 #include "confdefs.h"
9867
9868 #include <stdlib.h>
9869 #include <stdarg.h>
9870 #include <stdio.h>
9871 #include <wchar.h>
9872 #ifdef HAVE_LIBUTF8_H
9873 #include <libutf8.h>
9874 #endif
9875 int
9876 main ()
9877 {
9878 mbstate_t value
9879   ;
9880   return 0;
9881 }
9882 _ACEOF
9883 rm -f conftest.$ac_objext
9884 if { (eval echo "$as_me:9884: \"$ac_compile\"") >&5
9885   (eval $ac_compile) 2>&5
9886   ac_status=$?
9887   echo "$as_me:9887: \$? = $ac_status" >&5
9888   (exit $ac_status); } &&
9889          { ac_try='test -s conftest.$ac_objext'
9890   { (eval echo "$as_me:9890: \"$ac_try\"") >&5
9891   (eval $ac_try) 2>&5
9892   ac_status=$?
9893   echo "$as_me:9893: \$? = $ac_status" >&5
9894   (exit $ac_status); }; }; then
9895   cf_cv_mbstate_t=yes
9896 else
9897   echo "$as_me: failed program was:" >&5
9898 cat conftest.$ac_ext >&5
9899 cf_cv_mbstate_t=unknown
9900 fi
9901 rm -f conftest.$ac_objext conftest.$ac_ext
9902 fi
9903 rm -f conftest.$ac_objext conftest.$ac_ext
9904 fi
9905 echo "$as_me:9905: result: $cf_cv_mbstate_t" >&5
9906 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9907
9908 if test "$cf_cv_mbstate_t" = yes ; then
9909
9910 cat >>confdefs.h <<\EOF
9911 #define NEED_WCHAR_H 1
9912 EOF
9913
9914         NEED_WCHAR_H=1
9915 fi
9916
9917 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9918 if test "$cf_cv_mbstate_t" = unknown ; then
9919         NCURSES_MBSTATE_T=1
9920 fi
9921
9922 # This is needed on Tru64 5.0 to declare wchar_t
9923 echo "$as_me:9923: checking if we must include wchar.h to declare wchar_t" >&5
9924 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9925 if test "${cf_cv_wchar_t+set}" = set; then
9926   echo $ECHO_N "(cached) $ECHO_C" >&6
9927 else
9928
9929 cat >conftest.$ac_ext <<_ACEOF
9930 #line 9930 "configure"
9931 #include "confdefs.h"
9932
9933 #include <stdlib.h>
9934 #include <stdarg.h>
9935 #include <stdio.h>
9936 #ifdef HAVE_LIBUTF8_H
9937 #include <libutf8.h>
9938 #endif
9939 int
9940 main ()
9941 {
9942 wchar_t state
9943   ;
9944   return 0;
9945 }
9946 _ACEOF
9947 rm -f conftest.$ac_objext
9948 if { (eval echo "$as_me:9948: \"$ac_compile\"") >&5
9949   (eval $ac_compile) 2>&5
9950   ac_status=$?
9951   echo "$as_me:9951: \$? = $ac_status" >&5
9952   (exit $ac_status); } &&
9953          { ac_try='test -s conftest.$ac_objext'
9954   { (eval echo "$as_me:9954: \"$ac_try\"") >&5
9955   (eval $ac_try) 2>&5
9956   ac_status=$?
9957   echo "$as_me:9957: \$? = $ac_status" >&5
9958   (exit $ac_status); }; }; then
9959   cf_cv_wchar_t=no
9960 else
9961   echo "$as_me: failed program was:" >&5
9962 cat conftest.$ac_ext >&5
9963 cat >conftest.$ac_ext <<_ACEOF
9964 #line 9964 "configure"
9965 #include "confdefs.h"
9966
9967 #include <stdlib.h>
9968 #include <stdarg.h>
9969 #include <stdio.h>
9970 #include <wchar.h>
9971 #ifdef HAVE_LIBUTF8_H
9972 #include <libutf8.h>
9973 #endif
9974 int
9975 main ()
9976 {
9977 wchar_t value
9978   ;
9979   return 0;
9980 }
9981 _ACEOF
9982 rm -f conftest.$ac_objext
9983 if { (eval echo "$as_me:9983: \"$ac_compile\"") >&5
9984   (eval $ac_compile) 2>&5
9985   ac_status=$?
9986   echo "$as_me:9986: \$? = $ac_status" >&5
9987   (exit $ac_status); } &&
9988          { ac_try='test -s conftest.$ac_objext'
9989   { (eval echo "$as_me:9989: \"$ac_try\"") >&5
9990   (eval $ac_try) 2>&5
9991   ac_status=$?
9992   echo "$as_me:9992: \$? = $ac_status" >&5
9993   (exit $ac_status); }; }; then
9994   cf_cv_wchar_t=yes
9995 else
9996   echo "$as_me: failed program was:" >&5
9997 cat conftest.$ac_ext >&5
9998 cf_cv_wchar_t=unknown
9999 fi
10000 rm -f conftest.$ac_objext conftest.$ac_ext
10001 fi
10002 rm -f conftest.$ac_objext conftest.$ac_ext
10003 fi
10004 echo "$as_me:10004: result: $cf_cv_wchar_t" >&5
10005 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10006
10007 if test "$cf_cv_wchar_t" = yes ; then
10008
10009 cat >>confdefs.h <<\EOF
10010 #define NEED_WCHAR_H 1
10011 EOF
10012
10013         NEED_WCHAR_H=1
10014 fi
10015
10016 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10017 if test "$cf_cv_wchar_t" = unknown ; then
10018         NCURSES_WCHAR_T=1
10019 fi
10020
10021 # if we find wchar_t in either place, use substitution to provide a fallback.
10022 if test "$cf_cv_wchar_t" != unknown ; then
10023         NCURSES_OK_WCHAR_T=1
10024 fi
10025
10026 # This is needed on Tru64 5.0 to declare wint_t
10027 echo "$as_me:10027: checking if we must include wchar.h to declare wint_t" >&5
10028 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10029 if test "${cf_cv_wint_t+set}" = set; then
10030   echo $ECHO_N "(cached) $ECHO_C" >&6
10031 else
10032
10033 cat >conftest.$ac_ext <<_ACEOF
10034 #line 10034 "configure"
10035 #include "confdefs.h"
10036
10037 #include <stdlib.h>
10038 #include <stdarg.h>
10039 #include <stdio.h>
10040 #ifdef HAVE_LIBUTF8_H
10041 #include <libutf8.h>
10042 #endif
10043 int
10044 main ()
10045 {
10046 wint_t state
10047   ;
10048   return 0;
10049 }
10050 _ACEOF
10051 rm -f conftest.$ac_objext
10052 if { (eval echo "$as_me:10052: \"$ac_compile\"") >&5
10053   (eval $ac_compile) 2>&5
10054   ac_status=$?
10055   echo "$as_me:10055: \$? = $ac_status" >&5
10056   (exit $ac_status); } &&
10057          { ac_try='test -s conftest.$ac_objext'
10058   { (eval echo "$as_me:10058: \"$ac_try\"") >&5
10059   (eval $ac_try) 2>&5
10060   ac_status=$?
10061   echo "$as_me:10061: \$? = $ac_status" >&5
10062   (exit $ac_status); }; }; then
10063   cf_cv_wint_t=no
10064 else
10065   echo "$as_me: failed program was:" >&5
10066 cat conftest.$ac_ext >&5
10067 cat >conftest.$ac_ext <<_ACEOF
10068 #line 10068 "configure"
10069 #include "confdefs.h"
10070
10071 #include <stdlib.h>
10072 #include <stdarg.h>
10073 #include <stdio.h>
10074 #include <wchar.h>
10075 #ifdef HAVE_LIBUTF8_H
10076 #include <libutf8.h>
10077 #endif
10078 int
10079 main ()
10080 {
10081 wint_t value
10082   ;
10083   return 0;
10084 }
10085 _ACEOF
10086 rm -f conftest.$ac_objext
10087 if { (eval echo "$as_me:10087: \"$ac_compile\"") >&5
10088   (eval $ac_compile) 2>&5
10089   ac_status=$?
10090   echo "$as_me:10090: \$? = $ac_status" >&5
10091   (exit $ac_status); } &&
10092          { ac_try='test -s conftest.$ac_objext'
10093   { (eval echo "$as_me:10093: \"$ac_try\"") >&5
10094   (eval $ac_try) 2>&5
10095   ac_status=$?
10096   echo "$as_me:10096: \$? = $ac_status" >&5
10097   (exit $ac_status); }; }; then
10098   cf_cv_wint_t=yes
10099 else
10100   echo "$as_me: failed program was:" >&5
10101 cat conftest.$ac_ext >&5
10102 cf_cv_wint_t=unknown
10103 fi
10104 rm -f conftest.$ac_objext conftest.$ac_ext
10105 fi
10106 rm -f conftest.$ac_objext conftest.$ac_ext
10107 fi
10108 echo "$as_me:10108: result: $cf_cv_wint_t" >&5
10109 echo "${ECHO_T}$cf_cv_wint_t" >&6
10110
10111 if test "$cf_cv_wint_t" = yes ; then
10112
10113 cat >>confdefs.h <<\EOF
10114 #define NEED_WCHAR_H 1
10115 EOF
10116
10117         NEED_WCHAR_H=1
10118 fi
10119
10120 # if we do not find wint_t in either place, use substitution to provide a fallback.
10121 if test "$cf_cv_wint_t" = unknown ; then
10122         NCURSES_WINT_T=1
10123 fi
10124
10125 # if we find wint_t in either place, use substitution to provide a fallback.
10126 if test "$cf_cv_wint_t" != unknown ; then
10127         NCURSES_OK_WINT_T=1
10128 fi
10129
10130         if test "$NCURSES_MBSTATE_T" != 0; then
10131
10132 cat >>confdefs.h <<\EOF
10133 #define NEED_MBSTATE_T_DEF 1
10134 EOF
10135
10136         fi
10137 fi
10138
10139 ###   use option --disable-lp64 to allow long chtype
10140 case $cf_cv_abi_version in
10141 [345]*)
10142         default_with_lp64=no
10143         ;;
10144 *)
10145         default_with_lp64=yes
10146         ;;
10147 esac
10148
10149 echo "$as_me:10149: checking whether to enable _LP64 definition in curses.h" >&5
10150 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10151
10152 # Check whether --enable-lp64 or --disable-lp64 was given.
10153 if test "${enable_lp64+set}" = set; then
10154   enableval="$enable_lp64"
10155   with_lp64=$enableval
10156 else
10157   with_lp64=$default_with_lp64
10158 fi;
10159 echo "$as_me:10159: result: $with_lp64" >&5
10160 echo "${ECHO_T}$with_lp64" >&6
10161
10162 if test "x$with_lp64" = xyes ; then
10163         cf_cv_enable_lp64=1
10164 else
10165         cf_cv_enable_lp64=0
10166 fi
10167
10168 # Check whether --enable-largefile or --disable-largefile was given.
10169 if test "${enable_largefile+set}" = set; then
10170   enableval="$enable_largefile"
10171
10172 fi;
10173 if test "$enable_largefile" != no; then
10174
10175   echo "$as_me:10175: checking for special C compiler options needed for large files" >&5
10176 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10177 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10178   echo $ECHO_N "(cached) $ECHO_C" >&6
10179 else
10180   ac_cv_sys_largefile_CC=no
10181      if test "$GCC" != yes; then
10182        ac_save_CC=$CC
10183        while :; do
10184          # IRIX 6.2 and later do not support large files by default,
10185          # so use the C compiler's -n32 option if that helps.
10186          cat >conftest.$ac_ext <<_ACEOF
10187 #line 10187 "configure"
10188 #include "confdefs.h"
10189 #include <sys/types.h>
10190  /* Check that off_t can represent 2**63 - 1 correctly.
10191     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10192     since some C++ compilers masquerading as C compilers
10193     incorrectly reject 9223372036854775807.  */
10194 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10195   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10196                        && LARGE_OFF_T % 2147483647 == 1)
10197                       ? 1 : -1];
10198 int
10199 main ()
10200 {
10201
10202   ;
10203   return 0;
10204 }
10205 _ACEOF
10206          rm -f conftest.$ac_objext
10207 if { (eval echo "$as_me:10207: \"$ac_compile\"") >&5
10208   (eval $ac_compile) 2>&5
10209   ac_status=$?
10210   echo "$as_me:10210: \$? = $ac_status" >&5
10211   (exit $ac_status); } &&
10212          { ac_try='test -s conftest.$ac_objext'
10213   { (eval echo "$as_me:10213: \"$ac_try\"") >&5
10214   (eval $ac_try) 2>&5
10215   ac_status=$?
10216   echo "$as_me:10216: \$? = $ac_status" >&5
10217   (exit $ac_status); }; }; then
10218   break
10219 else
10220   echo "$as_me: failed program was:" >&5
10221 cat conftest.$ac_ext >&5
10222 fi
10223 rm -f conftest.$ac_objext
10224          CC="$CC -n32"
10225          rm -f conftest.$ac_objext
10226 if { (eval echo "$as_me:10226: \"$ac_compile\"") >&5
10227   (eval $ac_compile) 2>&5
10228   ac_status=$?
10229   echo "$as_me:10229: \$? = $ac_status" >&5
10230   (exit $ac_status); } &&
10231          { ac_try='test -s conftest.$ac_objext'
10232   { (eval echo "$as_me:10232: \"$ac_try\"") >&5
10233   (eval $ac_try) 2>&5
10234   ac_status=$?
10235   echo "$as_me:10235: \$? = $ac_status" >&5
10236   (exit $ac_status); }; }; then
10237   ac_cv_sys_largefile_CC=' -n32'; break
10238 else
10239   echo "$as_me: failed program was:" >&5
10240 cat conftest.$ac_ext >&5
10241 fi
10242 rm -f conftest.$ac_objext
10243          break
10244        done
10245        CC=$ac_save_CC
10246        rm -f conftest.$ac_ext
10247     fi
10248 fi
10249 echo "$as_me:10249: result: $ac_cv_sys_largefile_CC" >&5
10250 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10251   if test "$ac_cv_sys_largefile_CC" != no; then
10252     CC=$CC$ac_cv_sys_largefile_CC
10253   fi
10254
10255   echo "$as_me:10255: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10256 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10257 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10258   echo $ECHO_N "(cached) $ECHO_C" >&6
10259 else
10260   while :; do
10261   ac_cv_sys_file_offset_bits=no
10262   cat >conftest.$ac_ext <<_ACEOF
10263 #line 10263 "configure"
10264 #include "confdefs.h"
10265 #include <sys/types.h>
10266  /* Check that off_t can represent 2**63 - 1 correctly.
10267     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10268     since some C++ compilers masquerading as C compilers
10269     incorrectly reject 9223372036854775807.  */
10270 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10271   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10272                        && LARGE_OFF_T % 2147483647 == 1)
10273                       ? 1 : -1];
10274 int
10275 main ()
10276 {
10277
10278   ;
10279   return 0;
10280 }
10281 _ACEOF
10282 rm -f conftest.$ac_objext
10283 if { (eval echo "$as_me:10283: \"$ac_compile\"") >&5
10284   (eval $ac_compile) 2>&5
10285   ac_status=$?
10286   echo "$as_me:10286: \$? = $ac_status" >&5
10287   (exit $ac_status); } &&
10288          { ac_try='test -s conftest.$ac_objext'
10289   { (eval echo "$as_me:10289: \"$ac_try\"") >&5
10290   (eval $ac_try) 2>&5
10291   ac_status=$?
10292   echo "$as_me:10292: \$? = $ac_status" >&5
10293   (exit $ac_status); }; }; then
10294   break
10295 else
10296   echo "$as_me: failed program was:" >&5
10297 cat conftest.$ac_ext >&5
10298 fi
10299 rm -f conftest.$ac_objext conftest.$ac_ext
10300   cat >conftest.$ac_ext <<_ACEOF
10301 #line 10301 "configure"
10302 #include "confdefs.h"
10303 #define _FILE_OFFSET_BITS 64
10304 #include <sys/types.h>
10305  /* Check that off_t can represent 2**63 - 1 correctly.
10306     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10307     since some C++ compilers masquerading as C compilers
10308     incorrectly reject 9223372036854775807.  */
10309 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10310   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10311                        && LARGE_OFF_T % 2147483647 == 1)
10312                       ? 1 : -1];
10313 int
10314 main ()
10315 {
10316
10317   ;
10318   return 0;
10319 }
10320 _ACEOF
10321 rm -f conftest.$ac_objext
10322 if { (eval echo "$as_me:10322: \"$ac_compile\"") >&5
10323   (eval $ac_compile) 2>&5
10324   ac_status=$?
10325   echo "$as_me:10325: \$? = $ac_status" >&5
10326   (exit $ac_status); } &&
10327          { ac_try='test -s conftest.$ac_objext'
10328   { (eval echo "$as_me:10328: \"$ac_try\"") >&5
10329   (eval $ac_try) 2>&5
10330   ac_status=$?
10331   echo "$as_me:10331: \$? = $ac_status" >&5
10332   (exit $ac_status); }; }; then
10333   ac_cv_sys_file_offset_bits=64; break
10334 else
10335   echo "$as_me: failed program was:" >&5
10336 cat conftest.$ac_ext >&5
10337 fi
10338 rm -f conftest.$ac_objext conftest.$ac_ext
10339   break
10340 done
10341 fi
10342 echo "$as_me:10342: result: $ac_cv_sys_file_offset_bits" >&5
10343 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10344 if test "$ac_cv_sys_file_offset_bits" != no; then
10345
10346 cat >>confdefs.h <<EOF
10347 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10348 EOF
10349
10350 fi
10351 rm -rf conftest*
10352   echo "$as_me:10352: checking for _LARGE_FILES value needed for large files" >&5
10353 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10354 if test "${ac_cv_sys_large_files+set}" = set; then
10355   echo $ECHO_N "(cached) $ECHO_C" >&6
10356 else
10357   while :; do
10358   ac_cv_sys_large_files=no
10359   cat >conftest.$ac_ext <<_ACEOF
10360 #line 10360 "configure"
10361 #include "confdefs.h"
10362 #include <sys/types.h>
10363  /* Check that off_t can represent 2**63 - 1 correctly.
10364     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10365     since some C++ compilers masquerading as C compilers
10366     incorrectly reject 9223372036854775807.  */
10367 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10368   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10369                        && LARGE_OFF_T % 2147483647 == 1)
10370                       ? 1 : -1];
10371 int
10372 main ()
10373 {
10374
10375   ;
10376   return 0;
10377 }
10378 _ACEOF
10379 rm -f conftest.$ac_objext
10380 if { (eval echo "$as_me:10380: \"$ac_compile\"") >&5
10381   (eval $ac_compile) 2>&5
10382   ac_status=$?
10383   echo "$as_me:10383: \$? = $ac_status" >&5
10384   (exit $ac_status); } &&
10385          { ac_try='test -s conftest.$ac_objext'
10386   { (eval echo "$as_me:10386: \"$ac_try\"") >&5
10387   (eval $ac_try) 2>&5
10388   ac_status=$?
10389   echo "$as_me:10389: \$? = $ac_status" >&5
10390   (exit $ac_status); }; }; then
10391   break
10392 else
10393   echo "$as_me: failed program was:" >&5
10394 cat conftest.$ac_ext >&5
10395 fi
10396 rm -f conftest.$ac_objext conftest.$ac_ext
10397   cat >conftest.$ac_ext <<_ACEOF
10398 #line 10398 "configure"
10399 #include "confdefs.h"
10400 #define _LARGE_FILES 1
10401 #include <sys/types.h>
10402  /* Check that off_t can represent 2**63 - 1 correctly.
10403     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10404     since some C++ compilers masquerading as C compilers
10405     incorrectly reject 9223372036854775807.  */
10406 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10407   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10408                        && LARGE_OFF_T % 2147483647 == 1)
10409                       ? 1 : -1];
10410 int
10411 main ()
10412 {
10413
10414   ;
10415   return 0;
10416 }
10417 _ACEOF
10418 rm -f conftest.$ac_objext
10419 if { (eval echo "$as_me:10419: \"$ac_compile\"") >&5
10420   (eval $ac_compile) 2>&5
10421   ac_status=$?
10422   echo "$as_me:10422: \$? = $ac_status" >&5
10423   (exit $ac_status); } &&
10424          { ac_try='test -s conftest.$ac_objext'
10425   { (eval echo "$as_me:10425: \"$ac_try\"") >&5
10426   (eval $ac_try) 2>&5
10427   ac_status=$?
10428   echo "$as_me:10428: \$? = $ac_status" >&5
10429   (exit $ac_status); }; }; then
10430   ac_cv_sys_large_files=1; break
10431 else
10432   echo "$as_me: failed program was:" >&5
10433 cat conftest.$ac_ext >&5
10434 fi
10435 rm -f conftest.$ac_objext conftest.$ac_ext
10436   break
10437 done
10438 fi
10439 echo "$as_me:10439: result: $ac_cv_sys_large_files" >&5
10440 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10441 if test "$ac_cv_sys_large_files" != no; then
10442
10443 cat >>confdefs.h <<EOF
10444 #define _LARGE_FILES $ac_cv_sys_large_files
10445 EOF
10446
10447 fi
10448 rm -rf conftest*
10449 fi
10450
10451     if test "$enable_largefile" != no ; then
10452         echo "$as_me:10452: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10453 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10454 if test "${ac_cv_sys_largefile_source+set}" = set; then
10455   echo $ECHO_N "(cached) $ECHO_C" >&6
10456 else
10457   while :; do
10458   ac_cv_sys_largefile_source=no
10459   cat >conftest.$ac_ext <<_ACEOF
10460 #line 10460 "configure"
10461 #include "confdefs.h"
10462 #include <stdio.h>
10463 int
10464 main ()
10465 {
10466 return !fseeko;
10467   ;
10468   return 0;
10469 }
10470 _ACEOF
10471 rm -f conftest.$ac_objext
10472 if { (eval echo "$as_me:10472: \"$ac_compile\"") >&5
10473   (eval $ac_compile) 2>&5
10474   ac_status=$?
10475   echo "$as_me:10475: \$? = $ac_status" >&5
10476   (exit $ac_status); } &&
10477          { ac_try='test -s conftest.$ac_objext'
10478   { (eval echo "$as_me:10478: \"$ac_try\"") >&5
10479   (eval $ac_try) 2>&5
10480   ac_status=$?
10481   echo "$as_me:10481: \$? = $ac_status" >&5
10482   (exit $ac_status); }; }; then
10483   break
10484 else
10485   echo "$as_me: failed program was:" >&5
10486 cat conftest.$ac_ext >&5
10487 fi
10488 rm -f conftest.$ac_objext conftest.$ac_ext
10489   cat >conftest.$ac_ext <<_ACEOF
10490 #line 10490 "configure"
10491 #include "confdefs.h"
10492 #define _LARGEFILE_SOURCE 1
10493 #include <stdio.h>
10494 int
10495 main ()
10496 {
10497 return !fseeko;
10498   ;
10499   return 0;
10500 }
10501 _ACEOF
10502 rm -f conftest.$ac_objext
10503 if { (eval echo "$as_me:10503: \"$ac_compile\"") >&5
10504   (eval $ac_compile) 2>&5
10505   ac_status=$?
10506   echo "$as_me:10506: \$? = $ac_status" >&5
10507   (exit $ac_status); } &&
10508          { ac_try='test -s conftest.$ac_objext'
10509   { (eval echo "$as_me:10509: \"$ac_try\"") >&5
10510   (eval $ac_try) 2>&5
10511   ac_status=$?
10512   echo "$as_me:10512: \$? = $ac_status" >&5
10513   (exit $ac_status); }; }; then
10514   ac_cv_sys_largefile_source=1; break
10515 else
10516   echo "$as_me: failed program was:" >&5
10517 cat conftest.$ac_ext >&5
10518 fi
10519 rm -f conftest.$ac_objext conftest.$ac_ext
10520   break
10521 done
10522 fi
10523 echo "$as_me:10523: result: $ac_cv_sys_largefile_source" >&5
10524 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10525 if test "$ac_cv_sys_largefile_source" != no; then
10526
10527 cat >>confdefs.h <<EOF
10528 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10529 EOF
10530
10531 fi
10532 rm -rf conftest*
10533
10534 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10535 # in glibc 2.1.3, but that breaks too many other things.
10536 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10537 echo "$as_me:10537: checking for fseeko" >&5
10538 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10539 if test "${ac_cv_func_fseeko+set}" = set; then
10540   echo $ECHO_N "(cached) $ECHO_C" >&6
10541 else
10542   cat >conftest.$ac_ext <<_ACEOF
10543 #line 10543 "configure"
10544 #include "confdefs.h"
10545 #include <stdio.h>
10546 int
10547 main ()
10548 {
10549 return fseeko && fseeko (stdin, 0, 0);
10550   ;
10551   return 0;
10552 }
10553 _ACEOF
10554 rm -f conftest.$ac_objext conftest$ac_exeext
10555 if { (eval echo "$as_me:10555: \"$ac_link\"") >&5
10556   (eval $ac_link) 2>&5
10557   ac_status=$?
10558   echo "$as_me:10558: \$? = $ac_status" >&5
10559   (exit $ac_status); } &&
10560          { ac_try='test -s conftest$ac_exeext'
10561   { (eval echo "$as_me:10561: \"$ac_try\"") >&5
10562   (eval $ac_try) 2>&5
10563   ac_status=$?
10564   echo "$as_me:10564: \$? = $ac_status" >&5
10565   (exit $ac_status); }; }; then
10566   ac_cv_func_fseeko=yes
10567 else
10568   echo "$as_me: failed program was:" >&5
10569 cat conftest.$ac_ext >&5
10570 ac_cv_func_fseeko=no
10571 fi
10572 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10573 fi
10574 echo "$as_me:10574: result: $ac_cv_func_fseeko" >&5
10575 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10576 if test $ac_cv_func_fseeko = yes; then
10577
10578 cat >>confdefs.h <<\EOF
10579 #define HAVE_FSEEKO 1
10580 EOF
10581
10582 fi
10583
10584         # Normally we would collect these definitions in the config.h,
10585         # but (like _XOPEN_SOURCE), some environments rely on having these
10586         # defined before any of the system headers are included.  Another
10587         # case comes up with C++, e.g., on AIX the compiler compiles the
10588         # header files by themselves before looking at the body files it is
10589         # told to compile.  For ncurses, those header files do not include
10590         # the config.h
10591         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10592         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10593         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10594
10595         echo "$as_me:10595: checking whether to use struct dirent64" >&5
10596 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10597 if test "${cf_cv_struct_dirent64+set}" = set; then
10598   echo $ECHO_N "(cached) $ECHO_C" >&6
10599 else
10600
10601                 cat >conftest.$ac_ext <<_ACEOF
10602 #line 10602 "configure"
10603 #include "confdefs.h"
10604
10605 #include <sys/types.h>
10606 #include <dirent.h>
10607
10608 int
10609 main ()
10610 {
10611
10612                 /* if transitional largefile support is setup, this is true */
10613                 extern struct dirent64 * readdir(DIR *);
10614                 struct dirent64 *x = readdir((DIR *)0);
10615                 struct dirent *y = readdir((DIR *)0);
10616                 int z = x - y;
10617
10618   ;
10619   return 0;
10620 }
10621 _ACEOF
10622 rm -f conftest.$ac_objext
10623 if { (eval echo "$as_me:10623: \"$ac_compile\"") >&5
10624   (eval $ac_compile) 2>&5
10625   ac_status=$?
10626   echo "$as_me:10626: \$? = $ac_status" >&5
10627   (exit $ac_status); } &&
10628          { ac_try='test -s conftest.$ac_objext'
10629   { (eval echo "$as_me:10629: \"$ac_try\"") >&5
10630   (eval $ac_try) 2>&5
10631   ac_status=$?
10632   echo "$as_me:10632: \$? = $ac_status" >&5
10633   (exit $ac_status); }; }; then
10634   cf_cv_struct_dirent64=yes
10635 else
10636   echo "$as_me: failed program was:" >&5
10637 cat conftest.$ac_ext >&5
10638 cf_cv_struct_dirent64=no
10639 fi
10640 rm -f conftest.$ac_objext conftest.$ac_ext
10641
10642 fi
10643 echo "$as_me:10643: result: $cf_cv_struct_dirent64" >&5
10644 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10645         test "$cf_cv_struct_dirent64" = yes &&
10646 cat >>confdefs.h <<\EOF
10647 #define HAVE_STRUCT_DIRENT64 1
10648 EOF
10649
10650     fi
10651
10652 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10653 echo "$as_me:10653: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10654 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10655
10656 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10657 if test "${enable_tparm_varargs+set}" = set; then
10658   enableval="$enable_tparm_varargs"
10659   with_tparm_varargs=$enableval
10660 else
10661   with_tparm_varargs=yes
10662 fi;
10663 echo "$as_me:10663: result: $with_tparm_varargs" >&5
10664 echo "${ECHO_T}$with_tparm_varargs" >&6
10665 NCURSES_TPARM_VARARGS=0
10666 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10667
10668 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10669 if test "$with_ticlib" != no ; then
10670 echo "$as_me:10670: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10671 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10672
10673 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10674 if test "${enable_tic_depends+set}" = set; then
10675   enableval="$enable_tic_depends"
10676   with_tic_depends=$enableval
10677 else
10678   with_tic_depends=yes
10679 fi;
10680 echo "$as_me:10680: result: $with_tic_depends" >&5
10681 echo "${ECHO_T}$with_tic_depends" >&6
10682 else
10683         with_tic_depends=no
10684 fi
10685
10686 ###   use option --with-bool to override bool's type
10687 echo "$as_me:10687: checking for type of bool" >&5
10688 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10689
10690 # Check whether --with-bool or --without-bool was given.
10691 if test "${with_bool+set}" = set; then
10692   withval="$with_bool"
10693   NCURSES_BOOL="$withval"
10694 else
10695   NCURSES_BOOL=auto
10696 fi;
10697 echo "$as_me:10697: result: $NCURSES_BOOL" >&5
10698 echo "${ECHO_T}$NCURSES_BOOL" >&6
10699
10700 echo "$as_me:10700: checking for alternate terminal capabilities file" >&5
10701 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10702
10703 # Check whether --with-caps or --without-caps was given.
10704 if test "${with_caps+set}" = set; then
10705   withval="$with_caps"
10706   TERMINFO_CAPS=Caps.$withval
10707 else
10708   TERMINFO_CAPS=Caps
10709 fi;
10710 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10711 echo "$as_me:10711: result: $TERMINFO_CAPS" >&5
10712 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10713
10714 ###   use option --with-chtype to override chtype's type
10715 echo "$as_me:10715: checking for type of chtype" >&5
10716 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10717
10718 # Check whether --with-chtype or --without-chtype was given.
10719 if test "${with_chtype+set}" = set; then
10720   withval="$with_chtype"
10721   NCURSES_CHTYPE="$withval"
10722 else
10723   NCURSES_CHTYPE=auto
10724 fi;
10725 echo "$as_me:10725: result: $NCURSES_CHTYPE" >&5
10726 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10727
10728 ###   use option --with-ospeed to override ospeed's type
10729 echo "$as_me:10729: checking for type of ospeed" >&5
10730 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10731
10732 # Check whether --with-ospeed or --without-ospeed was given.
10733 if test "${with_ospeed+set}" = set; then
10734   withval="$with_ospeed"
10735   NCURSES_OSPEED="$withval"
10736 else
10737   NCURSES_OSPEED=short
10738 fi;
10739 echo "$as_me:10739: result: $NCURSES_OSPEED" >&5
10740 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10741
10742 ###   use option --with-mmask-t to override mmask_t's type
10743 echo "$as_me:10743: checking for type of mmask_t" >&5
10744 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10745
10746 # Check whether --with-mmask-t or --without-mmask-t was given.
10747 if test "${with_mmask_t+set}" = set; then
10748   withval="$with_mmask_t"
10749   NCURSES_MMASK_T="$withval"
10750 else
10751   NCURSES_MMASK_T=auto
10752 fi;
10753 echo "$as_me:10753: result: $NCURSES_MMASK_T" >&5
10754 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10755
10756 ###   use option --with-ccharw-max to override CCHARW_MAX size
10757 echo "$as_me:10757: checking for size CCHARW_MAX" >&5
10758 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10759
10760 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10761 if test "${with_ccharw_max+set}" = set; then
10762   withval="$with_ccharw_max"
10763   NCURSES_CCHARW_MAX="$withval"
10764 else
10765   NCURSES_CCHARW_MAX=5
10766 fi;
10767 echo "$as_me:10767: result: $NCURSES_CCHARW_MAX" >&5
10768 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10769
10770 ###   use option --with-tparm-arg to override tparm's argument type
10771 echo "$as_me:10771: checking for type of tparm args" >&5
10772 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10773
10774 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10775 if test "${with_tparm_arg+set}" = set; then
10776   withval="$with_tparm_arg"
10777   NCURSES_TPARM_ARG="$withval"
10778 else
10779   NCURSES_TPARM_ARG=long
10780 fi;
10781 echo "$as_me:10781: result: $NCURSES_TPARM_ARG" >&5
10782 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10783
10784 ### Enable compiling-in rcs id's
10785 echo "$as_me:10785: checking if RCS identifiers should be compiled-in" >&5
10786 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10787
10788 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10789 if test "${with_rcs_ids+set}" = set; then
10790   withval="$with_rcs_ids"
10791   with_rcs_ids=$withval
10792 else
10793   with_rcs_ids=no
10794 fi;
10795 echo "$as_me:10795: result: $with_rcs_ids" >&5
10796 echo "${ECHO_T}$with_rcs_ids" >&6
10797 test "x$with_rcs_ids" = xyes &&
10798 cat >>confdefs.h <<\EOF
10799 #define USE_RCS_IDS 1
10800 EOF
10801
10802 ###############################################################################
10803
10804 echo "$as_me:10804: checking format of man-pages" >&5
10805 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10806
10807 # Check whether --with-manpage-format or --without-manpage-format was given.
10808 if test "${with_manpage_format+set}" = set; then
10809   withval="$with_manpage_format"
10810   MANPAGE_FORMAT=$withval
10811 else
10812   MANPAGE_FORMAT=unknown
10813 fi;
10814
10815 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10816 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10817
10818 cf_unknown=
10819
10820 case $MANPAGE_FORMAT in
10821 unknown)
10822   if test -z "$MANPATH" ; then
10823     MANPATH="/usr/man:/usr/share/man"
10824   fi
10825
10826   # look for the 'date' man-page (it's most likely to be installed!)
10827   MANPAGE_FORMAT=
10828   cf_preform=no
10829   cf_catonly=yes
10830   cf_example=date
10831
10832   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10833   for cf_dir in $MANPATH; do
10834     test -z "$cf_dir" && cf_dir=/usr/man
10835     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
10836     do
10837       cf_test=`echo $cf_name | sed -e 's/*//'`
10838       if test "x$cf_test" = "x$cf_name" ; then
10839
10840         case "$cf_name" in
10841         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10842         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10843         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10844         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10845         esac
10846
10847         case "$cf_name" in
10848         $cf_dir/man*)
10849           cf_catonly=no
10850           ;;
10851         $cf_dir/cat*)
10852           cf_preform=yes
10853           ;;
10854         esac
10855         break
10856       fi
10857
10858       # if we found a match in either man* or cat*, stop looking
10859       if test -n "$MANPAGE_FORMAT" ; then
10860         cf_found=no
10861         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10862         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10863         case "$cf_name" in
10864         $cf_dir/cat*)
10865           cf_found=yes
10866           ;;
10867         esac
10868         test $cf_found=yes && break
10869       fi
10870     done
10871     # only check the first directory in $MANPATH where we find manpages
10872     if test -n "$MANPAGE_FORMAT" ; then
10873        break
10874     fi
10875   done
10876   # if we did not find the example, just assume it is normal
10877   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10878   IFS="$ac_save_ifs"
10879   ;;
10880 *)
10881   for cf_option in $MANPAGE_FORMAT; do
10882      case $cf_option in #(vi
10883      gzip|compress|BSDI|normal|formatted|catonly)
10884        ;;
10885      *)
10886        cf_unknown="$cf_unknown $cf_option"
10887        ;;
10888      esac
10889   done
10890   ;;
10891 esac
10892
10893 echo "$as_me:10893: result: $MANPAGE_FORMAT" >&5
10894 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10895 if test -n "$cf_unknown" ; then
10896   { echo "$as_me:10896: WARNING: Unexpected manpage-format $cf_unknown" >&5
10897 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10898 fi
10899
10900 echo "$as_me:10900: checking for manpage renaming" >&5
10901 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10902
10903 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10904 if test "${with_manpage_renames+set}" = set; then
10905   withval="$with_manpage_renames"
10906   MANPAGE_RENAMES=$withval
10907 else
10908   MANPAGE_RENAMES=yes
10909 fi;
10910
10911 case ".$MANPAGE_RENAMES" in #(vi
10912 .no) #(vi
10913   ;;
10914 .|.yes)
10915   # Debian 'man' program?
10916   if test -f /etc/debian_version ; then
10917     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10918   else
10919     MANPAGE_RENAMES=no
10920   fi
10921   ;;
10922 esac
10923
10924 if test "$MANPAGE_RENAMES" != no ; then
10925   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10926     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10927   elif test ! -f $MANPAGE_RENAMES ; then
10928     { { echo "$as_me:10928: error: not a filename: $MANPAGE_RENAMES" >&5
10929 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10930    { (exit 1); exit 1; }; }
10931   fi
10932
10933   test ! -d man && mkdir man
10934
10935   # Construct a sed-script to perform renaming within man-pages
10936   if test -n "$MANPAGE_RENAMES" ; then
10937     test ! -d man && mkdir man
10938     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10939   fi
10940 fi
10941
10942 echo "$as_me:10942: result: $MANPAGE_RENAMES" >&5
10943 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10944
10945 echo "$as_me:10945: checking if manpage aliases will be installed" >&5
10946 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10947
10948 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10949 if test "${with_manpage_aliases+set}" = set; then
10950   withval="$with_manpage_aliases"
10951   MANPAGE_ALIASES=$withval
10952 else
10953   MANPAGE_ALIASES=yes
10954 fi;
10955
10956 echo "$as_me:10956: result: $MANPAGE_ALIASES" >&5
10957 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10958
10959 case "x$LN_S" in #(vi
10960 xln*) #(vi
10961         cf_use_symlinks=yes
10962         ;;
10963 *)
10964         cf_use_symlinks=no
10965         ;;
10966 esac
10967
10968 MANPAGE_SYMLINKS=no
10969 if test "$MANPAGE_ALIASES" = yes ; then
10970 echo "$as_me:10970: checking if manpage symlinks should be used" >&5
10971 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10972
10973 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10974 if test "${with_manpage_symlinks+set}" = set; then
10975   withval="$with_manpage_symlinks"
10976   MANPAGE_SYMLINKS=$withval
10977 else
10978   MANPAGE_SYMLINKS=$cf_use_symlinks
10979 fi;
10980
10981 if test "$$cf_use_symlinks" = no; then
10982 if test "$MANPAGE_SYMLINKS" = yes ; then
10983         { echo "$as_me:10983: WARNING: cannot make symlinks" >&5
10984 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10985         MANPAGE_SYMLINKS=no
10986 fi
10987 fi
10988
10989 echo "$as_me:10989: result: $MANPAGE_SYMLINKS" >&5
10990 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10991 fi
10992
10993 echo "$as_me:10993: checking for manpage tbl" >&5
10994 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10995
10996 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10997 if test "${with_manpage_tbl+set}" = set; then
10998   withval="$with_manpage_tbl"
10999   MANPAGE_TBL=$withval
11000 else
11001   MANPAGE_TBL=no
11002 fi;
11003
11004 echo "$as_me:11004: result: $MANPAGE_TBL" >&5
11005 echo "${ECHO_T}$MANPAGE_TBL" >&6
11006
11007   if test "$prefix" = "NONE" ; then
11008      cf_prefix="$ac_default_prefix"
11009   else
11010      cf_prefix="$prefix"
11011   fi
11012
11013   case "$MANPAGE_FORMAT" in # (vi
11014   *catonly*) # (vi
11015     cf_format=yes
11016     cf_inboth=no
11017     ;;
11018   *formatted*) # (vi
11019     cf_format=yes
11020     cf_inboth=yes
11021     ;;
11022   *)
11023     cf_format=no
11024     cf_inboth=no
11025     ;;
11026   esac
11027
11028 test ! -d man && mkdir man
11029
11030 cf_so_strip=
11031 cf_compress=
11032 case "$MANPAGE_FORMAT" in #(vi
11033 *compress*) #(vi
11034         cf_so_strip="Z"
11035         cf_compress=compress
11036   ;;
11037 *gzip*)
11038         cf_so_strip="gz"
11039         cf_compress=gzip
11040   ;;
11041 esac
11042
11043 cf_edit_man=./edit_man.sh
11044 cf_man_alias=`pwd`/man_alias.sed
11045
11046 cat >$cf_edit_man <<CF_EOF
11047 #! /bin/sh
11048 # this script is generated by the configure-script CF_MAN_PAGES macro.
11049
11050 prefix="$cf_prefix"
11051 datarootdir="$datarootdir"
11052 datadir="$datadir"
11053
11054 NCURSES_MAJOR="$NCURSES_MAJOR"
11055 NCURSES_MINOR="$NCURSES_MINOR"
11056 NCURSES_PATCH="$NCURSES_PATCH"
11057
11058 NCURSES_OSPEED="$NCURSES_OSPEED"
11059 TERMINFO="$TERMINFO"
11060
11061 INSTALL="$INSTALL"
11062 INSTALL_DATA="$INSTALL_DATA"
11063
11064 transform="$program_transform_name"
11065
11066 TMP=\${TMPDIR:=/tmp}/man\$\$
11067 trap "rm -f \$TMP" 0 1 2 5 15
11068
11069 form=\$1
11070 shift || exit 1
11071
11072 verb=\$1
11073 shift || exit 1
11074
11075 mandir=\$1
11076 shift || exit 1
11077
11078 srcdir=\$1
11079 top_srcdir=\$srcdir/..
11080 shift || exit 1
11081
11082 if test "\$form" = normal ; then
11083         if test "$cf_format" = yes ; then
11084         if test "$cf_inboth" = no ; then
11085                 sh \$0 format \$verb \$mandir \$srcdir \$*
11086                 exit $?
11087         fi
11088         fi
11089         cf_subdir=\$mandir/man
11090         cf_tables=$MANPAGE_TBL
11091 else
11092         cf_subdir=\$mandir/cat
11093         cf_tables=yes
11094 fi
11095
11096 # process the list of source-files
11097 for i in \$* ; do
11098 case \$i in #(vi
11099 *.orig|*.rej) ;; #(vi
11100 *.[0-9]*)
11101         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11102         if test \$verb = installing ; then
11103         if test ! -d \$cf_subdir\${section} ; then
11104                 mkdir -p \$cf_subdir\$section
11105         fi
11106         fi
11107
11108         # replace variables in man page
11109         if test ! -f $cf_man_alias ; then
11110 cat >>$cf_man_alias <<-CF_EOF2
11111                 s,@DATADIR@,\$datadir,g
11112                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11113                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11114                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11115                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11116                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11117                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11118 CF_EOF
11119
11120         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
11121         do
11122                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11123                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11124 cat >>$cf_edit_man <<-CF_EOF
11125                 s,@$cf_NAME@,$cf_name,g
11126 CF_EOF
11127         done
11128
11129 cat >>$cf_edit_man <<CF_EOF
11130 CF_EOF2
11131                 echo "...made $cf_man_alias"
11132         fi
11133
11134         aliases=
11135         cf_source=\`basename \$i\`
11136         inalias=\$cf_source
11137         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11138         if test ! -f \$inalias ; then
11139                 echo .. skipped \$cf_source
11140                 continue
11141         fi
11142 CF_EOF
11143
11144 if test "$MANPAGE_ALIASES" != no ; then
11145 cat >>$cf_edit_man <<CF_EOF
11146         nCurses=ignore.3x
11147         test $with_curses_h = yes && nCurses=ncurses.3x
11148         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11149 CF_EOF
11150 fi
11151
11152 if test "$MANPAGE_RENAMES" = no ; then
11153 cat >>$cf_edit_man <<CF_EOF
11154         # perform program transformations for section 1 man pages
11155         if test \$section = 1 ; then
11156                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11157         else
11158                 cf_target=\$cf_subdir\${section}/\$cf_source
11159         fi
11160 CF_EOF
11161 else
11162 cat >>$cf_edit_man <<CF_EOF
11163         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11164         if test -z "\$cf_target" ; then
11165                 echo '? missing rename for '\$cf_source
11166                 cf_target="\$cf_source"
11167         fi
11168         cf_target="\$cf_subdir\${section}/\${cf_target}"
11169
11170 CF_EOF
11171 fi
11172
11173 cat >>$cf_edit_man <<CF_EOF
11174         sed     -f $cf_man_alias \\
11175 CF_EOF
11176
11177 if test -f $MANPAGE_RENAMES ; then
11178 cat >>$cf_edit_man <<CF_EOF
11179                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11180 CF_EOF
11181 else
11182 cat >>$cf_edit_man <<CF_EOF
11183                 < \$i >\$TMP
11184 CF_EOF
11185 fi
11186
11187 cat >>$cf_edit_man <<CF_EOF
11188 if test \$cf_tables = yes ; then
11189         tbl \$TMP >\$TMP.out
11190         mv \$TMP.out \$TMP
11191 fi
11192 CF_EOF
11193
11194 if test $with_overwrite != yes ; then
11195 cat >>$cf_edit_man <<CF_EOF
11196         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11197         mv \$TMP.out \$TMP
11198 CF_EOF
11199 fi
11200
11201 if test $with_curses_h != yes ; then
11202 cat >>$cf_edit_man <<CF_EOF
11203         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11204         mv \$TMP.out \$TMP
11205 CF_EOF
11206 fi
11207
11208 cat >>$cf_edit_man <<CF_EOF
11209         if test \$form = format ; then
11210                 nroff -man \$TMP >\$TMP.out
11211                 mv \$TMP.out \$TMP
11212         fi
11213 CF_EOF
11214
11215 if test -n "$cf_compress" ; then
11216 cat >>$cf_edit_man <<CF_EOF
11217         if test \$verb = installing ; then
11218         if ( $cf_compress -f \$TMP )
11219         then
11220                 mv \$TMP.$cf_so_strip \$TMP
11221         fi
11222         fi
11223         cf_target="\$cf_target.$cf_so_strip"
11224 CF_EOF
11225 fi
11226
11227 case "$MANPAGE_FORMAT" in #(vi
11228 *BSDI*)
11229 cat >>$cf_edit_man <<CF_EOF
11230         if test \$form = format ; then
11231                 # BSDI installs only .0 suffixes in the cat directories
11232                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11233         fi
11234 CF_EOF
11235   ;;
11236 esac
11237
11238 cat >>$cf_edit_man <<CF_EOF
11239         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11240         if test \$verb = installing ; then
11241                 echo \$verb \$cf_target
11242                 \$INSTALL_DATA \$TMP \$cf_target
11243                 test -d \$cf_subdir\${section} &&
11244                 test -n "\$aliases" && (
11245                         cd \$cf_subdir\${section} && (
11246                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11247                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11248                                 cf_target=\`basename \$cf_target\`
11249                                 for cf_alias in \$aliases
11250                                 do
11251                                         if test \$section = 1 ; then
11252                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11253                                         fi
11254
11255                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11256                                                 if test -f \$cf_alias\${suffix} ; then
11257                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11258                                                         then
11259                                                                 continue
11260                                                         fi
11261                                                 fi
11262                                                 echo .. \$verb alias \$cf_alias\${suffix}
11263 CF_EOF
11264 case "x$LN_S" in #(vi
11265 *-f) #(vi
11266 cat >>$cf_edit_man <<CF_EOF
11267                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11268 CF_EOF
11269         ;;
11270 *)
11271 cat >>$cf_edit_man <<CF_EOF
11272                                                 rm -f \$cf_alias\${suffix}
11273                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11274 CF_EOF
11275         ;;
11276 esac
11277 cat >>$cf_edit_man <<CF_EOF
11278                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11279                                                 echo ".so \$cf_source" >\$TMP
11280 CF_EOF
11281 if test -n "$cf_compress" ; then
11282 cat >>$cf_edit_man <<CF_EOF
11283                                                 if test -n "$cf_so_strip" ; then
11284                                                         $cf_compress -f \$TMP
11285                                                         mv \$TMP.$cf_so_strip \$TMP
11286                                                 fi
11287 CF_EOF
11288 fi
11289 cat >>$cf_edit_man <<CF_EOF
11290                                                 echo .. \$verb alias \$cf_alias\${suffix}
11291                                                 rm -f \$cf_alias\${suffix}
11292                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11293                                         fi
11294                                 done
11295                         )
11296                 )
11297         elif test \$verb = removing ; then
11298                 test -f \$cf_target && (
11299                         echo \$verb \$cf_target
11300                         rm -f \$cf_target
11301                 )
11302                 test -d \$cf_subdir\${section} &&
11303                 test -n "\$aliases" && (
11304                         cd \$cf_subdir\${section} && (
11305                                 for cf_alias in \$aliases
11306                                 do
11307                                         if test \$section = 1 ; then
11308                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11309                                         fi
11310
11311                                         echo .. \$verb alias \$cf_alias\${suffix}
11312                                         rm -f \$cf_alias\${suffix}
11313                                 done
11314                         )
11315                 )
11316         else
11317 #               echo ".hy 0"
11318                 cat \$TMP
11319         fi
11320         ;;
11321 esac
11322 done
11323
11324 if test $cf_inboth = yes ; then
11325 if test \$form != format ; then
11326         sh \$0 format \$verb \$mandir \$srcdir \$*
11327 fi
11328 fi
11329
11330 exit 0
11331 CF_EOF
11332 chmod 755 $cf_edit_man
11333
11334 ###############################################################################
11335
11336 ### Note that some functions (such as const) are normally disabled anyway.
11337 echo "$as_me:11337: checking if you want to build with function extensions" >&5
11338 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11339
11340 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11341 if test "${enable_ext_funcs+set}" = set; then
11342   enableval="$enable_ext_funcs"
11343   with_ext_funcs=$enableval
11344 else
11345   with_ext_funcs=yes
11346 fi;
11347 echo "$as_me:11347: result: $with_ext_funcs" >&5
11348 echo "${ECHO_T}$with_ext_funcs" >&6
11349 if test "x$with_ext_funcs" = xyes ; then
11350         NCURSES_EXT_FUNCS=1
11351
11352 cat >>confdefs.h <<\EOF
11353 #define HAVE_ASSUME_DEFAULT_COLORS 1
11354 EOF
11355
11356 cat >>confdefs.h <<\EOF
11357 #define HAVE_CURSES_VERSION 1
11358 EOF
11359
11360 cat >>confdefs.h <<\EOF
11361 #define HAVE_HAS_KEY 1
11362 EOF
11363
11364 cat >>confdefs.h <<\EOF
11365 #define HAVE_RESIZETERM 1
11366 EOF
11367
11368 cat >>confdefs.h <<\EOF
11369 #define HAVE_RESIZE_TERM 1
11370 EOF
11371
11372 cat >>confdefs.h <<\EOF
11373 #define HAVE_TERM_ENTRY_H 1
11374 EOF
11375
11376 cat >>confdefs.h <<\EOF
11377 #define HAVE_USE_DEFAULT_COLORS 1
11378 EOF
11379
11380 cat >>confdefs.h <<\EOF
11381 #define HAVE_USE_SCREEN 1
11382 EOF
11383
11384 cat >>confdefs.h <<\EOF
11385 #define HAVE_USE_WINDOW 1
11386 EOF
11387
11388 cat >>confdefs.h <<\EOF
11389 #define HAVE_WRESIZE 1
11390 EOF
11391
11392 cat >>confdefs.h <<\EOF
11393 #define NCURSES_EXT_FUNCS 1
11394 EOF
11395
11396         GENERATED_EXT_FUNCS=generated
11397 else
11398         NCURSES_EXT_FUNCS=0
11399         GENERATED_EXT_FUNCS=
11400 fi
11401
11402 echo "$as_me:11402: checking if you want to build with experimental SCREEN extensions" >&5
11403 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
11404
11405 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11406 if test "${enable_sp_funcs+set}" = set; then
11407   enableval="$enable_sp_funcs"
11408   with_sp_funcs=$enableval
11409 else
11410   with_sp_funcs=no
11411 fi;
11412 echo "$as_me:11412: result: $with_sp_funcs" >&5
11413 echo "${ECHO_T}$with_sp_funcs" >&6
11414 if test "x$with_sp_funcs" = xyes ; then
11415         NCURSES_SP_FUNCS=1
11416
11417 cat >>confdefs.h <<\EOF
11418 #define NCURSES_SP_FUNCS 1
11419 EOF
11420
11421         GENERATED_SP_FUNCS=generated
11422 else
11423         NCURSES_SP_FUNCS=0
11424         GENERATED_SP_FUNCS=
11425 fi
11426
11427 echo "$as_me:11427: checking if you want to build with experimental terminal-driver" >&5
11428 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
11429
11430 # Check whether --enable-term-driver or --disable-term-driver was given.
11431 if test "${enable_term_driver+set}" = set; then
11432   enableval="$enable_term_driver"
11433   with_term_driver=$enableval
11434 else
11435   with_term_driver=no
11436 fi;
11437 echo "$as_me:11437: result: $with_term_driver" >&5
11438 echo "${ECHO_T}$with_term_driver" >&6
11439 if test "x$with_term_driver" = xyes ; then
11440
11441 cat >>confdefs.h <<\EOF
11442 #define USE_TERM_DRIVER 1
11443 EOF
11444
11445         if test "x$with_sp_funcs" != xyes ; then
11446                 { { echo "$as_me:11446: error: The term-driver option relies upon sp-funcs" >&5
11447 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11448    { (exit 1); exit 1; }; }
11449         fi
11450 fi
11451
11452 ###   use option --enable-const to turn on use of const beyond that in XSI.
11453 echo "$as_me:11453: checking for extended use of const keyword" >&5
11454 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11455
11456 # Check whether --enable-const or --disable-const was given.
11457 if test "${enable_const+set}" = set; then
11458   enableval="$enable_const"
11459   with_ext_const=$enableval
11460 else
11461   with_ext_const=no
11462 fi;
11463 echo "$as_me:11463: result: $with_ext_const" >&5
11464 echo "${ECHO_T}$with_ext_const" >&6
11465 NCURSES_CONST='/*nothing*/'
11466 if test "x$with_ext_const" = xyes ; then
11467         NCURSES_CONST=const
11468 fi
11469
11470 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11471 echo "$as_me:11471: checking if you want to use extended colors" >&5
11472 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11473
11474 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11475 if test "${enable_ext_colors+set}" = set; then
11476   enableval="$enable_ext_colors"
11477   with_ext_colors=$enableval
11478 else
11479   with_ext_colors=no
11480 fi;
11481 echo "$as_me:11481: result: $with_ext_colors" >&5
11482 echo "${ECHO_T}$with_ext_colors" >&6
11483 NCURSES_EXT_COLORS=0
11484 if test "x$with_ext_colors" = xyes ; then
11485         if test "x$with_widec" != xyes ; then
11486                 { { echo "$as_me:11486: error: This option applies only to wide-character library" >&5
11487 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11488    { (exit 1); exit 1; }; }
11489         else
11490                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11491
11492 if test "${with_abi_version+set}" != set; then
11493         case $cf_cv_rel_version in
11494         5.*)
11495                 cf_cv_rel_version=6.0
11496                 cf_cv_abi_version=6
11497                 { echo "$as_me:11497: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11498 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11499                 ;;
11500         esac
11501 fi
11502
11503         fi
11504         NCURSES_EXT_COLORS=1
11505
11506 cat >>confdefs.h <<\EOF
11507 #define NCURSES_EXT_COLORS 1
11508 EOF
11509
11510 fi
11511
11512 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11513 echo "$as_me:11513: checking if you want to use extended mouse encoding" >&5
11514 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11515
11516 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11517 if test "${enable_ext_mouse+set}" = set; then
11518   enableval="$enable_ext_mouse"
11519   with_ext_mouse=$enableval
11520 else
11521   with_ext_mouse=no
11522 fi;
11523 echo "$as_me:11523: result: $with_ext_mouse" >&5
11524 echo "${ECHO_T}$with_ext_mouse" >&6
11525 NCURSES_MOUSE_VERSION=1
11526 if test "x$with_ext_mouse" = xyes ; then
11527         NCURSES_MOUSE_VERSION=2
11528
11529 if test "${with_abi_version+set}" != set; then
11530         case $cf_cv_rel_version in
11531         5.*)
11532                 cf_cv_rel_version=6.0
11533                 cf_cv_abi_version=6
11534                 { echo "$as_me:11534: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11535 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11536                 ;;
11537         esac
11538 fi
11539
11540 fi
11541
11542 echo "$as_me:11542: checking if you want \$NCURSES_NO_PADDING code" >&5
11543 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11544
11545 # Check whether --enable-no-padding or --disable-no-padding was given.
11546 if test "${enable_no_padding+set}" = set; then
11547   enableval="$enable_no_padding"
11548   with_no_padding=$enableval
11549 else
11550   with_no_padding=$with_ext_funcs
11551 fi;
11552 echo "$as_me:11552: result: $with_no_padding" >&5
11553 echo "${ECHO_T}$with_no_padding" >&6
11554 test "x$with_no_padding" = xyes &&
11555 cat >>confdefs.h <<\EOF
11556 #define NCURSES_NO_PADDING 1
11557 EOF
11558
11559 echo "$as_me:11559: checking for ANSI C header files" >&5
11560 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11561 if test "${ac_cv_header_stdc+set}" = set; then
11562   echo $ECHO_N "(cached) $ECHO_C" >&6
11563 else
11564   cat >conftest.$ac_ext <<_ACEOF
11565 #line 11565 "configure"
11566 #include "confdefs.h"
11567 #include <stdlib.h>
11568 #include <stdarg.h>
11569 #include <string.h>
11570 #include <float.h>
11571
11572 _ACEOF
11573 if { (eval echo "$as_me:11573: \"$ac_cpp conftest.$ac_ext\"") >&5
11574   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11575   ac_status=$?
11576   egrep -v '^ *\+' conftest.er1 >conftest.err
11577   rm -f conftest.er1
11578   cat conftest.err >&5
11579   echo "$as_me:11579: \$? = $ac_status" >&5
11580   (exit $ac_status); } >/dev/null; then
11581   if test -s conftest.err; then
11582     ac_cpp_err=$ac_c_preproc_warn_flag
11583   else
11584     ac_cpp_err=
11585   fi
11586 else
11587   ac_cpp_err=yes
11588 fi
11589 if test -z "$ac_cpp_err"; then
11590   ac_cv_header_stdc=yes
11591 else
11592   echo "$as_me: failed program was:" >&5
11593   cat conftest.$ac_ext >&5
11594   ac_cv_header_stdc=no
11595 fi
11596 rm -f conftest.err conftest.$ac_ext
11597
11598 if test $ac_cv_header_stdc = yes; then
11599   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11600   cat >conftest.$ac_ext <<_ACEOF
11601 #line 11601 "configure"
11602 #include "confdefs.h"
11603 #include <string.h>
11604
11605 _ACEOF
11606 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11607   egrep "memchr" >/dev/null 2>&1; then
11608   :
11609 else
11610   ac_cv_header_stdc=no
11611 fi
11612 rm -rf conftest*
11613
11614 fi
11615
11616 if test $ac_cv_header_stdc = yes; then
11617   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11618   cat >conftest.$ac_ext <<_ACEOF
11619 #line 11619 "configure"
11620 #include "confdefs.h"
11621 #include <stdlib.h>
11622
11623 _ACEOF
11624 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11625   egrep "free" >/dev/null 2>&1; then
11626   :
11627 else
11628   ac_cv_header_stdc=no
11629 fi
11630 rm -rf conftest*
11631
11632 fi
11633
11634 if test $ac_cv_header_stdc = yes; then
11635   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11636   if test "$cross_compiling" = yes; then
11637   :
11638 else
11639   cat >conftest.$ac_ext <<_ACEOF
11640 #line 11640 "configure"
11641 #include "confdefs.h"
11642 #include <ctype.h>
11643 #if ((' ' & 0x0FF) == 0x020)
11644 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11645 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11646 #else
11647 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11648                      || ('j' <= (c) && (c) <= 'r') \
11649                      || ('s' <= (c) && (c) <= 'z'))
11650 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11651 #endif
11652
11653 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11654 int
11655 main ()
11656 {
11657   int i;
11658   for (i = 0; i < 256; i++)
11659     if (XOR (islower (i), ISLOWER (i))
11660         || toupper (i) != TOUPPER (i))
11661       $ac_main_return(2);
11662   $ac_main_return (0);
11663 }
11664 _ACEOF
11665 rm -f conftest$ac_exeext
11666 if { (eval echo "$as_me:11666: \"$ac_link\"") >&5
11667   (eval $ac_link) 2>&5
11668   ac_status=$?
11669   echo "$as_me:11669: \$? = $ac_status" >&5
11670   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11671   { (eval echo "$as_me:11671: \"$ac_try\"") >&5
11672   (eval $ac_try) 2>&5
11673   ac_status=$?
11674   echo "$as_me:11674: \$? = $ac_status" >&5
11675   (exit $ac_status); }; }; then
11676   :
11677 else
11678   echo "$as_me: program exited with status $ac_status" >&5
11679 echo "$as_me: failed program was:" >&5
11680 cat conftest.$ac_ext >&5
11681 ac_cv_header_stdc=no
11682 fi
11683 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11684 fi
11685 fi
11686 fi
11687 echo "$as_me:11687: result: $ac_cv_header_stdc" >&5
11688 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11689 if test $ac_cv_header_stdc = yes; then
11690
11691 cat >>confdefs.h <<\EOF
11692 #define STDC_HEADERS 1
11693 EOF
11694
11695 fi
11696
11697 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11698
11699 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11700                   inttypes.h stdint.h unistd.h
11701 do
11702 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11703 echo "$as_me:11703: checking for $ac_header" >&5
11704 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11705 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11706   echo $ECHO_N "(cached) $ECHO_C" >&6
11707 else
11708   cat >conftest.$ac_ext <<_ACEOF
11709 #line 11709 "configure"
11710 #include "confdefs.h"
11711 $ac_includes_default
11712 #include <$ac_header>
11713 _ACEOF
11714 rm -f conftest.$ac_objext
11715 if { (eval echo "$as_me:11715: \"$ac_compile\"") >&5
11716   (eval $ac_compile) 2>&5
11717   ac_status=$?
11718   echo "$as_me:11718: \$? = $ac_status" >&5
11719   (exit $ac_status); } &&
11720          { ac_try='test -s conftest.$ac_objext'
11721   { (eval echo "$as_me:11721: \"$ac_try\"") >&5
11722   (eval $ac_try) 2>&5
11723   ac_status=$?
11724   echo "$as_me:11724: \$? = $ac_status" >&5
11725   (exit $ac_status); }; }; then
11726   eval "$as_ac_Header=yes"
11727 else
11728   echo "$as_me: failed program was:" >&5
11729 cat conftest.$ac_ext >&5
11730 eval "$as_ac_Header=no"
11731 fi
11732 rm -f conftest.$ac_objext conftest.$ac_ext
11733 fi
11734 echo "$as_me:11734: result: `eval echo '${'$as_ac_Header'}'`" >&5
11735 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11736 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11737   cat >>confdefs.h <<EOF
11738 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11739 EOF
11740
11741 fi
11742 done
11743
11744 echo "$as_me:11744: checking for signed char" >&5
11745 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11746 if test "${ac_cv_type_signed_char+set}" = set; then
11747   echo $ECHO_N "(cached) $ECHO_C" >&6
11748 else
11749   cat >conftest.$ac_ext <<_ACEOF
11750 #line 11750 "configure"
11751 #include "confdefs.h"
11752 $ac_includes_default
11753 int
11754 main ()
11755 {
11756 if ((signed char *) 0)
11757   return 0;
11758 if (sizeof (signed char))
11759   return 0;
11760   ;
11761   return 0;
11762 }
11763 _ACEOF
11764 rm -f conftest.$ac_objext
11765 if { (eval echo "$as_me:11765: \"$ac_compile\"") >&5
11766   (eval $ac_compile) 2>&5
11767   ac_status=$?
11768   echo "$as_me:11768: \$? = $ac_status" >&5
11769   (exit $ac_status); } &&
11770          { ac_try='test -s conftest.$ac_objext'
11771   { (eval echo "$as_me:11771: \"$ac_try\"") >&5
11772   (eval $ac_try) 2>&5
11773   ac_status=$?
11774   echo "$as_me:11774: \$? = $ac_status" >&5
11775   (exit $ac_status); }; }; then
11776   ac_cv_type_signed_char=yes
11777 else
11778   echo "$as_me: failed program was:" >&5
11779 cat conftest.$ac_ext >&5
11780 ac_cv_type_signed_char=no
11781 fi
11782 rm -f conftest.$ac_objext conftest.$ac_ext
11783 fi
11784 echo "$as_me:11784: result: $ac_cv_type_signed_char" >&5
11785 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11786
11787 echo "$as_me:11787: checking size of signed char" >&5
11788 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11789 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11790   echo $ECHO_N "(cached) $ECHO_C" >&6
11791 else
11792   if test "$ac_cv_type_signed_char" = yes; then
11793   if test "$cross_compiling" = yes; then
11794   # Depending upon the size, compute the lo and hi bounds.
11795 cat >conftest.$ac_ext <<_ACEOF
11796 #line 11796 "configure"
11797 #include "confdefs.h"
11798 $ac_includes_default
11799 int
11800 main ()
11801 {
11802 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11803   ;
11804   return 0;
11805 }
11806 _ACEOF
11807 rm -f conftest.$ac_objext
11808 if { (eval echo "$as_me:11808: \"$ac_compile\"") >&5
11809   (eval $ac_compile) 2>&5
11810   ac_status=$?
11811   echo "$as_me:11811: \$? = $ac_status" >&5
11812   (exit $ac_status); } &&
11813          { ac_try='test -s conftest.$ac_objext'
11814   { (eval echo "$as_me:11814: \"$ac_try\"") >&5
11815   (eval $ac_try) 2>&5
11816   ac_status=$?
11817   echo "$as_me:11817: \$? = $ac_status" >&5
11818   (exit $ac_status); }; }; then
11819   ac_lo=0 ac_mid=0
11820   while :; do
11821     cat >conftest.$ac_ext <<_ACEOF
11822 #line 11822 "configure"
11823 #include "confdefs.h"
11824 $ac_includes_default
11825 int
11826 main ()
11827 {
11828 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11829   ;
11830   return 0;
11831 }
11832 _ACEOF
11833 rm -f conftest.$ac_objext
11834 if { (eval echo "$as_me:11834: \"$ac_compile\"") >&5
11835   (eval $ac_compile) 2>&5
11836   ac_status=$?
11837   echo "$as_me:11837: \$? = $ac_status" >&5
11838   (exit $ac_status); } &&
11839          { ac_try='test -s conftest.$ac_objext'
11840   { (eval echo "$as_me:11840: \"$ac_try\"") >&5
11841   (eval $ac_try) 2>&5
11842   ac_status=$?
11843   echo "$as_me:11843: \$? = $ac_status" >&5
11844   (exit $ac_status); }; }; then
11845   ac_hi=$ac_mid; break
11846 else
11847   echo "$as_me: failed program was:" >&5
11848 cat conftest.$ac_ext >&5
11849 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11850 fi
11851 rm -f conftest.$ac_objext conftest.$ac_ext
11852   done
11853 else
11854   echo "$as_me: failed program was:" >&5
11855 cat conftest.$ac_ext >&5
11856 ac_hi=-1 ac_mid=-1
11857   while :; do
11858     cat >conftest.$ac_ext <<_ACEOF
11859 #line 11859 "configure"
11860 #include "confdefs.h"
11861 $ac_includes_default
11862 int
11863 main ()
11864 {
11865 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11866   ;
11867   return 0;
11868 }
11869 _ACEOF
11870 rm -f conftest.$ac_objext
11871 if { (eval echo "$as_me:11871: \"$ac_compile\"") >&5
11872   (eval $ac_compile) 2>&5
11873   ac_status=$?
11874   echo "$as_me:11874: \$? = $ac_status" >&5
11875   (exit $ac_status); } &&
11876          { ac_try='test -s conftest.$ac_objext'
11877   { (eval echo "$as_me:11877: \"$ac_try\"") >&5
11878   (eval $ac_try) 2>&5
11879   ac_status=$?
11880   echo "$as_me:11880: \$? = $ac_status" >&5
11881   (exit $ac_status); }; }; then
11882   ac_lo=$ac_mid; break
11883 else
11884   echo "$as_me: failed program was:" >&5
11885 cat conftest.$ac_ext >&5
11886 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11887 fi
11888 rm -f conftest.$ac_objext conftest.$ac_ext
11889   done
11890 fi
11891 rm -f conftest.$ac_objext conftest.$ac_ext
11892 # Binary search between lo and hi bounds.
11893 while test "x$ac_lo" != "x$ac_hi"; do
11894   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11895   cat >conftest.$ac_ext <<_ACEOF
11896 #line 11896 "configure"
11897 #include "confdefs.h"
11898 $ac_includes_default
11899 int
11900 main ()
11901 {
11902 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11903   ;
11904   return 0;
11905 }
11906 _ACEOF
11907 rm -f conftest.$ac_objext
11908 if { (eval echo "$as_me:11908: \"$ac_compile\"") >&5
11909   (eval $ac_compile) 2>&5
11910   ac_status=$?
11911   echo "$as_me:11911: \$? = $ac_status" >&5
11912   (exit $ac_status); } &&
11913          { ac_try='test -s conftest.$ac_objext'
11914   { (eval echo "$as_me:11914: \"$ac_try\"") >&5
11915   (eval $ac_try) 2>&5
11916   ac_status=$?
11917   echo "$as_me:11917: \$? = $ac_status" >&5
11918   (exit $ac_status); }; }; then
11919   ac_hi=$ac_mid
11920 else
11921   echo "$as_me: failed program was:" >&5
11922 cat conftest.$ac_ext >&5
11923 ac_lo=`expr $ac_mid + 1`
11924 fi
11925 rm -f conftest.$ac_objext conftest.$ac_ext
11926 done
11927 ac_cv_sizeof_signed_char=$ac_lo
11928 else
11929   if test "$cross_compiling" = yes; then
11930   { { echo "$as_me:11930: error: cannot run test program while cross compiling" >&5
11931 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11932    { (exit 1); exit 1; }; }
11933 else
11934   cat >conftest.$ac_ext <<_ACEOF
11935 #line 11935 "configure"
11936 #include "confdefs.h"
11937 $ac_includes_default
11938 int
11939 main ()
11940 {
11941 FILE *f = fopen ("conftest.val", "w");
11942 if (!f)
11943   $ac_main_return (1);
11944 fprintf (f, "%d", (sizeof (signed char)));
11945 fclose (f);
11946   ;
11947   return 0;
11948 }
11949 _ACEOF
11950 rm -f conftest$ac_exeext
11951 if { (eval echo "$as_me:11951: \"$ac_link\"") >&5
11952   (eval $ac_link) 2>&5
11953   ac_status=$?
11954   echo "$as_me:11954: \$? = $ac_status" >&5
11955   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11956   { (eval echo "$as_me:11956: \"$ac_try\"") >&5
11957   (eval $ac_try) 2>&5
11958   ac_status=$?
11959   echo "$as_me:11959: \$? = $ac_status" >&5
11960   (exit $ac_status); }; }; then
11961   ac_cv_sizeof_signed_char=`cat conftest.val`
11962 else
11963   echo "$as_me: program exited with status $ac_status" >&5
11964 echo "$as_me: failed program was:" >&5
11965 cat conftest.$ac_ext >&5
11966 fi
11967 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11968 fi
11969 fi
11970 rm -f conftest.val
11971 else
11972   ac_cv_sizeof_signed_char=0
11973 fi
11974 fi
11975 echo "$as_me:11975: result: $ac_cv_sizeof_signed_char" >&5
11976 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11977 cat >>confdefs.h <<EOF
11978 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11979 EOF
11980
11981 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11982         NCURSES_SBOOL="signed char"
11983 else
11984         NCURSES_SBOOL="char"
11985 fi
11986 echo "$as_me:11986: checking if you want to use signed Boolean array in term.h" >&5
11987 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11988
11989 # Check whether --enable-signed-char or --disable-signed-char was given.
11990 if test "${enable_signed_char+set}" = set; then
11991   enableval="$enable_signed_char"
11992   with_signed_char=$enableval
11993 else
11994   with_signed_char=no
11995 fi;
11996 echo "$as_me:11996: result: $with_signed_char" >&5
11997 echo "${ECHO_T}$with_signed_char" >&6
11998 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11999
12000 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12001 echo "$as_me:12001: checking if you want SIGWINCH handler" >&5
12002 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12003
12004 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12005 if test "${enable_sigwinch+set}" = set; then
12006   enableval="$enable_sigwinch"
12007   with_sigwinch=$enableval
12008 else
12009   with_sigwinch=$with_ext_funcs
12010 fi;
12011 echo "$as_me:12011: result: $with_sigwinch" >&5
12012 echo "${ECHO_T}$with_sigwinch" >&6
12013 test "x$with_sigwinch" = xyes &&
12014 cat >>confdefs.h <<\EOF
12015 #define USE_SIGWINCH 1
12016 EOF
12017
12018 ###   use option --enable-tcap-names to allow user to define new capabilities
12019 echo "$as_me:12019: checking if you want user-definable terminal capabilities like termcap" >&5
12020 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12021
12022 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12023 if test "${enable_tcap_names+set}" = set; then
12024   enableval="$enable_tcap_names"
12025   with_tcap_names=$enableval
12026 else
12027   with_tcap_names=$with_ext_funcs
12028 fi;
12029 echo "$as_me:12029: result: $with_tcap_names" >&5
12030 echo "${ECHO_T}$with_tcap_names" >&6
12031 NCURSES_XNAMES=0
12032 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12033
12034 ###############################################################################
12035 # These options are relatively safe to experiment with.
12036
12037 echo "$as_me:12037: checking if you want all development code" >&5
12038 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12039
12040 # Check whether --with-develop or --without-develop was given.
12041 if test "${with_develop+set}" = set; then
12042   withval="$with_develop"
12043   with_develop=$withval
12044 else
12045   with_develop=no
12046 fi;
12047 echo "$as_me:12047: result: $with_develop" >&5
12048 echo "${ECHO_T}$with_develop" >&6
12049
12050 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12051 echo "$as_me:12051: checking if you want hard-tabs code" >&5
12052 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12053
12054 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12055 if test "${enable_hard_tabs+set}" = set; then
12056   enableval="$enable_hard_tabs"
12057
12058 else
12059   enable_hard_tabs=$with_develop
12060 fi;
12061 echo "$as_me:12061: result: $enable_hard_tabs" >&5
12062 echo "${ECHO_T}$enable_hard_tabs" >&6
12063 test "x$enable_hard_tabs" = xyes &&
12064 cat >>confdefs.h <<\EOF
12065 #define USE_HARD_TABS 1
12066 EOF
12067
12068 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12069 echo "$as_me:12069: checking if you want limited support for xmc" >&5
12070 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12071
12072 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12073 if test "${enable_xmc_glitch+set}" = set; then
12074   enableval="$enable_xmc_glitch"
12075
12076 else
12077   enable_xmc_glitch=$with_develop
12078 fi;
12079 echo "$as_me:12079: result: $enable_xmc_glitch" >&5
12080 echo "${ECHO_T}$enable_xmc_glitch" >&6
12081 test "x$enable_xmc_glitch" = xyes &&
12082 cat >>confdefs.h <<\EOF
12083 #define USE_XMC_SUPPORT 1
12084 EOF
12085
12086 ###############################################################################
12087 # These are just experimental, probably should not be in a package:
12088
12089 echo "$as_me:12089: checking if you do not want to assume colors are white-on-black" >&5
12090 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12091
12092 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12093 if test "${enable_assumed_color+set}" = set; then
12094   enableval="$enable_assumed_color"
12095   with_assumed_color=$enableval
12096 else
12097   with_assumed_color=yes
12098 fi;
12099 echo "$as_me:12099: result: $with_assumed_color" >&5
12100 echo "${ECHO_T}$with_assumed_color" >&6
12101 test "x$with_assumed_color" = xyes &&
12102 cat >>confdefs.h <<\EOF
12103 #define USE_ASSUMED_COLOR 1
12104 EOF
12105
12106 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12107 echo "$as_me:12107: checking if you want hashmap scrolling-optimization code" >&5
12108 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12109
12110 # Check whether --enable-hashmap or --disable-hashmap was given.
12111 if test "${enable_hashmap+set}" = set; then
12112   enableval="$enable_hashmap"
12113   with_hashmap=$enableval
12114 else
12115   with_hashmap=yes
12116 fi;
12117 echo "$as_me:12117: result: $with_hashmap" >&5
12118 echo "${ECHO_T}$with_hashmap" >&6
12119 test "x$with_hashmap" = xyes &&
12120 cat >>confdefs.h <<\EOF
12121 #define USE_HASHMAP 1
12122 EOF
12123
12124 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12125 echo "$as_me:12125: checking if you want colorfgbg code" >&5
12126 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12127
12128 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12129 if test "${enable_colorfgbg+set}" = set; then
12130   enableval="$enable_colorfgbg"
12131   with_colorfgbg=$enableval
12132 else
12133   with_colorfgbg=no
12134 fi;
12135 echo "$as_me:12135: result: $with_colorfgbg" >&5
12136 echo "${ECHO_T}$with_colorfgbg" >&6
12137 test "x$with_colorfgbg" = xyes &&
12138 cat >>confdefs.h <<\EOF
12139 #define USE_COLORFGBG 1
12140 EOF
12141
12142 ###   use option --enable-interop to turn on use of bindings used for interop
12143 echo "$as_me:12143: checking if you want interop bindings" >&5
12144 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12145
12146 # Check whether --enable-interop or --disable-interop was given.
12147 if test "${enable_interop+set}" = set; then
12148   enableval="$enable_interop"
12149   with_exp_interop=$enableval
12150 else
12151   with_exp_interop=no
12152 fi;
12153 echo "$as_me:12153: result: $with_exp_interop" >&5
12154 echo "${ECHO_T}$with_exp_interop" >&6
12155
12156 NCURSES_INTEROP_FUNCS=0
12157 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12158
12159 # This is still experimental (20080329), but should ultimately be moved to
12160 # the script-block --with-normal, etc.
12161
12162 echo "$as_me:12162: checking if you want to link with the pthread library" >&5
12163 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12164
12165 # Check whether --with-pthread or --without-pthread was given.
12166 if test "${with_pthread+set}" = set; then
12167   withval="$with_pthread"
12168   with_pthread=$withval
12169 else
12170   with_pthread=no
12171 fi;
12172 echo "$as_me:12172: result: $with_pthread" >&5
12173 echo "${ECHO_T}$with_pthread" >&6
12174
12175 if test "$with_pthread" != no ; then
12176     echo "$as_me:12176: checking for pthread.h" >&5
12177 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12178 if test "${ac_cv_header_pthread_h+set}" = set; then
12179   echo $ECHO_N "(cached) $ECHO_C" >&6
12180 else
12181   cat >conftest.$ac_ext <<_ACEOF
12182 #line 12182 "configure"
12183 #include "confdefs.h"
12184 #include <pthread.h>
12185 _ACEOF
12186 if { (eval echo "$as_me:12186: \"$ac_cpp conftest.$ac_ext\"") >&5
12187   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12188   ac_status=$?
12189   egrep -v '^ *\+' conftest.er1 >conftest.err
12190   rm -f conftest.er1
12191   cat conftest.err >&5
12192   echo "$as_me:12192: \$? = $ac_status" >&5
12193   (exit $ac_status); } >/dev/null; then
12194   if test -s conftest.err; then
12195     ac_cpp_err=$ac_c_preproc_warn_flag
12196   else
12197     ac_cpp_err=
12198   fi
12199 else
12200   ac_cpp_err=yes
12201 fi
12202 if test -z "$ac_cpp_err"; then
12203   ac_cv_header_pthread_h=yes
12204 else
12205   echo "$as_me: failed program was:" >&5
12206   cat conftest.$ac_ext >&5
12207   ac_cv_header_pthread_h=no
12208 fi
12209 rm -f conftest.err conftest.$ac_ext
12210 fi
12211 echo "$as_me:12211: result: $ac_cv_header_pthread_h" >&5
12212 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12213 if test $ac_cv_header_pthread_h = yes; then
12214
12215 cat >>confdefs.h <<\EOF
12216 #define HAVE_PTHREADS_H 1
12217 EOF
12218
12219         for cf_lib_pthread in pthread c_r
12220         do
12221             echo "$as_me:12221: checking if we can link with the $cf_lib_pthread library" >&5
12222 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12223             cf_save_LIBS="$LIBS"
12224
12225 cf_add_libs="-l$cf_lib_pthread"
12226 # Filter out duplicates - this happens with badly-designed ".pc" files...
12227 for cf_add_1lib in $LIBS
12228 do
12229         for cf_add_2lib in $cf_add_libs
12230         do
12231                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12232                 then
12233                         cf_add_1lib=
12234                         break
12235                 fi
12236         done
12237         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12238 done
12239 LIBS="$cf_add_libs"
12240
12241             cat >conftest.$ac_ext <<_ACEOF
12242 #line 12242 "configure"
12243 #include "confdefs.h"
12244
12245 #include <pthread.h>
12246
12247 int
12248 main ()
12249 {
12250
12251                 int rc = pthread_create(0,0,0,0);
12252                 int r2 = pthread_mutexattr_settype(0, 0);
12253
12254   ;
12255   return 0;
12256 }
12257 _ACEOF
12258 rm -f conftest.$ac_objext conftest$ac_exeext
12259 if { (eval echo "$as_me:12259: \"$ac_link\"") >&5
12260   (eval $ac_link) 2>&5
12261   ac_status=$?
12262   echo "$as_me:12262: \$? = $ac_status" >&5
12263   (exit $ac_status); } &&
12264          { ac_try='test -s conftest$ac_exeext'
12265   { (eval echo "$as_me:12265: \"$ac_try\"") >&5
12266   (eval $ac_try) 2>&5
12267   ac_status=$?
12268   echo "$as_me:12268: \$? = $ac_status" >&5
12269   (exit $ac_status); }; }; then
12270   with_pthread=yes
12271 else
12272   echo "$as_me: failed program was:" >&5
12273 cat conftest.$ac_ext >&5
12274 with_pthread=no
12275 fi
12276 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12277             LIBS="$cf_save_LIBS"
12278             echo "$as_me:12278: result: $with_pthread" >&5
12279 echo "${ECHO_T}$with_pthread" >&6
12280             test "$with_pthread" = yes && break
12281         done
12282
12283         if test "$with_pthread" = yes ; then
12284
12285 cf_add_libs="-l$cf_lib_pthread"
12286 # Filter out duplicates - this happens with badly-designed ".pc" files...
12287 for cf_add_1lib in $LIBS
12288 do
12289         for cf_add_2lib in $cf_add_libs
12290         do
12291                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12292                 then
12293                         cf_add_1lib=
12294                         break
12295                 fi
12296         done
12297         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12298 done
12299 LIBS="$cf_add_libs"
12300
12301 cat >>confdefs.h <<\EOF
12302 #define HAVE_LIBPTHREADS 1
12303 EOF
12304
12305         else
12306             { { echo "$as_me:12306: error: Cannot link with pthread library" >&5
12307 echo "$as_me: error: Cannot link with pthread library" >&2;}
12308    { (exit 1); exit 1; }; }
12309         fi
12310
12311 fi
12312
12313 fi
12314
12315 if test "x$with_pthread" != xno; then
12316         echo "$as_me:12316: checking for pthread_kill" >&5
12317 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12318 if test "${ac_cv_func_pthread_kill+set}" = set; then
12319   echo $ECHO_N "(cached) $ECHO_C" >&6
12320 else
12321   cat >conftest.$ac_ext <<_ACEOF
12322 #line 12322 "configure"
12323 #include "confdefs.h"
12324 /* System header to define __stub macros and hopefully few prototypes,
12325     which can conflict with char pthread_kill (); below.  */
12326 #include <assert.h>
12327 /* Override any gcc2 internal prototype to avoid an error.  */
12328 #ifdef __cplusplus
12329 extern "C"
12330 #endif
12331 /* We use char because int might match the return type of a gcc2
12332    builtin and then its argument prototype would still apply.  */
12333 char pthread_kill ();
12334 char (*f) ();
12335
12336 int
12337 main ()
12338 {
12339 /* The GNU C library defines this for functions which it implements
12340     to always fail with ENOSYS.  Some functions are actually named
12341     something starting with __ and the normal name is an alias.  */
12342 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12343 choke me
12344 #else
12345 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12346 #endif
12347
12348   ;
12349   return 0;
12350 }
12351 _ACEOF
12352 rm -f conftest.$ac_objext conftest$ac_exeext
12353 if { (eval echo "$as_me:12353: \"$ac_link\"") >&5
12354   (eval $ac_link) 2>&5
12355   ac_status=$?
12356   echo "$as_me:12356: \$? = $ac_status" >&5
12357   (exit $ac_status); } &&
12358          { ac_try='test -s conftest$ac_exeext'
12359   { (eval echo "$as_me:12359: \"$ac_try\"") >&5
12360   (eval $ac_try) 2>&5
12361   ac_status=$?
12362   echo "$as_me:12362: \$? = $ac_status" >&5
12363   (exit $ac_status); }; }; then
12364   ac_cv_func_pthread_kill=yes
12365 else
12366   echo "$as_me: failed program was:" >&5
12367 cat conftest.$ac_ext >&5
12368 ac_cv_func_pthread_kill=no
12369 fi
12370 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12371 fi
12372 echo "$as_me:12372: result: $ac_cv_func_pthread_kill" >&5
12373 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12374 if test $ac_cv_func_pthread_kill = yes; then
12375
12376                 echo "$as_me:12376: checking if you want to allow EINTR in wgetch with pthreads" >&5
12377 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12378
12379 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12380 if test "${enable_pthreads_eintr+set}" = set; then
12381   enableval="$enable_pthreads_eintr"
12382   use_pthreads_eintr=$enableval
12383 else
12384   use_pthreads_eintr=no
12385 fi;
12386                 echo "$as_me:12386: result: $use_pthreads_eintr" >&5
12387 echo "${ECHO_T}$use_pthreads_eintr" >&6
12388                 if test "x$use_pthreads_eintr" = xyes ; then
12389
12390 cat >>confdefs.h <<\EOF
12391 #define USE_PTHREADS_EINTR 1
12392 EOF
12393
12394                 fi
12395 fi
12396
12397         echo "$as_me:12397: checking if you want to use weak-symbols for pthreads" >&5
12398 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12399
12400 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12401 if test "${enable_weak_symbols+set}" = set; then
12402   enableval="$enable_weak_symbols"
12403   use_weak_symbols=$enableval
12404 else
12405   use_weak_symbols=no
12406 fi;
12407         echo "$as_me:12407: result: $use_weak_symbols" >&5
12408 echo "${ECHO_T}$use_weak_symbols" >&6
12409         if test "x$use_weak_symbols" = xyes ; then
12410
12411 echo "$as_me:12411: checking if $CC supports weak symbols" >&5
12412 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12413 if test "${cf_cv_weak_symbols+set}" = set; then
12414   echo $ECHO_N "(cached) $ECHO_C" >&6
12415 else
12416
12417 cat >conftest.$ac_ext <<_ACEOF
12418 #line 12418 "configure"
12419 #include "confdefs.h"
12420
12421 #include <stdio.h>
12422 int
12423 main ()
12424 {
12425
12426 #if defined(__GNUC__)
12427 #  if defined __USE_ISOC99
12428 #    define _cat_pragma(exp)    _Pragma(#exp)
12429 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12430 #  else
12431 #    define _weak_pragma(exp)
12432 #  endif
12433 #  define _declare(name)        __extension__ extern __typeof__(name) name
12434 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12435 #endif
12436
12437 weak_symbol(fopen);
12438
12439   ;
12440   return 0;
12441 }
12442 _ACEOF
12443 rm -f conftest.$ac_objext
12444 if { (eval echo "$as_me:12444: \"$ac_compile\"") >&5
12445   (eval $ac_compile) 2>&5
12446   ac_status=$?
12447   echo "$as_me:12447: \$? = $ac_status" >&5
12448   (exit $ac_status); } &&
12449          { ac_try='test -s conftest.$ac_objext'
12450   { (eval echo "$as_me:12450: \"$ac_try\"") >&5
12451   (eval $ac_try) 2>&5
12452   ac_status=$?
12453   echo "$as_me:12453: \$? = $ac_status" >&5
12454   (exit $ac_status); }; }; then
12455   cf_cv_weak_symbols=yes
12456 else
12457   echo "$as_me: failed program was:" >&5
12458 cat conftest.$ac_ext >&5
12459 cf_cv_weak_symbols=no
12460 fi
12461 rm -f conftest.$ac_objext conftest.$ac_ext
12462
12463 fi
12464 echo "$as_me:12464: result: $cf_cv_weak_symbols" >&5
12465 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12466
12467         else
12468                 cf_cv_weak_symbols=no
12469         fi
12470
12471         if test "x$cf_cv_weak_symbols" = xyes ; then
12472
12473 cat >>confdefs.h <<\EOF
12474 #define USE_WEAK_SYMBOLS 1
12475 EOF
12476
12477         fi
12478 fi
12479
12480 PTHREAD=
12481 if test "x$with_pthread" = "xyes" ; then
12482
12483 cat >>confdefs.h <<\EOF
12484 #define USE_PTHREADS 1
12485 EOF
12486
12487     enable_reentrant=yes
12488     if test "x$cf_cv_weak_symbols" = xyes ; then
12489         PTHREAD=-lpthread
12490     fi
12491 fi
12492
12493 # Reentrant code has to be opaque; there's little advantage to making ncurses
12494 # opaque outside of that, so there is no --enable-opaque option.  We can use
12495 # this option without --with-pthreads, but this will be always set for
12496 # pthreads.
12497 echo "$as_me:12497: checking if you want experimental reentrant code" >&5
12498 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12499
12500 # Check whether --enable-reentrant or --disable-reentrant was given.
12501 if test "${enable_reentrant+set}" = set; then
12502   enableval="$enable_reentrant"
12503   with_reentrant=$enableval
12504 else
12505   with_reentrant=no
12506 fi;
12507 echo "$as_me:12507: result: $with_reentrant" >&5
12508 echo "${ECHO_T}$with_reentrant" >&6
12509 if test "x$with_reentrant" = xyes ; then
12510         cf_cv_enable_reentrant=1
12511         cf_cv_enable_opaque="NCURSES_INTERNALS"
12512         NCURSES_OPAQUE=1
12513         NCURSES_SIZE_T=int
12514         if test "x$cf_cv_weak_symbols" = xyes ; then
12515
12516 # remove pthread library from $LIBS
12517 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12518
12519 cf_add_libs="-lpthread"
12520 # Filter out duplicates - this happens with badly-designed ".pc" files...
12521 for cf_add_1lib in $TEST_LIBS
12522 do
12523         for cf_add_2lib in $cf_add_libs
12524         do
12525                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12526                 then
12527                         cf_add_1lib=
12528                         break
12529                 fi
12530         done
12531         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12532 done
12533 TEST_LIBS="$cf_add_libs"
12534
12535 cf_add_libs="-lpthread"
12536 # Filter out duplicates - this happens with badly-designed ".pc" files...
12537 for cf_add_1lib in $TEST_LIBS2
12538 do
12539         for cf_add_2lib in $cf_add_libs
12540         do
12541                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12542                 then
12543                         cf_add_1lib=
12544                         break
12545                 fi
12546         done
12547         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12548 done
12549 TEST_LIBS2="$cf_add_libs"
12550
12551         else
12552                 # when not using weak symbols but with_reentrant,
12553                 # add 't' to the library suffix on all platforms
12554                 # except cygwin, where we only do that if ALSO
12555                 # compiling with full thread support.
12556                 case "$host" in
12557                 *cygwin* | *msys*) #(vi
12558                         if test "$with_pthread" = "yes" ; then
12559                                 if test "x$disable_lib_suffixes" = "xno" ; then
12560                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12561                                 fi
12562                         fi ;;
12563                 *)
12564                         if test "x$disable_lib_suffixes" = "xno" ; then
12565                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12566                         fi
12567                         ;;
12568                 esac
12569         fi
12570
12571 cat >>confdefs.h <<\EOF
12572 #define USE_REENTRANT 1
12573 EOF
12574
12575 if test "${with_abi_version+set}" != set; then
12576         case $cf_cv_rel_version in
12577         5.*)
12578                 cf_cv_rel_version=6.0
12579                 cf_cv_abi_version=6
12580                 { echo "$as_me:12580: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12581 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12582                 ;;
12583         esac
12584 fi
12585
12586 else
12587         cf_cv_enable_reentrant=0
12588         cf_cv_enable_opaque="NCURSES_OPAQUE"
12589         NCURSES_OPAQUE=0
12590         NCURSES_SIZE_T=short
12591 fi
12592
12593 ### Allow using a different wrap-prefix
12594 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12595         echo "$as_me:12595: checking for prefix used to wrap public variables" >&5
12596 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12597
12598 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12599 if test "${with_wrap_prefix+set}" = set; then
12600   withval="$with_wrap_prefix"
12601   NCURSES_WRAP_PREFIX=$withval
12602 else
12603   NCURSES_WRAP_PREFIX=_nc_
12604 fi;
12605         echo "$as_me:12605: result: $NCURSES_WRAP_PREFIX" >&5
12606 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12607 else
12608         NCURSES_WRAP_PREFIX=_nc_
12609 fi
12610
12611 cat >>confdefs.h <<EOF
12612 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12613 EOF
12614
12615 echo "$as_me:12615: checking if you want experimental safe-sprintf code" >&5
12616 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12617
12618 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12619 if test "${enable_safe_sprintf+set}" = set; then
12620   enableval="$enable_safe_sprintf"
12621   with_safe_sprintf=$enableval
12622 else
12623   with_safe_sprintf=no
12624 fi;
12625 echo "$as_me:12625: result: $with_safe_sprintf" >&5
12626 echo "${ECHO_T}$with_safe_sprintf" >&6
12627 test "x$with_safe_sprintf" = xyes &&
12628 cat >>confdefs.h <<\EOF
12629 #define USE_SAFE_SPRINTF 1
12630 EOF
12631
12632 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12633 # when hashmap is used scroll hints are useless
12634 if test "$with_hashmap" = no ; then
12635 echo "$as_me:12635: checking if you want to experiment without scrolling-hints code" >&5
12636 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12637
12638 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12639 if test "${enable_scroll_hints+set}" = set; then
12640   enableval="$enable_scroll_hints"
12641   with_scroll_hints=$enableval
12642 else
12643   with_scroll_hints=yes
12644 fi;
12645 echo "$as_me:12645: result: $with_scroll_hints" >&5
12646 echo "${ECHO_T}$with_scroll_hints" >&6
12647 test "x$with_scroll_hints" = xyes &&
12648 cat >>confdefs.h <<\EOF
12649 #define USE_SCROLL_HINTS 1
12650 EOF
12651
12652 fi
12653
12654 echo "$as_me:12654: checking if you want experimental wgetch-events code" >&5
12655 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12656
12657 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12658 if test "${enable_wgetch_events+set}" = set; then
12659   enableval="$enable_wgetch_events"
12660   with_wgetch_events=$enableval
12661 else
12662   with_wgetch_events=no
12663 fi;
12664 echo "$as_me:12664: result: $with_wgetch_events" >&5
12665 echo "${ECHO_T}$with_wgetch_events" >&6
12666 test "x$with_wgetch_events" = xyes &&
12667 cat >>confdefs.h <<\EOF
12668 #define NCURSES_WGETCH_EVENTS 1
12669 EOF
12670
12671 ###############################################################################
12672
12673 ###     use option --disable-echo to suppress full display compiling commands
12674
12675 echo "$as_me:12675: checking if you want to see long compiling messages" >&5
12676 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12677
12678 # Check whether --enable-echo or --disable-echo was given.
12679 if test "${enable_echo+set}" = set; then
12680   enableval="$enable_echo"
12681   test "$enableval" != no && enableval=yes
12682   if test "$enableval" != "yes" ; then
12683
12684     ECHO_LT='--silent'
12685     ECHO_LD='@echo linking $@;'
12686     RULE_CC='@echo compiling $<'
12687     SHOW_CC='@echo compiling $@'
12688     ECHO_CC='@'
12689
12690   else
12691
12692     ECHO_LT=''
12693     ECHO_LD=''
12694     RULE_CC=''
12695     SHOW_CC=''
12696     ECHO_CC=''
12697
12698   fi
12699 else
12700   enableval=yes
12701
12702     ECHO_LT=''
12703     ECHO_LD=''
12704     RULE_CC=''
12705     SHOW_CC=''
12706     ECHO_CC=''
12707
12708 fi;
12709 echo "$as_me:12709: result: $enableval" >&5
12710 echo "${ECHO_T}$enableval" >&6
12711
12712 if test "x$enable_echo" = xyes; then
12713         ECHO_LINK=
12714 else
12715         ECHO_LINK='@ echo linking $@ ... ;'
12716         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12717         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12718 fi
12719
12720 ###     use option --enable-warnings to turn on all gcc warnings
12721 echo "$as_me:12721: checking if you want to see compiler warnings" >&5
12722 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12723
12724 # Check whether --enable-warnings or --disable-warnings was given.
12725 if test "${enable_warnings+set}" = set; then
12726   enableval="$enable_warnings"
12727   with_warnings=$enableval
12728 fi;
12729 echo "$as_me:12729: result: $with_warnings" >&5
12730 echo "${ECHO_T}$with_warnings" >&6
12731
12732 if test "x$with_warnings" = "xyes"; then
12733
12734         ADAFLAGS="$ADAFLAGS -gnatg"
12735
12736 INTEL_COMPILER=no
12737
12738 if test "$GCC" = yes ; then
12739         case $host_os in
12740         linux*|gnu*)
12741                 echo "$as_me:12741: checking if this is really Intel C compiler" >&5
12742 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12743                 cf_save_CFLAGS="$CFLAGS"
12744                 CFLAGS="$CFLAGS -no-gcc"
12745                 cat >conftest.$ac_ext <<_ACEOF
12746 #line 12746 "configure"
12747 #include "confdefs.h"
12748
12749 int
12750 main ()
12751 {
12752
12753 #ifdef __INTEL_COMPILER
12754 #else
12755 make an error
12756 #endif
12757
12758   ;
12759   return 0;
12760 }
12761 _ACEOF
12762 rm -f conftest.$ac_objext
12763 if { (eval echo "$as_me:12763: \"$ac_compile\"") >&5
12764   (eval $ac_compile) 2>&5
12765   ac_status=$?
12766   echo "$as_me:12766: \$? = $ac_status" >&5
12767   (exit $ac_status); } &&
12768          { ac_try='test -s conftest.$ac_objext'
12769   { (eval echo "$as_me:12769: \"$ac_try\"") >&5
12770   (eval $ac_try) 2>&5
12771   ac_status=$?
12772   echo "$as_me:12772: \$? = $ac_status" >&5
12773   (exit $ac_status); }; }; then
12774   INTEL_COMPILER=yes
12775 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12776
12777 else
12778   echo "$as_me: failed program was:" >&5
12779 cat conftest.$ac_ext >&5
12780 fi
12781 rm -f conftest.$ac_objext conftest.$ac_ext
12782                 CFLAGS="$cf_save_CFLAGS"
12783                 echo "$as_me:12783: result: $INTEL_COMPILER" >&5
12784 echo "${ECHO_T}$INTEL_COMPILER" >&6
12785                 ;;
12786         esac
12787 fi
12788
12789 CLANG_COMPILER=no
12790
12791 if test "$GCC" = yes ; then
12792         echo "$as_me:12792: checking if this is really Clang C compiler" >&5
12793 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12794         cf_save_CFLAGS="$CFLAGS"
12795         CFLAGS="$CFLAGS -Qunused-arguments"
12796         cat >conftest.$ac_ext <<_ACEOF
12797 #line 12797 "configure"
12798 #include "confdefs.h"
12799
12800 int
12801 main ()
12802 {
12803
12804 #ifdef __clang__
12805 #else
12806 make an error
12807 #endif
12808
12809   ;
12810   return 0;
12811 }
12812 _ACEOF
12813 rm -f conftest.$ac_objext
12814 if { (eval echo "$as_me:12814: \"$ac_compile\"") >&5
12815   (eval $ac_compile) 2>&5
12816   ac_status=$?
12817   echo "$as_me:12817: \$? = $ac_status" >&5
12818   (exit $ac_status); } &&
12819          { ac_try='test -s conftest.$ac_objext'
12820   { (eval echo "$as_me:12820: \"$ac_try\"") >&5
12821   (eval $ac_try) 2>&5
12822   ac_status=$?
12823   echo "$as_me:12823: \$? = $ac_status" >&5
12824   (exit $ac_status); }; }; then
12825   CLANG_COMPILER=yes
12826 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12827
12828 else
12829   echo "$as_me: failed program was:" >&5
12830 cat conftest.$ac_ext >&5
12831 fi
12832 rm -f conftest.$ac_objext conftest.$ac_ext
12833         CFLAGS="$cf_save_CFLAGS"
12834         echo "$as_me:12834: result: $CLANG_COMPILER" >&5
12835 echo "${ECHO_T}$CLANG_COMPILER" >&6
12836 fi
12837
12838 cat > conftest.$ac_ext <<EOF
12839 #line 12839 "${as_me:-configure}"
12840 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12841 EOF
12842
12843 if test "$INTEL_COMPILER" = yes
12844 then
12845 # The "-wdXXX" options suppress warnings:
12846 # remark #1419: external declaration in primary source file
12847 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12848 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12849 # remark #193: zero used for undefined preprocessing identifier
12850 # remark #593: variable "curs_sb_left_arrow" was set but never used
12851 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12852 # remark #869: parameter "tw" was never referenced
12853 # remark #981: operands are evaluated in unspecified order
12854 # warning #279: controlling expression is constant
12855
12856         { echo "$as_me:12856: checking for $CC warning options..." >&5
12857 echo "$as_me: checking for $CC warning options..." >&6;}
12858         cf_save_CFLAGS="$CFLAGS"
12859         EXTRA_CFLAGS="-Wall"
12860         for cf_opt in \
12861                 wd1419 \
12862                 wd1683 \
12863                 wd1684 \
12864                 wd193 \
12865                 wd593 \
12866                 wd279 \
12867                 wd810 \
12868                 wd869 \
12869                 wd981
12870         do
12871                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12872                 if { (eval echo "$as_me:12872: \"$ac_compile\"") >&5
12873   (eval $ac_compile) 2>&5
12874   ac_status=$?
12875   echo "$as_me:12875: \$? = $ac_status" >&5
12876   (exit $ac_status); }; then
12877                         test -n "$verbose" && echo "$as_me:12877: result: ... -$cf_opt" >&5
12878 echo "${ECHO_T}... -$cf_opt" >&6
12879                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12880                 fi
12881         done
12882         CFLAGS="$cf_save_CFLAGS"
12883
12884 elif test "$GCC" = yes
12885 then
12886         { echo "$as_me:12886: checking for $CC warning options..." >&5
12887 echo "$as_me: checking for $CC warning options..." >&6;}
12888         cf_save_CFLAGS="$CFLAGS"
12889         EXTRA_CFLAGS=
12890         cf_warn_CONST=""
12891         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12892         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12893         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12894         for cf_opt in W Wall \
12895                 Wbad-function-cast \
12896                 Wcast-align \
12897                 Wcast-qual \
12898                 Wdeclaration-after-statement \
12899                 Wextra \
12900                 Winline \
12901                 Wmissing-declarations \
12902                 Wmissing-prototypes \
12903                 Wnested-externs \
12904                 Wpointer-arith \
12905                 Wshadow \
12906                 Wstrict-prototypes \
12907                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
12908         do
12909                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12910                 if { (eval echo "$as_me:12910: \"$ac_compile\"") >&5
12911   (eval $ac_compile) 2>&5
12912   ac_status=$?
12913   echo "$as_me:12913: \$? = $ac_status" >&5
12914   (exit $ac_status); }; then
12915                         test -n "$verbose" && echo "$as_me:12915: result: ... -$cf_opt" >&5
12916 echo "${ECHO_T}... -$cf_opt" >&6
12917                         case $cf_opt in #(vi
12918                         Wcast-qual) #(vi
12919                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12920                                 ;;
12921                         Winline) #(vi
12922                                 case $GCC_VERSION in
12923                                 [34].*)
12924                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12925
12926 echo "${as_me:-configure}:12926: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12927
12928                                         continue;;
12929                                 esac
12930                                 ;;
12931                         Wpointer-arith) #(vi
12932                                 case $GCC_VERSION in
12933                                 [12].*)
12934                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12935
12936 echo "${as_me:-configure}:12936: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12937
12938                                         continue;;
12939                                 esac
12940                                 ;;
12941                         esac
12942                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12943                 fi
12944         done
12945         CFLAGS="$cf_save_CFLAGS"
12946 fi
12947 rm -rf conftest*
12948
12949         if test "x$cf_with_cxx" = xyes ; then
12950
12951 INTEL_CPLUSPLUS=no
12952
12953 if test "$GCC" = yes ; then
12954         case $host_os in
12955         linux*|gnu*)
12956                 echo "$as_me:12956: checking if this is really Intel C++ compiler" >&5
12957 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12958                 cf_save_CFLAGS="$CXXFLAGS"
12959                 CXXFLAGS="$CXXFLAGS -no-gcc"
12960                 cat >conftest.$ac_ext <<_ACEOF
12961 #line 12961 "configure"
12962 #include "confdefs.h"
12963
12964 int
12965 main ()
12966 {
12967
12968 #ifdef __INTEL_COMPILER
12969 #else
12970 make an error
12971 #endif
12972
12973   ;
12974   return 0;
12975 }
12976 _ACEOF
12977 rm -f conftest.$ac_objext
12978 if { (eval echo "$as_me:12978: \"$ac_compile\"") >&5
12979   (eval $ac_compile) 2>&5
12980   ac_status=$?
12981   echo "$as_me:12981: \$? = $ac_status" >&5
12982   (exit $ac_status); } &&
12983          { ac_try='test -s conftest.$ac_objext'
12984   { (eval echo "$as_me:12984: \"$ac_try\"") >&5
12985   (eval $ac_try) 2>&5
12986   ac_status=$?
12987   echo "$as_me:12987: \$? = $ac_status" >&5
12988   (exit $ac_status); }; }; then
12989   INTEL_CPLUSPLUS=yes
12990 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12991
12992 else
12993   echo "$as_me: failed program was:" >&5
12994 cat conftest.$ac_ext >&5
12995 fi
12996 rm -f conftest.$ac_objext conftest.$ac_ext
12997                 CXXFLAGS="$cf_save_CFLAGS"
12998                 echo "$as_me:12998: result: $INTEL_CPLUSPLUS" >&5
12999 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13000                 ;;
13001         esac
13002 fi
13003
13004 CLANG_CPLUSPLUS=no
13005
13006 if test "$GCC" = yes ; then
13007         echo "$as_me:13007: checking if this is really Clang C++ compiler" >&5
13008 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13009         cf_save_CFLAGS="$CXXFLAGS"
13010         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13011         cat >conftest.$ac_ext <<_ACEOF
13012 #line 13012 "configure"
13013 #include "confdefs.h"
13014
13015 int
13016 main ()
13017 {
13018
13019 #ifdef __clang__
13020 #else
13021 make an error
13022 #endif
13023
13024   ;
13025   return 0;
13026 }
13027 _ACEOF
13028 rm -f conftest.$ac_objext
13029 if { (eval echo "$as_me:13029: \"$ac_compile\"") >&5
13030   (eval $ac_compile) 2>&5
13031   ac_status=$?
13032   echo "$as_me:13032: \$? = $ac_status" >&5
13033   (exit $ac_status); } &&
13034          { ac_try='test -s conftest.$ac_objext'
13035   { (eval echo "$as_me:13035: \"$ac_try\"") >&5
13036   (eval $ac_try) 2>&5
13037   ac_status=$?
13038   echo "$as_me:13038: \$? = $ac_status" >&5
13039   (exit $ac_status); }; }; then
13040   CLANG_CPLUSPLUS=yes
13041 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13042
13043 else
13044   echo "$as_me: failed program was:" >&5
13045 cat conftest.$ac_ext >&5
13046 fi
13047 rm -f conftest.$ac_objext conftest.$ac_ext
13048         CXXFLAGS="$cf_save_CFLAGS"
13049         echo "$as_me:13049: result: $CLANG_CPLUSPLUS" >&5
13050 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13051 fi
13052
13053 ac_ext=cc
13054 ac_cpp='$CXXCPP $CPPFLAGS'
13055 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13056 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13057 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13058 ac_main_return=return
13059
13060 cat > conftest.$ac_ext <<EOF
13061 #line 13061 "configure"
13062 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13063 EOF
13064
13065 if test "$INTEL_CPLUSPLUS" = yes
13066 then
13067 # The "-wdXXX" options suppress warnings:
13068 # remark #1419: external declaration in primary source file
13069 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13070 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13071 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13072 # remark #193: zero used for undefined preprocessing identifier
13073 # remark #593: variable "curs_sb_left_arrow" was set but never used
13074 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13075 # remark #869: parameter "tw" was never referenced
13076 # remark #981: operands are evaluated in unspecified order
13077 # warning #269: invalid format string conversion
13078
13079         { echo "$as_me:13079: checking for $CC warning options..." >&5
13080 echo "$as_me: checking for $CC warning options..." >&6;}
13081         cf_save_CXXFLAGS="$CXXFLAGS"
13082         EXTRA_CXXFLAGS="-Wall"
13083         for cf_opt in \
13084                 wd1419 \
13085                 wd1682 \
13086                 wd1683 \
13087                 wd1684 \
13088                 wd193 \
13089                 wd279 \
13090                 wd593 \
13091                 wd810 \
13092                 wd869 \
13093                 wd981
13094         do
13095                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13096                 if { (eval echo "$as_me:13096: \"$ac_compile\"") >&5
13097   (eval $ac_compile) 2>&5
13098   ac_status=$?
13099   echo "$as_me:13099: \$? = $ac_status" >&5
13100   (exit $ac_status); }; then
13101                         test -n "$verbose" && echo "$as_me:13101: result: ... -$cf_opt" >&5
13102 echo "${ECHO_T}... -$cf_opt" >&6
13103                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13104                 fi
13105         done
13106         CXXFLAGS="$cf_save_CXXFLAGS"
13107
13108 elif test "$GXX" = yes
13109 then
13110         { echo "$as_me:13110: checking for $CXX warning options..." >&5
13111 echo "$as_me: checking for $CXX warning options..." >&6;}
13112         cf_save_CXXFLAGS="$CXXFLAGS"
13113         EXTRA_CXXFLAGS="-W -Wall"
13114         cf_gxx_extra_warnings=""
13115         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13116         case "$GCC_VERSION" in
13117         [1-2].*)
13118                 ;;
13119         *)
13120                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13121                 ;;
13122         esac
13123         for cf_opt in \
13124                 Wabi \
13125                 fabi-version=0 \
13126                 Wextra \
13127                 Wignored-qualifiers \
13128                 Wlogical-op \
13129                 Woverloaded-virtual \
13130                 Wsign-promo \
13131                 Wsynth \
13132                 Wold-style-cast \
13133                 Wcast-align \
13134                 Wcast-qual \
13135                 Wpointer-arith \
13136                 Wshadow \
13137                 Wundef $cf_gxx_extra_warnings Wno-unused
13138         do
13139                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13140                 if { (eval echo "$as_me:13140: \"$ac_compile\"") >&5
13141   (eval $ac_compile) 2>&5
13142   ac_status=$?
13143   echo "$as_me:13143: \$? = $ac_status" >&5
13144   (exit $ac_status); }; then
13145                         test -n "$verbose" && echo "$as_me:13145: result: ... -$cf_opt" >&5
13146 echo "${ECHO_T}... -$cf_opt" >&6
13147                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13148                 else
13149                         test -n "$verbose" && echo "$as_me:13149: result: ... no -$cf_opt" >&5
13150 echo "${ECHO_T}... no -$cf_opt" >&6
13151                 fi
13152         done
13153         CXXFLAGS="$cf_save_CXXFLAGS"
13154 fi
13155
13156 rm -rf conftest*
13157 ac_ext=c
13158 ac_cpp='$CPP $CPPFLAGS'
13159 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13160 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13161 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13162 ac_main_return=return
13163
13164         fi
13165 fi
13166
13167 if test "$GCC" = yes
13168 then
13169 cat > conftest.i <<EOF
13170 #ifndef GCC_PRINTF
13171 #define GCC_PRINTF 0
13172 #endif
13173 #ifndef GCC_SCANF
13174 #define GCC_SCANF 0
13175 #endif
13176 #ifndef GCC_NORETURN
13177 #define GCC_NORETURN /* nothing */
13178 #endif
13179 #ifndef GCC_UNUSED
13180 #define GCC_UNUSED /* nothing */
13181 #endif
13182 EOF
13183 if test "$GCC" = yes
13184 then
13185         { echo "$as_me:13185: checking for $CC __attribute__ directives..." >&5
13186 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13187 cat > conftest.$ac_ext <<EOF
13188 #line 13188 "${as_me:-configure}"
13189 #include "confdefs.h"
13190 #include "conftest.h"
13191 #include "conftest.i"
13192 #if     GCC_PRINTF
13193 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13194 #else
13195 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13196 #endif
13197 #if     GCC_SCANF
13198 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13199 #else
13200 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13201 #endif
13202 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13203 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13204 extern void foo(void) GCC_NORETURN;
13205 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13206 EOF
13207         cf_printf_attribute=no
13208         cf_scanf_attribute=no
13209         for cf_attribute in scanf printf unused noreturn
13210         do
13211
13212 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13213
13214                 cf_directive="__attribute__(($cf_attribute))"
13215                 echo "checking for $CC $cf_directive" 1>&5
13216
13217                 case $cf_attribute in #(vi
13218                 printf) #(vi
13219                         cf_printf_attribute=yes
13220                         cat >conftest.h <<EOF
13221 #define GCC_$cf_ATTRIBUTE 1
13222 EOF
13223                         ;;
13224                 scanf) #(vi
13225                         cf_scanf_attribute=yes
13226                         cat >conftest.h <<EOF
13227 #define GCC_$cf_ATTRIBUTE 1
13228 EOF
13229                         ;;
13230                 *) #(vi
13231                         cat >conftest.h <<EOF
13232 #define GCC_$cf_ATTRIBUTE $cf_directive
13233 EOF
13234                         ;;
13235                 esac
13236
13237                 if { (eval echo "$as_me:13237: \"$ac_compile\"") >&5
13238   (eval $ac_compile) 2>&5
13239   ac_status=$?
13240   echo "$as_me:13240: \$? = $ac_status" >&5
13241   (exit $ac_status); }; then
13242                         test -n "$verbose" && echo "$as_me:13242: result: ... $cf_attribute" >&5
13243 echo "${ECHO_T}... $cf_attribute" >&6
13244                         cat conftest.h >>confdefs.h
13245                         case $cf_attribute in #(vi
13246                         noreturn) #(vi
13247
13248 cat >>confdefs.h <<EOF
13249 #define GCC_NORETURN $cf_directive
13250 EOF
13251
13252                                 ;;
13253                         printf) #(vi
13254                                 cf_value='/* nothing */'
13255                                 if test "$cf_printf_attribute" != no ; then
13256                                         cf_value='__attribute__((format(printf,fmt,var)))'
13257
13258 cat >>confdefs.h <<\EOF
13259 #define GCC_PRINTF 1
13260 EOF
13261
13262                                 fi
13263
13264 cat >>confdefs.h <<EOF
13265 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13266 EOF
13267
13268                                 ;;
13269                         scanf) #(vi
13270                                 cf_value='/* nothing */'
13271                                 if test "$cf_scanf_attribute" != no ; then
13272                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13273
13274 cat >>confdefs.h <<\EOF
13275 #define GCC_SCANF 1
13276 EOF
13277
13278                                 fi
13279
13280 cat >>confdefs.h <<EOF
13281 #define GCC_SCANFLIKE(fmt,var) $cf_value
13282 EOF
13283
13284                                 ;;
13285                         unused) #(vi
13286
13287 cat >>confdefs.h <<EOF
13288 #define GCC_UNUSED $cf_directive
13289 EOF
13290
13291                                 ;;
13292                         esac
13293                 fi
13294         done
13295 else
13296         fgrep define conftest.i >>confdefs.h
13297 fi
13298 rm -rf conftest*
13299 fi
13300
13301 echo "$as_me:13301: checking if you want to work around bogus compiler/loader warnings" >&5
13302 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13303
13304 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13305 if test "${enable_string_hacks+set}" = set; then
13306   enableval="$enable_string_hacks"
13307   with_string_hacks=$enableval
13308 else
13309   with_string_hacks=no
13310 fi;
13311 echo "$as_me:13311: result: $with_string_hacks" >&5
13312 echo "${ECHO_T}$with_string_hacks" >&6
13313
13314 if test "x$with_string_hacks" = "xyes"; then
13315
13316 cat >>confdefs.h <<\EOF
13317 #define USE_STRING_HACKS 1
13318 EOF
13319
13320         { echo "$as_me:13320: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13321 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13322
13323 for ac_func in strlcat strlcpy snprintf
13324 do
13325 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13326 echo "$as_me:13326: checking for $ac_func" >&5
13327 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13328 if eval "test \"\${$as_ac_var+set}\" = set"; then
13329   echo $ECHO_N "(cached) $ECHO_C" >&6
13330 else
13331   cat >conftest.$ac_ext <<_ACEOF
13332 #line 13332 "configure"
13333 #include "confdefs.h"
13334 /* System header to define __stub macros and hopefully few prototypes,
13335     which can conflict with char $ac_func (); below.  */
13336 #include <assert.h>
13337 /* Override any gcc2 internal prototype to avoid an error.  */
13338 #ifdef __cplusplus
13339 extern "C"
13340 #endif
13341 /* We use char because int might match the return type of a gcc2
13342    builtin and then its argument prototype would still apply.  */
13343 char $ac_func ();
13344 char (*f) ();
13345
13346 int
13347 main ()
13348 {
13349 /* The GNU C library defines this for functions which it implements
13350     to always fail with ENOSYS.  Some functions are actually named
13351     something starting with __ and the normal name is an alias.  */
13352 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13353 choke me
13354 #else
13355 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13356 #endif
13357
13358   ;
13359   return 0;
13360 }
13361 _ACEOF
13362 rm -f conftest.$ac_objext conftest$ac_exeext
13363 if { (eval echo "$as_me:13363: \"$ac_link\"") >&5
13364   (eval $ac_link) 2>&5
13365   ac_status=$?
13366   echo "$as_me:13366: \$? = $ac_status" >&5
13367   (exit $ac_status); } &&
13368          { ac_try='test -s conftest$ac_exeext'
13369   { (eval echo "$as_me:13369: \"$ac_try\"") >&5
13370   (eval $ac_try) 2>&5
13371   ac_status=$?
13372   echo "$as_me:13372: \$? = $ac_status" >&5
13373   (exit $ac_status); }; }; then
13374   eval "$as_ac_var=yes"
13375 else
13376   echo "$as_me: failed program was:" >&5
13377 cat conftest.$ac_ext >&5
13378 eval "$as_ac_var=no"
13379 fi
13380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13381 fi
13382 echo "$as_me:13382: result: `eval echo '${'$as_ac_var'}'`" >&5
13383 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13384 if test `eval echo '${'$as_ac_var'}'` = yes; then
13385   cat >>confdefs.h <<EOF
13386 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13387 EOF
13388
13389 fi
13390 done
13391
13392 fi
13393
13394 ###     use option --enable-assertions to turn on generation of assertion code
13395 echo "$as_me:13395: checking if you want to enable runtime assertions" >&5
13396 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13397
13398 # Check whether --enable-assertions or --disable-assertions was given.
13399 if test "${enable_assertions+set}" = set; then
13400   enableval="$enable_assertions"
13401   with_assertions=$enableval
13402 else
13403   with_assertions=no
13404 fi;
13405 echo "$as_me:13405: result: $with_assertions" >&5
13406 echo "${ECHO_T}$with_assertions" >&6
13407 if test -n "$GCC"
13408 then
13409         if test "$with_assertions" = no
13410         then
13411                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13412         else
13413
13414         ADAFLAGS="$ADAFLAGS -gnata"
13415
13416         fi
13417 fi
13418
13419 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13420
13421 echo "$as_me:13421: checking if you want to use dmalloc for testing" >&5
13422 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13423
13424 # Check whether --with-dmalloc or --without-dmalloc was given.
13425 if test "${with_dmalloc+set}" = set; then
13426   withval="$with_dmalloc"
13427
13428 cat >>confdefs.h <<EOF
13429 #define USE_DMALLOC 1
13430 EOF
13431
13432         : ${with_cflags:=-g}
13433         : ${with_no_leaks:=yes}
13434          with_dmalloc=yes
13435 else
13436   with_dmalloc=
13437 fi;
13438 echo "$as_me:13438: result: ${with_dmalloc:-no}" >&5
13439 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13440
13441 case .$with_cflags in #(vi
13442 .*-g*)
13443         case .$CFLAGS in #(vi
13444         .*-g*) #(vi
13445                 ;;
13446         *)
13447
13448 cf_fix_cppflags=no
13449 cf_new_cflags=
13450 cf_new_cppflags=
13451 cf_new_extra_cppflags=
13452
13453 for cf_add_cflags in -g
13454 do
13455 case $cf_fix_cppflags in
13456 no)
13457         case $cf_add_cflags in #(vi
13458         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13459                 case $cf_add_cflags in
13460                 -D*)
13461                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13462
13463                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13464                                 && test -z "${cf_tst_cflags}" \
13465                                 && cf_fix_cppflags=yes
13466
13467                         if test $cf_fix_cppflags = yes ; then
13468                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13469                                 continue
13470                         elif test "${cf_tst_cflags}" = "\"'" ; then
13471                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13472                                 continue
13473                         fi
13474                         ;;
13475                 esac
13476                 case "$CPPFLAGS" in
13477                 *$cf_add_cflags) #(vi
13478                         ;;
13479                 *) #(vi
13480                         case $cf_add_cflags in #(vi
13481                         -D*)
13482                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13483
13484 CPPFLAGS=`echo "$CPPFLAGS" | \
13485         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13486                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13487
13488                                 ;;
13489                         esac
13490                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13491                         ;;
13492                 esac
13493                 ;;
13494         *)
13495                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13496                 ;;
13497         esac
13498         ;;
13499 yes)
13500         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13501
13502         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13503
13504         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13505                 && test -z "${cf_tst_cflags}" \
13506                 && cf_fix_cppflags=no
13507         ;;
13508 esac
13509 done
13510
13511 if test -n "$cf_new_cflags" ; then
13512
13513         CFLAGS="$CFLAGS $cf_new_cflags"
13514 fi
13515
13516 if test -n "$cf_new_cppflags" ; then
13517
13518         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13519 fi
13520
13521 if test -n "$cf_new_extra_cppflags" ; then
13522
13523         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13524 fi
13525
13526                 ;;
13527         esac
13528         ;;
13529 esac
13530
13531 if test "$with_dmalloc" = yes ; then
13532         echo "$as_me:13532: checking for dmalloc.h" >&5
13533 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13534 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13535   echo $ECHO_N "(cached) $ECHO_C" >&6
13536 else
13537   cat >conftest.$ac_ext <<_ACEOF
13538 #line 13538 "configure"
13539 #include "confdefs.h"
13540 #include <dmalloc.h>
13541 _ACEOF
13542 if { (eval echo "$as_me:13542: \"$ac_cpp conftest.$ac_ext\"") >&5
13543   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13544   ac_status=$?
13545   egrep -v '^ *\+' conftest.er1 >conftest.err
13546   rm -f conftest.er1
13547   cat conftest.err >&5
13548   echo "$as_me:13548: \$? = $ac_status" >&5
13549   (exit $ac_status); } >/dev/null; then
13550   if test -s conftest.err; then
13551     ac_cpp_err=$ac_c_preproc_warn_flag
13552   else
13553     ac_cpp_err=
13554   fi
13555 else
13556   ac_cpp_err=yes
13557 fi
13558 if test -z "$ac_cpp_err"; then
13559   ac_cv_header_dmalloc_h=yes
13560 else
13561   echo "$as_me: failed program was:" >&5
13562   cat conftest.$ac_ext >&5
13563   ac_cv_header_dmalloc_h=no
13564 fi
13565 rm -f conftest.err conftest.$ac_ext
13566 fi
13567 echo "$as_me:13567: result: $ac_cv_header_dmalloc_h" >&5
13568 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13569 if test $ac_cv_header_dmalloc_h = yes; then
13570
13571 echo "$as_me:13571: checking for dmalloc_debug in -ldmalloc" >&5
13572 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13573 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13574   echo $ECHO_N "(cached) $ECHO_C" >&6
13575 else
13576   ac_check_lib_save_LIBS=$LIBS
13577 LIBS="-ldmalloc  $LIBS"
13578 cat >conftest.$ac_ext <<_ACEOF
13579 #line 13579 "configure"
13580 #include "confdefs.h"
13581
13582 /* Override any gcc2 internal prototype to avoid an error.  */
13583 #ifdef __cplusplus
13584 extern "C"
13585 #endif
13586 /* We use char because int might match the return type of a gcc2
13587    builtin and then its argument prototype would still apply.  */
13588 char dmalloc_debug ();
13589 int
13590 main ()
13591 {
13592 dmalloc_debug ();
13593   ;
13594   return 0;
13595 }
13596 _ACEOF
13597 rm -f conftest.$ac_objext conftest$ac_exeext
13598 if { (eval echo "$as_me:13598: \"$ac_link\"") >&5
13599   (eval $ac_link) 2>&5
13600   ac_status=$?
13601   echo "$as_me:13601: \$? = $ac_status" >&5
13602   (exit $ac_status); } &&
13603          { ac_try='test -s conftest$ac_exeext'
13604   { (eval echo "$as_me:13604: \"$ac_try\"") >&5
13605   (eval $ac_try) 2>&5
13606   ac_status=$?
13607   echo "$as_me:13607: \$? = $ac_status" >&5
13608   (exit $ac_status); }; }; then
13609   ac_cv_lib_dmalloc_dmalloc_debug=yes
13610 else
13611   echo "$as_me: failed program was:" >&5
13612 cat conftest.$ac_ext >&5
13613 ac_cv_lib_dmalloc_dmalloc_debug=no
13614 fi
13615 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13616 LIBS=$ac_check_lib_save_LIBS
13617 fi
13618 echo "$as_me:13618: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13619 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13620 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13621   cat >>confdefs.h <<EOF
13622 #define HAVE_LIBDMALLOC 1
13623 EOF
13624
13625   LIBS="-ldmalloc $LIBS"
13626
13627 fi
13628
13629 fi
13630
13631 fi
13632
13633 echo "$as_me:13633: checking if you want to use dbmalloc for testing" >&5
13634 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13635
13636 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13637 if test "${with_dbmalloc+set}" = set; then
13638   withval="$with_dbmalloc"
13639
13640 cat >>confdefs.h <<EOF
13641 #define USE_DBMALLOC 1
13642 EOF
13643
13644         : ${with_cflags:=-g}
13645         : ${with_no_leaks:=yes}
13646          with_dbmalloc=yes
13647 else
13648   with_dbmalloc=
13649 fi;
13650 echo "$as_me:13650: result: ${with_dbmalloc:-no}" >&5
13651 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13652
13653 case .$with_cflags in #(vi
13654 .*-g*)
13655         case .$CFLAGS in #(vi
13656         .*-g*) #(vi
13657                 ;;
13658         *)
13659
13660 cf_fix_cppflags=no
13661 cf_new_cflags=
13662 cf_new_cppflags=
13663 cf_new_extra_cppflags=
13664
13665 for cf_add_cflags in -g
13666 do
13667 case $cf_fix_cppflags in
13668 no)
13669         case $cf_add_cflags in #(vi
13670         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13671                 case $cf_add_cflags in
13672                 -D*)
13673                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13674
13675                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13676                                 && test -z "${cf_tst_cflags}" \
13677                                 && cf_fix_cppflags=yes
13678
13679                         if test $cf_fix_cppflags = yes ; then
13680                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13681                                 continue
13682                         elif test "${cf_tst_cflags}" = "\"'" ; then
13683                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13684                                 continue
13685                         fi
13686                         ;;
13687                 esac
13688                 case "$CPPFLAGS" in
13689                 *$cf_add_cflags) #(vi
13690                         ;;
13691                 *) #(vi
13692                         case $cf_add_cflags in #(vi
13693                         -D*)
13694                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13695
13696 CPPFLAGS=`echo "$CPPFLAGS" | \
13697         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13698                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13699
13700                                 ;;
13701                         esac
13702                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13703                         ;;
13704                 esac
13705                 ;;
13706         *)
13707                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13708                 ;;
13709         esac
13710         ;;
13711 yes)
13712         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13713
13714         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13715
13716         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13717                 && test -z "${cf_tst_cflags}" \
13718                 && cf_fix_cppflags=no
13719         ;;
13720 esac
13721 done
13722
13723 if test -n "$cf_new_cflags" ; then
13724
13725         CFLAGS="$CFLAGS $cf_new_cflags"
13726 fi
13727
13728 if test -n "$cf_new_cppflags" ; then
13729
13730         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13731 fi
13732
13733 if test -n "$cf_new_extra_cppflags" ; then
13734
13735         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13736 fi
13737
13738                 ;;
13739         esac
13740         ;;
13741 esac
13742
13743 if test "$with_dbmalloc" = yes ; then
13744         echo "$as_me:13744: checking for dbmalloc.h" >&5
13745 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13746 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13747   echo $ECHO_N "(cached) $ECHO_C" >&6
13748 else
13749   cat >conftest.$ac_ext <<_ACEOF
13750 #line 13750 "configure"
13751 #include "confdefs.h"
13752 #include <dbmalloc.h>
13753 _ACEOF
13754 if { (eval echo "$as_me:13754: \"$ac_cpp conftest.$ac_ext\"") >&5
13755   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13756   ac_status=$?
13757   egrep -v '^ *\+' conftest.er1 >conftest.err
13758   rm -f conftest.er1
13759   cat conftest.err >&5
13760   echo "$as_me:13760: \$? = $ac_status" >&5
13761   (exit $ac_status); } >/dev/null; then
13762   if test -s conftest.err; then
13763     ac_cpp_err=$ac_c_preproc_warn_flag
13764   else
13765     ac_cpp_err=
13766   fi
13767 else
13768   ac_cpp_err=yes
13769 fi
13770 if test -z "$ac_cpp_err"; then
13771   ac_cv_header_dbmalloc_h=yes
13772 else
13773   echo "$as_me: failed program was:" >&5
13774   cat conftest.$ac_ext >&5
13775   ac_cv_header_dbmalloc_h=no
13776 fi
13777 rm -f conftest.err conftest.$ac_ext
13778 fi
13779 echo "$as_me:13779: result: $ac_cv_header_dbmalloc_h" >&5
13780 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13781 if test $ac_cv_header_dbmalloc_h = yes; then
13782
13783 echo "$as_me:13783: checking for debug_malloc in -ldbmalloc" >&5
13784 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13785 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13786   echo $ECHO_N "(cached) $ECHO_C" >&6
13787 else
13788   ac_check_lib_save_LIBS=$LIBS
13789 LIBS="-ldbmalloc  $LIBS"
13790 cat >conftest.$ac_ext <<_ACEOF
13791 #line 13791 "configure"
13792 #include "confdefs.h"
13793
13794 /* Override any gcc2 internal prototype to avoid an error.  */
13795 #ifdef __cplusplus
13796 extern "C"
13797 #endif
13798 /* We use char because int might match the return type of a gcc2
13799    builtin and then its argument prototype would still apply.  */
13800 char debug_malloc ();
13801 int
13802 main ()
13803 {
13804 debug_malloc ();
13805   ;
13806   return 0;
13807 }
13808 _ACEOF
13809 rm -f conftest.$ac_objext conftest$ac_exeext
13810 if { (eval echo "$as_me:13810: \"$ac_link\"") >&5
13811   (eval $ac_link) 2>&5
13812   ac_status=$?
13813   echo "$as_me:13813: \$? = $ac_status" >&5
13814   (exit $ac_status); } &&
13815          { ac_try='test -s conftest$ac_exeext'
13816   { (eval echo "$as_me:13816: \"$ac_try\"") >&5
13817   (eval $ac_try) 2>&5
13818   ac_status=$?
13819   echo "$as_me:13819: \$? = $ac_status" >&5
13820   (exit $ac_status); }; }; then
13821   ac_cv_lib_dbmalloc_debug_malloc=yes
13822 else
13823   echo "$as_me: failed program was:" >&5
13824 cat conftest.$ac_ext >&5
13825 ac_cv_lib_dbmalloc_debug_malloc=no
13826 fi
13827 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13828 LIBS=$ac_check_lib_save_LIBS
13829 fi
13830 echo "$as_me:13830: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13831 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13832 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13833   cat >>confdefs.h <<EOF
13834 #define HAVE_LIBDBMALLOC 1
13835 EOF
13836
13837   LIBS="-ldbmalloc $LIBS"
13838
13839 fi
13840
13841 fi
13842
13843 fi
13844
13845 echo "$as_me:13845: checking if you want to use valgrind for testing" >&5
13846 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13847
13848 # Check whether --with-valgrind or --without-valgrind was given.
13849 if test "${with_valgrind+set}" = set; then
13850   withval="$with_valgrind"
13851
13852 cat >>confdefs.h <<EOF
13853 #define USE_VALGRIND 1
13854 EOF
13855
13856         : ${with_cflags:=-g}
13857         : ${with_no_leaks:=yes}
13858          with_valgrind=yes
13859 else
13860   with_valgrind=
13861 fi;
13862 echo "$as_me:13862: result: ${with_valgrind:-no}" >&5
13863 echo "${ECHO_T}${with_valgrind:-no}" >&6
13864
13865 case .$with_cflags in #(vi
13866 .*-g*)
13867         case .$CFLAGS in #(vi
13868         .*-g*) #(vi
13869                 ;;
13870         *)
13871
13872 cf_fix_cppflags=no
13873 cf_new_cflags=
13874 cf_new_cppflags=
13875 cf_new_extra_cppflags=
13876
13877 for cf_add_cflags in -g
13878 do
13879 case $cf_fix_cppflags in
13880 no)
13881         case $cf_add_cflags in #(vi
13882         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13883                 case $cf_add_cflags in
13884                 -D*)
13885                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13886
13887                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13888                                 && test -z "${cf_tst_cflags}" \
13889                                 && cf_fix_cppflags=yes
13890
13891                         if test $cf_fix_cppflags = yes ; then
13892                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13893                                 continue
13894                         elif test "${cf_tst_cflags}" = "\"'" ; then
13895                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13896                                 continue
13897                         fi
13898                         ;;
13899                 esac
13900                 case "$CPPFLAGS" in
13901                 *$cf_add_cflags) #(vi
13902                         ;;
13903                 *) #(vi
13904                         case $cf_add_cflags in #(vi
13905                         -D*)
13906                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13907
13908 CPPFLAGS=`echo "$CPPFLAGS" | \
13909         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13910                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13911
13912                                 ;;
13913                         esac
13914                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13915                         ;;
13916                 esac
13917                 ;;
13918         *)
13919                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13920                 ;;
13921         esac
13922         ;;
13923 yes)
13924         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13925
13926         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13927
13928         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13929                 && test -z "${cf_tst_cflags}" \
13930                 && cf_fix_cppflags=no
13931         ;;
13932 esac
13933 done
13934
13935 if test -n "$cf_new_cflags" ; then
13936
13937         CFLAGS="$CFLAGS $cf_new_cflags"
13938 fi
13939
13940 if test -n "$cf_new_cppflags" ; then
13941
13942         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13943 fi
13944
13945 if test -n "$cf_new_extra_cppflags" ; then
13946
13947         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13948 fi
13949
13950                 ;;
13951         esac
13952         ;;
13953 esac
13954
13955 echo "$as_me:13955: checking if you want to perform memory-leak testing" >&5
13956 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13957
13958 # Check whether --enable-leaks or --disable-leaks was given.
13959 if test "${enable_leaks+set}" = set; then
13960   enableval="$enable_leaks"
13961   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13962 else
13963   : ${with_no_leaks:=no}
13964 fi;
13965 echo "$as_me:13965: result: $with_no_leaks" >&5
13966 echo "${ECHO_T}$with_no_leaks" >&6
13967
13968 if test "$with_no_leaks" = yes ; then
13969
13970 cat >>confdefs.h <<\EOF
13971 #define NO_LEAKS 1
13972 EOF
13973
13974 cat >>confdefs.h <<\EOF
13975 #define YY_NO_LEAKS 1
13976 EOF
13977
13978 fi
13979
13980 cat >>confdefs.h <<\EOF
13981 #define HAVE_NC_ALLOC_H 1
13982 EOF
13983
13984 ###     use option --enable-expanded to generate certain macros as functions
13985
13986 # Check whether --enable-expanded or --disable-expanded was given.
13987 if test "${enable_expanded+set}" = set; then
13988   enableval="$enable_expanded"
13989   test "x$enableval" = xyes &&
13990 cat >>confdefs.h <<\EOF
13991 #define NCURSES_EXPANDED 1
13992 EOF
13993
13994 fi;
13995
13996 ###     use option --disable-macros to suppress macros in favor of functions
13997
13998 # Check whether --enable-macros or --disable-macros was given.
13999 if test "${enable_macros+set}" = set; then
14000   enableval="$enable_macros"
14001   test "$enableval" = no &&
14002 cat >>confdefs.h <<\EOF
14003 #define NCURSES_NOMACROS 1
14004 EOF
14005
14006 fi;
14007
14008 # Normally we only add trace() to the debug-library.  Allow this to be
14009 # extended to all models of the ncurses library:
14010 cf_all_traces=no
14011 case "$CFLAGS $CPPFLAGS" in
14012 *-DTRACE*)
14013         cf_all_traces=yes
14014         ;;
14015 esac
14016
14017 echo "$as_me:14017: checking whether to add trace feature to all models" >&5
14018 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14019
14020 # Check whether --with-trace or --without-trace was given.
14021 if test "${with_trace+set}" = set; then
14022   withval="$with_trace"
14023   cf_with_trace=$withval
14024 else
14025   cf_with_trace=$cf_all_traces
14026 fi;
14027 echo "$as_me:14027: result: $cf_with_trace" >&5
14028 echo "${ECHO_T}$cf_with_trace" >&6
14029
14030 if test "x$cf_with_trace" = xyes ; then
14031         LIB_TRACING=all
14032         ADA_TRACE=TRUE
14033
14034 cf_fix_cppflags=no
14035 cf_new_cflags=
14036 cf_new_cppflags=
14037 cf_new_extra_cppflags=
14038
14039 for cf_add_cflags in -DTRACE
14040 do
14041 case $cf_fix_cppflags in
14042 no)
14043         case $cf_add_cflags in #(vi
14044         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14045                 case $cf_add_cflags in
14046                 -D*)
14047                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14048
14049                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14050                                 && test -z "${cf_tst_cflags}" \
14051                                 && cf_fix_cppflags=yes
14052
14053                         if test $cf_fix_cppflags = yes ; then
14054                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14055                                 continue
14056                         elif test "${cf_tst_cflags}" = "\"'" ; then
14057                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14058                                 continue
14059                         fi
14060                         ;;
14061                 esac
14062                 case "$CPPFLAGS" in
14063                 *$cf_add_cflags) #(vi
14064                         ;;
14065                 *) #(vi
14066                         case $cf_add_cflags in #(vi
14067                         -D*)
14068                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14069
14070 CPPFLAGS=`echo "$CPPFLAGS" | \
14071         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14072                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14073
14074                                 ;;
14075                         esac
14076                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14077                         ;;
14078                 esac
14079                 ;;
14080         *)
14081                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14082                 ;;
14083         esac
14084         ;;
14085 yes)
14086         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14087
14088         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14089
14090         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14091                 && test -z "${cf_tst_cflags}" \
14092                 && cf_fix_cppflags=no
14093         ;;
14094 esac
14095 done
14096
14097 if test -n "$cf_new_cflags" ; then
14098
14099         CFLAGS="$CFLAGS $cf_new_cflags"
14100 fi
14101
14102 if test -n "$cf_new_cppflags" ; then
14103
14104         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14105 fi
14106
14107 if test -n "$cf_new_extra_cppflags" ; then
14108
14109         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14110 fi
14111
14112 else
14113         LIB_TRACING=DEBUG
14114         ADA_TRACE=FALSE
14115 fi
14116
14117 echo "$as_me:14117: checking if we want to use GNAT projects" >&5
14118 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14119
14120 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14121 if test "${enable_gnat_projects+set}" = set; then
14122   enableval="$enable_gnat_projects"
14123   test "$enableval" != no && enableval=yes
14124   if test "$enableval" != "yes" ; then
14125     enable_gnat_projects=no
14126   else
14127     enable_gnat_projects=yes
14128   fi
14129 else
14130   enableval=yes
14131   enable_gnat_projects=yes
14132
14133 fi;
14134 echo "$as_me:14134: result: $enable_gnat_projects" >&5
14135 echo "${ECHO_T}$enable_gnat_projects" >&6
14136
14137 ###     Checks for libraries.
14138 case $cf_cv_system_name in #(vi
14139 *mingw32*|*mingw64*) #(vi
14140         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
14141         LIBS=" -lpsapi $LIBS"
14142         ;;
14143 *)
14144 echo "$as_me:14144: checking for gettimeofday" >&5
14145 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14146 if test "${ac_cv_func_gettimeofday+set}" = set; then
14147   echo $ECHO_N "(cached) $ECHO_C" >&6
14148 else
14149   cat >conftest.$ac_ext <<_ACEOF
14150 #line 14150 "configure"
14151 #include "confdefs.h"
14152 /* System header to define __stub macros and hopefully few prototypes,
14153     which can conflict with char gettimeofday (); below.  */
14154 #include <assert.h>
14155 /* Override any gcc2 internal prototype to avoid an error.  */
14156 #ifdef __cplusplus
14157 extern "C"
14158 #endif
14159 /* We use char because int might match the return type of a gcc2
14160    builtin and then its argument prototype would still apply.  */
14161 char gettimeofday ();
14162 char (*f) ();
14163
14164 int
14165 main ()
14166 {
14167 /* The GNU C library defines this for functions which it implements
14168     to always fail with ENOSYS.  Some functions are actually named
14169     something starting with __ and the normal name is an alias.  */
14170 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14171 choke me
14172 #else
14173 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14174 #endif
14175
14176   ;
14177   return 0;
14178 }
14179 _ACEOF
14180 rm -f conftest.$ac_objext conftest$ac_exeext
14181 if { (eval echo "$as_me:14181: \"$ac_link\"") >&5
14182   (eval $ac_link) 2>&5
14183   ac_status=$?
14184   echo "$as_me:14184: \$? = $ac_status" >&5
14185   (exit $ac_status); } &&
14186          { ac_try='test -s conftest$ac_exeext'
14187   { (eval echo "$as_me:14187: \"$ac_try\"") >&5
14188   (eval $ac_try) 2>&5
14189   ac_status=$?
14190   echo "$as_me:14190: \$? = $ac_status" >&5
14191   (exit $ac_status); }; }; then
14192   ac_cv_func_gettimeofday=yes
14193 else
14194   echo "$as_me: failed program was:" >&5
14195 cat conftest.$ac_ext >&5
14196 ac_cv_func_gettimeofday=no
14197 fi
14198 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14199 fi
14200 echo "$as_me:14200: result: $ac_cv_func_gettimeofday" >&5
14201 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14202 if test $ac_cv_func_gettimeofday = yes; then
14203
14204 cat >>confdefs.h <<\EOF
14205 #define HAVE_GETTIMEOFDAY 1
14206 EOF
14207
14208 else
14209
14210 echo "$as_me:14210: checking for gettimeofday in -lbsd" >&5
14211 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14212 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14213   echo $ECHO_N "(cached) $ECHO_C" >&6
14214 else
14215   ac_check_lib_save_LIBS=$LIBS
14216 LIBS="-lbsd  $LIBS"
14217 cat >conftest.$ac_ext <<_ACEOF
14218 #line 14218 "configure"
14219 #include "confdefs.h"
14220
14221 /* Override any gcc2 internal prototype to avoid an error.  */
14222 #ifdef __cplusplus
14223 extern "C"
14224 #endif
14225 /* We use char because int might match the return type of a gcc2
14226    builtin and then its argument prototype would still apply.  */
14227 char gettimeofday ();
14228 int
14229 main ()
14230 {
14231 gettimeofday ();
14232   ;
14233   return 0;
14234 }
14235 _ACEOF
14236 rm -f conftest.$ac_objext conftest$ac_exeext
14237 if { (eval echo "$as_me:14237: \"$ac_link\"") >&5
14238   (eval $ac_link) 2>&5
14239   ac_status=$?
14240   echo "$as_me:14240: \$? = $ac_status" >&5
14241   (exit $ac_status); } &&
14242          { ac_try='test -s conftest$ac_exeext'
14243   { (eval echo "$as_me:14243: \"$ac_try\"") >&5
14244   (eval $ac_try) 2>&5
14245   ac_status=$?
14246   echo "$as_me:14246: \$? = $ac_status" >&5
14247   (exit $ac_status); }; }; then
14248   ac_cv_lib_bsd_gettimeofday=yes
14249 else
14250   echo "$as_me: failed program was:" >&5
14251 cat conftest.$ac_ext >&5
14252 ac_cv_lib_bsd_gettimeofday=no
14253 fi
14254 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14255 LIBS=$ac_check_lib_save_LIBS
14256 fi
14257 echo "$as_me:14257: result: $ac_cv_lib_bsd_gettimeofday" >&5
14258 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14259 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14260
14261 cat >>confdefs.h <<\EOF
14262 #define HAVE_GETTIMEOFDAY 1
14263 EOF
14264
14265 cf_add_libs="-lbsd"
14266 # Filter out duplicates - this happens with badly-designed ".pc" files...
14267 for cf_add_1lib in $LIBS
14268 do
14269         for cf_add_2lib in $cf_add_libs
14270         do
14271                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14272                 then
14273                         cf_add_1lib=
14274                         break
14275                 fi
14276         done
14277         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14278 done
14279 LIBS="$cf_add_libs"
14280
14281 fi
14282
14283 fi
14284         ;;
14285 esac
14286
14287 echo "$as_me:14287: checking if -lm needed for math functions" >&5
14288 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14289 if test "${cf_cv_need_libm+set}" = set; then
14290   echo $ECHO_N "(cached) $ECHO_C" >&6
14291 else
14292
14293         cat >conftest.$ac_ext <<_ACEOF
14294 #line 14294 "configure"
14295 #include "confdefs.h"
14296
14297         #include <stdio.h>
14298         #include <math.h>
14299
14300 int
14301 main ()
14302 {
14303 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14304   ;
14305   return 0;
14306 }
14307 _ACEOF
14308 rm -f conftest.$ac_objext conftest$ac_exeext
14309 if { (eval echo "$as_me:14309: \"$ac_link\"") >&5
14310   (eval $ac_link) 2>&5
14311   ac_status=$?
14312   echo "$as_me:14312: \$? = $ac_status" >&5
14313   (exit $ac_status); } &&
14314          { ac_try='test -s conftest$ac_exeext'
14315   { (eval echo "$as_me:14315: \"$ac_try\"") >&5
14316   (eval $ac_try) 2>&5
14317   ac_status=$?
14318   echo "$as_me:14318: \$? = $ac_status" >&5
14319   (exit $ac_status); }; }; then
14320   cf_cv_need_libm=no
14321 else
14322   echo "$as_me: failed program was:" >&5
14323 cat conftest.$ac_ext >&5
14324 cf_cv_need_libm=yes
14325 fi
14326 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14327 fi
14328 echo "$as_me:14328: result: $cf_cv_need_libm" >&5
14329 echo "${ECHO_T}$cf_cv_need_libm" >&6
14330 if test "$cf_cv_need_libm" = yes
14331 then
14332 MATH_LIB=-lm
14333 fi
14334
14335 ###     Checks for header files.
14336 echo "$as_me:14336: checking for ANSI C header files" >&5
14337 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14338 if test "${ac_cv_header_stdc+set}" = set; then
14339   echo $ECHO_N "(cached) $ECHO_C" >&6
14340 else
14341   cat >conftest.$ac_ext <<_ACEOF
14342 #line 14342 "configure"
14343 #include "confdefs.h"
14344 #include <stdlib.h>
14345 #include <stdarg.h>
14346 #include <string.h>
14347 #include <float.h>
14348
14349 _ACEOF
14350 if { (eval echo "$as_me:14350: \"$ac_cpp conftest.$ac_ext\"") >&5
14351   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14352   ac_status=$?
14353   egrep -v '^ *\+' conftest.er1 >conftest.err
14354   rm -f conftest.er1
14355   cat conftest.err >&5
14356   echo "$as_me:14356: \$? = $ac_status" >&5
14357   (exit $ac_status); } >/dev/null; then
14358   if test -s conftest.err; then
14359     ac_cpp_err=$ac_c_preproc_warn_flag
14360   else
14361     ac_cpp_err=
14362   fi
14363 else
14364   ac_cpp_err=yes
14365 fi
14366 if test -z "$ac_cpp_err"; then
14367   ac_cv_header_stdc=yes
14368 else
14369   echo "$as_me: failed program was:" >&5
14370   cat conftest.$ac_ext >&5
14371   ac_cv_header_stdc=no
14372 fi
14373 rm -f conftest.err conftest.$ac_ext
14374
14375 if test $ac_cv_header_stdc = yes; then
14376   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14377   cat >conftest.$ac_ext <<_ACEOF
14378 #line 14378 "configure"
14379 #include "confdefs.h"
14380 #include <string.h>
14381
14382 _ACEOF
14383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14384   egrep "memchr" >/dev/null 2>&1; then
14385   :
14386 else
14387   ac_cv_header_stdc=no
14388 fi
14389 rm -rf conftest*
14390
14391 fi
14392
14393 if test $ac_cv_header_stdc = yes; then
14394   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14395   cat >conftest.$ac_ext <<_ACEOF
14396 #line 14396 "configure"
14397 #include "confdefs.h"
14398 #include <stdlib.h>
14399
14400 _ACEOF
14401 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14402   egrep "free" >/dev/null 2>&1; then
14403   :
14404 else
14405   ac_cv_header_stdc=no
14406 fi
14407 rm -rf conftest*
14408
14409 fi
14410
14411 if test $ac_cv_header_stdc = yes; then
14412   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14413   if test "$cross_compiling" = yes; then
14414   :
14415 else
14416   cat >conftest.$ac_ext <<_ACEOF
14417 #line 14417 "configure"
14418 #include "confdefs.h"
14419 #include <ctype.h>
14420 #if ((' ' & 0x0FF) == 0x020)
14421 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14422 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14423 #else
14424 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14425                      || ('j' <= (c) && (c) <= 'r') \
14426                      || ('s' <= (c) && (c) <= 'z'))
14427 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14428 #endif
14429
14430 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14431 int
14432 main ()
14433 {
14434   int i;
14435   for (i = 0; i < 256; i++)
14436     if (XOR (islower (i), ISLOWER (i))
14437         || toupper (i) != TOUPPER (i))
14438       $ac_main_return(2);
14439   $ac_main_return (0);
14440 }
14441 _ACEOF
14442 rm -f conftest$ac_exeext
14443 if { (eval echo "$as_me:14443: \"$ac_link\"") >&5
14444   (eval $ac_link) 2>&5
14445   ac_status=$?
14446   echo "$as_me:14446: \$? = $ac_status" >&5
14447   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14448   { (eval echo "$as_me:14448: \"$ac_try\"") >&5
14449   (eval $ac_try) 2>&5
14450   ac_status=$?
14451   echo "$as_me:14451: \$? = $ac_status" >&5
14452   (exit $ac_status); }; }; then
14453   :
14454 else
14455   echo "$as_me: program exited with status $ac_status" >&5
14456 echo "$as_me: failed program was:" >&5
14457 cat conftest.$ac_ext >&5
14458 ac_cv_header_stdc=no
14459 fi
14460 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14461 fi
14462 fi
14463 fi
14464 echo "$as_me:14464: result: $ac_cv_header_stdc" >&5
14465 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14466 if test $ac_cv_header_stdc = yes; then
14467
14468 cat >>confdefs.h <<\EOF
14469 #define STDC_HEADERS 1
14470 EOF
14471
14472 fi
14473
14474 ac_header_dirent=no
14475 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14476   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14477 echo "$as_me:14477: checking for $ac_hdr that defines DIR" >&5
14478 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14479 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14480   echo $ECHO_N "(cached) $ECHO_C" >&6
14481 else
14482   cat >conftest.$ac_ext <<_ACEOF
14483 #line 14483 "configure"
14484 #include "confdefs.h"
14485 #include <sys/types.h>
14486 #include <$ac_hdr>
14487
14488 int
14489 main ()
14490 {
14491 if ((DIR *) 0)
14492 return 0;
14493   ;
14494   return 0;
14495 }
14496 _ACEOF
14497 rm -f conftest.$ac_objext
14498 if { (eval echo "$as_me:14498: \"$ac_compile\"") >&5
14499   (eval $ac_compile) 2>&5
14500   ac_status=$?
14501   echo "$as_me:14501: \$? = $ac_status" >&5
14502   (exit $ac_status); } &&
14503          { ac_try='test -s conftest.$ac_objext'
14504   { (eval echo "$as_me:14504: \"$ac_try\"") >&5
14505   (eval $ac_try) 2>&5
14506   ac_status=$?
14507   echo "$as_me:14507: \$? = $ac_status" >&5
14508   (exit $ac_status); }; }; then
14509   eval "$as_ac_Header=yes"
14510 else
14511   echo "$as_me: failed program was:" >&5
14512 cat conftest.$ac_ext >&5
14513 eval "$as_ac_Header=no"
14514 fi
14515 rm -f conftest.$ac_objext conftest.$ac_ext
14516 fi
14517 echo "$as_me:14517: result: `eval echo '${'$as_ac_Header'}'`" >&5
14518 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14519 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14520   cat >>confdefs.h <<EOF
14521 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14522 EOF
14523
14524 ac_header_dirent=$ac_hdr; break
14525 fi
14526
14527 done
14528 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14529 if test $ac_header_dirent = dirent.h; then
14530   echo "$as_me:14530: checking for opendir in -ldir" >&5
14531 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14532 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14533   echo $ECHO_N "(cached) $ECHO_C" >&6
14534 else
14535   ac_check_lib_save_LIBS=$LIBS
14536 LIBS="-ldir  $LIBS"
14537 cat >conftest.$ac_ext <<_ACEOF
14538 #line 14538 "configure"
14539 #include "confdefs.h"
14540
14541 /* Override any gcc2 internal prototype to avoid an error.  */
14542 #ifdef __cplusplus
14543 extern "C"
14544 #endif
14545 /* We use char because int might match the return type of a gcc2
14546    builtin and then its argument prototype would still apply.  */
14547 char opendir ();
14548 int
14549 main ()
14550 {
14551 opendir ();
14552   ;
14553   return 0;
14554 }
14555 _ACEOF
14556 rm -f conftest.$ac_objext conftest$ac_exeext
14557 if { (eval echo "$as_me:14557: \"$ac_link\"") >&5
14558   (eval $ac_link) 2>&5
14559   ac_status=$?
14560   echo "$as_me:14560: \$? = $ac_status" >&5
14561   (exit $ac_status); } &&
14562          { ac_try='test -s conftest$ac_exeext'
14563   { (eval echo "$as_me:14563: \"$ac_try\"") >&5
14564   (eval $ac_try) 2>&5
14565   ac_status=$?
14566   echo "$as_me:14566: \$? = $ac_status" >&5
14567   (exit $ac_status); }; }; then
14568   ac_cv_lib_dir_opendir=yes
14569 else
14570   echo "$as_me: failed program was:" >&5
14571 cat conftest.$ac_ext >&5
14572 ac_cv_lib_dir_opendir=no
14573 fi
14574 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14575 LIBS=$ac_check_lib_save_LIBS
14576 fi
14577 echo "$as_me:14577: result: $ac_cv_lib_dir_opendir" >&5
14578 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14579 if test $ac_cv_lib_dir_opendir = yes; then
14580   LIBS="$LIBS -ldir"
14581 fi
14582
14583 else
14584   echo "$as_me:14584: checking for opendir in -lx" >&5
14585 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14586 if test "${ac_cv_lib_x_opendir+set}" = set; then
14587   echo $ECHO_N "(cached) $ECHO_C" >&6
14588 else
14589   ac_check_lib_save_LIBS=$LIBS
14590 LIBS="-lx  $LIBS"
14591 cat >conftest.$ac_ext <<_ACEOF
14592 #line 14592 "configure"
14593 #include "confdefs.h"
14594
14595 /* Override any gcc2 internal prototype to avoid an error.  */
14596 #ifdef __cplusplus
14597 extern "C"
14598 #endif
14599 /* We use char because int might match the return type of a gcc2
14600    builtin and then its argument prototype would still apply.  */
14601 char opendir ();
14602 int
14603 main ()
14604 {
14605 opendir ();
14606   ;
14607   return 0;
14608 }
14609 _ACEOF
14610 rm -f conftest.$ac_objext conftest$ac_exeext
14611 if { (eval echo "$as_me:14611: \"$ac_link\"") >&5
14612   (eval $ac_link) 2>&5
14613   ac_status=$?
14614   echo "$as_me:14614: \$? = $ac_status" >&5
14615   (exit $ac_status); } &&
14616          { ac_try='test -s conftest$ac_exeext'
14617   { (eval echo "$as_me:14617: \"$ac_try\"") >&5
14618   (eval $ac_try) 2>&5
14619   ac_status=$?
14620   echo "$as_me:14620: \$? = $ac_status" >&5
14621   (exit $ac_status); }; }; then
14622   ac_cv_lib_x_opendir=yes
14623 else
14624   echo "$as_me: failed program was:" >&5
14625 cat conftest.$ac_ext >&5
14626 ac_cv_lib_x_opendir=no
14627 fi
14628 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14629 LIBS=$ac_check_lib_save_LIBS
14630 fi
14631 echo "$as_me:14631: result: $ac_cv_lib_x_opendir" >&5
14632 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14633 if test $ac_cv_lib_x_opendir = yes; then
14634   LIBS="$LIBS -lx"
14635 fi
14636
14637 fi
14638
14639 echo "$as_me:14639: checking whether time.h and sys/time.h may both be included" >&5
14640 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14641 if test "${ac_cv_header_time+set}" = set; then
14642   echo $ECHO_N "(cached) $ECHO_C" >&6
14643 else
14644   cat >conftest.$ac_ext <<_ACEOF
14645 #line 14645 "configure"
14646 #include "confdefs.h"
14647 #include <sys/types.h>
14648 #include <sys/time.h>
14649 #include <time.h>
14650
14651 int
14652 main ()
14653 {
14654 if ((struct tm *) 0)
14655 return 0;
14656   ;
14657   return 0;
14658 }
14659 _ACEOF
14660 rm -f conftest.$ac_objext
14661 if { (eval echo "$as_me:14661: \"$ac_compile\"") >&5
14662   (eval $ac_compile) 2>&5
14663   ac_status=$?
14664   echo "$as_me:14664: \$? = $ac_status" >&5
14665   (exit $ac_status); } &&
14666          { ac_try='test -s conftest.$ac_objext'
14667   { (eval echo "$as_me:14667: \"$ac_try\"") >&5
14668   (eval $ac_try) 2>&5
14669   ac_status=$?
14670   echo "$as_me:14670: \$? = $ac_status" >&5
14671   (exit $ac_status); }; }; then
14672   ac_cv_header_time=yes
14673 else
14674   echo "$as_me: failed program was:" >&5
14675 cat conftest.$ac_ext >&5
14676 ac_cv_header_time=no
14677 fi
14678 rm -f conftest.$ac_objext conftest.$ac_ext
14679 fi
14680 echo "$as_me:14680: result: $ac_cv_header_time" >&5
14681 echo "${ECHO_T}$ac_cv_header_time" >&6
14682 if test $ac_cv_header_time = yes; then
14683
14684 cat >>confdefs.h <<\EOF
14685 #define TIME_WITH_SYS_TIME 1
14686 EOF
14687
14688 fi
14689
14690 cf_regex_func=no
14691
14692 cf_regex_libs="regex re"
14693 case $host_os in #(vi
14694 mingw*)
14695         cf_regex_libs="gnurx $cf_regex_libs"
14696         ;;
14697 esac
14698
14699 echo "$as_me:14699: checking for regcomp" >&5
14700 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14701 if test "${ac_cv_func_regcomp+set}" = set; then
14702   echo $ECHO_N "(cached) $ECHO_C" >&6
14703 else
14704   cat >conftest.$ac_ext <<_ACEOF
14705 #line 14705 "configure"
14706 #include "confdefs.h"
14707 /* System header to define __stub macros and hopefully few prototypes,
14708     which can conflict with char regcomp (); below.  */
14709 #include <assert.h>
14710 /* Override any gcc2 internal prototype to avoid an error.  */
14711 #ifdef __cplusplus
14712 extern "C"
14713 #endif
14714 /* We use char because int might match the return type of a gcc2
14715    builtin and then its argument prototype would still apply.  */
14716 char regcomp ();
14717 char (*f) ();
14718
14719 int
14720 main ()
14721 {
14722 /* The GNU C library defines this for functions which it implements
14723     to always fail with ENOSYS.  Some functions are actually named
14724     something starting with __ and the normal name is an alias.  */
14725 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14726 choke me
14727 #else
14728 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14729 #endif
14730
14731   ;
14732   return 0;
14733 }
14734 _ACEOF
14735 rm -f conftest.$ac_objext conftest$ac_exeext
14736 if { (eval echo "$as_me:14736: \"$ac_link\"") >&5
14737   (eval $ac_link) 2>&5
14738   ac_status=$?
14739   echo "$as_me:14739: \$? = $ac_status" >&5
14740   (exit $ac_status); } &&
14741          { ac_try='test -s conftest$ac_exeext'
14742   { (eval echo "$as_me:14742: \"$ac_try\"") >&5
14743   (eval $ac_try) 2>&5
14744   ac_status=$?
14745   echo "$as_me:14745: \$? = $ac_status" >&5
14746   (exit $ac_status); }; }; then
14747   ac_cv_func_regcomp=yes
14748 else
14749   echo "$as_me: failed program was:" >&5
14750 cat conftest.$ac_ext >&5
14751 ac_cv_func_regcomp=no
14752 fi
14753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14754 fi
14755 echo "$as_me:14755: result: $ac_cv_func_regcomp" >&5
14756 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14757 if test $ac_cv_func_regcomp = yes; then
14758   cf_regex_func=regcomp
14759 else
14760
14761         for cf_regex_lib in $cf_regex_libs
14762         do
14763                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14764 echo "$as_me:14764: checking for regcomp in -l$cf_regex_lib" >&5
14765 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14766 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14767   echo $ECHO_N "(cached) $ECHO_C" >&6
14768 else
14769   ac_check_lib_save_LIBS=$LIBS
14770 LIBS="-l$cf_regex_lib  $LIBS"
14771 cat >conftest.$ac_ext <<_ACEOF
14772 #line 14772 "configure"
14773 #include "confdefs.h"
14774
14775 /* Override any gcc2 internal prototype to avoid an error.  */
14776 #ifdef __cplusplus
14777 extern "C"
14778 #endif
14779 /* We use char because int might match the return type of a gcc2
14780    builtin and then its argument prototype would still apply.  */
14781 char regcomp ();
14782 int
14783 main ()
14784 {
14785 regcomp ();
14786   ;
14787   return 0;
14788 }
14789 _ACEOF
14790 rm -f conftest.$ac_objext conftest$ac_exeext
14791 if { (eval echo "$as_me:14791: \"$ac_link\"") >&5
14792   (eval $ac_link) 2>&5
14793   ac_status=$?
14794   echo "$as_me:14794: \$? = $ac_status" >&5
14795   (exit $ac_status); } &&
14796          { ac_try='test -s conftest$ac_exeext'
14797   { (eval echo "$as_me:14797: \"$ac_try\"") >&5
14798   (eval $ac_try) 2>&5
14799   ac_status=$?
14800   echo "$as_me:14800: \$? = $ac_status" >&5
14801   (exit $ac_status); }; }; then
14802   eval "$as_ac_Lib=yes"
14803 else
14804   echo "$as_me: failed program was:" >&5
14805 cat conftest.$ac_ext >&5
14806 eval "$as_ac_Lib=no"
14807 fi
14808 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14809 LIBS=$ac_check_lib_save_LIBS
14810 fi
14811 echo "$as_me:14811: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14812 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14813 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14814
14815 cf_add_libs="-l$cf_regex_lib"
14816 # Filter out duplicates - this happens with badly-designed ".pc" files...
14817 for cf_add_1lib in $LIBS
14818 do
14819         for cf_add_2lib in $cf_add_libs
14820         do
14821                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14822                 then
14823                         cf_add_1lib=
14824                         break
14825                 fi
14826         done
14827         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14828 done
14829 LIBS="$cf_add_libs"
14830
14831                                 cf_regex_func=regcomp
14832                                 break
14833 fi
14834
14835         done
14836
14837 fi
14838
14839 if test "$cf_regex_func" = no ; then
14840         echo "$as_me:14840: checking for compile" >&5
14841 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14842 if test "${ac_cv_func_compile+set}" = set; then
14843   echo $ECHO_N "(cached) $ECHO_C" >&6
14844 else
14845   cat >conftest.$ac_ext <<_ACEOF
14846 #line 14846 "configure"
14847 #include "confdefs.h"
14848 /* System header to define __stub macros and hopefully few prototypes,
14849     which can conflict with char compile (); below.  */
14850 #include <assert.h>
14851 /* Override any gcc2 internal prototype to avoid an error.  */
14852 #ifdef __cplusplus
14853 extern "C"
14854 #endif
14855 /* We use char because int might match the return type of a gcc2
14856    builtin and then its argument prototype would still apply.  */
14857 char compile ();
14858 char (*f) ();
14859
14860 int
14861 main ()
14862 {
14863 /* The GNU C library defines this for functions which it implements
14864     to always fail with ENOSYS.  Some functions are actually named
14865     something starting with __ and the normal name is an alias.  */
14866 #if defined (__stub_compile) || defined (__stub___compile)
14867 choke me
14868 #else
14869 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14870 #endif
14871
14872   ;
14873   return 0;
14874 }
14875 _ACEOF
14876 rm -f conftest.$ac_objext conftest$ac_exeext
14877 if { (eval echo "$as_me:14877: \"$ac_link\"") >&5
14878   (eval $ac_link) 2>&5
14879   ac_status=$?
14880   echo "$as_me:14880: \$? = $ac_status" >&5
14881   (exit $ac_status); } &&
14882          { ac_try='test -s conftest$ac_exeext'
14883   { (eval echo "$as_me:14883: \"$ac_try\"") >&5
14884   (eval $ac_try) 2>&5
14885   ac_status=$?
14886   echo "$as_me:14886: \$? = $ac_status" >&5
14887   (exit $ac_status); }; }; then
14888   ac_cv_func_compile=yes
14889 else
14890   echo "$as_me: failed program was:" >&5
14891 cat conftest.$ac_ext >&5
14892 ac_cv_func_compile=no
14893 fi
14894 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14895 fi
14896 echo "$as_me:14896: result: $ac_cv_func_compile" >&5
14897 echo "${ECHO_T}$ac_cv_func_compile" >&6
14898 if test $ac_cv_func_compile = yes; then
14899   cf_regex_func=compile
14900 else
14901
14902                 echo "$as_me:14902: checking for compile in -lgen" >&5
14903 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14904 if test "${ac_cv_lib_gen_compile+set}" = set; then
14905   echo $ECHO_N "(cached) $ECHO_C" >&6
14906 else
14907   ac_check_lib_save_LIBS=$LIBS
14908 LIBS="-lgen  $LIBS"
14909 cat >conftest.$ac_ext <<_ACEOF
14910 #line 14910 "configure"
14911 #include "confdefs.h"
14912
14913 /* Override any gcc2 internal prototype to avoid an error.  */
14914 #ifdef __cplusplus
14915 extern "C"
14916 #endif
14917 /* We use char because int might match the return type of a gcc2
14918    builtin and then its argument prototype would still apply.  */
14919 char compile ();
14920 int
14921 main ()
14922 {
14923 compile ();
14924   ;
14925   return 0;
14926 }
14927 _ACEOF
14928 rm -f conftest.$ac_objext conftest$ac_exeext
14929 if { (eval echo "$as_me:14929: \"$ac_link\"") >&5
14930   (eval $ac_link) 2>&5
14931   ac_status=$?
14932   echo "$as_me:14932: \$? = $ac_status" >&5
14933   (exit $ac_status); } &&
14934          { ac_try='test -s conftest$ac_exeext'
14935   { (eval echo "$as_me:14935: \"$ac_try\"") >&5
14936   (eval $ac_try) 2>&5
14937   ac_status=$?
14938   echo "$as_me:14938: \$? = $ac_status" >&5
14939   (exit $ac_status); }; }; then
14940   ac_cv_lib_gen_compile=yes
14941 else
14942   echo "$as_me: failed program was:" >&5
14943 cat conftest.$ac_ext >&5
14944 ac_cv_lib_gen_compile=no
14945 fi
14946 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14947 LIBS=$ac_check_lib_save_LIBS
14948 fi
14949 echo "$as_me:14949: result: $ac_cv_lib_gen_compile" >&5
14950 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14951 if test $ac_cv_lib_gen_compile = yes; then
14952
14953 cf_add_libs="-lgen"
14954 # Filter out duplicates - this happens with badly-designed ".pc" files...
14955 for cf_add_1lib in $LIBS
14956 do
14957         for cf_add_2lib in $cf_add_libs
14958         do
14959                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14960                 then
14961                         cf_add_1lib=
14962                         break
14963                 fi
14964         done
14965         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14966 done
14967 LIBS="$cf_add_libs"
14968
14969                                 cf_regex_func=compile
14970 fi
14971
14972 fi
14973
14974 fi
14975
14976 if test "$cf_regex_func" = no ; then
14977         { echo "$as_me:14977: WARNING: cannot find regular expression library" >&5
14978 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14979 fi
14980
14981 echo "$as_me:14981: checking for regular-expression headers" >&5
14982 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14983 if test "${cf_cv_regex_hdrs+set}" = set; then
14984   echo $ECHO_N "(cached) $ECHO_C" >&6
14985 else
14986
14987 cf_cv_regex_hdrs=no
14988 case $cf_regex_func in #(vi
14989 compile) #(vi
14990         for cf_regex_hdr in regexp.h regexpr.h
14991         do
14992                 cat >conftest.$ac_ext <<_ACEOF
14993 #line 14993 "configure"
14994 #include "confdefs.h"
14995 #include <$cf_regex_hdr>
14996 int
14997 main ()
14998 {
14999
15000                         char *p = compile("", "", "", 0);
15001                         int x = step("", "");
15002
15003   ;
15004   return 0;
15005 }
15006 _ACEOF
15007 rm -f conftest.$ac_objext conftest$ac_exeext
15008 if { (eval echo "$as_me:15008: \"$ac_link\"") >&5
15009   (eval $ac_link) 2>&5
15010   ac_status=$?
15011   echo "$as_me:15011: \$? = $ac_status" >&5
15012   (exit $ac_status); } &&
15013          { ac_try='test -s conftest$ac_exeext'
15014   { (eval echo "$as_me:15014: \"$ac_try\"") >&5
15015   (eval $ac_try) 2>&5
15016   ac_status=$?
15017   echo "$as_me:15017: \$? = $ac_status" >&5
15018   (exit $ac_status); }; }; then
15019
15020                         cf_cv_regex_hdrs=$cf_regex_hdr
15021                         break
15022
15023 else
15024   echo "$as_me: failed program was:" >&5
15025 cat conftest.$ac_ext >&5
15026 fi
15027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15028         done
15029         ;;
15030 *)
15031         for cf_regex_hdr in regex.h
15032         do
15033                 cat >conftest.$ac_ext <<_ACEOF
15034 #line 15034 "configure"
15035 #include "confdefs.h"
15036 #include <sys/types.h>
15037 #include <$cf_regex_hdr>
15038 int
15039 main ()
15040 {
15041
15042                         regex_t *p;
15043                         int x = regcomp(p, "", 0);
15044                         int y = regexec(p, "", 0, 0, 0);
15045                         regfree(p);
15046
15047   ;
15048   return 0;
15049 }
15050 _ACEOF
15051 rm -f conftest.$ac_objext conftest$ac_exeext
15052 if { (eval echo "$as_me:15052: \"$ac_link\"") >&5
15053   (eval $ac_link) 2>&5
15054   ac_status=$?
15055   echo "$as_me:15055: \$? = $ac_status" >&5
15056   (exit $ac_status); } &&
15057          { ac_try='test -s conftest$ac_exeext'
15058   { (eval echo "$as_me:15058: \"$ac_try\"") >&5
15059   (eval $ac_try) 2>&5
15060   ac_status=$?
15061   echo "$as_me:15061: \$? = $ac_status" >&5
15062   (exit $ac_status); }; }; then
15063
15064                         cf_cv_regex_hdrs=$cf_regex_hdr
15065                         break
15066
15067 else
15068   echo "$as_me: failed program was:" >&5
15069 cat conftest.$ac_ext >&5
15070 fi
15071 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15072         done
15073         ;;
15074 esac
15075
15076 fi
15077 echo "$as_me:15077: result: $cf_cv_regex_hdrs" >&5
15078 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15079
15080 case $cf_cv_regex_hdrs in #(vi
15081     no)        { echo "$as_me:15081: WARNING: no regular expression header found" >&5
15082 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
15083     regex.h)
15084 cat >>confdefs.h <<\EOF
15085 #define HAVE_REGEX_H_FUNCS 1
15086 EOF
15087  ;; #(vi
15088     regexp.h)
15089 cat >>confdefs.h <<\EOF
15090 #define HAVE_REGEXP_H_FUNCS 1
15091 EOF
15092  ;; #(vi
15093     regexpr.h)
15094 cat >>confdefs.h <<\EOF
15095 #define HAVE_REGEXPR_H_FUNCS 1
15096 EOF
15097  ;;
15098 esac
15099
15100 for ac_header in \
15101 fcntl.h \
15102 getopt.h \
15103 limits.h \
15104 locale.h \
15105 math.h \
15106 poll.h \
15107 sys/bsdtypes.h \
15108 sys/ioctl.h \
15109 sys/param.h \
15110 sys/poll.h \
15111 sys/select.h \
15112 sys/time.h \
15113 sys/times.h \
15114 ttyent.h \
15115 unistd.h \
15116 wctype.h \
15117
15118 do
15119 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15120 echo "$as_me:15120: checking for $ac_header" >&5
15121 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15122 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15123   echo $ECHO_N "(cached) $ECHO_C" >&6
15124 else
15125   cat >conftest.$ac_ext <<_ACEOF
15126 #line 15126 "configure"
15127 #include "confdefs.h"
15128 #include <$ac_header>
15129 _ACEOF
15130 if { (eval echo "$as_me:15130: \"$ac_cpp conftest.$ac_ext\"") >&5
15131   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15132   ac_status=$?
15133   egrep -v '^ *\+' conftest.er1 >conftest.err
15134   rm -f conftest.er1
15135   cat conftest.err >&5
15136   echo "$as_me:15136: \$? = $ac_status" >&5
15137   (exit $ac_status); } >/dev/null; then
15138   if test -s conftest.err; then
15139     ac_cpp_err=$ac_c_preproc_warn_flag
15140   else
15141     ac_cpp_err=
15142   fi
15143 else
15144   ac_cpp_err=yes
15145 fi
15146 if test -z "$ac_cpp_err"; then
15147   eval "$as_ac_Header=yes"
15148 else
15149   echo "$as_me: failed program was:" >&5
15150   cat conftest.$ac_ext >&5
15151   eval "$as_ac_Header=no"
15152 fi
15153 rm -f conftest.err conftest.$ac_ext
15154 fi
15155 echo "$as_me:15155: result: `eval echo '${'$as_ac_Header'}'`" >&5
15156 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15157 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15158   cat >>confdefs.h <<EOF
15159 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15160 EOF
15161
15162 fi
15163 done
15164
15165 for ac_header in unistd.h getopt.h
15166 do
15167 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15168 echo "$as_me:15168: checking for $ac_header" >&5
15169 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15170 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15171   echo $ECHO_N "(cached) $ECHO_C" >&6
15172 else
15173   cat >conftest.$ac_ext <<_ACEOF
15174 #line 15174 "configure"
15175 #include "confdefs.h"
15176 #include <$ac_header>
15177 _ACEOF
15178 if { (eval echo "$as_me:15178: \"$ac_cpp conftest.$ac_ext\"") >&5
15179   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15180   ac_status=$?
15181   egrep -v '^ *\+' conftest.er1 >conftest.err
15182   rm -f conftest.er1
15183   cat conftest.err >&5
15184   echo "$as_me:15184: \$? = $ac_status" >&5
15185   (exit $ac_status); } >/dev/null; then
15186   if test -s conftest.err; then
15187     ac_cpp_err=$ac_c_preproc_warn_flag
15188   else
15189     ac_cpp_err=
15190   fi
15191 else
15192   ac_cpp_err=yes
15193 fi
15194 if test -z "$ac_cpp_err"; then
15195   eval "$as_ac_Header=yes"
15196 else
15197   echo "$as_me: failed program was:" >&5
15198   cat conftest.$ac_ext >&5
15199   eval "$as_ac_Header=no"
15200 fi
15201 rm -f conftest.err conftest.$ac_ext
15202 fi
15203 echo "$as_me:15203: result: `eval echo '${'$as_ac_Header'}'`" >&5
15204 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15205 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15206   cat >>confdefs.h <<EOF
15207 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15208 EOF
15209
15210 fi
15211 done
15212
15213 echo "$as_me:15213: checking for header declaring getopt variables" >&5
15214 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15215 if test "${cf_cv_getopt_header+set}" = set; then
15216   echo $ECHO_N "(cached) $ECHO_C" >&6
15217 else
15218
15219 cf_cv_getopt_header=none
15220 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15221 do
15222 cat >conftest.$ac_ext <<_ACEOF
15223 #line 15223 "configure"
15224 #include "confdefs.h"
15225
15226 #include <$cf_header>
15227 int
15228 main ()
15229 {
15230 int x = optind; char *y = optarg
15231   ;
15232   return 0;
15233 }
15234 _ACEOF
15235 rm -f conftest.$ac_objext
15236 if { (eval echo "$as_me:15236: \"$ac_compile\"") >&5
15237   (eval $ac_compile) 2>&5
15238   ac_status=$?
15239   echo "$as_me:15239: \$? = $ac_status" >&5
15240   (exit $ac_status); } &&
15241          { ac_try='test -s conftest.$ac_objext'
15242   { (eval echo "$as_me:15242: \"$ac_try\"") >&5
15243   (eval $ac_try) 2>&5
15244   ac_status=$?
15245   echo "$as_me:15245: \$? = $ac_status" >&5
15246   (exit $ac_status); }; }; then
15247   cf_cv_getopt_header=$cf_header
15248  break
15249 else
15250   echo "$as_me: failed program was:" >&5
15251 cat conftest.$ac_ext >&5
15252 fi
15253 rm -f conftest.$ac_objext conftest.$ac_ext
15254 done
15255
15256 fi
15257 echo "$as_me:15257: result: $cf_cv_getopt_header" >&5
15258 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15259 if test $cf_cv_getopt_header != none ; then
15260
15261 cat >>confdefs.h <<\EOF
15262 #define HAVE_GETOPT_HEADER 1
15263 EOF
15264
15265 fi
15266 if test $cf_cv_getopt_header = getopt.h ; then
15267
15268 cat >>confdefs.h <<\EOF
15269 #define NEED_GETOPT_H 1
15270 EOF
15271
15272 fi
15273
15274 # check for ISC (this may also define _POSIX_SOURCE)
15275 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15276 if test "x$ISC" = xyes ; then
15277
15278 echo "$as_me:15278: checking for main in -lcposix" >&5
15279 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15280 if test "${ac_cv_lib_cposix_main+set}" = set; then
15281   echo $ECHO_N "(cached) $ECHO_C" >&6
15282 else
15283   ac_check_lib_save_LIBS=$LIBS
15284 LIBS="-lcposix  $LIBS"
15285 cat >conftest.$ac_ext <<_ACEOF
15286 #line 15286 "configure"
15287 #include "confdefs.h"
15288
15289 int
15290 main ()
15291 {
15292 main ();
15293   ;
15294   return 0;
15295 }
15296 _ACEOF
15297 rm -f conftest.$ac_objext conftest$ac_exeext
15298 if { (eval echo "$as_me:15298: \"$ac_link\"") >&5
15299   (eval $ac_link) 2>&5
15300   ac_status=$?
15301   echo "$as_me:15301: \$? = $ac_status" >&5
15302   (exit $ac_status); } &&
15303          { ac_try='test -s conftest$ac_exeext'
15304   { (eval echo "$as_me:15304: \"$ac_try\"") >&5
15305   (eval $ac_try) 2>&5
15306   ac_status=$?
15307   echo "$as_me:15307: \$? = $ac_status" >&5
15308   (exit $ac_status); }; }; then
15309   ac_cv_lib_cposix_main=yes
15310 else
15311   echo "$as_me: failed program was:" >&5
15312 cat conftest.$ac_ext >&5
15313 ac_cv_lib_cposix_main=no
15314 fi
15315 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15316 LIBS=$ac_check_lib_save_LIBS
15317 fi
15318 echo "$as_me:15318: result: $ac_cv_lib_cposix_main" >&5
15319 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15320 if test $ac_cv_lib_cposix_main = yes; then
15321   cat >>confdefs.h <<EOF
15322 #define HAVE_LIBCPOSIX 1
15323 EOF
15324
15325   LIBS="-lcposix $LIBS"
15326
15327 fi
15328
15329         echo "$as_me:15329: checking for bzero in -linet" >&5
15330 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15331 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15332   echo $ECHO_N "(cached) $ECHO_C" >&6
15333 else
15334   ac_check_lib_save_LIBS=$LIBS
15335 LIBS="-linet  $LIBS"
15336 cat >conftest.$ac_ext <<_ACEOF
15337 #line 15337 "configure"
15338 #include "confdefs.h"
15339
15340 /* Override any gcc2 internal prototype to avoid an error.  */
15341 #ifdef __cplusplus
15342 extern "C"
15343 #endif
15344 /* We use char because int might match the return type of a gcc2
15345    builtin and then its argument prototype would still apply.  */
15346 char bzero ();
15347 int
15348 main ()
15349 {
15350 bzero ();
15351   ;
15352   return 0;
15353 }
15354 _ACEOF
15355 rm -f conftest.$ac_objext conftest$ac_exeext
15356 if { (eval echo "$as_me:15356: \"$ac_link\"") >&5
15357   (eval $ac_link) 2>&5
15358   ac_status=$?
15359   echo "$as_me:15359: \$? = $ac_status" >&5
15360   (exit $ac_status); } &&
15361          { ac_try='test -s conftest$ac_exeext'
15362   { (eval echo "$as_me:15362: \"$ac_try\"") >&5
15363   (eval $ac_try) 2>&5
15364   ac_status=$?
15365   echo "$as_me:15365: \$? = $ac_status" >&5
15366   (exit $ac_status); }; }; then
15367   ac_cv_lib_inet_bzero=yes
15368 else
15369   echo "$as_me: failed program was:" >&5
15370 cat conftest.$ac_ext >&5
15371 ac_cv_lib_inet_bzero=no
15372 fi
15373 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15374 LIBS=$ac_check_lib_save_LIBS
15375 fi
15376 echo "$as_me:15376: result: $ac_cv_lib_inet_bzero" >&5
15377 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15378 if test $ac_cv_lib_inet_bzero = yes; then
15379
15380 cf_add_libs="-linet"
15381 # Filter out duplicates - this happens with badly-designed ".pc" files...
15382 for cf_add_1lib in $LIBS
15383 do
15384         for cf_add_2lib in $cf_add_libs
15385         do
15386                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15387                 then
15388                         cf_add_1lib=
15389                         break
15390                 fi
15391         done
15392         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15393 done
15394 LIBS="$cf_add_libs"
15395
15396 fi
15397 fi
15398
15399 echo "$as_me:15399: checking if sys/time.h works with sys/select.h" >&5
15400 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15401 if test "${cf_cv_sys_time_select+set}" = set; then
15402   echo $ECHO_N "(cached) $ECHO_C" >&6
15403 else
15404
15405 cat >conftest.$ac_ext <<_ACEOF
15406 #line 15406 "configure"
15407 #include "confdefs.h"
15408
15409 #include <sys/types.h>
15410 #ifdef HAVE_SYS_TIME_H
15411 #include <sys/time.h>
15412 #endif
15413 #ifdef HAVE_SYS_SELECT_H
15414 #include <sys/select.h>
15415 #endif
15416
15417 int
15418 main ()
15419 {
15420
15421   ;
15422   return 0;
15423 }
15424 _ACEOF
15425 rm -f conftest.$ac_objext
15426 if { (eval echo "$as_me:15426: \"$ac_compile\"") >&5
15427   (eval $ac_compile) 2>&5
15428   ac_status=$?
15429   echo "$as_me:15429: \$? = $ac_status" >&5
15430   (exit $ac_status); } &&
15431          { ac_try='test -s conftest.$ac_objext'
15432   { (eval echo "$as_me:15432: \"$ac_try\"") >&5
15433   (eval $ac_try) 2>&5
15434   ac_status=$?
15435   echo "$as_me:15435: \$? = $ac_status" >&5
15436   (exit $ac_status); }; }; then
15437   cf_cv_sys_time_select=yes
15438 else
15439   echo "$as_me: failed program was:" >&5
15440 cat conftest.$ac_ext >&5
15441 cf_cv_sys_time_select=no
15442 fi
15443 rm -f conftest.$ac_objext conftest.$ac_ext
15444
15445 fi
15446
15447 echo "$as_me:15447: result: $cf_cv_sys_time_select" >&5
15448 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15449 test "$cf_cv_sys_time_select" = yes &&
15450 cat >>confdefs.h <<\EOF
15451 #define HAVE_SYS_TIME_SELECT 1
15452 EOF
15453
15454 ###     checks for compiler characteristics
15455 ac_ext=c
15456 ac_cpp='$CPP $CPPFLAGS'
15457 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15458 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15459 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15460 ac_main_return=return
15461
15462 echo "$as_me:15462: checking for an ANSI C-conforming const" >&5
15463 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15464 if test "${ac_cv_c_const+set}" = set; then
15465   echo $ECHO_N "(cached) $ECHO_C" >&6
15466 else
15467   cat >conftest.$ac_ext <<_ACEOF
15468 #line 15468 "configure"
15469 #include "confdefs.h"
15470
15471 int
15472 main ()
15473 {
15474 /* FIXME: Include the comments suggested by Paul. */
15475 #ifndef __cplusplus
15476   /* Ultrix mips cc rejects this.  */
15477   typedef int charset[2];
15478   const charset x;
15479   /* SunOS 4.1.1 cc rejects this.  */
15480   char const *const *ccp;
15481   char **p;
15482   /* NEC SVR4.0.2 mips cc rejects this.  */
15483   struct point {int x, y;};
15484   static struct point const zero = {0,0};
15485   /* AIX XL C 1.02.0.0 rejects this.
15486      It does not let you subtract one const X* pointer from another in
15487      an arm of an if-expression whose if-part is not a constant
15488      expression */
15489   const char *g = "string";
15490   ccp = &g + (g ? g-g : 0);
15491   /* HPUX 7.0 cc rejects these. */
15492   ++ccp;
15493   p = (char**) ccp;
15494   ccp = (char const *const *) p;
15495   { /* SCO 3.2v4 cc rejects this.  */
15496     char *t;
15497     char const *s = 0 ? (char *) 0 : (char const *) 0;
15498
15499     *t++ = 0;
15500   }
15501   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15502     int x[] = {25, 17};
15503     const int *foo = &x[0];
15504     ++foo;
15505   }
15506   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15507     typedef const int *iptr;
15508     iptr p = 0;
15509     ++p;
15510   }
15511   { /* AIX XL C 1.02.0.0 rejects this saying
15512        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15513     struct s { int j; const int *ap[3]; };
15514     struct s *b; b->j = 5;
15515   }
15516   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15517     const int foo = 10;
15518   }
15519 #endif
15520
15521   ;
15522   return 0;
15523 }
15524 _ACEOF
15525 rm -f conftest.$ac_objext
15526 if { (eval echo "$as_me:15526: \"$ac_compile\"") >&5
15527   (eval $ac_compile) 2>&5
15528   ac_status=$?
15529   echo "$as_me:15529: \$? = $ac_status" >&5
15530   (exit $ac_status); } &&
15531          { ac_try='test -s conftest.$ac_objext'
15532   { (eval echo "$as_me:15532: \"$ac_try\"") >&5
15533   (eval $ac_try) 2>&5
15534   ac_status=$?
15535   echo "$as_me:15535: \$? = $ac_status" >&5
15536   (exit $ac_status); }; }; then
15537   ac_cv_c_const=yes
15538 else
15539   echo "$as_me: failed program was:" >&5
15540 cat conftest.$ac_ext >&5
15541 ac_cv_c_const=no
15542 fi
15543 rm -f conftest.$ac_objext conftest.$ac_ext
15544 fi
15545 echo "$as_me:15545: result: $ac_cv_c_const" >&5
15546 echo "${ECHO_T}$ac_cv_c_const" >&6
15547 if test $ac_cv_c_const = no; then
15548
15549 cat >>confdefs.h <<\EOF
15550 #define const
15551 EOF
15552
15553 fi
15554
15555 echo "$as_me:15555: checking for inline" >&5
15556 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15557 if test "${ac_cv_c_inline+set}" = set; then
15558   echo $ECHO_N "(cached) $ECHO_C" >&6
15559 else
15560   ac_cv_c_inline=no
15561 for ac_kw in inline __inline__ __inline; do
15562   cat >conftest.$ac_ext <<_ACEOF
15563 #line 15563 "configure"
15564 #include "confdefs.h"
15565 #ifndef __cplusplus
15566 static $ac_kw int static_foo () {return 0; }
15567 $ac_kw int foo () {return 0; }
15568 #endif
15569
15570 _ACEOF
15571 rm -f conftest.$ac_objext
15572 if { (eval echo "$as_me:15572: \"$ac_compile\"") >&5
15573   (eval $ac_compile) 2>&5
15574   ac_status=$?
15575   echo "$as_me:15575: \$? = $ac_status" >&5
15576   (exit $ac_status); } &&
15577          { ac_try='test -s conftest.$ac_objext'
15578   { (eval echo "$as_me:15578: \"$ac_try\"") >&5
15579   (eval $ac_try) 2>&5
15580   ac_status=$?
15581   echo "$as_me:15581: \$? = $ac_status" >&5
15582   (exit $ac_status); }; }; then
15583   ac_cv_c_inline=$ac_kw; break
15584 else
15585   echo "$as_me: failed program was:" >&5
15586 cat conftest.$ac_ext >&5
15587 fi
15588 rm -f conftest.$ac_objext conftest.$ac_ext
15589 done
15590
15591 fi
15592 echo "$as_me:15592: result: $ac_cv_c_inline" >&5
15593 echo "${ECHO_T}$ac_cv_c_inline" >&6
15594 case $ac_cv_c_inline in
15595   inline | yes) ;;
15596   no)
15597 cat >>confdefs.h <<\EOF
15598 #define inline
15599 EOF
15600  ;;
15601   *)  cat >>confdefs.h <<EOF
15602 #define inline $ac_cv_c_inline
15603 EOF
15604  ;;
15605 esac
15606
15607 NCURSES_INLINE=
15608 if test "$ac_cv_c_inline" != no ; then
15609   NCURSES_INLINE=inline
15610   if test "$INTEL_COMPILER" = yes
15611   then
15612     :
15613   elif test "$CLANG_COMPILER" = yes
15614   then
15615     :
15616   elif test "$GCC" = yes
15617   then
15618     echo "$as_me:15618: checking if $CC supports options to tune inlining" >&5
15619 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15620 if test "${cf_cv_gcc_inline+set}" = set; then
15621   echo $ECHO_N "(cached) $ECHO_C" >&6
15622 else
15623
15624       cf_save_CFLAGS=$CFLAGS
15625       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15626       cat >conftest.$ac_ext <<_ACEOF
15627 #line 15627 "configure"
15628 #include "confdefs.h"
15629 inline int foo(void) { return 1; }
15630 int
15631 main ()
15632 {
15633 ${cf_cv_main_return:-return} foo()
15634   ;
15635   return 0;
15636 }
15637 _ACEOF
15638 rm -f conftest.$ac_objext
15639 if { (eval echo "$as_me:15639: \"$ac_compile\"") >&5
15640   (eval $ac_compile) 2>&5
15641   ac_status=$?
15642   echo "$as_me:15642: \$? = $ac_status" >&5
15643   (exit $ac_status); } &&
15644          { ac_try='test -s conftest.$ac_objext'
15645   { (eval echo "$as_me:15645: \"$ac_try\"") >&5
15646   (eval $ac_try) 2>&5
15647   ac_status=$?
15648   echo "$as_me:15648: \$? = $ac_status" >&5
15649   (exit $ac_status); }; }; then
15650   cf_cv_gcc_inline=yes
15651 else
15652   echo "$as_me: failed program was:" >&5
15653 cat conftest.$ac_ext >&5
15654 cf_cv_gcc_inline=no
15655 fi
15656 rm -f conftest.$ac_objext conftest.$ac_ext
15657       CFLAGS=$cf_save_CFLAGS
15658
15659 fi
15660 echo "$as_me:15660: result: $cf_cv_gcc_inline" >&5
15661 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15662     if test "$cf_cv_gcc_inline" = yes ; then
15663
15664 cf_fix_cppflags=no
15665 cf_new_cflags=
15666 cf_new_cppflags=
15667 cf_new_extra_cppflags=
15668
15669 for cf_add_cflags in --param max-inline-insns-single=1200
15670 do
15671 case $cf_fix_cppflags in
15672 no)
15673         case $cf_add_cflags in #(vi
15674         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15675                 case $cf_add_cflags in
15676                 -D*)
15677                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15678
15679                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15680                                 && test -z "${cf_tst_cflags}" \
15681                                 && cf_fix_cppflags=yes
15682
15683                         if test $cf_fix_cppflags = yes ; then
15684                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15685                                 continue
15686                         elif test "${cf_tst_cflags}" = "\"'" ; then
15687                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15688                                 continue
15689                         fi
15690                         ;;
15691                 esac
15692                 case "$CPPFLAGS" in
15693                 *$cf_add_cflags) #(vi
15694                         ;;
15695                 *) #(vi
15696                         case $cf_add_cflags in #(vi
15697                         -D*)
15698                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15699
15700 CPPFLAGS=`echo "$CPPFLAGS" | \
15701         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15702                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15703
15704                                 ;;
15705                         esac
15706                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15707                         ;;
15708                 esac
15709                 ;;
15710         *)
15711                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15712                 ;;
15713         esac
15714         ;;
15715 yes)
15716         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15717
15718         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15719
15720         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15721                 && test -z "${cf_tst_cflags}" \
15722                 && cf_fix_cppflags=no
15723         ;;
15724 esac
15725 done
15726
15727 if test -n "$cf_new_cflags" ; then
15728
15729         CFLAGS="$CFLAGS $cf_new_cflags"
15730 fi
15731
15732 if test -n "$cf_new_cppflags" ; then
15733
15734         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15735 fi
15736
15737 if test -n "$cf_new_extra_cppflags" ; then
15738
15739         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15740 fi
15741
15742     fi
15743   fi
15744 fi
15745
15746 echo "$as_me:15746: checking for signal global datatype" >&5
15747 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15748 if test "${cf_cv_sig_atomic_t+set}" = set; then
15749   echo $ECHO_N "(cached) $ECHO_C" >&6
15750 else
15751
15752         for cf_type in \
15753                 "volatile sig_atomic_t" \
15754                 "sig_atomic_t" \
15755                 "int"
15756         do
15757         cat >conftest.$ac_ext <<_ACEOF
15758 #line 15758 "configure"
15759 #include "confdefs.h"
15760
15761 #include <sys/types.h>
15762 #include <signal.h>
15763 #include <stdio.h>
15764
15765 extern $cf_type x;
15766 $cf_type x;
15767 static void handler(int sig)
15768 {
15769         x = 5;
15770 }
15771 int
15772 main ()
15773 {
15774 signal(SIGINT, handler);
15775                  x = 1
15776   ;
15777   return 0;
15778 }
15779 _ACEOF
15780 rm -f conftest.$ac_objext
15781 if { (eval echo "$as_me:15781: \"$ac_compile\"") >&5
15782   (eval $ac_compile) 2>&5
15783   ac_status=$?
15784   echo "$as_me:15784: \$? = $ac_status" >&5
15785   (exit $ac_status); } &&
15786          { ac_try='test -s conftest.$ac_objext'
15787   { (eval echo "$as_me:15787: \"$ac_try\"") >&5
15788   (eval $ac_try) 2>&5
15789   ac_status=$?
15790   echo "$as_me:15790: \$? = $ac_status" >&5
15791   (exit $ac_status); }; }; then
15792   cf_cv_sig_atomic_t=$cf_type
15793 else
15794   echo "$as_me: failed program was:" >&5
15795 cat conftest.$ac_ext >&5
15796 cf_cv_sig_atomic_t=no
15797 fi
15798 rm -f conftest.$ac_objext conftest.$ac_ext
15799                 test "$cf_cv_sig_atomic_t" != no && break
15800         done
15801
15802 fi
15803
15804 echo "$as_me:15804: result: $cf_cv_sig_atomic_t" >&5
15805 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15806 test "$cf_cv_sig_atomic_t" != no &&
15807 cat >>confdefs.h <<EOF
15808 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15809 EOF
15810
15811 if test $NCURSES_CHTYPE = auto ; then
15812
15813 echo "$as_me:15813: checking for type of chtype" >&5
15814 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15815 if test "${cf_cv_typeof_chtype+set}" = set; then
15816   echo $ECHO_N "(cached) $ECHO_C" >&6
15817 else
15818
15819                 if test "$cross_compiling" = yes; then
15820   cf_cv_typeof_chtype=long
15821 else
15822   cat >conftest.$ac_ext <<_ACEOF
15823 #line 15823 "configure"
15824 #include "confdefs.h"
15825
15826 #define WANT_BITS 31
15827 #include <stdio.h>
15828 int main()
15829 {
15830         FILE *fp = fopen("cf_test.out", "w");
15831         if (fp != 0) {
15832                 char *result = "long";
15833                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15834                         int n;
15835                         unsigned int x, y;
15836                         for (n = 0; n < WANT_BITS; n++) {
15837                                 x = (1 << n);
15838                                 y = (x >> n);
15839                                 if (y != 1 || x == 0) {
15840                                         x = 0;
15841                                         break;
15842                                 }
15843                         }
15844                         /*
15845                          * If x is nonzero, an int is big enough for the bits
15846                          * that we want.
15847                          */
15848                         result = (x != 0) ? "int" : "long";
15849                 }
15850                 fputs(result, fp);
15851                 fclose(fp);
15852         }
15853         ${cf_cv_main_return:-return}(0);
15854 }
15855
15856 _ACEOF
15857 rm -f conftest$ac_exeext
15858 if { (eval echo "$as_me:15858: \"$ac_link\"") >&5
15859   (eval $ac_link) 2>&5
15860   ac_status=$?
15861   echo "$as_me:15861: \$? = $ac_status" >&5
15862   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15863   { (eval echo "$as_me:15863: \"$ac_try\"") >&5
15864   (eval $ac_try) 2>&5
15865   ac_status=$?
15866   echo "$as_me:15866: \$? = $ac_status" >&5
15867   (exit $ac_status); }; }; then
15868   cf_cv_typeof_chtype=`cat cf_test.out`
15869 else
15870   echo "$as_me: program exited with status $ac_status" >&5
15871 echo "$as_me: failed program was:" >&5
15872 cat conftest.$ac_ext >&5
15873 cf_cv_typeof_chtype=long
15874 fi
15875 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15876 fi
15877                 rm -f cf_test.out
15878
15879 fi
15880
15881 echo "$as_me:15881: result: $cf_cv_typeof_chtype" >&5
15882 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15883
15884 cat >>confdefs.h <<EOF
15885 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15886 EOF
15887
15888 else
15889         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15890 fi
15891 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15892
15893 echo "$as_me:15893: checking if unsigned literals are legal" >&5
15894 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15895 if test "${cf_cv_unsigned_literals+set}" = set; then
15896   echo $ECHO_N "(cached) $ECHO_C" >&6
15897 else
15898
15899         cat >conftest.$ac_ext <<_ACEOF
15900 #line 15900 "configure"
15901 #include "confdefs.h"
15902
15903 int
15904 main ()
15905 {
15906 long x = 1L + 1UL + 1U + 1
15907   ;
15908   return 0;
15909 }
15910 _ACEOF
15911 rm -f conftest.$ac_objext
15912 if { (eval echo "$as_me:15912: \"$ac_compile\"") >&5
15913   (eval $ac_compile) 2>&5
15914   ac_status=$?
15915   echo "$as_me:15915: \$? = $ac_status" >&5
15916   (exit $ac_status); } &&
15917          { ac_try='test -s conftest.$ac_objext'
15918   { (eval echo "$as_me:15918: \"$ac_try\"") >&5
15919   (eval $ac_try) 2>&5
15920   ac_status=$?
15921   echo "$as_me:15921: \$? = $ac_status" >&5
15922   (exit $ac_status); }; }; then
15923   cf_cv_unsigned_literals=yes
15924 else
15925   echo "$as_me: failed program was:" >&5
15926 cat conftest.$ac_ext >&5
15927 cf_cv_unsigned_literals=no
15928 fi
15929 rm -f conftest.$ac_objext conftest.$ac_ext
15930
15931 fi
15932
15933 echo "$as_me:15933: result: $cf_cv_unsigned_literals" >&5
15934 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15935
15936 cf_cv_1UL="1"
15937 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15938 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15939
15940 if test $NCURSES_MMASK_T = auto ; then
15941         cf_cv_typeof_mmask_t=long
15942 else
15943         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15944 fi
15945 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15946
15947 ###     Checks for external-data
15948
15949 echo "$as_me:15949: checking if external errno is declared" >&5
15950 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15951 if test "${cf_cv_dcl_errno+set}" = set; then
15952   echo $ECHO_N "(cached) $ECHO_C" >&6
15953 else
15954
15955     cat >conftest.$ac_ext <<_ACEOF
15956 #line 15956 "configure"
15957 #include "confdefs.h"
15958
15959 #ifdef HAVE_STDLIB_H
15960 #include <stdlib.h>
15961 #endif
15962 #include <stdio.h>
15963 #include <sys/types.h>
15964 #include <errno.h>
15965 int
15966 main ()
15967 {
15968 int x = (int) errno
15969   ;
15970   return 0;
15971 }
15972 _ACEOF
15973 rm -f conftest.$ac_objext
15974 if { (eval echo "$as_me:15974: \"$ac_compile\"") >&5
15975   (eval $ac_compile) 2>&5
15976   ac_status=$?
15977   echo "$as_me:15977: \$? = $ac_status" >&5
15978   (exit $ac_status); } &&
15979          { ac_try='test -s conftest.$ac_objext'
15980   { (eval echo "$as_me:15980: \"$ac_try\"") >&5
15981   (eval $ac_try) 2>&5
15982   ac_status=$?
15983   echo "$as_me:15983: \$? = $ac_status" >&5
15984   (exit $ac_status); }; }; then
15985   cf_cv_dcl_errno=yes
15986 else
15987   echo "$as_me: failed program was:" >&5
15988 cat conftest.$ac_ext >&5
15989 cf_cv_dcl_errno=no
15990 fi
15991 rm -f conftest.$ac_objext conftest.$ac_ext
15992
15993 fi
15994 echo "$as_me:15994: result: $cf_cv_dcl_errno" >&5
15995 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15996
15997 if test "$cf_cv_dcl_errno" = no ; then
15998
15999 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16000
16001     cat >>confdefs.h <<EOF
16002 #define $cf_result 1
16003 EOF
16004
16005 fi
16006
16007 # It's possible (for near-UNIX clones) that the data doesn't exist
16008
16009 echo "$as_me:16009: checking if external errno exists" >&5
16010 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16011 if test "${cf_cv_have_errno+set}" = set; then
16012   echo $ECHO_N "(cached) $ECHO_C" >&6
16013 else
16014
16015     cat >conftest.$ac_ext <<_ACEOF
16016 #line 16016 "configure"
16017 #include "confdefs.h"
16018
16019 #undef errno
16020 extern int errno;
16021
16022 int
16023 main ()
16024 {
16025 errno = 2
16026   ;
16027   return 0;
16028 }
16029 _ACEOF
16030 rm -f conftest.$ac_objext conftest$ac_exeext
16031 if { (eval echo "$as_me:16031: \"$ac_link\"") >&5
16032   (eval $ac_link) 2>&5
16033   ac_status=$?
16034   echo "$as_me:16034: \$? = $ac_status" >&5
16035   (exit $ac_status); } &&
16036          { ac_try='test -s conftest$ac_exeext'
16037   { (eval echo "$as_me:16037: \"$ac_try\"") >&5
16038   (eval $ac_try) 2>&5
16039   ac_status=$?
16040   echo "$as_me:16040: \$? = $ac_status" >&5
16041   (exit $ac_status); }; }; then
16042   cf_cv_have_errno=yes
16043 else
16044   echo "$as_me: failed program was:" >&5
16045 cat conftest.$ac_ext >&5
16046 cf_cv_have_errno=no
16047 fi
16048 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16049
16050 fi
16051 echo "$as_me:16051: result: $cf_cv_have_errno" >&5
16052 echo "${ECHO_T}$cf_cv_have_errno" >&6
16053
16054 if test "$cf_cv_have_errno" = yes ; then
16055
16056 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16057
16058     cat >>confdefs.h <<EOF
16059 #define $cf_result 1
16060 EOF
16061
16062 fi
16063
16064 echo "$as_me:16064: checking if data-only library module links" >&5
16065 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16066 if test "${cf_cv_link_dataonly+set}" = set; then
16067   echo $ECHO_N "(cached) $ECHO_C" >&6
16068 else
16069
16070         rm -f conftest.a
16071         cat >conftest.$ac_ext <<EOF
16072 #line 16072 "configure"
16073 int     testdata[3] = { 123, 456, 789 };
16074 EOF
16075         if { (eval echo "$as_me:16075: \"$ac_compile\"") >&5
16076   (eval $ac_compile) 2>&5
16077   ac_status=$?
16078   echo "$as_me:16078: \$? = $ac_status" >&5
16079   (exit $ac_status); } ; then
16080                 mv conftest.o data.o && \
16081                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16082         fi
16083         rm -f conftest.$ac_ext data.o
16084         cat >conftest.$ac_ext <<EOF
16085 #line 16085 "configure"
16086 int     testfunc()
16087 {
16088 #if defined(NeXT)
16089         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16090 #else
16091         extern int testdata[3];
16092         return testdata[0] == 123
16093            &&  testdata[1] == 456
16094            &&  testdata[2] == 789;
16095 #endif
16096 }
16097 EOF
16098         if { (eval echo "$as_me:16098: \"$ac_compile\"") >&5
16099   (eval $ac_compile) 2>&5
16100   ac_status=$?
16101   echo "$as_me:16101: \$? = $ac_status" >&5
16102   (exit $ac_status); }; then
16103                 mv conftest.o func.o && \
16104                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16105         fi
16106         rm -f conftest.$ac_ext func.o
16107         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16108         cf_saveLIBS="$LIBS"
16109         LIBS="conftest.a $LIBS"
16110         if test "$cross_compiling" = yes; then
16111   cf_cv_link_dataonly=unknown
16112 else
16113   cat >conftest.$ac_ext <<_ACEOF
16114 #line 16114 "configure"
16115 #include "confdefs.h"
16116
16117         int main()
16118         {
16119                 extern int testfunc();
16120                 ${cf_cv_main_return:-return} (!testfunc());
16121         }
16122
16123 _ACEOF
16124 rm -f conftest$ac_exeext
16125 if { (eval echo "$as_me:16125: \"$ac_link\"") >&5
16126   (eval $ac_link) 2>&5
16127   ac_status=$?
16128   echo "$as_me:16128: \$? = $ac_status" >&5
16129   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16130   { (eval echo "$as_me:16130: \"$ac_try\"") >&5
16131   (eval $ac_try) 2>&5
16132   ac_status=$?
16133   echo "$as_me:16133: \$? = $ac_status" >&5
16134   (exit $ac_status); }; }; then
16135   cf_cv_link_dataonly=yes
16136 else
16137   echo "$as_me: program exited with status $ac_status" >&5
16138 echo "$as_me: failed program was:" >&5
16139 cat conftest.$ac_ext >&5
16140 cf_cv_link_dataonly=no
16141 fi
16142 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16143 fi
16144         LIBS="$cf_saveLIBS"
16145
16146 fi
16147
16148 echo "$as_me:16148: result: $cf_cv_link_dataonly" >&5
16149 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16150
16151 if test "$cf_cv_link_dataonly" = no ; then
16152
16153 cat >>confdefs.h <<\EOF
16154 #define BROKEN_LINKER 1
16155 EOF
16156
16157         BROKEN_LINKER=1
16158 fi
16159
16160 ###     Checks for library functions.
16161
16162 for ac_func in \
16163 getcwd \
16164 getegid \
16165 geteuid \
16166 getopt \
16167 getttynam \
16168 issetugid \
16169 poll \
16170 putenv \
16171 remove \
16172 select \
16173 setbuf \
16174 setbuffer \
16175 setenv \
16176 setvbuf \
16177 sigaction \
16178 sigvec \
16179 strdup \
16180 strstr \
16181 tcgetpgrp \
16182 times \
16183 vsnprintf \
16184
16185 do
16186 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16187 echo "$as_me:16187: checking for $ac_func" >&5
16188 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16189 if eval "test \"\${$as_ac_var+set}\" = set"; then
16190   echo $ECHO_N "(cached) $ECHO_C" >&6
16191 else
16192   cat >conftest.$ac_ext <<_ACEOF
16193 #line 16193 "configure"
16194 #include "confdefs.h"
16195 /* System header to define __stub macros and hopefully few prototypes,
16196     which can conflict with char $ac_func (); below.  */
16197 #include <assert.h>
16198 /* Override any gcc2 internal prototype to avoid an error.  */
16199 #ifdef __cplusplus
16200 extern "C"
16201 #endif
16202 /* We use char because int might match the return type of a gcc2
16203    builtin and then its argument prototype would still apply.  */
16204 char $ac_func ();
16205 char (*f) ();
16206
16207 int
16208 main ()
16209 {
16210 /* The GNU C library defines this for functions which it implements
16211     to always fail with ENOSYS.  Some functions are actually named
16212     something starting with __ and the normal name is an alias.  */
16213 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16214 choke me
16215 #else
16216 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16217 #endif
16218
16219   ;
16220   return 0;
16221 }
16222 _ACEOF
16223 rm -f conftest.$ac_objext conftest$ac_exeext
16224 if { (eval echo "$as_me:16224: \"$ac_link\"") >&5
16225   (eval $ac_link) 2>&5
16226   ac_status=$?
16227   echo "$as_me:16227: \$? = $ac_status" >&5
16228   (exit $ac_status); } &&
16229          { ac_try='test -s conftest$ac_exeext'
16230   { (eval echo "$as_me:16230: \"$ac_try\"") >&5
16231   (eval $ac_try) 2>&5
16232   ac_status=$?
16233   echo "$as_me:16233: \$? = $ac_status" >&5
16234   (exit $ac_status); }; }; then
16235   eval "$as_ac_var=yes"
16236 else
16237   echo "$as_me: failed program was:" >&5
16238 cat conftest.$ac_ext >&5
16239 eval "$as_ac_var=no"
16240 fi
16241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16242 fi
16243 echo "$as_me:16243: result: `eval echo '${'$as_ac_var'}'`" >&5
16244 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16245 if test `eval echo '${'$as_ac_var'}'` = yes; then
16246   cat >>confdefs.h <<EOF
16247 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16248 EOF
16249
16250 fi
16251 done
16252
16253 if test "x$ac_cv_func_getopt" = xno &&
16254    test "x$cf_with_progs$cf_with_tests" != xnono; then
16255         { { echo "$as_me:16255: error: getopt is required for building programs" >&5
16256 echo "$as_me: error: getopt is required for building programs" >&2;}
16257    { (exit 1); exit 1; }; }
16258 fi
16259
16260 if test "x$with_getcap" = "xyes" ; then
16261
16262 echo "$as_me:16262: checking for terminal-capability database functions" >&5
16263 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16264 if test "${cf_cv_cgetent+set}" = set; then
16265   echo $ECHO_N "(cached) $ECHO_C" >&6
16266 else
16267
16268 cat >conftest.$ac_ext <<_ACEOF
16269 #line 16269 "configure"
16270 #include "confdefs.h"
16271
16272 #include <stdlib.h>
16273 int
16274 main ()
16275 {
16276
16277         char temp[128];
16278         char *buf = temp;
16279         char *db_array = temp;
16280         cgetent(&buf, &db_array, "vt100");
16281         cgetcap(buf, "tc", '=');
16282         cgetmatch(buf, "tc");
16283
16284   ;
16285   return 0;
16286 }
16287 _ACEOF
16288 rm -f conftest.$ac_objext conftest$ac_exeext
16289 if { (eval echo "$as_me:16289: \"$ac_link\"") >&5
16290   (eval $ac_link) 2>&5
16291   ac_status=$?
16292   echo "$as_me:16292: \$? = $ac_status" >&5
16293   (exit $ac_status); } &&
16294          { ac_try='test -s conftest$ac_exeext'
16295   { (eval echo "$as_me:16295: \"$ac_try\"") >&5
16296   (eval $ac_try) 2>&5
16297   ac_status=$?
16298   echo "$as_me:16298: \$? = $ac_status" >&5
16299   (exit $ac_status); }; }; then
16300   cf_cv_cgetent=yes
16301 else
16302   echo "$as_me: failed program was:" >&5
16303 cat conftest.$ac_ext >&5
16304 cf_cv_cgetent=no
16305 fi
16306 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16307
16308 fi
16309 echo "$as_me:16309: result: $cf_cv_cgetent" >&5
16310 echo "${ECHO_T}$cf_cv_cgetent" >&6
16311
16312 if test "$cf_cv_cgetent" = yes
16313 then
16314
16315 cat >>confdefs.h <<\EOF
16316 #define HAVE_BSD_CGETENT 1
16317 EOF
16318
16319 echo "$as_me:16319: checking if cgetent uses const parameter" >&5
16320 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16321 if test "${cf_cv_cgetent_const+set}" = set; then
16322   echo $ECHO_N "(cached) $ECHO_C" >&6
16323 else
16324
16325 cat >conftest.$ac_ext <<_ACEOF
16326 #line 16326 "configure"
16327 #include "confdefs.h"
16328
16329 #include <stdlib.h>
16330 int
16331 main ()
16332 {
16333
16334         char temp[128];
16335         char *buf = temp;
16336 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16337         const char *db_array = temp;
16338         cgetent(&buf, &db_array, "vt100");
16339 #endif
16340         cgetcap(buf, "tc", '=');
16341         cgetmatch(buf, "tc");
16342
16343   ;
16344   return 0;
16345 }
16346 _ACEOF
16347 rm -f conftest.$ac_objext conftest$ac_exeext
16348 if { (eval echo "$as_me:16348: \"$ac_link\"") >&5
16349   (eval $ac_link) 2>&5
16350   ac_status=$?
16351   echo "$as_me:16351: \$? = $ac_status" >&5
16352   (exit $ac_status); } &&
16353          { ac_try='test -s conftest$ac_exeext'
16354   { (eval echo "$as_me:16354: \"$ac_try\"") >&5
16355   (eval $ac_try) 2>&5
16356   ac_status=$?
16357   echo "$as_me:16357: \$? = $ac_status" >&5
16358   (exit $ac_status); }; }; then
16359   cf_cv_cgetent_const=yes
16360 else
16361   echo "$as_me: failed program was:" >&5
16362 cat conftest.$ac_ext >&5
16363 cf_cv_cgetent_const=no
16364 fi
16365 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16366
16367 fi
16368 echo "$as_me:16368: result: $cf_cv_cgetent_const" >&5
16369 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16370         if test "$cf_cv_cgetent_const" = yes
16371         then
16372
16373 cat >>confdefs.h <<EOF
16374 #define CGETENT_CONST const
16375 EOF
16376
16377         fi
16378 fi
16379
16380 fi
16381
16382 echo "$as_me:16382: checking for isascii" >&5
16383 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16384 if test "${cf_cv_have_isascii+set}" = set; then
16385   echo $ECHO_N "(cached) $ECHO_C" >&6
16386 else
16387
16388         cat >conftest.$ac_ext <<_ACEOF
16389 #line 16389 "configure"
16390 #include "confdefs.h"
16391 #include <ctype.h>
16392 int
16393 main ()
16394 {
16395 int x = isascii(' ')
16396   ;
16397   return 0;
16398 }
16399 _ACEOF
16400 rm -f conftest.$ac_objext conftest$ac_exeext
16401 if { (eval echo "$as_me:16401: \"$ac_link\"") >&5
16402   (eval $ac_link) 2>&5
16403   ac_status=$?
16404   echo "$as_me:16404: \$? = $ac_status" >&5
16405   (exit $ac_status); } &&
16406          { ac_try='test -s conftest$ac_exeext'
16407   { (eval echo "$as_me:16407: \"$ac_try\"") >&5
16408   (eval $ac_try) 2>&5
16409   ac_status=$?
16410   echo "$as_me:16410: \$? = $ac_status" >&5
16411   (exit $ac_status); }; }; then
16412   cf_cv_have_isascii=yes
16413 else
16414   echo "$as_me: failed program was:" >&5
16415 cat conftest.$ac_ext >&5
16416 cf_cv_have_isascii=no
16417 fi
16418 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16419
16420 fi
16421 echo "$as_me:16421: result: $cf_cv_have_isascii" >&5
16422 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16423 test "$cf_cv_have_isascii" = yes &&
16424 cat >>confdefs.h <<\EOF
16425 #define HAVE_ISASCII 1
16426 EOF
16427
16428 if test "$ac_cv_func_sigaction" = yes; then
16429 echo "$as_me:16429: checking whether sigaction needs _POSIX_SOURCE" >&5
16430 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16431 cat >conftest.$ac_ext <<_ACEOF
16432 #line 16432 "configure"
16433 #include "confdefs.h"
16434
16435 #include <sys/types.h>
16436 #include <signal.h>
16437 int
16438 main ()
16439 {
16440 struct sigaction act
16441   ;
16442   return 0;
16443 }
16444 _ACEOF
16445 rm -f conftest.$ac_objext
16446 if { (eval echo "$as_me:16446: \"$ac_compile\"") >&5
16447   (eval $ac_compile) 2>&5
16448   ac_status=$?
16449   echo "$as_me:16449: \$? = $ac_status" >&5
16450   (exit $ac_status); } &&
16451          { ac_try='test -s conftest.$ac_objext'
16452   { (eval echo "$as_me:16452: \"$ac_try\"") >&5
16453   (eval $ac_try) 2>&5
16454   ac_status=$?
16455   echo "$as_me:16455: \$? = $ac_status" >&5
16456   (exit $ac_status); }; }; then
16457   sigact_bad=no
16458 else
16459   echo "$as_me: failed program was:" >&5
16460 cat conftest.$ac_ext >&5
16461
16462 cat >conftest.$ac_ext <<_ACEOF
16463 #line 16463 "configure"
16464 #include "confdefs.h"
16465
16466 #define _POSIX_SOURCE
16467 #include <sys/types.h>
16468 #include <signal.h>
16469 int
16470 main ()
16471 {
16472 struct sigaction act
16473   ;
16474   return 0;
16475 }
16476 _ACEOF
16477 rm -f conftest.$ac_objext
16478 if { (eval echo "$as_me:16478: \"$ac_compile\"") >&5
16479   (eval $ac_compile) 2>&5
16480   ac_status=$?
16481   echo "$as_me:16481: \$? = $ac_status" >&5
16482   (exit $ac_status); } &&
16483          { ac_try='test -s conftest.$ac_objext'
16484   { (eval echo "$as_me:16484: \"$ac_try\"") >&5
16485   (eval $ac_try) 2>&5
16486   ac_status=$?
16487   echo "$as_me:16487: \$? = $ac_status" >&5
16488   (exit $ac_status); }; }; then
16489   sigact_bad=yes
16490
16491 cat >>confdefs.h <<\EOF
16492 #define _POSIX_SOURCE 1
16493 EOF
16494
16495 else
16496   echo "$as_me: failed program was:" >&5
16497 cat conftest.$ac_ext >&5
16498 sigact_bad=unknown
16499 fi
16500 rm -f conftest.$ac_objext conftest.$ac_ext
16501 fi
16502 rm -f conftest.$ac_objext conftest.$ac_ext
16503 echo "$as_me:16503: result: $sigact_bad" >&5
16504 echo "${ECHO_T}$sigact_bad" >&6
16505 fi
16506
16507 echo "$as_me:16507: checking if nanosleep really works" >&5
16508 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16509 if test "${cf_cv_func_nanosleep+set}" = set; then
16510   echo $ECHO_N "(cached) $ECHO_C" >&6
16511 else
16512
16513 if test "$cross_compiling" = yes; then
16514   cf_cv_func_nanosleep=unknown
16515 else
16516   cat >conftest.$ac_ext <<_ACEOF
16517 #line 16517 "configure"
16518 #include "confdefs.h"
16519
16520 #include <stdio.h>
16521 #include <errno.h>
16522 #include <time.h>
16523
16524 #ifdef HAVE_SYS_TIME_H
16525 #include <sys/time.h>
16526 #endif
16527
16528 int main() {
16529         struct timespec ts1, ts2;
16530         int code;
16531         ts1.tv_sec  = 0;
16532         ts1.tv_nsec = 750000000;
16533         ts2.tv_sec  = 0;
16534         ts2.tv_nsec = 0;
16535         errno = 0;
16536         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16537         ${cf_cv_main_return:-return}(code != 0);
16538 }
16539
16540 _ACEOF
16541 rm -f conftest$ac_exeext
16542 if { (eval echo "$as_me:16542: \"$ac_link\"") >&5
16543   (eval $ac_link) 2>&5
16544   ac_status=$?
16545   echo "$as_me:16545: \$? = $ac_status" >&5
16546   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16547   { (eval echo "$as_me:16547: \"$ac_try\"") >&5
16548   (eval $ac_try) 2>&5
16549   ac_status=$?
16550   echo "$as_me:16550: \$? = $ac_status" >&5
16551   (exit $ac_status); }; }; then
16552   cf_cv_func_nanosleep=yes
16553 else
16554   echo "$as_me: program exited with status $ac_status" >&5
16555 echo "$as_me: failed program was:" >&5
16556 cat conftest.$ac_ext >&5
16557 cf_cv_func_nanosleep=no
16558 fi
16559 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16560 fi
16561 fi
16562 echo "$as_me:16562: result: $cf_cv_func_nanosleep" >&5
16563 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16564
16565 test "$cf_cv_func_nanosleep" = "yes" &&
16566 cat >>confdefs.h <<\EOF
16567 #define HAVE_NANOSLEEP 1
16568 EOF
16569
16570 for ac_header in \
16571 termio.h \
16572 termios.h \
16573 unistd.h \
16574
16575 do
16576 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16577 echo "$as_me:16577: checking for $ac_header" >&5
16578 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16579 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16580   echo $ECHO_N "(cached) $ECHO_C" >&6
16581 else
16582   cat >conftest.$ac_ext <<_ACEOF
16583 #line 16583 "configure"
16584 #include "confdefs.h"
16585 #include <$ac_header>
16586 _ACEOF
16587 if { (eval echo "$as_me:16587: \"$ac_cpp conftest.$ac_ext\"") >&5
16588   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16589   ac_status=$?
16590   egrep -v '^ *\+' conftest.er1 >conftest.err
16591   rm -f conftest.er1
16592   cat conftest.err >&5
16593   echo "$as_me:16593: \$? = $ac_status" >&5
16594   (exit $ac_status); } >/dev/null; then
16595   if test -s conftest.err; then
16596     ac_cpp_err=$ac_c_preproc_warn_flag
16597   else
16598     ac_cpp_err=
16599   fi
16600 else
16601   ac_cpp_err=yes
16602 fi
16603 if test -z "$ac_cpp_err"; then
16604   eval "$as_ac_Header=yes"
16605 else
16606   echo "$as_me: failed program was:" >&5
16607   cat conftest.$ac_ext >&5
16608   eval "$as_ac_Header=no"
16609 fi
16610 rm -f conftest.err conftest.$ac_ext
16611 fi
16612 echo "$as_me:16612: result: `eval echo '${'$as_ac_Header'}'`" >&5
16613 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16614 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16615   cat >>confdefs.h <<EOF
16616 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16617 EOF
16618
16619 fi
16620 done
16621
16622 if test "$ISC" = yes ; then
16623
16624 for ac_header in sys/termio.h
16625 do
16626 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16627 echo "$as_me:16627: checking for $ac_header" >&5
16628 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16629 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16630   echo $ECHO_N "(cached) $ECHO_C" >&6
16631 else
16632   cat >conftest.$ac_ext <<_ACEOF
16633 #line 16633 "configure"
16634 #include "confdefs.h"
16635 #include <$ac_header>
16636 _ACEOF
16637 if { (eval echo "$as_me:16637: \"$ac_cpp conftest.$ac_ext\"") >&5
16638   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16639   ac_status=$?
16640   egrep -v '^ *\+' conftest.er1 >conftest.err
16641   rm -f conftest.er1
16642   cat conftest.err >&5
16643   echo "$as_me:16643: \$? = $ac_status" >&5
16644   (exit $ac_status); } >/dev/null; then
16645   if test -s conftest.err; then
16646     ac_cpp_err=$ac_c_preproc_warn_flag
16647   else
16648     ac_cpp_err=
16649   fi
16650 else
16651   ac_cpp_err=yes
16652 fi
16653 if test -z "$ac_cpp_err"; then
16654   eval "$as_ac_Header=yes"
16655 else
16656   echo "$as_me: failed program was:" >&5
16657   cat conftest.$ac_ext >&5
16658   eval "$as_ac_Header=no"
16659 fi
16660 rm -f conftest.err conftest.$ac_ext
16661 fi
16662 echo "$as_me:16662: result: `eval echo '${'$as_ac_Header'}'`" >&5
16663 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16664 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16665   cat >>confdefs.h <<EOF
16666 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16667 EOF
16668
16669 fi
16670 done
16671
16672 fi
16673 if test "$ac_cv_header_termios_h" = yes ; then
16674         case "$CFLAGS $CPPFLAGS" in
16675         *-D_POSIX_SOURCE*)
16676                 termios_bad=dunno ;;
16677         *)      termios_bad=maybe ;;
16678         esac
16679         if test "$termios_bad" = maybe ; then
16680         echo "$as_me:16680: checking whether termios.h needs _POSIX_SOURCE" >&5
16681 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16682         cat >conftest.$ac_ext <<_ACEOF
16683 #line 16683 "configure"
16684 #include "confdefs.h"
16685 #include <termios.h>
16686 int
16687 main ()
16688 {
16689 struct termios foo; int x = foo.c_iflag
16690   ;
16691   return 0;
16692 }
16693 _ACEOF
16694 rm -f conftest.$ac_objext
16695 if { (eval echo "$as_me:16695: \"$ac_compile\"") >&5
16696   (eval $ac_compile) 2>&5
16697   ac_status=$?
16698   echo "$as_me:16698: \$? = $ac_status" >&5
16699   (exit $ac_status); } &&
16700          { ac_try='test -s conftest.$ac_objext'
16701   { (eval echo "$as_me:16701: \"$ac_try\"") >&5
16702   (eval $ac_try) 2>&5
16703   ac_status=$?
16704   echo "$as_me:16704: \$? = $ac_status" >&5
16705   (exit $ac_status); }; }; then
16706   termios_bad=no
16707 else
16708   echo "$as_me: failed program was:" >&5
16709 cat conftest.$ac_ext >&5
16710
16711                 cat >conftest.$ac_ext <<_ACEOF
16712 #line 16712 "configure"
16713 #include "confdefs.h"
16714
16715 #define _POSIX_SOURCE
16716 #include <termios.h>
16717 int
16718 main ()
16719 {
16720 struct termios foo; int x = foo.c_iflag
16721   ;
16722   return 0;
16723 }
16724 _ACEOF
16725 rm -f conftest.$ac_objext
16726 if { (eval echo "$as_me:16726: \"$ac_compile\"") >&5
16727   (eval $ac_compile) 2>&5
16728   ac_status=$?
16729   echo "$as_me:16729: \$? = $ac_status" >&5
16730   (exit $ac_status); } &&
16731          { ac_try='test -s conftest.$ac_objext'
16732   { (eval echo "$as_me:16732: \"$ac_try\"") >&5
16733   (eval $ac_try) 2>&5
16734   ac_status=$?
16735   echo "$as_me:16735: \$? = $ac_status" >&5
16736   (exit $ac_status); }; }; then
16737   termios_bad=unknown
16738 else
16739   echo "$as_me: failed program was:" >&5
16740 cat conftest.$ac_ext >&5
16741 termios_bad=yes
16742 cat >>confdefs.h <<\EOF
16743 #define _POSIX_SOURCE 1
16744 EOF
16745
16746 fi
16747 rm -f conftest.$ac_objext conftest.$ac_ext
16748
16749 fi
16750 rm -f conftest.$ac_objext conftest.$ac_ext
16751         echo "$as_me:16751: result: $termios_bad" >&5
16752 echo "${ECHO_T}$termios_bad" >&6
16753         fi
16754 fi
16755
16756 echo "$as_me:16756: checking for tcgetattr" >&5
16757 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16758 if test "${cf_cv_have_tcgetattr+set}" = set; then
16759   echo $ECHO_N "(cached) $ECHO_C" >&6
16760 else
16761
16762 cat >conftest.$ac_ext <<_ACEOF
16763 #line 16763 "configure"
16764 #include "confdefs.h"
16765
16766 #include <sys/types.h>
16767 #ifdef HAVE_UNISTD_H
16768 #include <unistd.h>
16769 #endif
16770 #ifdef HAVE_TERMIOS_H
16771 #include <termios.h>
16772 #define TTY struct termios
16773 #else
16774 #ifdef HAVE_TERMIO_H
16775 #include <termio.h>
16776 #define TTY struct termio
16777 #endif
16778 #endif
16779
16780 int
16781 main ()
16782 {
16783
16784 TTY foo;
16785 tcgetattr(1, &foo);
16786   ;
16787   return 0;
16788 }
16789 _ACEOF
16790 rm -f conftest.$ac_objext conftest$ac_exeext
16791 if { (eval echo "$as_me:16791: \"$ac_link\"") >&5
16792   (eval $ac_link) 2>&5
16793   ac_status=$?
16794   echo "$as_me:16794: \$? = $ac_status" >&5
16795   (exit $ac_status); } &&
16796          { ac_try='test -s conftest$ac_exeext'
16797   { (eval echo "$as_me:16797: \"$ac_try\"") >&5
16798   (eval $ac_try) 2>&5
16799   ac_status=$?
16800   echo "$as_me:16800: \$? = $ac_status" >&5
16801   (exit $ac_status); }; }; then
16802   cf_cv_have_tcgetattr=yes
16803 else
16804   echo "$as_me: failed program was:" >&5
16805 cat conftest.$ac_ext >&5
16806 cf_cv_have_tcgetattr=no
16807 fi
16808 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16809 fi
16810 echo "$as_me:16810: result: $cf_cv_have_tcgetattr" >&5
16811 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16812 test "$cf_cv_have_tcgetattr" = yes &&
16813 cat >>confdefs.h <<\EOF
16814 #define HAVE_TCGETATTR 1
16815 EOF
16816
16817 echo "$as_me:16817: checking for vsscanf function or workaround" >&5
16818 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16819 if test "${cf_cv_func_vsscanf+set}" = set; then
16820   echo $ECHO_N "(cached) $ECHO_C" >&6
16821 else
16822
16823 cat >conftest.$ac_ext <<_ACEOF
16824 #line 16824 "configure"
16825 #include "confdefs.h"
16826
16827 #include <stdarg.h>
16828 #include <stdio.h>
16829 int
16830 main ()
16831 {
16832
16833         va_list ap;
16834         vsscanf("from", "%d", ap)
16835   ;
16836   return 0;
16837 }
16838 _ACEOF
16839 rm -f conftest.$ac_objext conftest$ac_exeext
16840 if { (eval echo "$as_me:16840: \"$ac_link\"") >&5
16841   (eval $ac_link) 2>&5
16842   ac_status=$?
16843   echo "$as_me:16843: \$? = $ac_status" >&5
16844   (exit $ac_status); } &&
16845          { ac_try='test -s conftest$ac_exeext'
16846   { (eval echo "$as_me:16846: \"$ac_try\"") >&5
16847   (eval $ac_try) 2>&5
16848   ac_status=$?
16849   echo "$as_me:16849: \$? = $ac_status" >&5
16850   (exit $ac_status); }; }; then
16851   cf_cv_func_vsscanf=vsscanf
16852 else
16853   echo "$as_me: failed program was:" >&5
16854 cat conftest.$ac_ext >&5
16855
16856 cat >conftest.$ac_ext <<_ACEOF
16857 #line 16857 "configure"
16858 #include "confdefs.h"
16859
16860 #include <stdarg.h>
16861 #include <stdio.h>
16862 int
16863 main ()
16864 {
16865
16866     FILE strbuf;
16867     char *str = "from";
16868
16869     strbuf._flag = _IOREAD;
16870     strbuf._ptr = strbuf._base = (unsigned char *) str;
16871     strbuf._cnt = strlen(str);
16872     strbuf._file = _NFILE;
16873     return (vfscanf(&strbuf, "%d", ap))
16874   ;
16875   return 0;
16876 }
16877 _ACEOF
16878 rm -f conftest.$ac_objext conftest$ac_exeext
16879 if { (eval echo "$as_me:16879: \"$ac_link\"") >&5
16880   (eval $ac_link) 2>&5
16881   ac_status=$?
16882   echo "$as_me:16882: \$? = $ac_status" >&5
16883   (exit $ac_status); } &&
16884          { ac_try='test -s conftest$ac_exeext'
16885   { (eval echo "$as_me:16885: \"$ac_try\"") >&5
16886   (eval $ac_try) 2>&5
16887   ac_status=$?
16888   echo "$as_me:16888: \$? = $ac_status" >&5
16889   (exit $ac_status); }; }; then
16890   cf_cv_func_vsscanf=vfscanf
16891 else
16892   echo "$as_me: failed program was:" >&5
16893 cat conftest.$ac_ext >&5
16894
16895 cat >conftest.$ac_ext <<_ACEOF
16896 #line 16896 "configure"
16897 #include "confdefs.h"
16898
16899 #include <stdarg.h>
16900 #include <stdio.h>
16901 int
16902 main ()
16903 {
16904
16905     FILE strbuf;
16906     char *str = "from";
16907
16908     strbuf._flag = _IOREAD;
16909     strbuf._ptr = strbuf._base = (unsigned char *) str;
16910     strbuf._cnt = strlen(str);
16911     strbuf._file = _NFILE;
16912     return (_doscan(&strbuf, "%d", ap))
16913   ;
16914   return 0;
16915 }
16916 _ACEOF
16917 rm -f conftest.$ac_objext conftest$ac_exeext
16918 if { (eval echo "$as_me:16918: \"$ac_link\"") >&5
16919   (eval $ac_link) 2>&5
16920   ac_status=$?
16921   echo "$as_me:16921: \$? = $ac_status" >&5
16922   (exit $ac_status); } &&
16923          { ac_try='test -s conftest$ac_exeext'
16924   { (eval echo "$as_me:16924: \"$ac_try\"") >&5
16925   (eval $ac_try) 2>&5
16926   ac_status=$?
16927   echo "$as_me:16927: \$? = $ac_status" >&5
16928   (exit $ac_status); }; }; then
16929   cf_cv_func_vsscanf=_doscan
16930 else
16931   echo "$as_me: failed program was:" >&5
16932 cat conftest.$ac_ext >&5
16933
16934 cf_cv_func_vsscanf=no
16935 fi
16936 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16937 fi
16938 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16939 fi
16940 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16941 fi
16942 echo "$as_me:16942: result: $cf_cv_func_vsscanf" >&5
16943 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16944
16945 case $cf_cv_func_vsscanf in #(vi
16946 vsscanf)
16947 cat >>confdefs.h <<\EOF
16948 #define HAVE_VSSCANF 1
16949 EOF
16950 ;; #(vi
16951 vfscanf)
16952 cat >>confdefs.h <<\EOF
16953 #define HAVE_VFSCANF 1
16954 EOF
16955 ;; #(vi
16956 _doscan)
16957 cat >>confdefs.h <<\EOF
16958 #define HAVE__DOSCAN 1
16959 EOF
16960 ;;
16961 esac
16962
16963 echo "$as_me:16963: checking for working mkstemp" >&5
16964 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16965 if test "${cf_cv_func_mkstemp+set}" = set; then
16966   echo $ECHO_N "(cached) $ECHO_C" >&6
16967 else
16968
16969 rm -rf conftest*
16970 if test "$cross_compiling" = yes; then
16971   cf_cv_func_mkstemp=maybe
16972 else
16973   cat >conftest.$ac_ext <<_ACEOF
16974 #line 16974 "configure"
16975 #include "confdefs.h"
16976
16977 #include <sys/types.h>
16978 #include <stdlib.h>
16979 #include <stdio.h>
16980 #include <string.h>
16981 #include <sys/stat.h>
16982 int main()
16983 {
16984         char *tmpl = "conftestXXXXXX";
16985         char name[2][80];
16986         int n;
16987         int result = 0;
16988         int fd;
16989         struct stat sb;
16990
16991         umask(077);
16992         for (n = 0; n < 2; ++n) {
16993                 strcpy(name[n], tmpl);
16994                 if ((fd = mkstemp(name[n])) >= 0) {
16995                         if (!strcmp(name[n], tmpl)
16996                          || stat(name[n], &sb) != 0
16997                          || (sb.st_mode & S_IFMT) != S_IFREG
16998                          || (sb.st_mode & 077) != 0) {
16999                                 result = 1;
17000                         }
17001                         close(fd);
17002                 }
17003         }
17004         if (result == 0
17005          && !strcmp(name[0], name[1]))
17006                 result = 1;
17007         ${cf_cv_main_return:-return}(result);
17008 }
17009
17010 _ACEOF
17011 rm -f conftest$ac_exeext
17012 if { (eval echo "$as_me:17012: \"$ac_link\"") >&5
17013   (eval $ac_link) 2>&5
17014   ac_status=$?
17015   echo "$as_me:17015: \$? = $ac_status" >&5
17016   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17017   { (eval echo "$as_me:17017: \"$ac_try\"") >&5
17018   (eval $ac_try) 2>&5
17019   ac_status=$?
17020   echo "$as_me:17020: \$? = $ac_status" >&5
17021   (exit $ac_status); }; }; then
17022   cf_cv_func_mkstemp=yes
17023
17024 else
17025   echo "$as_me: program exited with status $ac_status" >&5
17026 echo "$as_me: failed program was:" >&5
17027 cat conftest.$ac_ext >&5
17028 cf_cv_func_mkstemp=no
17029
17030 fi
17031 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17032 fi
17033
17034 fi
17035 echo "$as_me:17035: result: $cf_cv_func_mkstemp" >&5
17036 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17037 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17038         echo "$as_me:17038: checking for mkstemp" >&5
17039 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17040 if test "${ac_cv_func_mkstemp+set}" = set; then
17041   echo $ECHO_N "(cached) $ECHO_C" >&6
17042 else
17043   cat >conftest.$ac_ext <<_ACEOF
17044 #line 17044 "configure"
17045 #include "confdefs.h"
17046 /* System header to define __stub macros and hopefully few prototypes,
17047     which can conflict with char mkstemp (); below.  */
17048 #include <assert.h>
17049 /* Override any gcc2 internal prototype to avoid an error.  */
17050 #ifdef __cplusplus
17051 extern "C"
17052 #endif
17053 /* We use char because int might match the return type of a gcc2
17054    builtin and then its argument prototype would still apply.  */
17055 char mkstemp ();
17056 char (*f) ();
17057
17058 int
17059 main ()
17060 {
17061 /* The GNU C library defines this for functions which it implements
17062     to always fail with ENOSYS.  Some functions are actually named
17063     something starting with __ and the normal name is an alias.  */
17064 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17065 choke me
17066 #else
17067 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17068 #endif
17069
17070   ;
17071   return 0;
17072 }
17073 _ACEOF
17074 rm -f conftest.$ac_objext conftest$ac_exeext
17075 if { (eval echo "$as_me:17075: \"$ac_link\"") >&5
17076   (eval $ac_link) 2>&5
17077   ac_status=$?
17078   echo "$as_me:17078: \$? = $ac_status" >&5
17079   (exit $ac_status); } &&
17080          { ac_try='test -s conftest$ac_exeext'
17081   { (eval echo "$as_me:17081: \"$ac_try\"") >&5
17082   (eval $ac_try) 2>&5
17083   ac_status=$?
17084   echo "$as_me:17084: \$? = $ac_status" >&5
17085   (exit $ac_status); }; }; then
17086   ac_cv_func_mkstemp=yes
17087 else
17088   echo "$as_me: failed program was:" >&5
17089 cat conftest.$ac_ext >&5
17090 ac_cv_func_mkstemp=no
17091 fi
17092 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17093 fi
17094 echo "$as_me:17094: result: $ac_cv_func_mkstemp" >&5
17095 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17096
17097 fi
17098 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17099
17100 cat >>confdefs.h <<\EOF
17101 #define HAVE_MKSTEMP 1
17102 EOF
17103
17104 fi
17105
17106 # setup for prototype of fallback for vsscanf()
17107
17108 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17109         HAVE_VSSCANF=1
17110 else
17111         HAVE_VSSCANF=0
17112 fi
17113
17114 if test "x$cross_compiling" = xyes ; then
17115         { echo "$as_me:17115: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17116 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17117 else
17118         echo "$as_me:17118: checking whether setvbuf arguments are reversed" >&5
17119 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17120 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17121   echo $ECHO_N "(cached) $ECHO_C" >&6
17122 else
17123   if test "$cross_compiling" = yes; then
17124   { { echo "$as_me:17124: error: cannot run test program while cross compiling" >&5
17125 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17126    { (exit 1); exit 1; }; }
17127 else
17128   cat >conftest.$ac_ext <<_ACEOF
17129 #line 17129 "configure"
17130 #include "confdefs.h"
17131 #include <stdio.h>
17132 /* If setvbuf has the reversed format, exit 0. */
17133 int
17134 main ()
17135 {
17136   /* This call has the arguments reversed.
17137      A reversed system may check and see that the address of main
17138      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17139   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17140     $ac_main_return(1);
17141   putc('\r', stdout);
17142   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17143 }
17144 _ACEOF
17145 rm -f conftest$ac_exeext
17146 if { (eval echo "$as_me:17146: \"$ac_link\"") >&5
17147   (eval $ac_link) 2>&5
17148   ac_status=$?
17149   echo "$as_me:17149: \$? = $ac_status" >&5
17150   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17151   { (eval echo "$as_me:17151: \"$ac_try\"") >&5
17152   (eval $ac_try) 2>&5
17153   ac_status=$?
17154   echo "$as_me:17154: \$? = $ac_status" >&5
17155   (exit $ac_status); }; }; then
17156   ac_cv_func_setvbuf_reversed=yes
17157 else
17158   echo "$as_me: program exited with status $ac_status" >&5
17159 echo "$as_me: failed program was:" >&5
17160 cat conftest.$ac_ext >&5
17161 ac_cv_func_setvbuf_reversed=no
17162 fi
17163 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17164 fi
17165 rm -f core core.* *.core
17166 fi
17167 echo "$as_me:17167: result: $ac_cv_func_setvbuf_reversed" >&5
17168 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17169 if test $ac_cv_func_setvbuf_reversed = yes; then
17170
17171 cat >>confdefs.h <<\EOF
17172 #define SETVBUF_REVERSED 1
17173 EOF
17174
17175 fi
17176
17177 fi
17178 echo "$as_me:17178: checking for intptr_t" >&5
17179 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17180 if test "${ac_cv_type_intptr_t+set}" = set; then
17181   echo $ECHO_N "(cached) $ECHO_C" >&6
17182 else
17183   cat >conftest.$ac_ext <<_ACEOF
17184 #line 17184 "configure"
17185 #include "confdefs.h"
17186 $ac_includes_default
17187 int
17188 main ()
17189 {
17190 if ((intptr_t *) 0)
17191   return 0;
17192 if (sizeof (intptr_t))
17193   return 0;
17194   ;
17195   return 0;
17196 }
17197 _ACEOF
17198 rm -f conftest.$ac_objext
17199 if { (eval echo "$as_me:17199: \"$ac_compile\"") >&5
17200   (eval $ac_compile) 2>&5
17201   ac_status=$?
17202   echo "$as_me:17202: \$? = $ac_status" >&5
17203   (exit $ac_status); } &&
17204          { ac_try='test -s conftest.$ac_objext'
17205   { (eval echo "$as_me:17205: \"$ac_try\"") >&5
17206   (eval $ac_try) 2>&5
17207   ac_status=$?
17208   echo "$as_me:17208: \$? = $ac_status" >&5
17209   (exit $ac_status); }; }; then
17210   ac_cv_type_intptr_t=yes
17211 else
17212   echo "$as_me: failed program was:" >&5
17213 cat conftest.$ac_ext >&5
17214 ac_cv_type_intptr_t=no
17215 fi
17216 rm -f conftest.$ac_objext conftest.$ac_ext
17217 fi
17218 echo "$as_me:17218: result: $ac_cv_type_intptr_t" >&5
17219 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17220 if test $ac_cv_type_intptr_t = yes; then
17221   :
17222 else
17223
17224 cat >>confdefs.h <<EOF
17225 #define intptr_t long
17226 EOF
17227
17228 fi
17229
17230 echo "$as_me:17230: checking for type sigaction_t" >&5
17231 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17232 if test "${cf_cv_type_sigaction+set}" = set; then
17233   echo $ECHO_N "(cached) $ECHO_C" >&6
17234 else
17235
17236         cat >conftest.$ac_ext <<_ACEOF
17237 #line 17237 "configure"
17238 #include "confdefs.h"
17239
17240 #include <signal.h>
17241 int
17242 main ()
17243 {
17244 sigaction_t x
17245   ;
17246   return 0;
17247 }
17248 _ACEOF
17249 rm -f conftest.$ac_objext
17250 if { (eval echo "$as_me:17250: \"$ac_compile\"") >&5
17251   (eval $ac_compile) 2>&5
17252   ac_status=$?
17253   echo "$as_me:17253: \$? = $ac_status" >&5
17254   (exit $ac_status); } &&
17255          { ac_try='test -s conftest.$ac_objext'
17256   { (eval echo "$as_me:17256: \"$ac_try\"") >&5
17257   (eval $ac_try) 2>&5
17258   ac_status=$?
17259   echo "$as_me:17259: \$? = $ac_status" >&5
17260   (exit $ac_status); }; }; then
17261   cf_cv_type_sigaction=yes
17262 else
17263   echo "$as_me: failed program was:" >&5
17264 cat conftest.$ac_ext >&5
17265 cf_cv_type_sigaction=no
17266 fi
17267 rm -f conftest.$ac_objext conftest.$ac_ext
17268 fi
17269
17270 echo "$as_me:17270: result: $cf_cv_type_sigaction" >&5
17271 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17272 test "$cf_cv_type_sigaction" = yes &&
17273 cat >>confdefs.h <<\EOF
17274 #define HAVE_TYPE_SIGACTION 1
17275 EOF
17276
17277 echo "$as_me:17277: checking declaration of size-change" >&5
17278 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17279 if test "${cf_cv_sizechange+set}" = set; then
17280   echo $ECHO_N "(cached) $ECHO_C" >&6
17281 else
17282
17283     cf_cv_sizechange=unknown
17284     cf_save_CPPFLAGS="$CPPFLAGS"
17285
17286 for cf_opts in "" "NEED_PTEM_H"
17287 do
17288
17289     CPPFLAGS="$cf_save_CPPFLAGS"
17290     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17291     cat >conftest.$ac_ext <<_ACEOF
17292 #line 17292 "configure"
17293 #include "confdefs.h"
17294 #include <sys/types.h>
17295 #ifdef HAVE_TERMIOS_H
17296 #include <termios.h>
17297 #else
17298 #ifdef HAVE_TERMIO_H
17299 #include <termio.h>
17300 #endif
17301 #endif
17302 #ifdef NEED_PTEM_H
17303 /* This is a workaround for SCO:  they neglected to define struct winsize in
17304  * termios.h -- it's only in termio.h and ptem.h
17305  */
17306 #include        <sys/stream.h>
17307 #include        <sys/ptem.h>
17308 #endif
17309 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17310 #include <sys/ioctl.h>
17311 #endif
17312
17313 int
17314 main ()
17315 {
17316
17317 #ifdef TIOCGSIZE
17318         struct ttysize win;     /* FIXME: what system is this? */
17319         int y = win.ts_lines;
17320         int x = win.ts_cols;
17321 #else
17322 #ifdef TIOCGWINSZ
17323         struct winsize win;
17324         int y = win.ws_row;
17325         int x = win.ws_col;
17326 #else
17327         no TIOCGSIZE or TIOCGWINSZ
17328 #endif /* TIOCGWINSZ */
17329 #endif /* TIOCGSIZE */
17330
17331   ;
17332   return 0;
17333 }
17334 _ACEOF
17335 rm -f conftest.$ac_objext
17336 if { (eval echo "$as_me:17336: \"$ac_compile\"") >&5
17337   (eval $ac_compile) 2>&5
17338   ac_status=$?
17339   echo "$as_me:17339: \$? = $ac_status" >&5
17340   (exit $ac_status); } &&
17341          { ac_try='test -s conftest.$ac_objext'
17342   { (eval echo "$as_me:17342: \"$ac_try\"") >&5
17343   (eval $ac_try) 2>&5
17344   ac_status=$?
17345   echo "$as_me:17345: \$? = $ac_status" >&5
17346   (exit $ac_status); }; }; then
17347   cf_cv_sizechange=yes
17348 else
17349   echo "$as_me: failed program was:" >&5
17350 cat conftest.$ac_ext >&5
17351 cf_cv_sizechange=no
17352 fi
17353 rm -f conftest.$ac_objext conftest.$ac_ext
17354
17355         CPPFLAGS="$cf_save_CPPFLAGS"
17356         if test "$cf_cv_sizechange" = yes ; then
17357                 echo "size-change succeeded ($cf_opts)" >&5
17358                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17359                 break
17360         fi
17361 done
17362
17363 fi
17364 echo "$as_me:17364: result: $cf_cv_sizechange" >&5
17365 echo "${ECHO_T}$cf_cv_sizechange" >&6
17366 if test "$cf_cv_sizechange" != no ; then
17367
17368 cat >>confdefs.h <<\EOF
17369 #define HAVE_SIZECHANGE 1
17370 EOF
17371
17372         case $cf_cv_sizechange in #(vi
17373         NEED*)
17374                 cat >>confdefs.h <<EOF
17375 #define $cf_cv_sizechange  1
17376 EOF
17377
17378                 ;;
17379         esac
17380 fi
17381
17382 echo "$as_me:17382: checking for memmove" >&5
17383 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17384 if test "${ac_cv_func_memmove+set}" = set; then
17385   echo $ECHO_N "(cached) $ECHO_C" >&6
17386 else
17387   cat >conftest.$ac_ext <<_ACEOF
17388 #line 17388 "configure"
17389 #include "confdefs.h"
17390 /* System header to define __stub macros and hopefully few prototypes,
17391     which can conflict with char memmove (); below.  */
17392 #include <assert.h>
17393 /* Override any gcc2 internal prototype to avoid an error.  */
17394 #ifdef __cplusplus
17395 extern "C"
17396 #endif
17397 /* We use char because int might match the return type of a gcc2
17398    builtin and then its argument prototype would still apply.  */
17399 char memmove ();
17400 char (*f) ();
17401
17402 int
17403 main ()
17404 {
17405 /* The GNU C library defines this for functions which it implements
17406     to always fail with ENOSYS.  Some functions are actually named
17407     something starting with __ and the normal name is an alias.  */
17408 #if defined (__stub_memmove) || defined (__stub___memmove)
17409 choke me
17410 #else
17411 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17412 #endif
17413
17414   ;
17415   return 0;
17416 }
17417 _ACEOF
17418 rm -f conftest.$ac_objext conftest$ac_exeext
17419 if { (eval echo "$as_me:17419: \"$ac_link\"") >&5
17420   (eval $ac_link) 2>&5
17421   ac_status=$?
17422   echo "$as_me:17422: \$? = $ac_status" >&5
17423   (exit $ac_status); } &&
17424          { ac_try='test -s conftest$ac_exeext'
17425   { (eval echo "$as_me:17425: \"$ac_try\"") >&5
17426   (eval $ac_try) 2>&5
17427   ac_status=$?
17428   echo "$as_me:17428: \$? = $ac_status" >&5
17429   (exit $ac_status); }; }; then
17430   ac_cv_func_memmove=yes
17431 else
17432   echo "$as_me: failed program was:" >&5
17433 cat conftest.$ac_ext >&5
17434 ac_cv_func_memmove=no
17435 fi
17436 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17437 fi
17438 echo "$as_me:17438: result: $ac_cv_func_memmove" >&5
17439 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17440 if test $ac_cv_func_memmove = yes; then
17441   :
17442 else
17443
17444 echo "$as_me:17444: checking for bcopy" >&5
17445 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17446 if test "${ac_cv_func_bcopy+set}" = set; then
17447   echo $ECHO_N "(cached) $ECHO_C" >&6
17448 else
17449   cat >conftest.$ac_ext <<_ACEOF
17450 #line 17450 "configure"
17451 #include "confdefs.h"
17452 /* System header to define __stub macros and hopefully few prototypes,
17453     which can conflict with char bcopy (); below.  */
17454 #include <assert.h>
17455 /* Override any gcc2 internal prototype to avoid an error.  */
17456 #ifdef __cplusplus
17457 extern "C"
17458 #endif
17459 /* We use char because int might match the return type of a gcc2
17460    builtin and then its argument prototype would still apply.  */
17461 char bcopy ();
17462 char (*f) ();
17463
17464 int
17465 main ()
17466 {
17467 /* The GNU C library defines this for functions which it implements
17468     to always fail with ENOSYS.  Some functions are actually named
17469     something starting with __ and the normal name is an alias.  */
17470 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17471 choke me
17472 #else
17473 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17474 #endif
17475
17476   ;
17477   return 0;
17478 }
17479 _ACEOF
17480 rm -f conftest.$ac_objext conftest$ac_exeext
17481 if { (eval echo "$as_me:17481: \"$ac_link\"") >&5
17482   (eval $ac_link) 2>&5
17483   ac_status=$?
17484   echo "$as_me:17484: \$? = $ac_status" >&5
17485   (exit $ac_status); } &&
17486          { ac_try='test -s conftest$ac_exeext'
17487   { (eval echo "$as_me:17487: \"$ac_try\"") >&5
17488   (eval $ac_try) 2>&5
17489   ac_status=$?
17490   echo "$as_me:17490: \$? = $ac_status" >&5
17491   (exit $ac_status); }; }; then
17492   ac_cv_func_bcopy=yes
17493 else
17494   echo "$as_me: failed program was:" >&5
17495 cat conftest.$ac_ext >&5
17496 ac_cv_func_bcopy=no
17497 fi
17498 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17499 fi
17500 echo "$as_me:17500: result: $ac_cv_func_bcopy" >&5
17501 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17502 if test $ac_cv_func_bcopy = yes; then
17503
17504         echo "$as_me:17504: checking if bcopy does overlapping moves" >&5
17505 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17506 if test "${cf_cv_good_bcopy+set}" = set; then
17507   echo $ECHO_N "(cached) $ECHO_C" >&6
17508 else
17509
17510                 if test "$cross_compiling" = yes; then
17511   cf_cv_good_bcopy=unknown
17512 else
17513   cat >conftest.$ac_ext <<_ACEOF
17514 #line 17514 "configure"
17515 #include "confdefs.h"
17516
17517 int main() {
17518         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17519         char temp[40];
17520         bcopy(data, temp, sizeof(data));
17521         bcopy(temp+10, temp, 15);
17522         bcopy(temp+5, temp+15, 10);
17523         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17524 }
17525
17526 _ACEOF
17527 rm -f conftest$ac_exeext
17528 if { (eval echo "$as_me:17528: \"$ac_link\"") >&5
17529   (eval $ac_link) 2>&5
17530   ac_status=$?
17531   echo "$as_me:17531: \$? = $ac_status" >&5
17532   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17533   { (eval echo "$as_me:17533: \"$ac_try\"") >&5
17534   (eval $ac_try) 2>&5
17535   ac_status=$?
17536   echo "$as_me:17536: \$? = $ac_status" >&5
17537   (exit $ac_status); }; }; then
17538   cf_cv_good_bcopy=yes
17539 else
17540   echo "$as_me: program exited with status $ac_status" >&5
17541 echo "$as_me: failed program was:" >&5
17542 cat conftest.$ac_ext >&5
17543 cf_cv_good_bcopy=no
17544 fi
17545 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17546 fi
17547
17548 fi
17549 echo "$as_me:17549: result: $cf_cv_good_bcopy" >&5
17550 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17551
17552 else
17553   cf_cv_good_bcopy=no
17554 fi
17555
17556         if test "$cf_cv_good_bcopy" = yes ; then
17557
17558 cat >>confdefs.h <<\EOF
17559 #define USE_OK_BCOPY 1
17560 EOF
17561
17562         else
17563
17564 cat >>confdefs.h <<\EOF
17565 #define USE_MY_MEMMOVE 1
17566 EOF
17567
17568         fi
17569
17570 fi
17571
17572 echo "$as_me:17572: checking if poll really works" >&5
17573 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17574 if test "${cf_cv_working_poll+set}" = set; then
17575   echo $ECHO_N "(cached) $ECHO_C" >&6
17576 else
17577
17578 if test "$cross_compiling" = yes; then
17579   cf_cv_working_poll=unknown
17580 else
17581   cat >conftest.$ac_ext <<_ACEOF
17582 #line 17582 "configure"
17583 #include "confdefs.h"
17584
17585 #include <stdlib.h>
17586 #include <stdio.h>
17587 #include <unistd.h>
17588 #include <fcntl.h>
17589 #ifdef HAVE_POLL_H
17590 #include <poll.h>
17591 #else
17592 #include <sys/poll.h>
17593 #endif
17594 int main() {
17595         struct pollfd myfds;
17596         int ret;
17597
17598         /* check for Darwin bug with respect to "devices" */
17599         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17600         if (myfds.fd < 0)
17601                 myfds.fd = 0;
17602         myfds.events = POLLIN;
17603         myfds.revents = 0;
17604
17605         ret = poll(&myfds, 1, 100);
17606
17607         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17608                 ret = -1;
17609         } else {
17610                 int fd = 0;
17611                 if (!isatty(fd)) {
17612                         fd = open("/dev/tty", 2);       /* O_RDWR */
17613                 }
17614
17615                 if (fd >= 0) {
17616                         /* also check with standard input */
17617                         myfds.fd = fd;
17618                         myfds.events = POLLIN;
17619                         myfds.revents = 0;
17620                         ret = poll(&myfds, 1, 100);
17621                 } else {
17622                         ret = -1;
17623                 }
17624         }
17625         ${cf_cv_main_return:-return}(ret < 0);
17626 }
17627 _ACEOF
17628 rm -f conftest$ac_exeext
17629 if { (eval echo "$as_me:17629: \"$ac_link\"") >&5
17630   (eval $ac_link) 2>&5
17631   ac_status=$?
17632   echo "$as_me:17632: \$? = $ac_status" >&5
17633   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17634   { (eval echo "$as_me:17634: \"$ac_try\"") >&5
17635   (eval $ac_try) 2>&5
17636   ac_status=$?
17637   echo "$as_me:17637: \$? = $ac_status" >&5
17638   (exit $ac_status); }; }; then
17639   cf_cv_working_poll=yes
17640 else
17641   echo "$as_me: program exited with status $ac_status" >&5
17642 echo "$as_me: failed program was:" >&5
17643 cat conftest.$ac_ext >&5
17644 cf_cv_working_poll=no
17645 fi
17646 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17647 fi
17648 fi
17649 echo "$as_me:17649: result: $cf_cv_working_poll" >&5
17650 echo "${ECHO_T}$cf_cv_working_poll" >&6
17651 test "$cf_cv_working_poll" = "yes" &&
17652 cat >>confdefs.h <<\EOF
17653 #define HAVE_WORKING_POLL 1
17654 EOF
17655
17656 echo "$as_me:17656: checking for va_copy" >&5
17657 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17658 if test "${cf_cv_have_va_copy+set}" = set; then
17659   echo $ECHO_N "(cached) $ECHO_C" >&6
17660 else
17661
17662 cat >conftest.$ac_ext <<_ACEOF
17663 #line 17663 "configure"
17664 #include "confdefs.h"
17665
17666 #include <stdarg.h>
17667
17668 int
17669 main ()
17670 {
17671
17672         static va_list dst;
17673         static va_list src;
17674         va_copy(dst, src)
17675   ;
17676   return 0;
17677 }
17678 _ACEOF
17679 rm -f conftest.$ac_objext conftest$ac_exeext
17680 if { (eval echo "$as_me:17680: \"$ac_link\"") >&5
17681   (eval $ac_link) 2>&5
17682   ac_status=$?
17683   echo "$as_me:17683: \$? = $ac_status" >&5
17684   (exit $ac_status); } &&
17685          { ac_try='test -s conftest$ac_exeext'
17686   { (eval echo "$as_me:17686: \"$ac_try\"") >&5
17687   (eval $ac_try) 2>&5
17688   ac_status=$?
17689   echo "$as_me:17689: \$? = $ac_status" >&5
17690   (exit $ac_status); }; }; then
17691   cf_cv_have_va_copy=yes
17692 else
17693   echo "$as_me: failed program was:" >&5
17694 cat conftest.$ac_ext >&5
17695 cf_cv_have_va_copy=no
17696 fi
17697 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17698 fi
17699 echo "$as_me:17699: result: $cf_cv_have_va_copy" >&5
17700 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17701
17702 test "$cf_cv_have_va_copy" = yes &&
17703 cat >>confdefs.h <<\EOF
17704 #define HAVE_VA_COPY 1
17705 EOF
17706
17707 echo "$as_me:17707: checking for __va_copy" >&5
17708 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17709 if test "${cf_cv_have___va_copy+set}" = set; then
17710   echo $ECHO_N "(cached) $ECHO_C" >&6
17711 else
17712
17713 cat >conftest.$ac_ext <<_ACEOF
17714 #line 17714 "configure"
17715 #include "confdefs.h"
17716
17717 #include <stdarg.h>
17718
17719 int
17720 main ()
17721 {
17722
17723         static va_list dst;
17724         static va_list src;
17725         __va_copy(dst, src)
17726   ;
17727   return 0;
17728 }
17729 _ACEOF
17730 rm -f conftest.$ac_objext conftest$ac_exeext
17731 if { (eval echo "$as_me:17731: \"$ac_link\"") >&5
17732   (eval $ac_link) 2>&5
17733   ac_status=$?
17734   echo "$as_me:17734: \$? = $ac_status" >&5
17735   (exit $ac_status); } &&
17736          { ac_try='test -s conftest$ac_exeext'
17737   { (eval echo "$as_me:17737: \"$ac_try\"") >&5
17738   (eval $ac_try) 2>&5
17739   ac_status=$?
17740   echo "$as_me:17740: \$? = $ac_status" >&5
17741   (exit $ac_status); }; }; then
17742   cf_cv_have___va_copy=yes
17743 else
17744   echo "$as_me: failed program was:" >&5
17745 cat conftest.$ac_ext >&5
17746 cf_cv_have___va_copy=no
17747 fi
17748 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17749 fi
17750 echo "$as_me:17750: result: $cf_cv_have___va_copy" >&5
17751 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17752
17753 test "$cf_cv_have___va_copy" = yes &&
17754 cat >>confdefs.h <<\EOF
17755 #define HAVE___VA_COPY 1
17756 EOF
17757
17758 echo "$as_me:17758: checking for pid_t" >&5
17759 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17760 if test "${ac_cv_type_pid_t+set}" = set; then
17761   echo $ECHO_N "(cached) $ECHO_C" >&6
17762 else
17763   cat >conftest.$ac_ext <<_ACEOF
17764 #line 17764 "configure"
17765 #include "confdefs.h"
17766 $ac_includes_default
17767 int
17768 main ()
17769 {
17770 if ((pid_t *) 0)
17771   return 0;
17772 if (sizeof (pid_t))
17773   return 0;
17774   ;
17775   return 0;
17776 }
17777 _ACEOF
17778 rm -f conftest.$ac_objext
17779 if { (eval echo "$as_me:17779: \"$ac_compile\"") >&5
17780   (eval $ac_compile) 2>&5
17781   ac_status=$?
17782   echo "$as_me:17782: \$? = $ac_status" >&5
17783   (exit $ac_status); } &&
17784          { ac_try='test -s conftest.$ac_objext'
17785   { (eval echo "$as_me:17785: \"$ac_try\"") >&5
17786   (eval $ac_try) 2>&5
17787   ac_status=$?
17788   echo "$as_me:17788: \$? = $ac_status" >&5
17789   (exit $ac_status); }; }; then
17790   ac_cv_type_pid_t=yes
17791 else
17792   echo "$as_me: failed program was:" >&5
17793 cat conftest.$ac_ext >&5
17794 ac_cv_type_pid_t=no
17795 fi
17796 rm -f conftest.$ac_objext conftest.$ac_ext
17797 fi
17798 echo "$as_me:17798: result: $ac_cv_type_pid_t" >&5
17799 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17800 if test $ac_cv_type_pid_t = yes; then
17801   :
17802 else
17803
17804 cat >>confdefs.h <<EOF
17805 #define pid_t int
17806 EOF
17807
17808 fi
17809
17810 for ac_header in unistd.h vfork.h
17811 do
17812 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17813 echo "$as_me:17813: checking for $ac_header" >&5
17814 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17815 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17816   echo $ECHO_N "(cached) $ECHO_C" >&6
17817 else
17818   cat >conftest.$ac_ext <<_ACEOF
17819 #line 17819 "configure"
17820 #include "confdefs.h"
17821 #include <$ac_header>
17822 _ACEOF
17823 if { (eval echo "$as_me:17823: \"$ac_cpp conftest.$ac_ext\"") >&5
17824   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17825   ac_status=$?
17826   egrep -v '^ *\+' conftest.er1 >conftest.err
17827   rm -f conftest.er1
17828   cat conftest.err >&5
17829   echo "$as_me:17829: \$? = $ac_status" >&5
17830   (exit $ac_status); } >/dev/null; then
17831   if test -s conftest.err; then
17832     ac_cpp_err=$ac_c_preproc_warn_flag
17833   else
17834     ac_cpp_err=
17835   fi
17836 else
17837   ac_cpp_err=yes
17838 fi
17839 if test -z "$ac_cpp_err"; then
17840   eval "$as_ac_Header=yes"
17841 else
17842   echo "$as_me: failed program was:" >&5
17843   cat conftest.$ac_ext >&5
17844   eval "$as_ac_Header=no"
17845 fi
17846 rm -f conftest.err conftest.$ac_ext
17847 fi
17848 echo "$as_me:17848: result: `eval echo '${'$as_ac_Header'}'`" >&5
17849 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17850 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17851   cat >>confdefs.h <<EOF
17852 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17853 EOF
17854
17855 fi
17856 done
17857
17858 for ac_func in fork vfork
17859 do
17860 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17861 echo "$as_me:17861: checking for $ac_func" >&5
17862 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17863 if eval "test \"\${$as_ac_var+set}\" = set"; then
17864   echo $ECHO_N "(cached) $ECHO_C" >&6
17865 else
17866   cat >conftest.$ac_ext <<_ACEOF
17867 #line 17867 "configure"
17868 #include "confdefs.h"
17869 /* System header to define __stub macros and hopefully few prototypes,
17870     which can conflict with char $ac_func (); below.  */
17871 #include <assert.h>
17872 /* Override any gcc2 internal prototype to avoid an error.  */
17873 #ifdef __cplusplus
17874 extern "C"
17875 #endif
17876 /* We use char because int might match the return type of a gcc2
17877    builtin and then its argument prototype would still apply.  */
17878 char $ac_func ();
17879 char (*f) ();
17880
17881 int
17882 main ()
17883 {
17884 /* The GNU C library defines this for functions which it implements
17885     to always fail with ENOSYS.  Some functions are actually named
17886     something starting with __ and the normal name is an alias.  */
17887 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17888 choke me
17889 #else
17890 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17891 #endif
17892
17893   ;
17894   return 0;
17895 }
17896 _ACEOF
17897 rm -f conftest.$ac_objext conftest$ac_exeext
17898 if { (eval echo "$as_me:17898: \"$ac_link\"") >&5
17899   (eval $ac_link) 2>&5
17900   ac_status=$?
17901   echo "$as_me:17901: \$? = $ac_status" >&5
17902   (exit $ac_status); } &&
17903          { ac_try='test -s conftest$ac_exeext'
17904   { (eval echo "$as_me:17904: \"$ac_try\"") >&5
17905   (eval $ac_try) 2>&5
17906   ac_status=$?
17907   echo "$as_me:17907: \$? = $ac_status" >&5
17908   (exit $ac_status); }; }; then
17909   eval "$as_ac_var=yes"
17910 else
17911   echo "$as_me: failed program was:" >&5
17912 cat conftest.$ac_ext >&5
17913 eval "$as_ac_var=no"
17914 fi
17915 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17916 fi
17917 echo "$as_me:17917: result: `eval echo '${'$as_ac_var'}'`" >&5
17918 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17919 if test `eval echo '${'$as_ac_var'}'` = yes; then
17920   cat >>confdefs.h <<EOF
17921 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17922 EOF
17923
17924 fi
17925 done
17926
17927 ac_cv_func_fork_works=$ac_cv_func_fork
17928 if test "x$ac_cv_func_fork" = xyes; then
17929   echo "$as_me:17929: checking for working fork" >&5
17930 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17931 if test "${ac_cv_func_fork_works+set}" = set; then
17932   echo $ECHO_N "(cached) $ECHO_C" >&6
17933 else
17934   if test "$cross_compiling" = yes; then
17935   ac_cv_func_fork_works=cross
17936 else
17937   cat >conftest.$ac_ext <<_ACEOF
17938 /* By Rüdiger Kuhlmann. */
17939       #include <sys/types.h>
17940       #if HAVE_UNISTD_H
17941       # include <unistd.h>
17942       #endif
17943       /* Some systems only have a dummy stub for fork() */
17944       int main ()
17945       {
17946         if (fork() < 0)
17947           $ac_main_return (1);
17948         $ac_main_return (0);
17949       }
17950 _ACEOF
17951 rm -f conftest$ac_exeext
17952 if { (eval echo "$as_me:17952: \"$ac_link\"") >&5
17953   (eval $ac_link) 2>&5
17954   ac_status=$?
17955   echo "$as_me:17955: \$? = $ac_status" >&5
17956   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17957   { (eval echo "$as_me:17957: \"$ac_try\"") >&5
17958   (eval $ac_try) 2>&5
17959   ac_status=$?
17960   echo "$as_me:17960: \$? = $ac_status" >&5
17961   (exit $ac_status); }; }; then
17962   ac_cv_func_fork_works=yes
17963 else
17964   echo "$as_me: program exited with status $ac_status" >&5
17965 echo "$as_me: failed program was:" >&5
17966 cat conftest.$ac_ext >&5
17967 ac_cv_func_fork_works=no
17968 fi
17969 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17970 fi
17971 fi
17972 echo "$as_me:17972: result: $ac_cv_func_fork_works" >&5
17973 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17974
17975 fi
17976 if test "x$ac_cv_func_fork_works" = xcross; then
17977   case $host in
17978     *-*-amigaos* | *-*-msdosdjgpp*)
17979       # Override, as these systems have only a dummy fork() stub
17980       ac_cv_func_fork_works=no
17981       ;;
17982     *)
17983       ac_cv_func_fork_works=yes
17984       ;;
17985   esac
17986   { echo "$as_me:17986: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17987 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17988 fi
17989 ac_cv_func_vfork_works=$ac_cv_func_vfork
17990 if test "x$ac_cv_func_vfork" = xyes; then
17991   echo "$as_me:17991: checking for working vfork" >&5
17992 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17993 if test "${ac_cv_func_vfork_works+set}" = set; then
17994   echo $ECHO_N "(cached) $ECHO_C" >&6
17995 else
17996   if test "$cross_compiling" = yes; then
17997   ac_cv_func_vfork_works=cross
17998 else
17999   cat >conftest.$ac_ext <<_ACEOF
18000 #line 18000 "configure"
18001 #include "confdefs.h"
18002 /* Thanks to Paul Eggert for this test.  */
18003 #include <stdio.h>
18004 #include <sys/types.h>
18005 #include <sys/stat.h>
18006 #if HAVE_UNISTD_H
18007 # include <unistd.h>
18008 #endif
18009 #if HAVE_VFORK_H
18010 # include <vfork.h>
18011 #endif
18012 /* On some sparc systems, changes by the child to local and incoming
18013    argument registers are propagated back to the parent.  The compiler
18014    is told about this with #include <vfork.h>, but some compilers
18015    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18016    static variable whose address is put into a register that is
18017    clobbered by the vfork.  */
18018 static
18019 #ifdef __cplusplus
18020 sparc_address_test (int arg)
18021 # else
18022 sparc_address_test (arg) int arg;
18023 #endif
18024 {
18025   static pid_t child;
18026   if (!child) {
18027     child = vfork ();
18028     if (child < 0) {
18029       perror ("vfork");
18030       _exit(2);
18031     }
18032     if (!child) {
18033       arg = getpid();
18034       write(-1, "", 0);
18035       _exit (arg);
18036     }
18037   }
18038 }
18039
18040 int
18041 main ()
18042 {
18043   pid_t parent = getpid ();
18044   pid_t child;
18045
18046   sparc_address_test ();
18047
18048   child = vfork ();
18049
18050   if (child == 0) {
18051     /* Here is another test for sparc vfork register problems.  This
18052        test uses lots of local variables, at least as many local
18053        variables as main has allocated so far including compiler
18054        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18055        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18056        reuse the register of parent for one of the local variables,
18057        since it will think that parent can't possibly be used any more
18058        in this routine.  Assigning to the local variable will thus
18059        munge parent in the parent process.  */
18060     pid_t
18061       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18062       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18063     /* Convince the compiler that p..p7 are live; otherwise, it might
18064        use the same hardware register for all 8 local variables.  */
18065     if (p != p1 || p != p2 || p != p3 || p != p4
18066         || p != p5 || p != p6 || p != p7)
18067       _exit(1);
18068
18069     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18070        from child file descriptors.  If the child closes a descriptor
18071        before it execs or exits, this munges the parent's descriptor
18072        as well.  Test for this by closing stdout in the child.  */
18073     _exit(close(fileno(stdout)) != 0);
18074   } else {
18075     int status;
18076     struct stat st;
18077
18078     while (wait(&status) != child)
18079       ;
18080     $ac_main_return(
18081          /* Was there some problem with vforking?  */
18082          child < 0
18083
18084          /* Did the child fail?  (This shouldn't happen.)  */
18085          || status
18086
18087          /* Did the vfork/compiler bug occur?  */
18088          || parent != getpid()
18089
18090          /* Did the file descriptor bug occur?  */
18091          || fstat(fileno(stdout), &st) != 0
18092          );
18093   }
18094 }
18095 _ACEOF
18096 rm -f conftest$ac_exeext
18097 if { (eval echo "$as_me:18097: \"$ac_link\"") >&5
18098   (eval $ac_link) 2>&5
18099   ac_status=$?
18100   echo "$as_me:18100: \$? = $ac_status" >&5
18101   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18102   { (eval echo "$as_me:18102: \"$ac_try\"") >&5
18103   (eval $ac_try) 2>&5
18104   ac_status=$?
18105   echo "$as_me:18105: \$? = $ac_status" >&5
18106   (exit $ac_status); }; }; then
18107   ac_cv_func_vfork_works=yes
18108 else
18109   echo "$as_me: program exited with status $ac_status" >&5
18110 echo "$as_me: failed program was:" >&5
18111 cat conftest.$ac_ext >&5
18112 ac_cv_func_vfork_works=no
18113 fi
18114 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18115 fi
18116 fi
18117 echo "$as_me:18117: result: $ac_cv_func_vfork_works" >&5
18118 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18119
18120 fi;
18121 if test "x$ac_cv_func_fork_works" = xcross; then
18122   ac_cv_func_vfork_works=ac_cv_func_vfork
18123   { echo "$as_me:18123: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18124 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18125 fi
18126
18127 if test "x$ac_cv_func_vfork_works" = xyes; then
18128
18129 cat >>confdefs.h <<\EOF
18130 #define HAVE_WORKING_VFORK 1
18131 EOF
18132
18133 else
18134
18135 cat >>confdefs.h <<\EOF
18136 #define vfork fork
18137 EOF
18138
18139 fi
18140 if test "x$ac_cv_func_fork_works" = xyes; then
18141
18142 cat >>confdefs.h <<\EOF
18143 #define HAVE_WORKING_FORK 1
18144 EOF
18145
18146 fi
18147
18148 # special check for test/ditto.c
18149
18150 echo "$as_me:18150: checking for openpty in -lutil" >&5
18151 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18152 if test "${ac_cv_lib_util_openpty+set}" = set; then
18153   echo $ECHO_N "(cached) $ECHO_C" >&6
18154 else
18155   ac_check_lib_save_LIBS=$LIBS
18156 LIBS="-lutil  $LIBS"
18157 cat >conftest.$ac_ext <<_ACEOF
18158 #line 18158 "configure"
18159 #include "confdefs.h"
18160
18161 /* Override any gcc2 internal prototype to avoid an error.  */
18162 #ifdef __cplusplus
18163 extern "C"
18164 #endif
18165 /* We use char because int might match the return type of a gcc2
18166    builtin and then its argument prototype would still apply.  */
18167 char openpty ();
18168 int
18169 main ()
18170 {
18171 openpty ();
18172   ;
18173   return 0;
18174 }
18175 _ACEOF
18176 rm -f conftest.$ac_objext conftest$ac_exeext
18177 if { (eval echo "$as_me:18177: \"$ac_link\"") >&5
18178   (eval $ac_link) 2>&5
18179   ac_status=$?
18180   echo "$as_me:18180: \$? = $ac_status" >&5
18181   (exit $ac_status); } &&
18182          { ac_try='test -s conftest$ac_exeext'
18183   { (eval echo "$as_me:18183: \"$ac_try\"") >&5
18184   (eval $ac_try) 2>&5
18185   ac_status=$?
18186   echo "$as_me:18186: \$? = $ac_status" >&5
18187   (exit $ac_status); }; }; then
18188   ac_cv_lib_util_openpty=yes
18189 else
18190   echo "$as_me: failed program was:" >&5
18191 cat conftest.$ac_ext >&5
18192 ac_cv_lib_util_openpty=no
18193 fi
18194 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18195 LIBS=$ac_check_lib_save_LIBS
18196 fi
18197 echo "$as_me:18197: result: $ac_cv_lib_util_openpty" >&5
18198 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18199 if test $ac_cv_lib_util_openpty = yes; then
18200   cf_cv_lib_util=yes
18201 else
18202   cf_cv_lib_util=no
18203 fi
18204
18205 echo "$as_me:18205: checking for openpty header" >&5
18206 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18207 if test "${cf_cv_func_openpty+set}" = set; then
18208   echo $ECHO_N "(cached) $ECHO_C" >&6
18209 else
18210
18211     cf_save_LIBS="$LIBS"
18212     test $cf_cv_lib_util = yes &&
18213 cf_add_libs="-lutil"
18214 # Filter out duplicates - this happens with badly-designed ".pc" files...
18215 for cf_add_1lib in $LIBS
18216 do
18217         for cf_add_2lib in $cf_add_libs
18218         do
18219                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18220                 then
18221                         cf_add_1lib=
18222                         break
18223                 fi
18224         done
18225         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18226 done
18227 LIBS="$cf_add_libs"
18228
18229     for cf_header in pty.h libutil.h util.h
18230     do
18231     cat >conftest.$ac_ext <<_ACEOF
18232 #line 18232 "configure"
18233 #include "confdefs.h"
18234
18235 #include <$cf_header>
18236
18237 int
18238 main ()
18239 {
18240
18241     int x = openpty((int *)0, (int *)0, (char *)0,
18242                    (struct termios *)0, (struct winsize *)0);
18243
18244   ;
18245   return 0;
18246 }
18247 _ACEOF
18248 rm -f conftest.$ac_objext conftest$ac_exeext
18249 if { (eval echo "$as_me:18249: \"$ac_link\"") >&5
18250   (eval $ac_link) 2>&5
18251   ac_status=$?
18252   echo "$as_me:18252: \$? = $ac_status" >&5
18253   (exit $ac_status); } &&
18254          { ac_try='test -s conftest$ac_exeext'
18255   { (eval echo "$as_me:18255: \"$ac_try\"") >&5
18256   (eval $ac_try) 2>&5
18257   ac_status=$?
18258   echo "$as_me:18258: \$? = $ac_status" >&5
18259   (exit $ac_status); }; }; then
18260
18261         cf_cv_func_openpty=$cf_header
18262         break
18263
18264 else
18265   echo "$as_me: failed program was:" >&5
18266 cat conftest.$ac_ext >&5
18267
18268         cf_cv_func_openpty=no
18269
18270 fi
18271 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18272     done
18273     LIBS="$cf_save_LIBS"
18274
18275 fi
18276 echo "$as_me:18276: result: $cf_cv_func_openpty" >&5
18277 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18278
18279 if test "$cf_cv_func_openpty" != no ; then
18280
18281 cat >>confdefs.h <<EOF
18282 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18283 EOF
18284
18285 cat >>confdefs.h <<\EOF
18286 #define USE_XTERM_PTY 1
18287 EOF
18288
18289     if test "x$cf_cv_lib_util" = xyes ; then
18290
18291 cf_add_libs="-lutil"
18292 # Filter out duplicates - this happens with badly-designed ".pc" files...
18293 for cf_add_1lib in $TEST_LIBS
18294 do
18295         for cf_add_2lib in $cf_add_libs
18296         do
18297                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18298                 then
18299                         cf_add_1lib=
18300                         break
18301                 fi
18302         done
18303         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18304 done
18305 TEST_LIBS="$cf_add_libs"
18306
18307     fi
18308 fi
18309
18310 if test "$with_hashed_db" != no ; then
18311
18312 cat >>confdefs.h <<\EOF
18313 #define USE_HASHED_DB 1
18314 EOF
18315
18316 case $with_hashed_db in #(vi
18317 yes|*able*) #(vi
18318     ;;
18319 *)
18320     if test -d "$with_hashed_db" ; then
18321
18322 if test -n "$with_hashed_db/include" ; then
18323   for cf_add_incdir in $with_hashed_db/include
18324   do
18325         while test $cf_add_incdir != /usr/include
18326         do
18327           if test -d $cf_add_incdir
18328           then
18329                 cf_have_incdir=no
18330                 if test -n "$CFLAGS$CPPFLAGS" ; then
18331                   # a loop is needed to ensure we can add subdirs of existing dirs
18332                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18333                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18334                           cf_have_incdir=yes; break
18335                         fi
18336                   done
18337                 fi
18338
18339                 if test "$cf_have_incdir" = no ; then
18340                   if test "$cf_add_incdir" = /usr/local/include ; then
18341                         if test "$GCC" = yes
18342                         then
18343                           cf_save_CPPFLAGS=$CPPFLAGS
18344                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18345                           cat >conftest.$ac_ext <<_ACEOF
18346 #line 18346 "configure"
18347 #include "confdefs.h"
18348 #include <stdio.h>
18349 int
18350 main ()
18351 {
18352 printf("Hello")
18353   ;
18354   return 0;
18355 }
18356 _ACEOF
18357 rm -f conftest.$ac_objext
18358 if { (eval echo "$as_me:18358: \"$ac_compile\"") >&5
18359   (eval $ac_compile) 2>&5
18360   ac_status=$?
18361   echo "$as_me:18361: \$? = $ac_status" >&5
18362   (exit $ac_status); } &&
18363          { ac_try='test -s conftest.$ac_objext'
18364   { (eval echo "$as_me:18364: \"$ac_try\"") >&5
18365   (eval $ac_try) 2>&5
18366   ac_status=$?
18367   echo "$as_me:18367: \$? = $ac_status" >&5
18368   (exit $ac_status); }; }; then
18369   :
18370 else
18371   echo "$as_me: failed program was:" >&5
18372 cat conftest.$ac_ext >&5
18373 cf_have_incdir=yes
18374 fi
18375 rm -f conftest.$ac_objext conftest.$ac_ext
18376                           CPPFLAGS=$cf_save_CPPFLAGS
18377                         fi
18378                   fi
18379                 fi
18380
18381                 if test "$cf_have_incdir" = no ; then
18382                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18383
18384 echo "${as_me:-configure}:18384: testing adding $cf_add_incdir to include-path ..." 1>&5
18385
18386                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18387
18388                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18389                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18390                   cf_add_incdir="$cf_top_incdir"
18391                 else
18392                   break
18393                 fi
18394           fi
18395         done
18396   done
18397 fi
18398
18399 if test -n "$with_hashed_db/lib" ; then
18400   for cf_add_libdir in $with_hashed_db/lib
18401   do
18402     if test $cf_add_libdir = /usr/lib ; then
18403       :
18404     elif test -d $cf_add_libdir
18405     then
18406       cf_have_libdir=no
18407       if test -n "$LDFLAGS$LIBS" ; then
18408         # a loop is needed to ensure we can add subdirs of existing dirs
18409         for cf_test_libdir in $LDFLAGS $LIBS ; do
18410           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18411             cf_have_libdir=yes; break
18412           fi
18413         done
18414       fi
18415       if test "$cf_have_libdir" = no ; then
18416         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18417
18418 echo "${as_me:-configure}:18418: testing adding $cf_add_libdir to library-path ..." 1>&5
18419
18420         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18421       fi
18422     fi
18423   done
18424 fi
18425
18426         else
18427                 case "$with_hashed_db" in #(vi
18428                 ./*|../*|/*)
18429                         { echo "$as_me:18429: WARNING: no such directory $with_hashed_db" >&5
18430 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18431                         ;; #(vi
18432                 *)
18433
18434 cf_search=
18435
18436 test "x$prefix" != "xNONE" && \
18437 test -d "$prefix" && \
18438  {
18439         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18440         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18441         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18442         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18443         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18444         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18445 }
18446
18447 for cf_subdir_prefix in \
18448         /usr \
18449         /usr/local \
18450         /usr/pkg \
18451         /opt \
18452         /opt/local \
18453         $HOME
18454 do
18455
18456 test "x$cf_subdir_prefix" != "x$prefix" && \
18457 test -d "$cf_subdir_prefix" && \
18458 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18459         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
18460         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
18461         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
18462         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
18463         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
18464         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"
18465 }
18466
18467 done
18468
18469         for cf_item in $cf_search
18470         do
18471                 case $cf_item in #(vi
18472                 */$with_hashed_db)
18473
18474 if test -n "$cf_item" ; then
18475   for cf_add_incdir in $cf_item
18476   do
18477         while test $cf_add_incdir != /usr/include
18478         do
18479           if test -d $cf_add_incdir
18480           then
18481                 cf_have_incdir=no
18482                 if test -n "$CFLAGS$CPPFLAGS" ; then
18483                   # a loop is needed to ensure we can add subdirs of existing dirs
18484                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18485                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18486                           cf_have_incdir=yes; break
18487                         fi
18488                   done
18489                 fi
18490
18491                 if test "$cf_have_incdir" = no ; then
18492                   if test "$cf_add_incdir" = /usr/local/include ; then
18493                         if test "$GCC" = yes
18494                         then
18495                           cf_save_CPPFLAGS=$CPPFLAGS
18496                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18497                           cat >conftest.$ac_ext <<_ACEOF
18498 #line 18498 "configure"
18499 #include "confdefs.h"
18500 #include <stdio.h>
18501 int
18502 main ()
18503 {
18504 printf("Hello")
18505   ;
18506   return 0;
18507 }
18508 _ACEOF
18509 rm -f conftest.$ac_objext
18510 if { (eval echo "$as_me:18510: \"$ac_compile\"") >&5
18511   (eval $ac_compile) 2>&5
18512   ac_status=$?
18513   echo "$as_me:18513: \$? = $ac_status" >&5
18514   (exit $ac_status); } &&
18515          { ac_try='test -s conftest.$ac_objext'
18516   { (eval echo "$as_me:18516: \"$ac_try\"") >&5
18517   (eval $ac_try) 2>&5
18518   ac_status=$?
18519   echo "$as_me:18519: \$? = $ac_status" >&5
18520   (exit $ac_status); }; }; then
18521   :
18522 else
18523   echo "$as_me: failed program was:" >&5
18524 cat conftest.$ac_ext >&5
18525 cf_have_incdir=yes
18526 fi
18527 rm -f conftest.$ac_objext conftest.$ac_ext
18528                           CPPFLAGS=$cf_save_CPPFLAGS
18529                         fi
18530                   fi
18531                 fi
18532
18533                 if test "$cf_have_incdir" = no ; then
18534                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18535
18536 echo "${as_me:-configure}:18536: testing adding $cf_add_incdir to include-path ..." 1>&5
18537
18538                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18539
18540                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18541                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18542                   cf_add_incdir="$cf_top_incdir"
18543                 else
18544                   break
18545                 fi
18546           fi
18547         done
18548   done
18549 fi
18550
18551                         ;;
18552                 esac
18553         done
18554
18555 cf_search=
18556
18557 test "x$prefix" != "xNONE" && \
18558 test -d "$prefix" && \
18559  {
18560         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18561         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18562         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18563         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18564         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18565         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18566 }
18567
18568 for cf_subdir_prefix in \
18569         /usr \
18570         /usr/local \
18571         /usr/pkg \
18572         /opt \
18573         /opt/local \
18574         $HOME
18575 do
18576
18577 test "x$cf_subdir_prefix" != "x$prefix" && \
18578 test -d "$cf_subdir_prefix" && \
18579 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18580         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
18581         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
18582         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
18583         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
18584         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
18585         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"
18586 }
18587
18588 done
18589
18590         for cf_item in $cf_search
18591         do
18592                 case $cf_item in #(vi
18593                 */$with_hashed_db)
18594
18595 if test -n "$cf_item" ; then
18596   for cf_add_libdir in $cf_item
18597   do
18598     if test $cf_add_libdir = /usr/lib ; then
18599       :
18600     elif test -d $cf_add_libdir
18601     then
18602       cf_have_libdir=no
18603       if test -n "$LDFLAGS$LIBS" ; then
18604         # a loop is needed to ensure we can add subdirs of existing dirs
18605         for cf_test_libdir in $LDFLAGS $LIBS ; do
18606           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18607             cf_have_libdir=yes; break
18608           fi
18609         done
18610       fi
18611       if test "$cf_have_libdir" = no ; then
18612         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18613
18614 echo "${as_me:-configure}:18614: testing adding $cf_add_libdir to library-path ..." 1>&5
18615
18616         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18617       fi
18618     fi
18619   done
18620 fi
18621
18622                         ;;
18623                 esac
18624         done
18625
18626                         ;;
18627                 esac
18628     fi
18629 esac
18630
18631 echo "$as_me:18631: checking for db.h" >&5
18632 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18633 if test "${ac_cv_header_db_h+set}" = set; then
18634   echo $ECHO_N "(cached) $ECHO_C" >&6
18635 else
18636   cat >conftest.$ac_ext <<_ACEOF
18637 #line 18637 "configure"
18638 #include "confdefs.h"
18639 #include <db.h>
18640 _ACEOF
18641 if { (eval echo "$as_me:18641: \"$ac_cpp conftest.$ac_ext\"") >&5
18642   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18643   ac_status=$?
18644   egrep -v '^ *\+' conftest.er1 >conftest.err
18645   rm -f conftest.er1
18646   cat conftest.err >&5
18647   echo "$as_me:18647: \$? = $ac_status" >&5
18648   (exit $ac_status); } >/dev/null; then
18649   if test -s conftest.err; then
18650     ac_cpp_err=$ac_c_preproc_warn_flag
18651   else
18652     ac_cpp_err=
18653   fi
18654 else
18655   ac_cpp_err=yes
18656 fi
18657 if test -z "$ac_cpp_err"; then
18658   ac_cv_header_db_h=yes
18659 else
18660   echo "$as_me: failed program was:" >&5
18661   cat conftest.$ac_ext >&5
18662   ac_cv_header_db_h=no
18663 fi
18664 rm -f conftest.err conftest.$ac_ext
18665 fi
18666 echo "$as_me:18666: result: $ac_cv_header_db_h" >&5
18667 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18668 if test $ac_cv_header_db_h = yes; then
18669
18670 echo "$as_me:18670: checking for version of db" >&5
18671 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18672 if test "${cf_cv_hashed_db_version+set}" = set; then
18673   echo $ECHO_N "(cached) $ECHO_C" >&6
18674 else
18675
18676 cf_cv_hashed_db_version=unknown
18677
18678 for cf_db_version in 1 2 3 4 5 6
18679 do
18680
18681 echo "${as_me:-configure}:18681: testing checking for db version $cf_db_version ..." 1>&5
18682
18683         cat >conftest.$ac_ext <<_ACEOF
18684 #line 18684 "configure"
18685 #include "confdefs.h"
18686
18687 $ac_includes_default
18688 #include <db.h>
18689
18690 #ifdef DB_VERSION_MAJOR
18691         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18692 #if $cf_db_version == DB_VERSION_MAJOR
18693         /* ok */
18694 #else
18695         make an error
18696 #endif
18697 #else
18698 #if $cf_db_version == 1
18699         /* ok: assuming this is DB 1.8.5 */
18700 #else
18701         make an error
18702 #endif
18703 #endif
18704
18705 int
18706 main ()
18707 {
18708 DBT *foo = 0
18709   ;
18710   return 0;
18711 }
18712 _ACEOF
18713 rm -f conftest.$ac_objext
18714 if { (eval echo "$as_me:18714: \"$ac_compile\"") >&5
18715   (eval $ac_compile) 2>&5
18716   ac_status=$?
18717   echo "$as_me:18717: \$? = $ac_status" >&5
18718   (exit $ac_status); } &&
18719          { ac_try='test -s conftest.$ac_objext'
18720   { (eval echo "$as_me:18720: \"$ac_try\"") >&5
18721   (eval $ac_try) 2>&5
18722   ac_status=$?
18723   echo "$as_me:18723: \$? = $ac_status" >&5
18724   (exit $ac_status); }; }; then
18725
18726         cf_cv_hashed_db_version=$cf_db_version
18727         break
18728
18729 else
18730   echo "$as_me: failed program was:" >&5
18731 cat conftest.$ac_ext >&5
18732 fi
18733 rm -f conftest.$ac_objext conftest.$ac_ext
18734 done
18735
18736 fi
18737 echo "$as_me:18737: result: $cf_cv_hashed_db_version" >&5
18738 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
18739
18740 if test "$cf_cv_hashed_db_version" = unknown ; then
18741         { { echo "$as_me:18741: error: Cannot determine version of db" >&5
18742 echo "$as_me: error: Cannot determine version of db" >&2;}
18743    { (exit 1); exit 1; }; }
18744 else
18745
18746 echo "$as_me:18746: checking for db libraries" >&5
18747 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
18748 if test "${cf_cv_hashed_db_libs+set}" = set; then
18749   echo $ECHO_N "(cached) $ECHO_C" >&6
18750 else
18751
18752 cf_cv_hashed_db_libs=unknown
18753 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
18754 do
18755         cf_save_libs="$LIBS"
18756         if test -n "$cf_db_libs"; then
18757
18758 cf_add_libs="-l$cf_db_libs"
18759 # Filter out duplicates - this happens with badly-designed ".pc" files...
18760 for cf_add_1lib in $LIBS
18761 do
18762         for cf_add_2lib in $cf_add_libs
18763         do
18764                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18765                 then
18766                         cf_add_1lib=
18767                         break
18768                 fi
18769         done
18770         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18771 done
18772 LIBS="$cf_add_libs"
18773
18774         fi
18775
18776 echo "${as_me:-configure}:18776: testing checking for library "$cf_db_libs" ..." 1>&5
18777
18778         cat >conftest.$ac_ext <<_ACEOF
18779 #line 18779 "configure"
18780 #include "confdefs.h"
18781
18782 $ac_includes_default
18783 #include <db.h>
18784
18785 int
18786 main ()
18787 {
18788
18789         char *path = "/tmp/foo";
18790 #ifdef DB_VERSION_MAJOR
18791 #if DB_VERSION_MAJOR >= 4
18792         DB *result = 0;
18793         db_create(&result, NULL, 0);
18794         result->open(result,
18795                 NULL,
18796                 path,
18797                 path,
18798                 DB_HASH,
18799                 DB_CREATE,
18800                 0644);
18801 #elif DB_VERSION_MAJOR >= 3
18802         DB *result = 0;
18803         db_create(&result, NULL, 0);
18804         result->open(result,
18805                 path,
18806                 path,
18807                 DB_HASH,
18808                 DB_CREATE,
18809                 0644);
18810 #elif DB_VERSION_MAJOR >= 2
18811         DB *result = 0;
18812         db_open(path,
18813                 DB_HASH,
18814                 DB_CREATE,
18815                 0644,
18816                 (DB_ENV *) 0,
18817                 (DB_INFO *) 0,
18818                 &result);
18819 #endif /* DB_VERSION_MAJOR */
18820 #else
18821         DB *result = dbopen(path,
18822                      2,
18823                      0644,
18824                      DB_HASH,
18825                      0);
18826 #endif
18827         ${cf_cv_main_return:-return}(result != 0)
18828
18829   ;
18830   return 0;
18831 }
18832 _ACEOF
18833 rm -f conftest.$ac_objext conftest$ac_exeext
18834 if { (eval echo "$as_me:18834: \"$ac_link\"") >&5
18835   (eval $ac_link) 2>&5
18836   ac_status=$?
18837   echo "$as_me:18837: \$? = $ac_status" >&5
18838   (exit $ac_status); } &&
18839          { ac_try='test -s conftest$ac_exeext'
18840   { (eval echo "$as_me:18840: \"$ac_try\"") >&5
18841   (eval $ac_try) 2>&5
18842   ac_status=$?
18843   echo "$as_me:18843: \$? = $ac_status" >&5
18844   (exit $ac_status); }; }; then
18845
18846         if test -n "$cf_db_libs" ; then
18847                 cf_cv_hashed_db_libs=$cf_db_libs
18848         else
18849                 cf_cv_hashed_db_libs=default
18850         fi
18851         LIBS="$cf_save_libs"
18852         break
18853
18854 else
18855   echo "$as_me: failed program was:" >&5
18856 cat conftest.$ac_ext >&5
18857 fi
18858 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18859         LIBS="$cf_save_libs"
18860 done
18861
18862 fi
18863 echo "$as_me:18863: result: $cf_cv_hashed_db_libs" >&5
18864 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
18865
18866         if test "$cf_cv_hashed_db_libs" = unknown ; then
18867                 { { echo "$as_me:18867: error: Cannot determine library for db" >&5
18868 echo "$as_me: error: Cannot determine library for db" >&2;}
18869    { (exit 1); exit 1; }; }
18870         elif test "$cf_cv_hashed_db_libs" != default ; then
18871
18872 cf_add_libs="-l$cf_cv_hashed_db_libs"
18873 # Filter out duplicates - this happens with badly-designed ".pc" files...
18874 for cf_add_1lib in $LIBS
18875 do
18876         for cf_add_2lib in $cf_add_libs
18877         do
18878                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18879                 then
18880                         cf_add_1lib=
18881                         break
18882                 fi
18883         done
18884         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18885 done
18886 LIBS="$cf_add_libs"
18887
18888         fi
18889 fi
18890
18891 else
18892
18893         { { echo "$as_me:18893: error: Cannot find db.h" >&5
18894 echo "$as_me: error: Cannot find db.h" >&2;}
18895    { (exit 1); exit 1; }; }
18896
18897 fi
18898
18899 fi
18900
18901 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
18902         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18903         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18904 fi
18905
18906 # Just in case, check if the C compiler has a bool type.
18907
18908 echo "$as_me:18908: checking if we should include stdbool.h" >&5
18909 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18910
18911 if test "${cf_cv_header_stdbool_h+set}" = set; then
18912   echo $ECHO_N "(cached) $ECHO_C" >&6
18913 else
18914
18915         cat >conftest.$ac_ext <<_ACEOF
18916 #line 18916 "configure"
18917 #include "confdefs.h"
18918
18919 int
18920 main ()
18921 {
18922 bool foo = false
18923   ;
18924   return 0;
18925 }
18926 _ACEOF
18927 rm -f conftest.$ac_objext
18928 if { (eval echo "$as_me:18928: \"$ac_compile\"") >&5
18929   (eval $ac_compile) 2>&5
18930   ac_status=$?
18931   echo "$as_me:18931: \$? = $ac_status" >&5
18932   (exit $ac_status); } &&
18933          { ac_try='test -s conftest.$ac_objext'
18934   { (eval echo "$as_me:18934: \"$ac_try\"") >&5
18935   (eval $ac_try) 2>&5
18936   ac_status=$?
18937   echo "$as_me:18937: \$? = $ac_status" >&5
18938   (exit $ac_status); }; }; then
18939   cf_cv_header_stdbool_h=0
18940 else
18941   echo "$as_me: failed program was:" >&5
18942 cat conftest.$ac_ext >&5
18943 cat >conftest.$ac_ext <<_ACEOF
18944 #line 18944 "configure"
18945 #include "confdefs.h"
18946
18947 #ifndef __BEOS__
18948 #include <stdbool.h>
18949 #endif
18950
18951 int
18952 main ()
18953 {
18954 bool foo = false
18955   ;
18956   return 0;
18957 }
18958 _ACEOF
18959 rm -f conftest.$ac_objext
18960 if { (eval echo "$as_me:18960: \"$ac_compile\"") >&5
18961   (eval $ac_compile) 2>&5
18962   ac_status=$?
18963   echo "$as_me:18963: \$? = $ac_status" >&5
18964   (exit $ac_status); } &&
18965          { ac_try='test -s conftest.$ac_objext'
18966   { (eval echo "$as_me:18966: \"$ac_try\"") >&5
18967   (eval $ac_try) 2>&5
18968   ac_status=$?
18969   echo "$as_me:18969: \$? = $ac_status" >&5
18970   (exit $ac_status); }; }; then
18971   cf_cv_header_stdbool_h=1
18972 else
18973   echo "$as_me: failed program was:" >&5
18974 cat conftest.$ac_ext >&5
18975 cf_cv_header_stdbool_h=0
18976 fi
18977 rm -f conftest.$ac_objext conftest.$ac_ext
18978 fi
18979 rm -f conftest.$ac_objext conftest.$ac_ext
18980 fi
18981
18982 if test "$cf_cv_header_stdbool_h" = 1
18983 then    echo "$as_me:18983: result: yes" >&5
18984 echo "${ECHO_T}yes" >&6
18985 else    echo "$as_me:18985: result: no" >&5
18986 echo "${ECHO_T}no" >&6
18987 fi
18988
18989 echo "$as_me:18989: checking for builtin bool type" >&5
18990 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18991
18992 if test "${cf_cv_cc_bool_type+set}" = set; then
18993   echo $ECHO_N "(cached) $ECHO_C" >&6
18994 else
18995
18996         cat >conftest.$ac_ext <<_ACEOF
18997 #line 18997 "configure"
18998 #include "confdefs.h"
18999
19000 #include <stdio.h>
19001 #include <sys/types.h>
19002
19003 int
19004 main ()
19005 {
19006 bool x = false
19007   ;
19008   return 0;
19009 }
19010 _ACEOF
19011 rm -f conftest.$ac_objext
19012 if { (eval echo "$as_me:19012: \"$ac_compile\"") >&5
19013   (eval $ac_compile) 2>&5
19014   ac_status=$?
19015   echo "$as_me:19015: \$? = $ac_status" >&5
19016   (exit $ac_status); } &&
19017          { ac_try='test -s conftest.$ac_objext'
19018   { (eval echo "$as_me:19018: \"$ac_try\"") >&5
19019   (eval $ac_try) 2>&5
19020   ac_status=$?
19021   echo "$as_me:19021: \$? = $ac_status" >&5
19022   (exit $ac_status); }; }; then
19023   cf_cv_cc_bool_type=1
19024 else
19025   echo "$as_me: failed program was:" >&5
19026 cat conftest.$ac_ext >&5
19027 cf_cv_cc_bool_type=0
19028 fi
19029 rm -f conftest.$ac_objext conftest.$ac_ext
19030
19031 fi
19032
19033 if test "$cf_cv_cc_bool_type" = 1
19034 then    echo "$as_me:19034: result: yes" >&5
19035 echo "${ECHO_T}yes" >&6
19036 else    echo "$as_me:19036: result: no" >&5
19037 echo "${ECHO_T}no" >&6
19038 fi
19039
19040 # Check for C++ compiler characteristics (and ensure that it's there!)
19041 if test -n "$CXX" ; then
19042         ac_ext=cc
19043 ac_cpp='$CXXCPP $CPPFLAGS'
19044 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19045 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19046 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19047 ac_main_return=return
19048
19049 if test -n "$GXX" ; then
19050 case $cf_cv_system_name in #(vi
19051 os2*) #(vi
19052         cf_stdcpp_libname=stdcpp
19053         ;;
19054 *)
19055         cf_stdcpp_libname=stdc++
19056         ;;
19057 esac
19058 echo "$as_me:19058: checking for library $cf_stdcpp_libname" >&5
19059 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19060 if test "${cf_cv_libstdcpp+set}" = set; then
19061   echo $ECHO_N "(cached) $ECHO_C" >&6
19062 else
19063
19064         cf_save="$LIBS"
19065
19066 cf_add_libs="-l$cf_stdcpp_libname"
19067 # Filter out duplicates - this happens with badly-designed ".pc" files...
19068 for cf_add_1lib in $LIBS
19069 do
19070         for cf_add_2lib in $cf_add_libs
19071         do
19072                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19073                 then
19074                         cf_add_1lib=
19075                         break
19076                 fi
19077         done
19078         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19079 done
19080 LIBS="$cf_add_libs"
19081
19082 cat >conftest.$ac_ext <<_ACEOF
19083 #line 19083 "configure"
19084 #include "confdefs.h"
19085
19086 #include <strstream.h>
19087 int
19088 main ()
19089 {
19090
19091 char buf[80];
19092 strstreambuf foo(buf, sizeof(buf))
19093
19094   ;
19095   return 0;
19096 }
19097 _ACEOF
19098 rm -f conftest.$ac_objext conftest$ac_exeext
19099 if { (eval echo "$as_me:19099: \"$ac_link\"") >&5
19100   (eval $ac_link) 2>&5
19101   ac_status=$?
19102   echo "$as_me:19102: \$? = $ac_status" >&5
19103   (exit $ac_status); } &&
19104          { ac_try='test -s conftest$ac_exeext'
19105   { (eval echo "$as_me:19105: \"$ac_try\"") >&5
19106   (eval $ac_try) 2>&5
19107   ac_status=$?
19108   echo "$as_me:19108: \$? = $ac_status" >&5
19109   (exit $ac_status); }; }; then
19110   cf_cv_libstdcpp=yes
19111 else
19112   echo "$as_me: failed program was:" >&5
19113 cat conftest.$ac_ext >&5
19114 cf_cv_libstdcpp=no
19115 fi
19116 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19117         LIBS="$cf_save"
19118
19119 fi
19120 echo "$as_me:19120: result: $cf_cv_libstdcpp" >&5
19121 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19122 test "$cf_cv_libstdcpp" = yes &&
19123 cf_add_libs="-l$cf_stdcpp_libname"
19124 # Filter out duplicates - this happens with badly-designed ".pc" files...
19125 for cf_add_1lib in $CXXLIBS
19126 do
19127         for cf_add_2lib in $cf_add_libs
19128         do
19129                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19130                 then
19131                         cf_add_1lib=
19132                         break
19133                 fi
19134         done
19135         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19136 done
19137 CXXLIBS="$cf_add_libs"
19138
19139 fi
19140
19141         echo "$as_me:19141: checking whether $CXX understands -c and -o together" >&5
19142 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19143 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19144   echo $ECHO_N "(cached) $ECHO_C" >&6
19145 else
19146
19147 cat > conftest.$ac_ext <<CF_EOF
19148 #include <stdio.h>
19149 int main()
19150 {
19151         ${cf_cv_main_return:-return}(0);
19152 }
19153 CF_EOF
19154 # We do the test twice because some compilers refuse to overwrite an
19155 # existing .o file with -o, though they will create one.
19156 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19157 if { (eval echo "$as_me:19157: \"$ac_try\"") >&5
19158   (eval $ac_try) 2>&5
19159   ac_status=$?
19160   echo "$as_me:19160: \$? = $ac_status" >&5
19161   (exit $ac_status); } &&
19162   test -f conftest2.$ac_objext && { (eval echo "$as_me:19162: \"$ac_try\"") >&5
19163   (eval $ac_try) 2>&5
19164   ac_status=$?
19165   echo "$as_me:19165: \$? = $ac_status" >&5
19166   (exit $ac_status); };
19167 then
19168   eval cf_cv_prog_CXX_c_o=yes
19169 else
19170   eval cf_cv_prog_CXX_c_o=no
19171 fi
19172 rm -rf conftest*
19173
19174 fi
19175 if test $cf_cv_prog_CXX_c_o = yes; then
19176   echo "$as_me:19176: result: yes" >&5
19177 echo "${ECHO_T}yes" >&6
19178 else
19179   echo "$as_me:19179: result: no" >&5
19180 echo "${ECHO_T}no" >&6
19181 fi
19182
19183         case $GXX_VERSION in
19184         1*|2.0-6*)
19185                 cf_cxx_library=yes
19186                 ;;
19187         *-2.7*|2.7*)
19188
19189 cf_cxx_library=unknown
19190 case $cf_cv_system_name in #(vi
19191 os2*) #(vi
19192         cf_gpp_libname=gpp
19193         ;;
19194 *)
19195         cf_gpp_libname=g++
19196         ;;
19197 esac
19198 if test "$GXX" = yes; then
19199         echo "$as_me:19199: checking for lib$cf_gpp_libname" >&5
19200 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19201         cf_save="$LIBS"
19202
19203 cf_add_libs="-l$cf_gpp_libname"
19204 # Filter out duplicates - this happens with badly-designed ".pc" files...
19205 for cf_add_1lib in $LIBS
19206 do
19207         for cf_add_2lib in $cf_add_libs
19208         do
19209                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19210                 then
19211                         cf_add_1lib=
19212                         break
19213                 fi
19214         done
19215         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19216 done
19217 LIBS="$cf_add_libs"
19218
19219         cat >conftest.$ac_ext <<_ACEOF
19220 #line 19220 "configure"
19221 #include "confdefs.h"
19222
19223 #include <$cf_gpp_libname/builtin.h>
19224
19225 int
19226 main ()
19227 {
19228 two_arg_error_handler_t foo2 = lib_error_handler
19229   ;
19230   return 0;
19231 }
19232 _ACEOF
19233 rm -f conftest.$ac_objext conftest$ac_exeext
19234 if { (eval echo "$as_me:19234: \"$ac_link\"") >&5
19235   (eval $ac_link) 2>&5
19236   ac_status=$?
19237   echo "$as_me:19237: \$? = $ac_status" >&5
19238   (exit $ac_status); } &&
19239          { ac_try='test -s conftest$ac_exeext'
19240   { (eval echo "$as_me:19240: \"$ac_try\"") >&5
19241   (eval $ac_try) 2>&5
19242   ac_status=$?
19243   echo "$as_me:19243: \$? = $ac_status" >&5
19244   (exit $ac_status); }; }; then
19245   cf_cxx_library=yes
19246
19247 cf_add_libs="-l$cf_gpp_libname"
19248 # Filter out duplicates - this happens with badly-designed ".pc" files...
19249 for cf_add_1lib in $CXXLIBS
19250 do
19251         for cf_add_2lib in $cf_add_libs
19252         do
19253                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19254                 then
19255                         cf_add_1lib=
19256                         break
19257                 fi
19258         done
19259         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19260 done
19261 CXXLIBS="$cf_add_libs"
19262
19263          if test "$cf_gpp_libname" = cpp ; then
19264
19265 cat >>confdefs.h <<\EOF
19266 #define HAVE_GPP_BUILTIN_H 1
19267 EOF
19268
19269          else
19270
19271 cat >>confdefs.h <<\EOF
19272 #define HAVE_GXX_BUILTIN_H 1
19273 EOF
19274
19275          fi
19276 else
19277   echo "$as_me: failed program was:" >&5
19278 cat conftest.$ac_ext >&5
19279 cat >conftest.$ac_ext <<_ACEOF
19280 #line 19280 "configure"
19281 #include "confdefs.h"
19282
19283 #include <builtin.h>
19284
19285 int
19286 main ()
19287 {
19288 two_arg_error_handler_t foo2 = lib_error_handler
19289   ;
19290   return 0;
19291 }
19292 _ACEOF
19293 rm -f conftest.$ac_objext conftest$ac_exeext
19294 if { (eval echo "$as_me:19294: \"$ac_link\"") >&5
19295   (eval $ac_link) 2>&5
19296   ac_status=$?
19297   echo "$as_me:19297: \$? = $ac_status" >&5
19298   (exit $ac_status); } &&
19299          { ac_try='test -s conftest$ac_exeext'
19300   { (eval echo "$as_me:19300: \"$ac_try\"") >&5
19301   (eval $ac_try) 2>&5
19302   ac_status=$?
19303   echo "$as_me:19303: \$? = $ac_status" >&5
19304   (exit $ac_status); }; }; then
19305   cf_cxx_library=yes
19306
19307 cf_add_libs="-l$cf_gpp_libname"
19308 # Filter out duplicates - this happens with badly-designed ".pc" files...
19309 for cf_add_1lib in $CXXLIBS
19310 do
19311         for cf_add_2lib in $cf_add_libs
19312         do
19313                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19314                 then
19315                         cf_add_1lib=
19316                         break
19317                 fi
19318         done
19319         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19320 done
19321 CXXLIBS="$cf_add_libs"
19322
19323 cat >>confdefs.h <<\EOF
19324 #define HAVE_BUILTIN_H 1
19325 EOF
19326
19327 else
19328   echo "$as_me: failed program was:" >&5
19329 cat conftest.$ac_ext >&5
19330 cf_cxx_library=no
19331 fi
19332 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19333 fi
19334 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19335         LIBS="$cf_save"
19336         echo "$as_me:19336: result: $cf_cxx_library" >&5
19337 echo "${ECHO_T}$cf_cxx_library" >&6
19338 fi
19339
19340                 ;;
19341         *)
19342                 cf_cxx_library=no
19343                 ;;
19344         esac
19345
19346         ac_ext=cc
19347 ac_cpp='$CXXCPP $CPPFLAGS'
19348 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19349 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19350 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19351 ac_main_return=return
19352 echo "$as_me:19352: checking how to run the C++ preprocessor" >&5
19353 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19354 if test -z "$CXXCPP"; then
19355   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19356   echo $ECHO_N "(cached) $ECHO_C" >&6
19357 else
19358       # Double quotes because CXXCPP needs to be expanded
19359     for CXXCPP in "$CXX -E" "/lib/cpp"
19360     do
19361       ac_preproc_ok=false
19362 for ac_cxx_preproc_warn_flag in '' yes
19363 do
19364   # Use a header file that comes with gcc, so configuring glibc
19365   # with a fresh cross-compiler works.
19366   # On the NeXT, cc -E runs the code through the compiler's parser,
19367   # not just through cpp. "Syntax error" is here to catch this case.
19368   cat >conftest.$ac_ext <<_ACEOF
19369 #line 19369 "configure"
19370 #include "confdefs.h"
19371 #include <assert.h>
19372                      Syntax error
19373 _ACEOF
19374 if { (eval echo "$as_me:19374: \"$ac_cpp conftest.$ac_ext\"") >&5
19375   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19376   ac_status=$?
19377   egrep -v '^ *\+' conftest.er1 >conftest.err
19378   rm -f conftest.er1
19379   cat conftest.err >&5
19380   echo "$as_me:19380: \$? = $ac_status" >&5
19381   (exit $ac_status); } >/dev/null; then
19382   if test -s conftest.err; then
19383     ac_cpp_err=$ac_cxx_preproc_warn_flag
19384   else
19385     ac_cpp_err=
19386   fi
19387 else
19388   ac_cpp_err=yes
19389 fi
19390 if test -z "$ac_cpp_err"; then
19391   :
19392 else
19393   echo "$as_me: failed program was:" >&5
19394   cat conftest.$ac_ext >&5
19395   # Broken: fails on valid input.
19396 continue
19397 fi
19398 rm -f conftest.err conftest.$ac_ext
19399
19400   # OK, works on sane cases.  Now check whether non-existent headers
19401   # can be detected and how.
19402   cat >conftest.$ac_ext <<_ACEOF
19403 #line 19403 "configure"
19404 #include "confdefs.h"
19405 #include <ac_nonexistent.h>
19406 _ACEOF
19407 if { (eval echo "$as_me:19407: \"$ac_cpp conftest.$ac_ext\"") >&5
19408   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19409   ac_status=$?
19410   egrep -v '^ *\+' conftest.er1 >conftest.err
19411   rm -f conftest.er1
19412   cat conftest.err >&5
19413   echo "$as_me:19413: \$? = $ac_status" >&5
19414   (exit $ac_status); } >/dev/null; then
19415   if test -s conftest.err; then
19416     ac_cpp_err=$ac_cxx_preproc_warn_flag
19417   else
19418     ac_cpp_err=
19419   fi
19420 else
19421   ac_cpp_err=yes
19422 fi
19423 if test -z "$ac_cpp_err"; then
19424   # Broken: success on invalid input.
19425 continue
19426 else
19427   echo "$as_me: failed program was:" >&5
19428   cat conftest.$ac_ext >&5
19429   # Passes both tests.
19430 ac_preproc_ok=:
19431 break
19432 fi
19433 rm -f conftest.err conftest.$ac_ext
19434
19435 done
19436 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19437 rm -f conftest.err conftest.$ac_ext
19438 if $ac_preproc_ok; then
19439   break
19440 fi
19441
19442     done
19443     ac_cv_prog_CXXCPP=$CXXCPP
19444
19445 fi
19446   CXXCPP=$ac_cv_prog_CXXCPP
19447 else
19448   ac_cv_prog_CXXCPP=$CXXCPP
19449 fi
19450 echo "$as_me:19450: result: $CXXCPP" >&5
19451 echo "${ECHO_T}$CXXCPP" >&6
19452 ac_preproc_ok=false
19453 for ac_cxx_preproc_warn_flag in '' yes
19454 do
19455   # Use a header file that comes with gcc, so configuring glibc
19456   # with a fresh cross-compiler works.
19457   # On the NeXT, cc -E runs the code through the compiler's parser,
19458   # not just through cpp. "Syntax error" is here to catch this case.
19459   cat >conftest.$ac_ext <<_ACEOF
19460 #line 19460 "configure"
19461 #include "confdefs.h"
19462 #include <assert.h>
19463                      Syntax error
19464 _ACEOF
19465 if { (eval echo "$as_me:19465: \"$ac_cpp conftest.$ac_ext\"") >&5
19466   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19467   ac_status=$?
19468   egrep -v '^ *\+' conftest.er1 >conftest.err
19469   rm -f conftest.er1
19470   cat conftest.err >&5
19471   echo "$as_me:19471: \$? = $ac_status" >&5
19472   (exit $ac_status); } >/dev/null; then
19473   if test -s conftest.err; then
19474     ac_cpp_err=$ac_cxx_preproc_warn_flag
19475   else
19476     ac_cpp_err=
19477   fi
19478 else
19479   ac_cpp_err=yes
19480 fi
19481 if test -z "$ac_cpp_err"; then
19482   :
19483 else
19484   echo "$as_me: failed program was:" >&5
19485   cat conftest.$ac_ext >&5
19486   # Broken: fails on valid input.
19487 continue
19488 fi
19489 rm -f conftest.err conftest.$ac_ext
19490
19491   # OK, works on sane cases.  Now check whether non-existent headers
19492   # can be detected and how.
19493   cat >conftest.$ac_ext <<_ACEOF
19494 #line 19494 "configure"
19495 #include "confdefs.h"
19496 #include <ac_nonexistent.h>
19497 _ACEOF
19498 if { (eval echo "$as_me:19498: \"$ac_cpp conftest.$ac_ext\"") >&5
19499   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19500   ac_status=$?
19501   egrep -v '^ *\+' conftest.er1 >conftest.err
19502   rm -f conftest.er1
19503   cat conftest.err >&5
19504   echo "$as_me:19504: \$? = $ac_status" >&5
19505   (exit $ac_status); } >/dev/null; then
19506   if test -s conftest.err; then
19507     ac_cpp_err=$ac_cxx_preproc_warn_flag
19508   else
19509     ac_cpp_err=
19510   fi
19511 else
19512   ac_cpp_err=yes
19513 fi
19514 if test -z "$ac_cpp_err"; then
19515   # Broken: success on invalid input.
19516 continue
19517 else
19518   echo "$as_me: failed program was:" >&5
19519   cat conftest.$ac_ext >&5
19520   # Passes both tests.
19521 ac_preproc_ok=:
19522 break
19523 fi
19524 rm -f conftest.err conftest.$ac_ext
19525
19526 done
19527 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19528 rm -f conftest.err conftest.$ac_ext
19529 if $ac_preproc_ok; then
19530   :
19531 else
19532   { { echo "$as_me:19532: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19533 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19534    { (exit 1); exit 1; }; }
19535 fi
19536
19537 ac_ext=cc
19538 ac_cpp='$CXXCPP $CPPFLAGS'
19539 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19540 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19541 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19542 ac_main_return=return
19543
19544 for ac_header in typeinfo
19545 do
19546 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19547 echo "$as_me:19547: checking for $ac_header" >&5
19548 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19549 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19550   echo $ECHO_N "(cached) $ECHO_C" >&6
19551 else
19552   cat >conftest.$ac_ext <<_ACEOF
19553 #line 19553 "configure"
19554 #include "confdefs.h"
19555 #include <$ac_header>
19556 _ACEOF
19557 if { (eval echo "$as_me:19557: \"$ac_cpp conftest.$ac_ext\"") >&5
19558   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19559   ac_status=$?
19560   egrep -v '^ *\+' conftest.er1 >conftest.err
19561   rm -f conftest.er1
19562   cat conftest.err >&5
19563   echo "$as_me:19563: \$? = $ac_status" >&5
19564   (exit $ac_status); } >/dev/null; then
19565   if test -s conftest.err; then
19566     ac_cpp_err=$ac_cxx_preproc_warn_flag
19567   else
19568     ac_cpp_err=
19569   fi
19570 else
19571   ac_cpp_err=yes
19572 fi
19573 if test -z "$ac_cpp_err"; then
19574   eval "$as_ac_Header=yes"
19575 else
19576   echo "$as_me: failed program was:" >&5
19577   cat conftest.$ac_ext >&5
19578   eval "$as_ac_Header=no"
19579 fi
19580 rm -f conftest.err conftest.$ac_ext
19581 fi
19582 echo "$as_me:19582: result: `eval echo '${'$as_ac_Header'}'`" >&5
19583 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19584 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19585   cat >>confdefs.h <<EOF
19586 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19587 EOF
19588
19589 fi
19590 done
19591
19592 for ac_header in iostream
19593 do
19594 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19595 echo "$as_me:19595: checking for $ac_header" >&5
19596 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19597 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19598   echo $ECHO_N "(cached) $ECHO_C" >&6
19599 else
19600   cat >conftest.$ac_ext <<_ACEOF
19601 #line 19601 "configure"
19602 #include "confdefs.h"
19603 #include <$ac_header>
19604 _ACEOF
19605 if { (eval echo "$as_me:19605: \"$ac_cpp conftest.$ac_ext\"") >&5
19606   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19607   ac_status=$?
19608   egrep -v '^ *\+' conftest.er1 >conftest.err
19609   rm -f conftest.er1
19610   cat conftest.err >&5
19611   echo "$as_me:19611: \$? = $ac_status" >&5
19612   (exit $ac_status); } >/dev/null; then
19613   if test -s conftest.err; then
19614     ac_cpp_err=$ac_cxx_preproc_warn_flag
19615   else
19616     ac_cpp_err=
19617   fi
19618 else
19619   ac_cpp_err=yes
19620 fi
19621 if test -z "$ac_cpp_err"; then
19622   eval "$as_ac_Header=yes"
19623 else
19624   echo "$as_me: failed program was:" >&5
19625   cat conftest.$ac_ext >&5
19626   eval "$as_ac_Header=no"
19627 fi
19628 rm -f conftest.err conftest.$ac_ext
19629 fi
19630 echo "$as_me:19630: result: `eval echo '${'$as_ac_Header'}'`" >&5
19631 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19632 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19633   cat >>confdefs.h <<EOF
19634 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19635 EOF
19636
19637 fi
19638 done
19639
19640 if test x"$ac_cv_header_iostream" = xyes ; then
19641         echo "$as_me:19641: checking if iostream uses std-namespace" >&5
19642 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
19643         cat >conftest.$ac_ext <<_ACEOF
19644 #line 19644 "configure"
19645 #include "confdefs.h"
19646
19647 #include <iostream>
19648 using std::endl;
19649 using std::cerr;
19650 int
19651 main ()
19652 {
19653
19654 cerr << "testing" << endl;
19655
19656   ;
19657   return 0;
19658 }
19659 _ACEOF
19660 rm -f conftest.$ac_objext
19661 if { (eval echo "$as_me:19661: \"$ac_compile\"") >&5
19662   (eval $ac_compile) 2>&5
19663   ac_status=$?
19664   echo "$as_me:19664: \$? = $ac_status" >&5
19665   (exit $ac_status); } &&
19666          { ac_try='test -s conftest.$ac_objext'
19667   { (eval echo "$as_me:19667: \"$ac_try\"") >&5
19668   (eval $ac_try) 2>&5
19669   ac_status=$?
19670   echo "$as_me:19670: \$? = $ac_status" >&5
19671   (exit $ac_status); }; }; then
19672   cf_iostream_namespace=yes
19673 else
19674   echo "$as_me: failed program was:" >&5
19675 cat conftest.$ac_ext >&5
19676 cf_iostream_namespace=no
19677 fi
19678 rm -f conftest.$ac_objext conftest.$ac_ext
19679         echo "$as_me:19679: result: $cf_iostream_namespace" >&5
19680 echo "${ECHO_T}$cf_iostream_namespace" >&6
19681         if test "$cf_iostream_namespace" = yes ; then
19682
19683 cat >>confdefs.h <<\EOF
19684 #define IOSTREAM_NAMESPACE 1
19685 EOF
19686
19687         fi
19688 fi
19689
19690 echo "$as_me:19690: checking if we should include stdbool.h" >&5
19691 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19692
19693 if test "${cf_cv_header_stdbool_h+set}" = set; then
19694   echo $ECHO_N "(cached) $ECHO_C" >&6
19695 else
19696
19697         cat >conftest.$ac_ext <<_ACEOF
19698 #line 19698 "configure"
19699 #include "confdefs.h"
19700
19701 int
19702 main ()
19703 {
19704 bool foo = false
19705   ;
19706   return 0;
19707 }
19708 _ACEOF
19709 rm -f conftest.$ac_objext
19710 if { (eval echo "$as_me:19710: \"$ac_compile\"") >&5
19711   (eval $ac_compile) 2>&5
19712   ac_status=$?
19713   echo "$as_me:19713: \$? = $ac_status" >&5
19714   (exit $ac_status); } &&
19715          { ac_try='test -s conftest.$ac_objext'
19716   { (eval echo "$as_me:19716: \"$ac_try\"") >&5
19717   (eval $ac_try) 2>&5
19718   ac_status=$?
19719   echo "$as_me:19719: \$? = $ac_status" >&5
19720   (exit $ac_status); }; }; then
19721   cf_cv_header_stdbool_h=0
19722 else
19723   echo "$as_me: failed program was:" >&5
19724 cat conftest.$ac_ext >&5
19725 cat >conftest.$ac_ext <<_ACEOF
19726 #line 19726 "configure"
19727 #include "confdefs.h"
19728
19729 #ifndef __BEOS__
19730 #include <stdbool.h>
19731 #endif
19732
19733 int
19734 main ()
19735 {
19736 bool foo = false
19737   ;
19738   return 0;
19739 }
19740 _ACEOF
19741 rm -f conftest.$ac_objext
19742 if { (eval echo "$as_me:19742: \"$ac_compile\"") >&5
19743   (eval $ac_compile) 2>&5
19744   ac_status=$?
19745   echo "$as_me:19745: \$? = $ac_status" >&5
19746   (exit $ac_status); } &&
19747          { ac_try='test -s conftest.$ac_objext'
19748   { (eval echo "$as_me:19748: \"$ac_try\"") >&5
19749   (eval $ac_try) 2>&5
19750   ac_status=$?
19751   echo "$as_me:19751: \$? = $ac_status" >&5
19752   (exit $ac_status); }; }; then
19753   cf_cv_header_stdbool_h=1
19754 else
19755   echo "$as_me: failed program was:" >&5
19756 cat conftest.$ac_ext >&5
19757 cf_cv_header_stdbool_h=0
19758 fi
19759 rm -f conftest.$ac_objext conftest.$ac_ext
19760 fi
19761 rm -f conftest.$ac_objext conftest.$ac_ext
19762 fi
19763
19764 if test "$cf_cv_header_stdbool_h" = 1
19765 then    echo "$as_me:19765: result: yes" >&5
19766 echo "${ECHO_T}yes" >&6
19767 else    echo "$as_me:19767: result: no" >&5
19768 echo "${ECHO_T}no" >&6
19769 fi
19770
19771 echo "$as_me:19771: checking for builtin bool type" >&5
19772 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19773
19774 if test "${cf_cv_builtin_bool+set}" = set; then
19775   echo $ECHO_N "(cached) $ECHO_C" >&6
19776 else
19777
19778         cat >conftest.$ac_ext <<_ACEOF
19779 #line 19779 "configure"
19780 #include "confdefs.h"
19781
19782 #include <stdio.h>
19783 #include <sys/types.h>
19784
19785 int
19786 main ()
19787 {
19788 bool x = false
19789   ;
19790   return 0;
19791 }
19792 _ACEOF
19793 rm -f conftest.$ac_objext
19794 if { (eval echo "$as_me:19794: \"$ac_compile\"") >&5
19795   (eval $ac_compile) 2>&5
19796   ac_status=$?
19797   echo "$as_me:19797: \$? = $ac_status" >&5
19798   (exit $ac_status); } &&
19799          { ac_try='test -s conftest.$ac_objext'
19800   { (eval echo "$as_me:19800: \"$ac_try\"") >&5
19801   (eval $ac_try) 2>&5
19802   ac_status=$?
19803   echo "$as_me:19803: \$? = $ac_status" >&5
19804   (exit $ac_status); }; }; then
19805   cf_cv_builtin_bool=1
19806 else
19807   echo "$as_me: failed program was:" >&5
19808 cat conftest.$ac_ext >&5
19809 cf_cv_builtin_bool=0
19810 fi
19811 rm -f conftest.$ac_objext conftest.$ac_ext
19812
19813 fi
19814
19815 if test "$cf_cv_builtin_bool" = 1
19816 then    echo "$as_me:19816: result: yes" >&5
19817 echo "${ECHO_T}yes" >&6
19818 else    echo "$as_me:19818: result: no" >&5
19819 echo "${ECHO_T}no" >&6
19820 fi
19821
19822 echo "$as_me:19822: checking for size of bool" >&5
19823 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19824 if test "${cf_cv_type_of_bool+set}" = set; then
19825   echo $ECHO_N "(cached) $ECHO_C" >&6
19826 else
19827
19828         rm -f cf_test.out
19829         if test "$cross_compiling" = yes; then
19830   cf_cv_type_of_bool=unknown
19831 else
19832   cat >conftest.$ac_ext <<_ACEOF
19833 #line 19833 "configure"
19834 #include "confdefs.h"
19835
19836 #include <stdlib.h>
19837 #include <stdio.h>
19838
19839 #if defined(__cplusplus)
19840
19841 #ifdef HAVE_GXX_BUILTIN_H
19842 #include <g++/builtin.h>
19843 #elif HAVE_GPP_BUILTIN_H
19844 #include <gpp/builtin.h>
19845 #elif HAVE_BUILTIN_H
19846 #include <builtin.h>
19847 #endif
19848
19849 #else
19850
19851 #if $cf_cv_header_stdbool_h
19852 #include <stdbool.h>
19853 #endif
19854
19855 #endif
19856
19857 int main()
19858 {
19859         FILE *fp = fopen("cf_test.out", "w");
19860         if (fp != 0) {
19861                 bool x = true;
19862                 if ((bool)(-x) >= 0)
19863                         fputs("unsigned ", fp);
19864                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19865                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19866                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19867                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19868                 fclose(fp);
19869         }
19870         ${cf_cv_main_return:-return}(0);
19871 }
19872
19873 _ACEOF
19874 rm -f conftest$ac_exeext
19875 if { (eval echo "$as_me:19875: \"$ac_link\"") >&5
19876   (eval $ac_link) 2>&5
19877   ac_status=$?
19878   echo "$as_me:19878: \$? = $ac_status" >&5
19879   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19880   { (eval echo "$as_me:19880: \"$ac_try\"") >&5
19881   (eval $ac_try) 2>&5
19882   ac_status=$?
19883   echo "$as_me:19883: \$? = $ac_status" >&5
19884   (exit $ac_status); }; }; then
19885   cf_cv_type_of_bool=`cat cf_test.out`
19886                  if test -z "$cf_cv_type_of_bool"; then
19887                    cf_cv_type_of_bool=unknown
19888                  fi
19889 else
19890   echo "$as_me: program exited with status $ac_status" >&5
19891 echo "$as_me: failed program was:" >&5
19892 cat conftest.$ac_ext >&5
19893 cf_cv_type_of_bool=unknown
19894 fi
19895 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19896 fi
19897
19898 fi
19899
19900         rm -f cf_test.out
19901 echo "$as_me:19901: result: $cf_cv_type_of_bool" >&5
19902 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19903 if test "$cf_cv_type_of_bool" = unknown ; then
19904         case .$NCURSES_BOOL in #(vi
19905         .auto|.) NCURSES_BOOL=unsigned;;
19906         esac
19907         { echo "$as_me:19907: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19908 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19909         cf_cv_type_of_bool=$NCURSES_BOOL
19910 fi
19911
19912 echo "$as_me:19912: checking for special defines needed for etip.h" >&5
19913 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
19914 cf_save_CXXFLAGS="$CXXFLAGS"
19915 cf_result="none"
19916
19917 # etip.h includes ncurses.h which includes ncurses_dll.h
19918 # But ncurses_dll.h is generated - fix here.
19919 test -d include || mkdir include
19920 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
19921
19922 for cf_math in "" MATH_H
19923 do
19924 for cf_excp in "" MATH_EXCEPTION
19925 do
19926         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
19927         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
19928         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
19929 cat >conftest.$ac_ext <<_ACEOF
19930 #line 19930 "configure"
19931 #include "confdefs.h"
19932
19933 #include <etip.h.in>
19934
19935 int
19936 main ()
19937 {
19938
19939   ;
19940   return 0;
19941 }
19942 _ACEOF
19943 rm -f conftest.$ac_objext
19944 if { (eval echo "$as_me:19944: \"$ac_compile\"") >&5
19945   (eval $ac_compile) 2>&5
19946   ac_status=$?
19947   echo "$as_me:19947: \$? = $ac_status" >&5
19948   (exit $ac_status); } &&
19949          { ac_try='test -s conftest.$ac_objext'
19950   { (eval echo "$as_me:19950: \"$ac_try\"") >&5
19951   (eval $ac_try) 2>&5
19952   ac_status=$?
19953   echo "$as_me:19953: \$? = $ac_status" >&5
19954   (exit $ac_status); }; }; then
19955
19956         test -n "$cf_math" && cat >>confdefs.h <<EOF
19957 #define ETIP_NEEDS_${cf_math} 1
19958 EOF
19959
19960         test -n "$cf_excp" && cat >>confdefs.h <<EOF
19961 #define ETIP_NEEDS_${cf_excp} 1
19962 EOF
19963
19964         cf_result="$cf_math $cf_excp"
19965         break 2
19966
19967 else
19968   echo "$as_me: failed program was:" >&5
19969 cat conftest.$ac_ext >&5
19970 fi
19971 rm -f conftest.$ac_objext conftest.$ac_ext
19972 done
19973 done
19974 echo "$as_me:19974: result: $cf_result" >&5
19975 echo "${ECHO_T}$cf_result" >&6
19976 CXXFLAGS="$cf_save_CXXFLAGS"
19977
19978 if test -n "$CXX"; then
19979 echo "$as_me:19979: checking if $CXX accepts parameter initialization" >&5
19980 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
19981 if test "${cf_cv_cpp_param_init+set}" = set; then
19982   echo $ECHO_N "(cached) $ECHO_C" >&6
19983 else
19984
19985         ac_ext=cc
19986 ac_cpp='$CXXCPP $CPPFLAGS'
19987 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19988 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19989 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19990 ac_main_return=return
19991
19992         if test "$cross_compiling" = yes; then
19993   cf_cv_cpp_param_init=unknown
19994 else
19995   cat >conftest.$ac_ext <<_ACEOF
19996 #line 19996 "configure"
19997 #include "confdefs.h"
19998
19999 class TEST {
20000 private:
20001         int value;
20002 public:
20003         TEST(int x = 1);
20004         ~TEST();
20005 };
20006
20007 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20008 {
20009         value = x;
20010 }
20011 int main() { }
20012
20013 _ACEOF
20014 rm -f conftest$ac_exeext
20015 if { (eval echo "$as_me:20015: \"$ac_link\"") >&5
20016   (eval $ac_link) 2>&5
20017   ac_status=$?
20018   echo "$as_me:20018: \$? = $ac_status" >&5
20019   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20020   { (eval echo "$as_me:20020: \"$ac_try\"") >&5
20021   (eval $ac_try) 2>&5
20022   ac_status=$?
20023   echo "$as_me:20023: \$? = $ac_status" >&5
20024   (exit $ac_status); }; }; then
20025   cf_cv_cpp_param_init=yes
20026 else
20027   echo "$as_me: program exited with status $ac_status" >&5
20028 echo "$as_me: failed program was:" >&5
20029 cat conftest.$ac_ext >&5
20030 cf_cv_cpp_param_init=no
20031 fi
20032 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20033 fi
20034         ac_ext=cc
20035 ac_cpp='$CXXCPP $CPPFLAGS'
20036 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20037 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20038 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20039 ac_main_return=return
20040
20041 fi
20042 echo "$as_me:20042: result: $cf_cv_cpp_param_init" >&5
20043 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20044 fi
20045 test "$cf_cv_cpp_param_init" = yes &&
20046 cat >>confdefs.h <<\EOF
20047 #define CPP_HAS_PARAM_INIT 1
20048 EOF
20049
20050 if test -n "$CXX"; then
20051
20052 echo "$as_me:20052: checking if $CXX accepts static_cast" >&5
20053 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20054 if test "${cf_cv_cpp_static_cast+set}" = set; then
20055   echo $ECHO_N "(cached) $ECHO_C" >&6
20056 else
20057
20058         ac_ext=cc
20059 ac_cpp='$CXXCPP $CPPFLAGS'
20060 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20061 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20062 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20063 ac_main_return=return
20064
20065         cat >conftest.$ac_ext <<_ACEOF
20066 #line 20066 "configure"
20067 #include "confdefs.h"
20068
20069 class NCursesPanel
20070 {
20071 public:
20072   NCursesPanel(int nlines,
20073                int ncols,
20074                int begin_y = 0,
20075                int begin_x = 0)
20076   {
20077   }
20078   NCursesPanel();
20079   ~NCursesPanel();
20080 };
20081
20082 template<class T> class NCursesUserPanel : public NCursesPanel
20083 {
20084 public:
20085   NCursesUserPanel (int nlines,
20086                     int ncols,
20087                     int begin_y = 0,
20088                     int begin_x = 0,
20089                     const T* p_UserData = static_cast<T*>(0))
20090     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20091   {
20092   };
20093   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20094   {
20095   };
20096
20097   virtual ~NCursesUserPanel() {};
20098 };
20099
20100 int
20101 main ()
20102 {
20103
20104         const char* p_UserData = static_cast<char*>(0)
20105   ;
20106   return 0;
20107 }
20108 _ACEOF
20109 rm -f conftest.$ac_objext
20110 if { (eval echo "$as_me:20110: \"$ac_compile\"") >&5
20111   (eval $ac_compile) 2>&5
20112   ac_status=$?
20113   echo "$as_me:20113: \$? = $ac_status" >&5
20114   (exit $ac_status); } &&
20115          { ac_try='test -s conftest.$ac_objext'
20116   { (eval echo "$as_me:20116: \"$ac_try\"") >&5
20117   (eval $ac_try) 2>&5
20118   ac_status=$?
20119   echo "$as_me:20119: \$? = $ac_status" >&5
20120   (exit $ac_status); }; }; then
20121   cf_cv_cpp_static_cast=yes
20122 else
20123   echo "$as_me: failed program was:" >&5
20124 cat conftest.$ac_ext >&5
20125 cf_cv_cpp_static_cast=no
20126 fi
20127 rm -f conftest.$ac_objext conftest.$ac_ext
20128
20129         ac_ext=cc
20130 ac_cpp='$CXXCPP $CPPFLAGS'
20131 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20132 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20133 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20134 ac_main_return=return
20135
20136 fi
20137 echo "$as_me:20137: result: $cf_cv_cpp_static_cast" >&5
20138 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20139
20140 fi
20141
20142 test "$cf_cv_cpp_static_cast" = yes &&
20143 cat >>confdefs.h <<\EOF
20144 #define CPP_HAS_STATIC_CAST 1
20145 EOF
20146
20147         CXX_AR='$(AR)'
20148         CXX_ARFLAGS='$(ARFLAGS)'
20149         case $cf_cv_system_name in #(vi
20150         irix*) #(vi
20151             if test "$GXX" != yes ; then
20152                 CXX_AR='$(CXX)'
20153                 CXX_ARFLAGS='-ar -o'
20154             fi
20155             ;;
20156         sco3.2v5*) #(vi
20157             CXXLDFLAGS="-u main"
20158             ;;
20159         solaris2*)
20160             if test "$GXX" != yes ; then
20161                 CXX_AR='$(CXX)'
20162                 CXX_ARFLAGS='-xar -o'
20163             fi
20164             ;;
20165         esac
20166
20167 else
20168         cf_cxx_library=no
20169         cf_cv_builtin_bool=1
20170
20171         # Just because we are not configuring against C++ right now does not
20172         # mean that a user will not want to use C++.  Some distributors disable
20173         # the C++ portion of this configuration as a shortcut (or just to avoid
20174         # compiling the demo in the c++ directory).  So we need a reasonable
20175         # default for the 'bool' type.
20176         #
20177         # Caveat: since the storage of the bool type is not standardized, it
20178         # may change.
20179
20180         if test "$NCURSES_BOOL" != auto ; then
20181                 cf_cv_type_of_bool=$NCURSES_BOOL
20182                 cf_cv_header_stdbool_h=0
20183         else
20184                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20185
20186 echo "$as_me:20186: checking for size of bool" >&5
20187 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20188 if test "${cf_cv_type_of_bool+set}" = set; then
20189   echo $ECHO_N "(cached) $ECHO_C" >&6
20190 else
20191
20192         rm -f cf_test.out
20193         if test "$cross_compiling" = yes; then
20194   cf_cv_type_of_bool=unknown
20195 else
20196   cat >conftest.$ac_ext <<_ACEOF
20197 #line 20197 "configure"
20198 #include "confdefs.h"
20199
20200 #include <stdlib.h>
20201 #include <stdio.h>
20202
20203 #if defined(__cplusplus)
20204
20205 #ifdef HAVE_GXX_BUILTIN_H
20206 #include <g++/builtin.h>
20207 #elif HAVE_GPP_BUILTIN_H
20208 #include <gpp/builtin.h>
20209 #elif HAVE_BUILTIN_H
20210 #include <builtin.h>
20211 #endif
20212
20213 #else
20214
20215 #if $cf_cv_header_stdbool_h
20216 #include <stdbool.h>
20217 #endif
20218
20219 #endif
20220
20221 int main()
20222 {
20223         FILE *fp = fopen("cf_test.out", "w");
20224         if (fp != 0) {
20225                 bool x = true;
20226                 if ((bool)(-x) >= 0)
20227                         fputs("unsigned ", fp);
20228                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20229                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20230                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20231                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20232                 fclose(fp);
20233         }
20234         ${cf_cv_main_return:-return}(0);
20235 }
20236
20237 _ACEOF
20238 rm -f conftest$ac_exeext
20239 if { (eval echo "$as_me:20239: \"$ac_link\"") >&5
20240   (eval $ac_link) 2>&5
20241   ac_status=$?
20242   echo "$as_me:20242: \$? = $ac_status" >&5
20243   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20244   { (eval echo "$as_me:20244: \"$ac_try\"") >&5
20245   (eval $ac_try) 2>&5
20246   ac_status=$?
20247   echo "$as_me:20247: \$? = $ac_status" >&5
20248   (exit $ac_status); }; }; then
20249   cf_cv_type_of_bool=`cat cf_test.out`
20250                  if test -z "$cf_cv_type_of_bool"; then
20251                    cf_cv_type_of_bool=unknown
20252                  fi
20253 else
20254   echo "$as_me: program exited with status $ac_status" >&5
20255 echo "$as_me: failed program was:" >&5
20256 cat conftest.$ac_ext >&5
20257 cf_cv_type_of_bool=unknown
20258 fi
20259 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20260 fi
20261
20262 fi
20263
20264         rm -f cf_test.out
20265 echo "$as_me:20265: result: $cf_cv_type_of_bool" >&5
20266 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20267 if test "$cf_cv_type_of_bool" = unknown ; then
20268         case .$NCURSES_BOOL in #(vi
20269         .auto|.) NCURSES_BOOL=unsigned;;
20270         esac
20271         { echo "$as_me:20271: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20272 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20273         cf_cv_type_of_bool=$NCURSES_BOOL
20274 fi
20275
20276                 else
20277                         echo "$as_me:20277: checking for fallback type of bool" >&5
20278 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20279                         case "$host_cpu" in #(vi
20280                         i?86)   cf_cv_type_of_bool=char ;; #(vi
20281                         *)      cf_cv_type_of_bool=int  ;;
20282                         esac
20283                         echo "$as_me:20283: result: $cf_cv_type_of_bool" >&5
20284 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20285                 fi
20286         fi
20287 fi
20288
20289 # If the C compiler did not declare bool, and we did not determine that the C++
20290 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20291 # ncurses library use the same type as C++ bool.  Note that this allows one to
20292 # specify the type of bool in a configure-script option and postpone
20293 # integration with the C++ compiler provided that the types are compatible.
20294 USE_CXX_BOOL=1
20295 if test $cf_cv_cc_bool_type = 1
20296 then
20297         # oops: C has a bool.  Unlikely, but C++ could differ.
20298         USE_CXX_BOOL=0
20299 elif test $cf_cv_builtin_bool = 0
20300 then
20301         # C++ has no bool
20302         USE_CXX_BOOL=0
20303 else
20304         # this is the normal case
20305         USE_CXX_BOOL='defined(__cplusplus)'
20306 fi
20307
20308 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20309
20310         if test "$cf_with_ada" != "no" ; then
20311                 if test "$with_libtool" != "no"; then
20312                         { echo "$as_me:20312: WARNING: libtool does not support Ada - disabling feature" >&5
20313 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20314                         cf_with_ada=no
20315                 fi
20316         fi
20317
20318         if test "$cf_with_ada" != "no" ; then
20319
20320 cf_ada_make=gnatmake
20321 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20322 set dummy $cf_ada_make; ac_word=$2
20323 echo "$as_me:20323: checking for $ac_word" >&5
20324 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20325 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20326   echo $ECHO_N "(cached) $ECHO_C" >&6
20327 else
20328   if test -n "$gnat_exists"; then
20329   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20330 else
20331   ac_save_IFS=$IFS; IFS=$ac_path_separator
20332 ac_dummy="$PATH"
20333 for ac_dir in $ac_dummy; do
20334   IFS=$ac_save_IFS
20335   test -z "$ac_dir" && ac_dir=.
20336   $as_executable_p "$ac_dir/$ac_word" || continue
20337 ac_cv_prog_gnat_exists="yes"
20338 echo "$as_me:20338: found $ac_dir/$ac_word" >&5
20339 break
20340 done
20341
20342   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20343 fi
20344 fi
20345 gnat_exists=$ac_cv_prog_gnat_exists
20346 if test -n "$gnat_exists"; then
20347   echo "$as_me:20347: result: $gnat_exists" >&5
20348 echo "${ECHO_T}$gnat_exists" >&6
20349 else
20350   echo "$as_me:20350: result: no" >&5
20351 echo "${ECHO_T}no" >&6
20352 fi
20353
20354 if test "$ac_cv_prog_gnat_exists" = no; then
20355    cf_ada_make=
20356    cf_cv_prog_gnat_correct=no
20357 else
20358
20359 echo "$as_me:20359: checking for gnat version" >&5
20360 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20361 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20362         grep '[0-9].[0-9][0-9]*' |\
20363     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20364 echo "$as_me:20364: result: $cf_gnat_version" >&5
20365 echo "${ECHO_T}$cf_gnat_version" >&6
20366
20367 case $cf_gnat_version in #(vi
20368 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
20369         cf_cv_prog_gnat_correct=yes
20370         ;;
20371 *)
20372         { echo "$as_me:20372: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20373 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20374         cf_cv_prog_gnat_correct=no
20375         ;;
20376 esac
20377
20378    # Extract the first word of "m4", so it can be a program name with args.
20379 set dummy m4; ac_word=$2
20380 echo "$as_me:20380: checking for $ac_word" >&5
20381 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20382 if test "${ac_cv_prog_M4_exists+set}" = set; then
20383   echo $ECHO_N "(cached) $ECHO_C" >&6
20384 else
20385   if test -n "$M4_exists"; then
20386   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20387 else
20388   ac_save_IFS=$IFS; IFS=$ac_path_separator
20389 ac_dummy="$PATH"
20390 for ac_dir in $ac_dummy; do
20391   IFS=$ac_save_IFS
20392   test -z "$ac_dir" && ac_dir=.
20393   $as_executable_p "$ac_dir/$ac_word" || continue
20394 ac_cv_prog_M4_exists="yes"
20395 echo "$as_me:20395: found $ac_dir/$ac_word" >&5
20396 break
20397 done
20398
20399   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20400 fi
20401 fi
20402 M4_exists=$ac_cv_prog_M4_exists
20403 if test -n "$M4_exists"; then
20404   echo "$as_me:20404: result: $M4_exists" >&5
20405 echo "${ECHO_T}$M4_exists" >&6
20406 else
20407   echo "$as_me:20407: result: no" >&5
20408 echo "${ECHO_T}no" >&6
20409 fi
20410
20411    if test "$ac_cv_prog_M4_exists" = no; then
20412       cf_cv_prog_gnat_correct=no
20413       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20414    fi
20415    if test "$cf_cv_prog_gnat_correct" = yes; then
20416       echo "$as_me:20416: checking if GNAT works" >&5
20417 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20418
20419 rm -rf conftest* *~conftest*
20420 cat >>conftest.ads <<CF_EOF
20421 procedure conftest;
20422 CF_EOF
20423 cat >>conftest.adb <<CF_EOF
20424 with Text_IO;
20425 with GNAT.OS_Lib;
20426 procedure conftest is
20427 begin
20428    Text_IO.Put ("Hello World");
20429    Text_IO.New_Line;
20430    GNAT.OS_Lib.OS_Exit (0);
20431 end conftest;
20432 CF_EOF
20433 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20434    if ( ./conftest 1>&5 2>&1 ) ; then
20435       cf_cv_prog_gnat_correct=yes
20436    else
20437       cf_cv_prog_gnat_correct=no
20438    fi
20439 else
20440    cf_cv_prog_gnat_correct=no
20441 fi
20442 rm -rf conftest* *~conftest*
20443
20444       echo "$as_me:20444: result: $cf_cv_prog_gnat_correct" >&5
20445 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20446    fi
20447 fi
20448
20449                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20450
20451         ADAFLAGS="$ADAFLAGS -gnatpn"
20452
20453         echo "$as_me:20453: checking optimization options for ADAFLAGS" >&5
20454 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20455         case "$CFLAGS" in
20456         *-g*)
20457
20458         ADAFLAGS="$ADAFLAGS -g"
20459
20460                 ;;
20461         esac
20462         case "$CFLAGS" in
20463         *-O*)
20464                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20465
20466         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20467
20468                 ;;
20469         esac
20470         echo "$as_me:20470: result: $ADAFLAGS" >&5
20471 echo "${ECHO_T}$ADAFLAGS" >&6
20472
20473 echo "$as_me:20473: checking if GNATPREP supports -T option" >&5
20474 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20475 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20476   echo $ECHO_N "(cached) $ECHO_C" >&6
20477 else
20478
20479 cf_cv_gnatprep_opt_t=no
20480 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20481
20482 fi
20483 echo "$as_me:20483: result: $cf_cv_gnatprep_opt_t" >&5
20484 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20485 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20486
20487 echo "$as_me:20487: checking if GNAT supports generics" >&5
20488 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20489 case $cf_gnat_version in #(vi
20490 3.[1-9]*|[4-9].*) #(vi
20491         cf_gnat_generics=yes
20492         ;;
20493 *)
20494         cf_gnat_generics=no
20495         ;;
20496 esac
20497 echo "$as_me:20497: result: $cf_gnat_generics" >&5
20498 echo "${ECHO_T}$cf_gnat_generics" >&6
20499
20500 if test "$cf_gnat_generics" = yes
20501 then
20502         cf_compile_generics=generics
20503         cf_generic_objects="\${GENOBJS}"
20504 else
20505         cf_compile_generics=
20506         cf_generic_objects=
20507 fi
20508
20509 echo "$as_me:20509: checking if GNAT supports SIGINT" >&5
20510 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20511 if test "${cf_cv_gnat_sigint+set}" = set; then
20512   echo $ECHO_N "(cached) $ECHO_C" >&6
20513 else
20514
20515 rm -rf conftest* *~conftest*
20516 cat >>conftest.ads <<CF_EOF
20517 with Ada.Interrupts.Names;
20518
20519 package ConfTest is
20520
20521    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20522    pragma Unreserve_All_Interrupts;
20523    pragma Warnings (On);
20524
20525    protected Process is
20526       procedure Stop;
20527       function Continue return Boolean;
20528       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20529    private
20530       Done : Boolean := False;
20531    end Process;
20532
20533 end ConfTest;
20534 CF_EOF
20535 cat >>conftest.adb <<CF_EOF
20536 package body ConfTest is
20537    protected body Process is
20538       procedure Stop is
20539       begin
20540          Done := True;
20541       end Stop;
20542       function Continue return Boolean is
20543       begin
20544          return not Done;
20545       end Continue;
20546    end Process;
20547 end ConfTest;
20548 CF_EOF
20549 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20550       cf_cv_gnat_sigint=yes
20551 else
20552    cf_cv_gnat_sigint=no
20553 fi
20554 rm -rf conftest* *~conftest*
20555
20556 fi
20557 echo "$as_me:20557: result: $cf_cv_gnat_sigint" >&5
20558 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20559
20560 if test $cf_cv_gnat_sigint = yes ; then
20561         USE_GNAT_SIGINT=""
20562 else
20563         USE_GNAT_SIGINT="#"
20564 fi
20565
20566 cf_gnat_libraries=no
20567 cf_gnat_projects=no
20568
20569 if test "$enable_gnat_projects" != no ; then
20570 echo "$as_me:20570: checking if GNAT supports project files" >&5
20571 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20572 case $cf_gnat_version in #(vi
20573 3.[0-9]*) #(vi
20574         ;;
20575 *)
20576         case $cf_cv_system_name in #(vi
20577         cygwin*|msys*) #(vi
20578                 ;;
20579         *)
20580                 mkdir conftest.src conftest.bin conftest.lib
20581                 cd conftest.src
20582                 rm -rf conftest* *~conftest*
20583                 cat >>library.gpr <<CF_EOF
20584 project Library is
20585   Kind := External ("LIB_KIND");
20586   for Library_Name use "ConfTest";
20587   for Object_Dir use ".";
20588   for Library_ALI_Dir use External("LIBRARY_DIR");
20589   for Library_Version use External ("SONAME");
20590   for Library_Kind use Kind;
20591   for Library_Dir use External("BUILD_DIR");
20592   Source_Dir := External ("SOURCE_DIR");
20593   for Source_Dirs use (Source_Dir);
20594 end Library;
20595 CF_EOF
20596                 cat >>confpackage.ads <<CF_EOF
20597 package ConfPackage is
20598    procedure conftest;
20599 end ConfPackage;
20600 CF_EOF
20601                 cat >>confpackage.adb <<CF_EOF
20602 with Text_IO;
20603 package body ConfPackage is
20604    procedure conftest is
20605    begin
20606       Text_IO.Put ("Hello World");
20607       Text_IO.New_Line;
20608    end conftest;
20609 end ConfPackage;
20610 CF_EOF
20611                 if ( $cf_ada_make $ADAFLAGS \
20612                                 -Plibrary.gpr \
20613                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
20614                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
20615                                 -XSOURCE_DIR=`pwd` \
20616                                 -XSONAME=libConfTest.so.1 \
20617                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
20618                         cf_gnat_projects=yes
20619                 fi
20620                 cd ..
20621                 if test -f conftest.lib/confpackage.ali
20622                 then
20623                         cf_gnat_libraries=yes
20624                 fi
20625                 rm -rf conftest* *~conftest*
20626                 ;;
20627         esac
20628         ;;
20629 esac
20630 echo "$as_me:20630: result: $cf_gnat_projects" >&5
20631 echo "${ECHO_T}$cf_gnat_projects" >&6
20632 fi # enable_gnat_projects
20633
20634 if test $cf_gnat_projects = yes
20635 then
20636         echo "$as_me:20636: checking if GNAT supports libraries" >&5
20637 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
20638         echo "$as_me:20638: result: $cf_gnat_libraries" >&5
20639 echo "${ECHO_T}$cf_gnat_libraries" >&6
20640 fi
20641
20642 if test "$cf_gnat_projects" = yes
20643 then
20644         USE_OLD_MAKERULES="#"
20645         USE_GNAT_PROJECTS=""
20646 else
20647         USE_OLD_MAKERULES=""
20648         USE_GNAT_PROJECTS="#"
20649 fi
20650
20651 if test "$cf_gnat_libraries" = yes
20652 then
20653         USE_GNAT_LIBRARIES=""
20654 else
20655         USE_GNAT_LIBRARIES="#"
20656 fi
20657
20658 echo "$as_me:20658: checking for ada-compiler" >&5
20659 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
20660
20661 # Check whether --with-ada-compiler or --without-ada-compiler was given.
20662 if test "${with_ada_compiler+set}" = set; then
20663   withval="$with_ada_compiler"
20664   cf_ada_compiler=$withval
20665 else
20666   cf_ada_compiler=gnatmake
20667 fi;
20668
20669 echo "$as_me:20669: result: $cf_ada_compiler" >&5
20670 echo "${ECHO_T}$cf_ada_compiler" >&6
20671
20672                         cf_ada_package=terminal_interface
20673
20674 echo "$as_me:20674: checking for ada-include" >&5
20675 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
20676
20677 # Check whether --with-ada-include or --without-ada-include was given.
20678 if test "${with_ada_include+set}" = set; then
20679   withval="$with_ada_include"
20680
20681 else
20682   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20683 fi; if test -n "$prefix/share/ada/adainclude" ; then
20684
20685 if test "x$prefix" != xNONE; then
20686   cf_path_syntax="$prefix"
20687 else
20688   cf_path_syntax="$ac_default_prefix"
20689 fi
20690
20691 case ".$withval" in #(vi
20692 .\$\(*\)*|.\'*\'*) #(vi
20693   ;;
20694 ..|./*|.\\*) #(vi
20695   ;;
20696 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20697   ;;
20698 .\${*prefix}*|.\${*dir}*) #(vi
20699   eval withval="$withval"
20700   case ".$withval" in #(vi
20701   .NONE/*)
20702     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20703     ;;
20704   esac
20705   ;; #(vi
20706 .no|.NONE/*)
20707   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20708   ;;
20709 *)
20710   { { echo "$as_me:20710: error: expected a pathname, not \"$withval\"" >&5
20711 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20712    { (exit 1); exit 1; }; }
20713   ;;
20714 esac
20715
20716 fi
20717 eval ADA_INCLUDE="$withval"
20718
20719 echo "$as_me:20719: result: $ADA_INCLUDE" >&5
20720 echo "${ECHO_T}$ADA_INCLUDE" >&6
20721
20722 echo "$as_me:20722: checking for ada-objects" >&5
20723 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
20724
20725 # Check whether --with-ada-objects or --without-ada-objects was given.
20726 if test "${with_ada_objects+set}" = set; then
20727   withval="$with_ada_objects"
20728
20729 else
20730   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
20731 fi; if test -n "$prefix/lib/ada/adalib" ; then
20732
20733 if test "x$prefix" != xNONE; then
20734   cf_path_syntax="$prefix"
20735 else
20736   cf_path_syntax="$ac_default_prefix"
20737 fi
20738
20739 case ".$withval" in #(vi
20740 .\$\(*\)*|.\'*\'*) #(vi
20741   ;;
20742 ..|./*|.\\*) #(vi
20743   ;;
20744 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20745   ;;
20746 .\${*prefix}*|.\${*dir}*) #(vi
20747   eval withval="$withval"
20748   case ".$withval" in #(vi
20749   .NONE/*)
20750     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20751     ;;
20752   esac
20753   ;; #(vi
20754 .no|.NONE/*)
20755   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20756   ;;
20757 *)
20758   { { echo "$as_me:20758: error: expected a pathname, not \"$withval\"" >&5
20759 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20760    { (exit 1); exit 1; }; }
20761   ;;
20762 esac
20763
20764 fi
20765 eval ADA_OBJECTS="$withval"
20766
20767 echo "$as_me:20767: result: $ADA_OBJECTS" >&5
20768 echo "${ECHO_T}$ADA_OBJECTS" >&6
20769
20770 echo "$as_me:20770: checking if an Ada95 shared-library should be built" >&5
20771 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
20772
20773 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
20774 if test "${with_ada_sharedlib+set}" = set; then
20775   withval="$with_ada_sharedlib"
20776   with_ada_sharedlib=$withval
20777 else
20778   with_ada_sharedlib=no
20779 fi;
20780 echo "$as_me:20780: result: $with_ada_sharedlib" >&5
20781 echo "${ECHO_T}$with_ada_sharedlib" >&6
20782
20783 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
20784 MAKE_ADA_SHAREDLIB="#"
20785
20786 if test "x$with_ada_sharedlib" != xno
20787 then
20788         MAKE_ADA_SHAREDLIB=
20789         if test "x$with_ada_sharedlib" != xyes
20790         then
20791                 ADA_SHAREDLIB="$with_ada_sharedlib"
20792         fi
20793 fi
20794
20795                 fi
20796         fi
20797 else
20798         cf_with_ada=no
20799 fi
20800
20801 # do this "late" to avoid conflict with header-checks
20802 if test "x$with_widec" = xyes ; then
20803         echo "$as_me:20803: checking for wchar_t" >&5
20804 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
20805 if test "${ac_cv_type_wchar_t+set}" = set; then
20806   echo $ECHO_N "(cached) $ECHO_C" >&6
20807 else
20808   cat >conftest.$ac_ext <<_ACEOF
20809 #line 20809 "configure"
20810 #include "confdefs.h"
20811 $ac_includes_default
20812 int
20813 main ()
20814 {
20815 if ((wchar_t *) 0)
20816   return 0;
20817 if (sizeof (wchar_t))
20818   return 0;
20819   ;
20820   return 0;
20821 }
20822 _ACEOF
20823 rm -f conftest.$ac_objext
20824 if { (eval echo "$as_me:20824: \"$ac_compile\"") >&5
20825   (eval $ac_compile) 2>&5
20826   ac_status=$?
20827   echo "$as_me:20827: \$? = $ac_status" >&5
20828   (exit $ac_status); } &&
20829          { ac_try='test -s conftest.$ac_objext'
20830   { (eval echo "$as_me:20830: \"$ac_try\"") >&5
20831   (eval $ac_try) 2>&5
20832   ac_status=$?
20833   echo "$as_me:20833: \$? = $ac_status" >&5
20834   (exit $ac_status); }; }; then
20835   ac_cv_type_wchar_t=yes
20836 else
20837   echo "$as_me: failed program was:" >&5
20838 cat conftest.$ac_ext >&5
20839 ac_cv_type_wchar_t=no
20840 fi
20841 rm -f conftest.$ac_objext conftest.$ac_ext
20842 fi
20843 echo "$as_me:20843: result: $ac_cv_type_wchar_t" >&5
20844 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
20845
20846 echo "$as_me:20846: checking size of wchar_t" >&5
20847 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
20848 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
20849   echo $ECHO_N "(cached) $ECHO_C" >&6
20850 else
20851   if test "$ac_cv_type_wchar_t" = yes; then
20852   if test "$cross_compiling" = yes; then
20853   # Depending upon the size, compute the lo and hi bounds.
20854 cat >conftest.$ac_ext <<_ACEOF
20855 #line 20855 "configure"
20856 #include "confdefs.h"
20857 $ac_includes_default
20858 int
20859 main ()
20860 {
20861 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
20862   ;
20863   return 0;
20864 }
20865 _ACEOF
20866 rm -f conftest.$ac_objext
20867 if { (eval echo "$as_me:20867: \"$ac_compile\"") >&5
20868   (eval $ac_compile) 2>&5
20869   ac_status=$?
20870   echo "$as_me:20870: \$? = $ac_status" >&5
20871   (exit $ac_status); } &&
20872          { ac_try='test -s conftest.$ac_objext'
20873   { (eval echo "$as_me:20873: \"$ac_try\"") >&5
20874   (eval $ac_try) 2>&5
20875   ac_status=$?
20876   echo "$as_me:20876: \$? = $ac_status" >&5
20877   (exit $ac_status); }; }; then
20878   ac_lo=0 ac_mid=0
20879   while :; do
20880     cat >conftest.$ac_ext <<_ACEOF
20881 #line 20881 "configure"
20882 #include "confdefs.h"
20883 $ac_includes_default
20884 int
20885 main ()
20886 {
20887 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20888   ;
20889   return 0;
20890 }
20891 _ACEOF
20892 rm -f conftest.$ac_objext
20893 if { (eval echo "$as_me:20893: \"$ac_compile\"") >&5
20894   (eval $ac_compile) 2>&5
20895   ac_status=$?
20896   echo "$as_me:20896: \$? = $ac_status" >&5
20897   (exit $ac_status); } &&
20898          { ac_try='test -s conftest.$ac_objext'
20899   { (eval echo "$as_me:20899: \"$ac_try\"") >&5
20900   (eval $ac_try) 2>&5
20901   ac_status=$?
20902   echo "$as_me:20902: \$? = $ac_status" >&5
20903   (exit $ac_status); }; }; then
20904   ac_hi=$ac_mid; break
20905 else
20906   echo "$as_me: failed program was:" >&5
20907 cat conftest.$ac_ext >&5
20908 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
20909 fi
20910 rm -f conftest.$ac_objext conftest.$ac_ext
20911   done
20912 else
20913   echo "$as_me: failed program was:" >&5
20914 cat conftest.$ac_ext >&5
20915 ac_hi=-1 ac_mid=-1
20916   while :; do
20917     cat >conftest.$ac_ext <<_ACEOF
20918 #line 20918 "configure"
20919 #include "confdefs.h"
20920 $ac_includes_default
20921 int
20922 main ()
20923 {
20924 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
20925   ;
20926   return 0;
20927 }
20928 _ACEOF
20929 rm -f conftest.$ac_objext
20930 if { (eval echo "$as_me:20930: \"$ac_compile\"") >&5
20931   (eval $ac_compile) 2>&5
20932   ac_status=$?
20933   echo "$as_me:20933: \$? = $ac_status" >&5
20934   (exit $ac_status); } &&
20935          { ac_try='test -s conftest.$ac_objext'
20936   { (eval echo "$as_me:20936: \"$ac_try\"") >&5
20937   (eval $ac_try) 2>&5
20938   ac_status=$?
20939   echo "$as_me:20939: \$? = $ac_status" >&5
20940   (exit $ac_status); }; }; then
20941   ac_lo=$ac_mid; break
20942 else
20943   echo "$as_me: failed program was:" >&5
20944 cat conftest.$ac_ext >&5
20945 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
20946 fi
20947 rm -f conftest.$ac_objext conftest.$ac_ext
20948   done
20949 fi
20950 rm -f conftest.$ac_objext conftest.$ac_ext
20951 # Binary search between lo and hi bounds.
20952 while test "x$ac_lo" != "x$ac_hi"; do
20953   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20954   cat >conftest.$ac_ext <<_ACEOF
20955 #line 20955 "configure"
20956 #include "confdefs.h"
20957 $ac_includes_default
20958 int
20959 main ()
20960 {
20961 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20962   ;
20963   return 0;
20964 }
20965 _ACEOF
20966 rm -f conftest.$ac_objext
20967 if { (eval echo "$as_me:20967: \"$ac_compile\"") >&5
20968   (eval $ac_compile) 2>&5
20969   ac_status=$?
20970   echo "$as_me:20970: \$? = $ac_status" >&5
20971   (exit $ac_status); } &&
20972          { ac_try='test -s conftest.$ac_objext'
20973   { (eval echo "$as_me:20973: \"$ac_try\"") >&5
20974   (eval $ac_try) 2>&5
20975   ac_status=$?
20976   echo "$as_me:20976: \$? = $ac_status" >&5
20977   (exit $ac_status); }; }; then
20978   ac_hi=$ac_mid
20979 else
20980   echo "$as_me: failed program was:" >&5
20981 cat conftest.$ac_ext >&5
20982 ac_lo=`expr $ac_mid + 1`
20983 fi
20984 rm -f conftest.$ac_objext conftest.$ac_ext
20985 done
20986 ac_cv_sizeof_wchar_t=$ac_lo
20987 else
20988   if test "$cross_compiling" = yes; then
20989   { { echo "$as_me:20989: error: cannot run test program while cross compiling" >&5
20990 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20991    { (exit 1); exit 1; }; }
20992 else
20993   cat >conftest.$ac_ext <<_ACEOF
20994 #line 20994 "configure"
20995 #include "confdefs.h"
20996 $ac_includes_default
20997 int
20998 main ()
20999 {
21000 FILE *f = fopen ("conftest.val", "w");
21001 if (!f)
21002   $ac_main_return (1);
21003 fprintf (f, "%d", (sizeof (wchar_t)));
21004 fclose (f);
21005   ;
21006   return 0;
21007 }
21008 _ACEOF
21009 rm -f conftest$ac_exeext
21010 if { (eval echo "$as_me:21010: \"$ac_link\"") >&5
21011   (eval $ac_link) 2>&5
21012   ac_status=$?
21013   echo "$as_me:21013: \$? = $ac_status" >&5
21014   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21015   { (eval echo "$as_me:21015: \"$ac_try\"") >&5
21016   (eval $ac_try) 2>&5
21017   ac_status=$?
21018   echo "$as_me:21018: \$? = $ac_status" >&5
21019   (exit $ac_status); }; }; then
21020   ac_cv_sizeof_wchar_t=`cat conftest.val`
21021 else
21022   echo "$as_me: program exited with status $ac_status" >&5
21023 echo "$as_me: failed program was:" >&5
21024 cat conftest.$ac_ext >&5
21025 fi
21026 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21027 fi
21028 fi
21029 rm -f conftest.val
21030 else
21031   ac_cv_sizeof_wchar_t=0
21032 fi
21033 fi
21034 echo "$as_me:21034: result: $ac_cv_sizeof_wchar_t" >&5
21035 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21036 cat >>confdefs.h <<EOF
21037 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21038 EOF
21039
21040 fi
21041
21042 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21043 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21044 ###
21045 ### ticlib modules may be a separate library, otherwise contained in termlib.
21046 ### termlib modules may be a separate library, otherwise contained in ncurses.
21047 ###
21048 ### The of "+" or " " between the tokens controls the way the script
21049 ### chooses to split module lists into libraries.
21050 ###
21051 ### (see CF_LIB_RULES).
21052 echo "$as_me:21052: checking for library subsets" >&5
21053 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21054 LIB_SUBSETS=
21055
21056 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21057         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21058         if test "$with_ticlib" != no ; then
21059                 LIB_SUBSETS="${LIB_SUBSETS} "
21060         else
21061                 LIB_SUBSETS="${LIB_SUBSETS}+"
21062         fi
21063 fi
21064
21065 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21066 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21067
21068 if test "$with_termlib" != no ; then
21069         LIB_SUBSETS="${LIB_SUBSETS} "
21070 else
21071         LIB_SUBSETS="${LIB_SUBSETS}+"
21072 fi
21073
21074 LIB_SUBSETS="${LIB_SUBSETS}base"
21075
21076 # Most term-driver calls are to tinfo, but some like init_pair are to the
21077 # base library (so it resides in base).
21078 if test "$with_term_driver" != no ; then
21079         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21080         case $cf_cv_system_name in #(vi
21081         *mingw32*|*mingw64*) #(vi
21082                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21083                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21084                 ;;
21085         *) #(vi
21086                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21087                 ;;
21088         esac
21089 fi
21090
21091 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21092 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21093
21094 echo "$as_me:21094: result: $LIB_SUBSETS" >&5
21095 echo "${ECHO_T}$LIB_SUBSETS" >&6
21096
21097 ### Construct the list of include-directories to be generated
21098
21099 if test "$srcdir" != "."; then
21100         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21101 fi
21102 CPPFLAGS="-I../include $CPPFLAGS"
21103 if test "$srcdir" != "."; then
21104         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21105 fi
21106 CPPFLAGS="-I. $CPPFLAGS"
21107
21108 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21109 if test "$srcdir" != "."; then
21110         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21111 fi
21112 if test "$GCC" != yes; then
21113         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21114 elif test "$includedir" != "/usr/include"; then
21115         if test "$includedir" = '${prefix}/include' ; then
21116                 if test x$prefix != x/usr ; then
21117                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21118                 fi
21119         else
21120                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21121         fi
21122 fi
21123
21124 ### Build up pieces for makefile rules
21125 echo "$as_me:21125: checking default library suffix" >&5
21126 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21127
21128         case $DFT_LWR_MODEL in
21129         libtool) DFT_ARG_SUFFIX=''   ;;
21130         normal)  DFT_ARG_SUFFIX=''   ;;
21131         debug)   DFT_ARG_SUFFIX='_g' ;;
21132         profile) DFT_ARG_SUFFIX='_p' ;;
21133         shared)  DFT_ARG_SUFFIX=''   ;;
21134         esac
21135         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21136 echo "$as_me:21136: result: $DFT_ARG_SUFFIX" >&5
21137 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21138
21139 echo "$as_me:21139: checking default library-dependency suffix" >&5
21140 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21141
21142         case X$DFT_LWR_MODEL in #(vi
21143         Xlibtool) #(vi
21144                 DFT_LIB_SUFFIX='.la'
21145                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21146                 ;;
21147         Xdebug) #(vi
21148                 DFT_LIB_SUFFIX='_g.a'
21149                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21150                 ;;
21151         Xprofile) #(vi
21152                 DFT_LIB_SUFFIX='_p.a'
21153                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21154                 ;;
21155         Xshared) #(vi
21156                 case $cf_cv_system_name in
21157                 aix[5-7]*) #(vi
21158                         DFT_LIB_SUFFIX='.so'
21159                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21160                         ;;
21161                 cygwin*|msys*|mingw*) #(vi
21162                         DFT_LIB_SUFFIX='.dll'
21163                         DFT_DEP_SUFFIX='.dll.a'
21164                         ;;
21165                 darwin*) #(vi
21166                         DFT_LIB_SUFFIX='.dylib'
21167                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21168                         ;;
21169                 hpux*) #(vi
21170                         case $target in
21171                         ia64*) #(vi
21172                                 DFT_LIB_SUFFIX='.so'
21173                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21174                                 ;;
21175                         *) #(vi
21176                                 DFT_LIB_SUFFIX='.sl'
21177                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21178                                 ;;
21179                         esac
21180                         ;;
21181                 *) #(vi
21182                         DFT_LIB_SUFFIX='.so'
21183                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21184                         ;;
21185                 esac
21186                 ;;
21187         *)
21188                 DFT_LIB_SUFFIX='.a'
21189                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21190                 ;;
21191         esac
21192         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
21193         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
21194 echo "$as_me:21194: result: $DFT_DEP_SUFFIX" >&5
21195 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21196
21197 echo "$as_me:21197: checking default object directory" >&5
21198 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21199
21200         case $DFT_LWR_MODEL in
21201         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21202         normal)  DFT_OBJ_SUBDIR='objects' ;;
21203         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21204         profile) DFT_OBJ_SUBDIR='obj_p' ;;
21205         shared)
21206                 case $cf_cv_system_name in #(vi
21207                 cygwin|msys) #(vi
21208                         DFT_OBJ_SUBDIR='objects' ;;
21209                 *)
21210                         DFT_OBJ_SUBDIR='obj_s' ;;
21211                 esac
21212         esac
21213 echo "$as_me:21213: result: $DFT_OBJ_SUBDIR" >&5
21214 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21215
21216 if test "x$cf_with_cxx" = xyes ; then
21217 echo "$as_me:21217: checking c++ library-dependency suffix" >&5
21218 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21219 if test "$with_libtool" != "no"; then
21220         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21221         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21222 elif test "$with_shared_cxx" != "no"; then
21223         # also for g++ users...
21224         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21225 else
21226         # we normally make a static library because C/C++ library rules differ
21227
21228         case Xnormal in #(vi
21229         Xlibtool) #(vi
21230                 CXX_LIB_SUFFIX='.la'
21231                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21232                 ;;
21233         Xdebug) #(vi
21234                 CXX_LIB_SUFFIX='_g.a'
21235                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21236                 ;;
21237         Xprofile) #(vi
21238                 CXX_LIB_SUFFIX='_p.a'
21239                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21240                 ;;
21241         Xshared) #(vi
21242                 case $cf_cv_system_name in
21243                 aix[5-7]*) #(vi
21244                         CXX_LIB_SUFFIX='.so'
21245                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21246                         ;;
21247                 cygwin*|msys*|mingw*) #(vi
21248                         CXX_LIB_SUFFIX='.dll'
21249                         CXX_DEP_SUFFIX='.dll.a'
21250                         ;;
21251                 darwin*) #(vi
21252                         CXX_LIB_SUFFIX='.dylib'
21253                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21254                         ;;
21255                 hpux*) #(vi
21256                         case $target in
21257                         ia64*) #(vi
21258                                 CXX_LIB_SUFFIX='.so'
21259                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21260                                 ;;
21261                         *) #(vi
21262                                 CXX_LIB_SUFFIX='.sl'
21263                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21264                                 ;;
21265                         esac
21266                         ;;
21267                 *) #(vi
21268                         CXX_LIB_SUFFIX='.so'
21269                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21270                         ;;
21271                 esac
21272                 ;;
21273         *)
21274                 CXX_LIB_SUFFIX='.a'
21275                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21276                 ;;
21277         esac
21278         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
21279         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
21280
21281 fi
21282 echo "$as_me:21282: result: $CXX_LIB_SUFFIX" >&5
21283 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21284
21285 fi
21286
21287 # do not want -ldl in build except as needed for -lncurses dependency
21288 if test "x$with_dlsym" = xyes ; then
21289 if test $DFT_LWR_MODEL = shared || \
21290    test $DFT_LWR_MODEL = libtool ; then
21291
21292 # remove dl library from $LIBS
21293 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21294
21295 fi
21296 fi
21297 ### Set up low-level terminfo dependencies for makefiles.
21298
21299 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21300 # do not need libdl
21301 TICS_LIST=
21302 if test "x$with_dlsym" = xyes ; then
21303
21304 # remove dl library from $SHLIB_LIST
21305 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21306
21307 fi
21308
21309 if test "$with_ticlib" != no ; then
21310
21311         if test "x$with_ticlib" != xyes ; then
21312                 TICS_NAME=$with_ticlib
21313                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21314                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21315                 TICS_LIB_SUFFIX="${with_ticlib}"
21316         else
21317                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
21318                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21319                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
21320         fi
21321         TICS_LDFLAGS="-L${LIB_DIR}"
21322         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21323 else
21324         TICS_LDFLAGS="-L${LIB_DIR}"
21325         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21326 fi
21327
21328 if test "$with_termlib" != no ; then
21329
21330         if test "x$with_termlib" != xyes ; then
21331                 TINFO_NAME=$with_termlib
21332                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21333                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21334                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21335                 TINFO_LIB_SUFFIX="${with_termlib}"
21336         else
21337                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21338                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
21339                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21340                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
21341         fi
21342
21343         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21344         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21345         if test "$DFT_LWR_MODEL" = "libtool"; then
21346                 TEST_ARGS="${TEST_DEPS}"
21347                 TEST_ARG2="${TEST_DEP2}"
21348                 TINFO_LDFLAGS="-L${LIB_DIR}"
21349                 TINFO_LIBS="$TEST_ARGS"
21350                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21351                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21352         else
21353                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21354                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21355                 if test "x$with_term_driver" != xno ; then
21356                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21357                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21358                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21359                 else
21360                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21361                         TINFO_LIBS="$TEST_ARGS"
21362                 fi
21363                 TINFO_LDFLAGS="-L${LIB_DIR}"
21364                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21365         fi
21366 else
21367         # the next lines are needed for linking libtic over libncurses
21368         TINFO_NAME=${LIB_NAME}
21369         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21370         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
21371         if test "x$with_tic_depends" = xyes ; then
21372                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21373         else
21374                 TICS_LIST="$SHLIB_LIST"
21375         fi
21376
21377         TINFO_LDFLAGS="-L${LIB_DIR}"
21378         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21379 fi
21380
21381 if test "$DFT_LWR_MODEL" = shared ; then
21382         case $cf_cv_system_name in #(vi
21383         cygwin*|msys*)
21384                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21385                 TINFO_SUFFIX=.dll
21386                 ;;
21387         esac
21388 fi
21389
21390 if test "x$with_dlsym" = xyes ; then
21391
21392 # remove dl library from $TICS_LIST
21393 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21394
21395 fi
21396
21397 if test "$DFT_LWR_MODEL" = "libtool"; then
21398     OBJEXT=lo
21399 fi
21400
21401 # needed for Ada95
21402 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21403
21404 case $DFT_LWR_MODEL in
21405 normal|debug|profile)
21406
21407 if test "$GCC" = yes ; then
21408         case $cf_cv_system_name in #(
21409         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
21410                 LDFLAGS_STATIC=
21411                 LDFLAGS_SHARED=
21412                 ;;
21413     *)  #( normally, except when broken
21414         LDFLAGS_STATIC=-static
21415         LDFLAGS_SHARED=-dynamic
21416         ;;
21417     esac
21418 else
21419         case $cf_cv_system_name in #(
21420         aix[4-7]*)      #( from ld manpage
21421                 LDFLAGS_STATIC=-bstatic
21422                 LDFLAGS_SHARED=-bdynamic
21423                 ;;
21424         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
21425                 # We could also use just "archive" and "shared".
21426                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21427                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21428                 ;;
21429         irix*)          #( from ld manpage IRIX64
21430                 LDFLAGS_STATIC=-Bstatic
21431                 LDFLAGS_SHARED=-Bdynamic
21432                 ;;
21433         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
21434                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21435                 LDFLAGS_STATIC=-noso
21436                 LDFLAGS_SHARED=-so_archive
21437                 ;;
21438         solaris2*)
21439                 LDFLAGS_STATIC=-Bstatic
21440                 LDFLAGS_SHARED=-Bdynamic
21441                 ;;
21442         esac
21443 fi
21444
21445 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21446 then
21447         echo "$as_me:21447: checking if linker supports switching between static/dynamic" >&5
21448 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21449
21450         rm -f libconftest.a
21451         cat >conftest.$ac_ext <<EOF
21452 #line 21452 "configure"
21453 #include <stdio.h>
21454 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21455 EOF
21456         if { (eval echo "$as_me:21456: \"$ac_compile\"") >&5
21457   (eval $ac_compile) 2>&5
21458   ac_status=$?
21459   echo "$as_me:21459: \$? = $ac_status" >&5
21460   (exit $ac_status); } ; then
21461                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21462                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21463         fi
21464         rm -f conftest.*
21465
21466         cf_save_LIBS="$LIBS"
21467
21468         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21469         cat >conftest.$ac_ext <<_ACEOF
21470 #line 21470 "configure"
21471 #include "confdefs.h"
21472
21473 #line 21473 "configure"
21474 #include <stdio.h>
21475 int cf_ldflags_static(FILE *fp);
21476
21477 int
21478 main ()
21479 {
21480
21481         return cf_ldflags_static(stdin);
21482
21483   ;
21484   return 0;
21485 }
21486 _ACEOF
21487 rm -f conftest.$ac_objext conftest$ac_exeext
21488 if { (eval echo "$as_me:21488: \"$ac_link\"") >&5
21489   (eval $ac_link) 2>&5
21490   ac_status=$?
21491   echo "$as_me:21491: \$? = $ac_status" >&5
21492   (exit $ac_status); } &&
21493          { ac_try='test -s conftest$ac_exeext'
21494   { (eval echo "$as_me:21494: \"$ac_try\"") >&5
21495   (eval $ac_try) 2>&5
21496   ac_status=$?
21497   echo "$as_me:21497: \$? = $ac_status" >&5
21498   (exit $ac_status); }; }; then
21499
21500         # some linkers simply ignore the -dynamic
21501         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
21502         *static*) # (vi
21503                 cf_ldflags_static=no
21504                 ;;
21505         *)
21506                 cf_ldflags_static=yes
21507                 ;;
21508         esac
21509
21510 else
21511   echo "$as_me: failed program was:" >&5
21512 cat conftest.$ac_ext >&5
21513 cf_ldflags_static=no
21514 fi
21515 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21516
21517         rm -f libconftest.*
21518         LIBS="$cf_save_LIBS"
21519
21520         echo "$as_me:21520: result: $cf_ldflags_static" >&5
21521 echo "${ECHO_T}$cf_ldflags_static" >&6
21522
21523         if test $cf_ldflags_static != yes
21524         then
21525                 LDFLAGS_STATIC=
21526                 LDFLAGS_SHARED=
21527         fi
21528 else
21529         LDFLAGS_STATIC=
21530         LDFLAGS_SHARED=
21531 fi
21532
21533         ;;
21534 esac
21535
21536 echo "$as_me:21536: checking where we will install curses.h" >&5
21537 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21538
21539 includesubdir=
21540 if test "$with_overwrite" = no && \
21541  ( test "x$includedir" = 'x${prefix}/include' || \
21542    test "x$includedir" = "x${prefix}/include" )
21543 then
21544         includesubdir="/ncurses${LIB_SUFFIX}"
21545 fi
21546 echo "$as_me:21546: result: ${includedir}${includesubdir}" >&5
21547 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21548
21549 ### Resolve a conflict between normal and wide-curses by forcing applications
21550 ### that will need libutf8 to add it to their configure script.
21551 if test "$with_overwrite" != no ; then
21552 if test "$NCURSES_LIBUTF8" = 1 ; then
21553         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21554         { echo "$as_me:21554: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21555 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21556 fi
21557 fi
21558 WITH_OVERWRITE=$with_overwrite
21559
21560 # used to separate tack out of the tree
21561 NCURSES_TREE=
21562
21563 ### predefined stuff for the test programs
21564
21565 cat >>confdefs.h <<\EOF
21566 #define HAVE_SLK_COLOR 1
21567 EOF
21568
21569 ### Construct the list of subdirectories for which we'll customize makefiles
21570 ### with the appropriate compile-rules.
21571
21572 echo "$as_me:21572: checking for src modules" >&5
21573 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21574
21575 # dependencies and linker-arguments for test-programs
21576 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21577 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21578 if test "$DFT_LWR_MODEL" = "libtool"; then
21579         TEST_ARGS="${TEST_DEPS}"
21580         TEST_ARG2="${TEST_DEP2}"
21581 else
21582         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21583         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
21584 fi
21585
21586 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
21587 cf_cv_src_modules=
21588 for cf_dir in $modules_to_build
21589 do
21590         if test -f $srcdir/$cf_dir/modules; then
21591
21592                 # We may/may not have tack in the distribution, though the
21593                 # makefile is.
21594                 if test $cf_dir = tack ; then
21595                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
21596                                 continue
21597                         fi
21598                 fi
21599
21600                 if test -z "$cf_cv_src_modules"; then
21601                         cf_cv_src_modules=$cf_dir
21602                 else
21603                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
21604                 fi
21605
21606                 # Make the ncurses_cfg.h file record the library interface files as
21607                 # well.  These are header files that are the same name as their
21608                 # directory.  Ncurses is the only library that does not follow
21609                 # that pattern.
21610                 if test $cf_dir = tack ; then
21611                         continue
21612                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
21613
21614 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21615
21616                         cat >>confdefs.h <<EOF
21617 #define HAVE_${cf_have_include}_H 1
21618 EOF
21619
21620                         cat >>confdefs.h <<EOF
21621 #define HAVE_LIB${cf_have_include} 1
21622 EOF
21623
21624                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
21625                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
21626                         if test "$DFT_LWR_MODEL" = "libtool"; then
21627                                 TEST_ARGS="${TEST_DEPS}"
21628                                 TEST_ARG2="${TEST_DEP2}"
21629                         else
21630                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
21631                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
21632                         fi
21633                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
21634                 fi
21635         fi
21636 done
21637 echo "$as_me:21637: result: $cf_cv_src_modules" >&5
21638 echo "${ECHO_T}$cf_cv_src_modules" >&6
21639
21640 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21641 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21642
21643 SRC_SUBDIRS=
21644 if test "x$cf_with_manpages" != xno ; then
21645         SRC_SUBDIRS="$SRC_SUBDIRS man"
21646 fi
21647 SRC_SUBDIRS="$SRC_SUBDIRS include"
21648 for cf_dir in $cf_cv_src_modules
21649 do
21650         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21651 done
21652 if test "x$cf_with_tests" != "xno" ; then
21653         SRC_SUBDIRS="$SRC_SUBDIRS test"
21654 fi
21655 # always make this, to install the ncurses-config script
21656 SRC_SUBDIRS="$SRC_SUBDIRS misc"
21657 if test "$cf_with_cxx_binding" != no; then
21658         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
21659         SRC_SUBDIRS="$SRC_SUBDIRS c++"
21660 fi
21661
21662 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21663 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
21664
21665 ADA_SUBDIRS=
21666 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
21667         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
21668         ADA_SUBDIRS="gen src"
21669         if test "x$cf_with_tests" != "xno" ; then
21670                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
21671         fi
21672 fi
21673
21674 SUB_MAKEFILES=
21675 for cf_dir in $SRC_SUBDIRS
21676 do
21677         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
21678 done
21679
21680 if test -n "$ADA_SUBDIRS"; then
21681         for cf_dir in $ADA_SUBDIRS
21682         do
21683                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
21684         done
21685
21686 fi
21687
21688 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21689    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
21690    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
21691 fi
21692
21693 DIRS_TO_MAKE="lib"
21694 for cf_item in $cf_list_models
21695 do
21696
21697         case $cf_item in
21698         libtool) cf_subdir='obj_lo'  ;;
21699         normal)  cf_subdir='objects' ;;
21700         debug)   cf_subdir='obj_g' ;;
21701         profile) cf_subdir='obj_p' ;;
21702         shared)
21703                 case $cf_cv_system_name in #(vi
21704                 cygwin|msys) #(vi
21705                         cf_subdir='objects' ;;
21706                 *)
21707                         cf_subdir='obj_s' ;;
21708                 esac
21709         esac
21710
21711         for cf_item2 in $DIRS_TO_MAKE
21712         do
21713                 test $cf_item2 = $cf_subdir && break
21714         done
21715         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21716 done
21717 for cf_dir in $DIRS_TO_MAKE
21718 do
21719         test ! -d $cf_dir && mkdir $cf_dir
21720 done
21721
21722 # symbols that differ when compiling Ada95 by itself.
21723 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
21724
21725 # values to use as strings
21726
21727 cat >>confdefs.h <<EOF
21728 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
21729 EOF
21730
21731 cat >>confdefs.h <<EOF
21732 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
21733 EOF
21734
21735 ### Now that we're done running tests, add the compiler-warnings, if any
21736
21737 cf_fix_cppflags=no
21738 cf_new_cflags=
21739 cf_new_cppflags=
21740 cf_new_extra_cppflags=
21741
21742 for cf_add_cflags in $EXTRA_CFLAGS
21743 do
21744 case $cf_fix_cppflags in
21745 no)
21746         case $cf_add_cflags in #(vi
21747         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
21748                 case $cf_add_cflags in
21749                 -D*)
21750                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21751
21752                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21753                                 && test -z "${cf_tst_cflags}" \
21754                                 && cf_fix_cppflags=yes
21755
21756                         if test $cf_fix_cppflags = yes ; then
21757                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21758                                 continue
21759                         elif test "${cf_tst_cflags}" = "\"'" ; then
21760                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21761                                 continue
21762                         fi
21763                         ;;
21764                 esac
21765                 case "$CPPFLAGS" in
21766                 *$cf_add_cflags) #(vi
21767                         ;;
21768                 *) #(vi
21769                         case $cf_add_cflags in #(vi
21770                         -D*)
21771                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21772
21773 CPPFLAGS=`echo "$CPPFLAGS" | \
21774         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21775                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21776
21777                                 ;;
21778                         esac
21779                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
21780                         ;;
21781                 esac
21782                 ;;
21783         *)
21784                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
21785                 ;;
21786         esac
21787         ;;
21788 yes)
21789         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21790
21791         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21792
21793         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21794                 && test -z "${cf_tst_cflags}" \
21795                 && cf_fix_cppflags=no
21796         ;;
21797 esac
21798 done
21799
21800 if test -n "$cf_new_cflags" ; then
21801
21802         CFLAGS="$CFLAGS $cf_new_cflags"
21803 fi
21804
21805 if test -n "$cf_new_cppflags" ; then
21806
21807         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
21808 fi
21809
21810 if test -n "$cf_new_extra_cppflags" ; then
21811
21812         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
21813 fi
21814
21815 ### Define substitutions for header files to avoid name-pollution
21816
21817 if test "x$cf_cv_have_tcgetattr" = xyes ; then
21818         HAVE_TCGETATTR=1
21819 else
21820         HAVE_TCGETATTR=0
21821 fi
21822
21823 if test "x$ac_cv_header_stdint_h" = xyes ; then
21824         HAVE_STDINT_H=1
21825 else
21826         HAVE_STDINT_H=0
21827 fi
21828
21829 if test "x$ac_cv_header_termio_h" = xyes ; then
21830         HAVE_TERMIO_H=1
21831 else
21832         HAVE_TERMIO_H=0
21833 fi
21834
21835 if test "x$ac_cv_header_termios_h" = xyes ; then
21836         HAVE_TERMIOS_H=1
21837 else
21838         HAVE_TERMIOS_H=0
21839 fi
21840
21841 ################################################################################
21842 test "x$use_database" = xyes && \
21843 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
21844
21845 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
21846 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
21847
21848 if test "x$enable_pc_files" = xyes ; then \
21849 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
21850 MAKE_PC_FILES=
21851 else
21852 MAKE_PC_FILES="#"
21853 fi
21854
21855 # Extract the first word of "tic", so it can be a program name with args.
21856 set dummy tic; ac_word=$2
21857 echo "$as_me:21857: checking for $ac_word" >&5
21858 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21859 if test "${ac_cv_path_TIC_PATH+set}" = set; then
21860   echo $ECHO_N "(cached) $ECHO_C" >&6
21861 else
21862   case $TIC_PATH in
21863   [\\/]* | ?:[\\/]*)
21864   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
21865   ;;
21866   *)
21867   ac_save_IFS=$IFS; IFS=$ac_path_separator
21868 ac_dummy="$PATH:/usr/local/ncurses/bin"
21869 for ac_dir in $ac_dummy; do
21870   IFS=$ac_save_IFS
21871   test -z "$ac_dir" && ac_dir=.
21872   if $as_executable_p "$ac_dir/$ac_word"; then
21873    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
21874    echo "$as_me:21874: found $ac_dir/$ac_word" >&5
21875    break
21876 fi
21877 done
21878
21879   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
21880   ;;
21881 esac
21882 fi
21883 TIC_PATH=$ac_cv_path_TIC_PATH
21884
21885 if test -n "$TIC_PATH"; then
21886   echo "$as_me:21886: result: $TIC_PATH" >&5
21887 echo "${ECHO_T}$TIC_PATH" >&6
21888 else
21889   echo "$as_me:21889: result: no" >&5
21890 echo "${ECHO_T}no" >&6
21891 fi
21892
21893 if test -n "$FALLBACK_LIST"
21894 then
21895         if test "$TIC_PATH" = unknown
21896         then
21897                 { echo "$as_me:21897: WARNING: no tic program found for fallbacks" >&5
21898 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
21899         fi
21900 fi
21901
21902 if test "x$cf_with_tests" != xno ; then
21903         MAKE_TESTS=
21904 else
21905         MAKE_TESTS="#"
21906 fi
21907
21908 ADAHTML_DIR=../../doc/html/ada
21909
21910 # these could be configurable, but are not currently
21911 PANEL_NAME=panel
21912 MENU_NAME=menu
21913 FORM_NAME=form
21914 CXX_NAME=ncurses++
21915
21916 # workaround for g++ versus Solaris (20131116)
21917 case $cf_cv_system_name in #(vi
21918 solaris2*) #(vi
21919         case "x$CPPFLAGS" in #(vi
21920         *-D_XOPEN_SOURCE_EXTENDED*)
21921                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
21922
21923 echo "${as_me:-configure}:21923: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
21924
21925                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
21926                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
21927                 ;;
21928         esac
21929         ;;
21930 esac
21931
21932 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
21933 case "x$NCURSES_OSPEED" in #(vi
21934 *short*) #(vi
21935         cf_compatible=1
21936         ;;
21937 *)
21938         cf_compatible=0
21939         ;;
21940 esac
21941
21942 cat >>confdefs.h <<EOF
21943 #define NCURSES_OSPEED_COMPAT $cf_compatible
21944 EOF
21945
21946 case "x$cf_cv_typeof_chtype" in
21947 xshort|xint|xlong)
21948         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
21949         ;;
21950 esac
21951
21952 case "x$cf_cv_typeof_mmask_t" in
21953 xshort|xint|xlong)
21954         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
21955         ;;
21956 esac
21957
21958 # substitute into misc/Makefile to suppress
21959 # (un)install.data from the
21960 # (un)install rules.
21961 if test "x$cf_with_db_install" = "xno"; then
21962         MISC_INSTALL_DATA=
21963         MISC_UNINSTALL_DATA=
21964 else
21965         MISC_INSTALL_DATA=install.data
21966         MISC_UNINSTALL_DATA=uninstall.data
21967 fi
21968
21969 SUB_SCRIPTS=
21970
21971 if test -n "$PACKAGE"
21972 then
21973         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
21974         export PACKAGE
21975         echo "package: $PACKAGE"
21976 fi
21977
21978 if test -n "$RESULTING_SYMS"
21979 then
21980         UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
21981         case $cf_cv_abi_version in
21982         [6789])
21983                 if test -n "$VERSIONED_SYMS"
21984                 then
21985                         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
21986
21987 echo "${as_me:-configure}:21987: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
21988
21989                 fi
21990                 RESULTING_SYMS=resulting.map
21991                 ;;
21992         *)
21993                 RESULTING_SYMS="$UNALTERED_SYMS"
21994                 ;;
21995         esac
21996 else
21997         UNALTERED_SYMS=
21998 fi
21999
22000 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"
22001 ac_config_commands="$ac_config_commands default"
22002 cat >confcache <<\_ACEOF
22003 # This file is a shell script that caches the results of configure
22004 # tests run on this system so they can be shared between configure
22005 # scripts and configure runs, see configure's option --config-cache.
22006 # It is not useful on other systems.  If it contains results you don't
22007 # want to keep, you may remove or edit it.
22008 #
22009 # config.status only pays attention to the cache file if you give it
22010 # the --recheck option to rerun configure.
22011 #
22012 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22013 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22014 # following values.
22015
22016 _ACEOF
22017
22018 # The following way of writing the cache mishandles newlines in values,
22019 # but we know of no workaround that is simple, portable, and efficient.
22020 # So, don't put newlines in cache variables' values.
22021 # Ultrix sh set writes to stderr and can't be redirected directly,
22022 # and sets the high bit in the cache file unless we assign to the vars.
22023 {
22024   (set) 2>&1 |
22025     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22026     *ac_space=\ *)
22027       # `set' does not quote correctly, so add quotes (double-quote
22028       # substitution turns \\\\ into \\, and sed turns \\ into \).
22029       sed -n \
22030         "s/'/'\\\\''/g;
22031           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22032       ;;
22033     *)
22034       # `set' quotes correctly as required by POSIX, so do not add quotes.
22035       sed -n \
22036         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22037       ;;
22038     esac;
22039 } |
22040   sed '
22041      t clear
22042      : clear
22043      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22044      t end
22045      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22046      : end' >>confcache
22047 if cmp -s $cache_file confcache; then :; else
22048   if test -w $cache_file; then
22049     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22050     cat confcache >$cache_file
22051   else
22052     echo "not updating unwritable cache $cache_file"
22053   fi
22054 fi
22055 rm -f confcache
22056
22057 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22058 # Let make expand exec_prefix.
22059 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22060
22061 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22062 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22063 # trailing colons and then remove the whole line if VPATH becomes empty
22064 # (actually we leave an empty line to preserve line numbers).
22065 if test "x$srcdir" = x.; then
22066   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22067 s/:*\$(srcdir):*/:/;
22068 s/:*\${srcdir}:*/:/;
22069 s/:*@srcdir@:*/:/;
22070 s/^\([^=]*=[    ]*\):*/\1/;
22071 s/:*$//;
22072 s/^[^=]*=[      ]*$//;
22073 }'
22074 fi
22075
22076 DEFS=-DHAVE_CONFIG_H
22077
22078 : ${CONFIG_STATUS=./config.status}
22079 ac_clean_files_save=$ac_clean_files
22080 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22081 { echo "$as_me:22081: creating $CONFIG_STATUS" >&5
22082 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22083 cat >$CONFIG_STATUS <<_ACEOF
22084 #! $SHELL
22085 # Generated automatically by configure.
22086 # Run this file to recreate the current configuration.
22087 # Compiler output produced by configure, useful for debugging
22088 # configure, is in config.log if it exists.
22089
22090 debug=false
22091 SHELL=\${CONFIG_SHELL-$SHELL}
22092 ac_cs_invocation="\$0 \$@"
22093
22094 _ACEOF
22095
22096 cat >>$CONFIG_STATUS <<\_ACEOF
22097 # Be Bourne compatible
22098 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22099   emulate sh
22100   NULLCMD=:
22101 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22102   set -o posix
22103 fi
22104
22105 # Name of the executable.
22106 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22107
22108 if expr a : '\(a\)' >/dev/null 2>&1; then
22109   as_expr=expr
22110 else
22111   as_expr=false
22112 fi
22113
22114 rm -f conf$$ conf$$.exe conf$$.file
22115 echo >conf$$.file
22116 if ln -s conf$$.file conf$$ 2>/dev/null; then
22117   # We could just check for DJGPP; but this test a) works b) is more generic
22118   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22119   if test -f conf$$.exe; then
22120     # Don't use ln at all; we don't have any links
22121     as_ln_s='cp -p'
22122   else
22123     as_ln_s='ln -s'
22124   fi
22125 elif ln conf$$.file conf$$ 2>/dev/null; then
22126   as_ln_s=ln
22127 else
22128   as_ln_s='cp -p'
22129 fi
22130 rm -f conf$$ conf$$.exe conf$$.file
22131
22132 as_executable_p="test -f"
22133
22134 # Support unset when possible.
22135 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22136   as_unset=unset
22137 else
22138   as_unset=false
22139 fi
22140
22141 # NLS nuisances.
22142 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22143 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22144 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22145 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22146 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22147 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22148 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22149 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22150
22151 # IFS
22152 # We need space, tab and new line, in precisely that order.
22153 as_nl='
22154 '
22155 IFS="   $as_nl"
22156
22157 # CDPATH.
22158 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22159
22160 exec 6>&1
22161
22162 _ACEOF
22163
22164 # Files that config.status was made for.
22165 if test -n "$ac_config_files"; then
22166   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22167 fi
22168
22169 if test -n "$ac_config_headers"; then
22170   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22171 fi
22172
22173 if test -n "$ac_config_links"; then
22174   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22175 fi
22176
22177 if test -n "$ac_config_commands"; then
22178   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22179 fi
22180
22181 cat >>$CONFIG_STATUS <<\EOF
22182
22183 ac_cs_usage="\
22184 \`$as_me' instantiates files from templates according to the
22185 current configuration.
22186
22187 Usage: $0 [OPTIONS] [FILE]...
22188
22189   -h, --help       print this help, then exit
22190   -V, --version    print version number, then exit
22191   -d, --debug      don't remove temporary files
22192       --recheck    update $as_me by reconfiguring in the same conditions
22193   --file=FILE[:TEMPLATE]
22194                    instantiate the configuration file FILE
22195   --header=FILE[:TEMPLATE]
22196                    instantiate the configuration header FILE
22197
22198 Configuration files:
22199 $config_files
22200
22201 Configuration headers:
22202 $config_headers
22203
22204 Configuration commands:
22205 $config_commands
22206
22207 Report bugs to <dickey@invisible-island.net>."
22208 EOF
22209
22210 cat >>$CONFIG_STATUS <<EOF
22211 ac_cs_version="\\
22212 config.status
22213 configured by $0, generated by GNU Autoconf 2.52.20141204,
22214   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22215
22216 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22217 Free Software Foundation, Inc.
22218 This config.status script is free software; the Free Software Foundation
22219 gives unlimited permission to copy, distribute and modify it."
22220 srcdir=$srcdir
22221 INSTALL="$INSTALL"
22222 EOF
22223
22224 cat >>$CONFIG_STATUS <<\EOF
22225 # If no file are specified by the user, then we need to provide default
22226 # value.  By we need to know if files were specified by the user.
22227 ac_need_defaults=:
22228 while test $# != 0
22229 do
22230   case $1 in
22231   --*=*)
22232     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22233     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22234     shift
22235     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22236     shift
22237     ;;
22238   -*);;
22239   *) # This is not an option, so the user has probably given explicit
22240      # arguments.
22241      ac_need_defaults=false;;
22242   esac
22243
22244   case $1 in
22245   # Handling of the options.
22246 EOF
22247 cat >>$CONFIG_STATUS <<EOF
22248   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22249     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22250     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22251 EOF
22252 cat >>$CONFIG_STATUS <<\EOF
22253   --version | --vers* | -V )
22254     echo "$ac_cs_version"; exit 0 ;;
22255   --he | --h)
22256     # Conflict between --help and --header
22257     { { echo "$as_me:22257: error: ambiguous option: $1
22258 Try \`$0 --help' for more information." >&5
22259 echo "$as_me: error: ambiguous option: $1
22260 Try \`$0 --help' for more information." >&2;}
22261    { (exit 1); exit 1; }; };;
22262   --help | --hel | -h )
22263     echo "$ac_cs_usage"; exit 0 ;;
22264   --debug | --d* | -d )
22265     debug=: ;;
22266   --file | --fil | --fi | --f )
22267     shift
22268     CONFIG_FILES="$CONFIG_FILES $1"
22269     ac_need_defaults=false;;
22270   --header | --heade | --head | --hea )
22271     shift
22272     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22273     ac_need_defaults=false;;
22274
22275   # This is an error.
22276   -*) { { echo "$as_me:22276: error: unrecognized option: $1
22277 Try \`$0 --help' for more information." >&5
22278 echo "$as_me: error: unrecognized option: $1
22279 Try \`$0 --help' for more information." >&2;}
22280    { (exit 1); exit 1; }; } ;;
22281
22282   *) ac_config_targets="$ac_config_targets $1" ;;
22283
22284   esac
22285   shift
22286 done
22287
22288 exec 5>>config.log
22289 cat >&5 << _ACEOF
22290
22291 ## ----------------------- ##
22292 ## Running config.status.  ##
22293 ## ----------------------- ##
22294
22295 This file was extended by $as_me 2.52.20141204, executed with
22296   CONFIG_FILES    = $CONFIG_FILES
22297   CONFIG_HEADERS  = $CONFIG_HEADERS
22298   CONFIG_LINKS    = $CONFIG_LINKS
22299   CONFIG_COMMANDS = $CONFIG_COMMANDS
22300   > $ac_cs_invocation
22301 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22302
22303 _ACEOF
22304 EOF
22305
22306 cat >>$CONFIG_STATUS <<EOF
22307 #
22308 # INIT-COMMANDS section.
22309 #
22310
22311 ### Special initialization commands, used to pass information from the
22312 ### configuration-run into config.status
22313
22314 AWK="$AWK"
22315 ALTERNATE_SYMS="$ALTERNATE_SYMS"
22316 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22317 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22318 ECHO_LD="$ECHO_LD"
22319 LDCONFIG="$LDCONFIG"
22320 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22321 LIB_NAME="$LIB_NAME"
22322 LIB_PREFIX="$LIB_PREFIX"
22323 LIB_SUBSETS="$LIB_SUBSETS"
22324 LIB_SUFFIX="$LIB_SUFFIX"
22325 LIB_TRACING="$LIB_TRACING"
22326 LN_S="$LN_S"
22327 MAKE_TERMINFO="$MAKE_TERMINFO"
22328 NCURSES_MAJOR="$NCURSES_MAJOR"
22329 NCURSES_MINOR="$NCURSES_MINOR"
22330 NCURSES_OSPEED="$NCURSES_OSPEED"
22331 NCURSES_PATCH="$NCURSES_PATCH"
22332 SRC_SUBDIRS="$SRC_SUBDIRS"
22333 TERMINFO="$TERMINFO"
22334 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22335 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22336 TICS_NAME="$TICS_NAME"
22337 TIC_PATH="$TIC_PATH"
22338 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22339 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22340 TINFO_NAME="$TINFO_NAME"
22341 TINFO_SUFFIX="$TINFO_SUFFIX"
22342 UNALTERED_SYMS="$UNALTERED_SYMS"
22343 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22344 WITH_CURSES_H="$with_curses_h"
22345 WITH_ECHO="${enable_echo:=yes}"
22346 WITH_OVERWRITE="$with_overwrite"
22347 cf_LIST_MODELS="$cf_list_models"
22348 cf_cv_abi_version="$cf_cv_abi_version"
22349 cf_cv_do_relink="$cf_cv_do_relink"
22350 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22351 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22352 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22353 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22354 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22355 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22356 cf_cv_rel_version="$cf_cv_rel_version"
22357 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22358 cf_cv_shared_soname='$cf_cv_shared_soname'
22359 cf_cv_shlib_version="$cf_cv_shlib_version"
22360 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22361 cf_cv_system_name="$cf_cv_system_name"
22362 cf_cv_term_driver="$with_term_driver"
22363 cf_with_ada="$cf_with_ada"
22364 cf_with_cxx_binding="$cf_with_cxx_binding"
22365 cf_with_db_install="$cf_with_db_install"
22366 cf_with_manpages="$cf_with_manpages"
22367 cf_with_tests="$cf_with_tests"
22368 host="$host"
22369 target="$target"
22370 with_shared_cxx="$with_shared_cxx"
22371
22372 EOF
22373
22374 cat >>$CONFIG_STATUS <<\EOF
22375 for ac_config_target in $ac_config_targets
22376 do
22377   case "$ac_config_target" in
22378   # Handling of arguments.
22379   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22380   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22381   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22382   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22383   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22384   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22385   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22386   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22387   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22388   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22389   *) { { echo "$as_me:22389: error: invalid argument: $ac_config_target" >&5
22390 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22391    { (exit 1); exit 1; }; };;
22392   esac
22393 done
22394
22395 # If the user did not use the arguments to specify the items to instantiate,
22396 # then the envvar interface is used.  Set only those that are not.
22397 # We use the long form for the default assignment because of an extremely
22398 # bizarre bug on SunOS 4.1.3.
22399 if $ac_need_defaults; then
22400   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22401   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22402   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22403 fi
22404
22405 # Create a temporary directory, and hook for its removal unless debugging.
22406 $debug ||
22407 {
22408   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22409   trap '{ (exit 1); exit 1; }' 1 2 13 15
22410 }
22411
22412 # Create a (secure) tmp directory for tmp files.
22413 : ${TMPDIR=/tmp}
22414 {
22415   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22416   test -n "$tmp" && test -d "$tmp"
22417 }  ||
22418 {
22419   tmp=$TMPDIR/cs$$-$RANDOM
22420   (umask 077 && mkdir $tmp)
22421 } ||
22422 {
22423    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22424    { (exit 1); exit 1; }
22425 }
22426
22427 EOF
22428
22429 cat >>$CONFIG_STATUS <<EOF
22430
22431 #
22432 # CONFIG_FILES section.
22433 #
22434
22435 # No need to generate the scripts if there are no CONFIG_FILES.
22436 # This happens for instance when ./config.status config.h
22437 if test -n "\$CONFIG_FILES"; then
22438   # Protect against being on the right side of a sed subst in config.status.
22439   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22440    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22441 s,@SHELL@,$SHELL,;t t
22442 s,@exec_prefix@,$exec_prefix,;t t
22443 s,@prefix@,$prefix,;t t
22444 s,@program_transform_name@,$program_transform_name,;t t
22445 s,@bindir@,$bindir,;t t
22446 s,@sbindir@,$sbindir,;t t
22447 s,@libexecdir@,$libexecdir,;t t
22448 s,@datarootdir@,$datarootdir,;t t
22449 s,@datadir@,$datadir,;t t
22450 s,@sysconfdir@,$sysconfdir,;t t
22451 s,@sharedstatedir@,$sharedstatedir,;t t
22452 s,@localstatedir@,$localstatedir,;t t
22453 s,@libdir@,$libdir,;t t
22454 s,@includedir@,$includedir,;t t
22455 s,@oldincludedir@,$oldincludedir,;t t
22456 s,@infodir@,$infodir,;t t
22457 s,@mandir@,$mandir,;t t
22458 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22459 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22460 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22461 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22462 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22463 s,@build_alias@,$build_alias,;t t
22464 s,@host_alias@,$host_alias,;t t
22465 s,@target_alias@,$target_alias,;t t
22466 s,@ECHO_C@,$ECHO_C,;t t
22467 s,@ECHO_N@,$ECHO_N,;t t
22468 s,@ECHO_T@,$ECHO_T,;t t
22469 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22470 s,@DEFS@,$DEFS,;t t
22471 s,@LIBS@,$LIBS,;t t
22472 s,@top_builddir@,$top_builddir,;t t
22473 s,@EGREP@,$EGREP,;t t
22474 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22475 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22476 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22477 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22478 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22479 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22480 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22481 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22482 s,@VERSION@,$VERSION,;t t
22483 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
22484 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
22485 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
22486 s,@PACKAGE@,$PACKAGE,;t t
22487 s,@build@,$build,;t t
22488 s,@build_cpu@,$build_cpu,;t t
22489 s,@build_vendor@,$build_vendor,;t t
22490 s,@build_os@,$build_os,;t t
22491 s,@host@,$host,;t t
22492 s,@host_cpu@,$host_cpu,;t t
22493 s,@host_vendor@,$host_vendor,;t t
22494 s,@host_os@,$host_os,;t t
22495 s,@target@,$target,;t t
22496 s,@target_cpu@,$target_cpu,;t t
22497 s,@target_vendor@,$target_vendor,;t t
22498 s,@target_os@,$target_os,;t t
22499 s,@CC@,$CC,;t t
22500 s,@CFLAGS@,$CFLAGS,;t t
22501 s,@LDFLAGS@,$LDFLAGS,;t t
22502 s,@CPPFLAGS@,$CPPFLAGS,;t t
22503 s,@ac_ct_CC@,$ac_ct_CC,;t t
22504 s,@EXEEXT@,$EXEEXT,;t t
22505 s,@OBJEXT@,$OBJEXT,;t t
22506 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22507 s,@CPP@,$CPP,;t t
22508 s,@LDCONFIG@,$LDCONFIG,;t t
22509 s,@CXX@,$CXX,;t t
22510 s,@CXXFLAGS@,$CXXFLAGS,;t t
22511 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22512 s,@AWK@,$AWK,;t t
22513 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22514 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22515 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22516 s,@LINT@,$LINT,;t t
22517 s,@LINT_OPTS@,$LINT_OPTS,;t t
22518 s,@LN_S@,$LN_S,;t t
22519 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22520 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22521 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22522 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22523 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
22524 s,@SET_MAKE@,$SET_MAKE,;t t
22525 s,@CTAGS@,$CTAGS,;t t
22526 s,@ETAGS@,$ETAGS,;t t
22527 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22528 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22529 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22530 s,@RANLIB@,$RANLIB,;t t
22531 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22532 s,@LD@,$LD,;t t
22533 s,@ac_ct_LD@,$ac_ct_LD,;t t
22534 s,@AR@,$AR,;t t
22535 s,@ac_ct_AR@,$ac_ct_AR,;t t
22536 s,@NM@,$NM,;t t
22537 s,@ac_ct_NM@,$ac_ct_NM,;t t
22538 s,@ARFLAGS@,$ARFLAGS,;t t
22539 s,@DESTDIR@,$DESTDIR,;t t
22540 s,@BUILD_CC@,$BUILD_CC,;t t
22541 s,@BUILD_CPP@,$BUILD_CPP,;t t
22542 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22543 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22544 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22545 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22546 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22547 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22548 s,@cf_list_models@,$cf_list_models,;t t
22549 s,@ABI_VERSION@,$ABI_VERSION,;t t
22550 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
22551 s,@LIBTOOL@,$LIBTOOL,;t t
22552 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22553 s,@LT_UNDEF@,$LT_UNDEF,;t t
22554 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22555 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22556 s,@LIB_CREATE@,$LIB_CREATE,;t t
22557 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22558 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22559 s,@LIB_PREP@,$LIB_PREP,;t t
22560 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22561 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22562 s,@LIB_LINK@,$LIB_LINK,;t t
22563 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22564 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
22565 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
22566 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
22567 s,@TICS_NAME@,$TICS_NAME,;t t
22568 s,@TINFO_NAME@,$TINFO_NAME,;t t
22569 s,@LIB_NAME@,$LIB_NAME,;t t
22570 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
22571 s,@CC_G_OPT@,$CC_G_OPT,;t t
22572 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
22573 s,@LD_MODEL@,$LD_MODEL,;t t
22574 s,@shlibdir@,$shlibdir,;t t
22575 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
22576 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
22577 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
22578 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
22579 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
22580 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
22581 s,@LINK_PROGS@,$LINK_PROGS,;t t
22582 s,@LINK_TESTS@,$LINK_TESTS,;t t
22583 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22584 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
22585 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
22586 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
22587 s,@RPATH_LIST@,$RPATH_LIST,;t t
22588 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
22589 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
22590 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
22591 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22592 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
22593 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
22594 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
22595 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
22596 s,@XTERM_KBS@,$XTERM_KBS,;t t
22597 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
22598 s,@TERMINFO@,$TERMINFO,;t t
22599 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
22600 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
22601 s,@TERMPATH@,$TERMPATH,;t t
22602 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
22603 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
22604 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
22605 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
22606 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
22607 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
22608 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
22609 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
22610 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
22611 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
22612 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
22613 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
22614 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
22615 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
22616 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
22617 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
22618 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
22619 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
22620 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
22621 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
22622 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
22623 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
22624 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
22625 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
22626 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
22627 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
22628 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
22629 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
22630 s,@PTHREAD@,$PTHREAD,;t t
22631 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
22632 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
22633 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
22634 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
22635 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
22636 s,@ECHO_LT@,$ECHO_LT,;t t
22637 s,@ECHO_LD@,$ECHO_LD,;t t
22638 s,@RULE_CC@,$RULE_CC,;t t
22639 s,@SHOW_CC@,$SHOW_CC,;t t
22640 s,@ECHO_CC@,$ECHO_CC,;t t
22641 s,@ECHO_LINK@,$ECHO_LINK,;t t
22642 s,@ADAFLAGS@,$ADAFLAGS,;t t
22643 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
22644 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
22645 s,@ADA_TRACE@,$ADA_TRACE,;t t
22646 s,@MATH_LIB@,$MATH_LIB,;t t
22647 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
22648 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
22649 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
22650 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
22651 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
22652 s,@TEST_LIBS@,$TEST_LIBS,;t t
22653 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
22654 s,@CXXCPP@,$CXXCPP,;t t
22655 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
22656 s,@CXX_AR@,$CXX_AR,;t t
22657 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
22658 s,@CXXLIBS@,$CXXLIBS,;t t
22659 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
22660 s,@gnat_exists@,$gnat_exists,;t t
22661 s,@M4_exists@,$M4_exists,;t t
22662 s,@cf_ada_make@,$cf_ada_make,;t t
22663 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
22664 s,@cf_compile_generics@,$cf_compile_generics,;t t
22665 s,@cf_generic_objects@,$cf_generic_objects,;t t
22666 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
22667 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
22668 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
22669 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
22670 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
22671 s,@cf_ada_package@,$cf_ada_package,;t t
22672 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
22673 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
22674 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
22675 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
22676 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
22677 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
22678 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
22679 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
22680 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
22681 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
22682 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
22683 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
22684 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
22685 s,@TICS_LIBS@,$TICS_LIBS,;t t
22686 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
22687 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
22688 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
22689 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
22690 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
22691 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
22692 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
22693 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
22694 s,@includesubdir@,$includesubdir,;t t
22695 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
22696 s,@TICS_LIST@,$TICS_LIST,;t t
22697 s,@TINFO_LIST@,$TINFO_LIST,;t t
22698 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
22699 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
22700 s,@TEST_ARGS@,$TEST_ARGS,;t t
22701 s,@TEST_DEPS@,$TEST_DEPS,;t t
22702 s,@TEST_ARG2@,$TEST_ARG2,;t t
22703 s,@TEST_DEP2@,$TEST_DEP2,;t t
22704 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
22705 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
22706 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
22707 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
22708 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
22709 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
22710 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
22711 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
22712 s,@cross_compiling@,$cross_compiling,;t t
22713 s,@TIC_PATH@,$TIC_PATH,;t t
22714 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
22715 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
22716 s,@PANEL_NAME@,$PANEL_NAME,;t t
22717 s,@MENU_NAME@,$MENU_NAME,;t t
22718 s,@FORM_NAME@,$FORM_NAME,;t t
22719 s,@CXX_NAME@,$CXX_NAME,;t t
22720 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
22721 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
22722 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
22723 CEOF
22724
22725 EOF
22726
22727   cat >>$CONFIG_STATUS <<\EOF
22728   # Split the substitutions into bite-sized pieces for seds with
22729   # small command number limits, like on Digital OSF/1 and HP-UX.
22730   ac_max_sed_lines=48
22731   ac_sed_frag=1 # Number of current file.
22732   ac_beg=1 # First line for current file.
22733   ac_end=$ac_max_sed_lines # Line after last line for current file.
22734   ac_more_lines=:
22735   ac_sed_cmds=
22736   while $ac_more_lines; do
22737     if test $ac_beg -gt 1; then
22738       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22739     else
22740       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22741     fi
22742     if test ! -s $tmp/subs.frag; then
22743       ac_more_lines=false
22744     else
22745       # The purpose of the label and of the branching condition is to
22746       # speed up the sed processing (if there are no `@' at all, there
22747       # is no need to browse any of the substitutions).
22748       # These are the two extra sed commands mentioned above.
22749       (echo ':t
22750   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22751       if test -z "$ac_sed_cmds"; then
22752         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
22753       else
22754         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22755       fi
22756       ac_sed_frag=`expr $ac_sed_frag + 1`
22757       ac_beg=$ac_end
22758       ac_end=`expr $ac_end + $ac_max_sed_lines`
22759     fi
22760   done
22761   if test -z "$ac_sed_cmds"; then
22762     ac_sed_cmds=cat
22763   fi
22764 fi # test -n "$CONFIG_FILES"
22765
22766 EOF
22767 cat >>$CONFIG_STATUS <<\EOF
22768 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22769   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22770   case $ac_file in
22771   - | *:- | *:-:* ) # input from stdin
22772         cat >$tmp/stdin
22773         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22774         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22775   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22776         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22777   * )   ac_file_in=$ac_file.in ;;
22778   esac
22779
22780   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22781   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22782          X"$ac_file" : 'X\(//\)[^/]' \| \
22783          X"$ac_file" : 'X\(//\)$' \| \
22784          X"$ac_file" : 'X\(/\)' \| \
22785          .     : '\(.\)' 2>/dev/null ||
22786 echo X"$ac_file" |
22787     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22788           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22789           /^X\(\/\/\)$/{ s//\1/; q; }
22790           /^X\(\/\).*/{ s//\1/; q; }
22791           s/.*/./; q'`
22792   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22793     { case "$ac_dir" in
22794   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22795   *)                      as_incr_dir=.;;
22796 esac
22797 as_dummy="$ac_dir"
22798 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22799   case $as_mkdir_dir in
22800     # Skip DOS drivespec
22801     ?:) as_incr_dir=$as_mkdir_dir ;;
22802     *)
22803       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22804       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22805     ;;
22806   esac
22807 done; }
22808
22809     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
22810     # A "../" for each directory in $ac_dir_suffix.
22811     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
22812   else
22813     ac_dir_suffix= ac_dots=
22814   fi
22815
22816   case $srcdir in
22817   .)  ac_srcdir=.
22818       if test -z "$ac_dots"; then
22819          ac_top_srcdir=.
22820       else
22821          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
22822       fi ;;
22823   [\\/]* | ?:[\\/]* )
22824       ac_srcdir=$srcdir$ac_dir_suffix;
22825       ac_top_srcdir=$srcdir ;;
22826   *) # Relative path.
22827     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
22828     ac_top_srcdir=$ac_dots$srcdir ;;
22829   esac
22830
22831   case $INSTALL in
22832   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22833   *) ac_INSTALL=$ac_dots$INSTALL ;;
22834   esac
22835
22836   if test x"$ac_file" != x-; then
22837     { echo "$as_me:22837: creating $ac_file" >&5
22838 echo "$as_me: creating $ac_file" >&6;}
22839     rm -f "$ac_file"
22840   fi
22841   # Let's still pretend it is `configure' which instantiates (i.e., don't
22842   # use $as_me), people would be surprised to read:
22843   #    /* config.h.  Generated automatically by config.status.  */
22844   configure_input="Generated automatically from `echo $ac_file_in |
22845                                                  sed 's,.*/,,'` by configure."
22846
22847   # First look for the input files in the build tree, otherwise in the
22848   # src tree.
22849   ac_file_inputs=`IFS=:
22850     for f in $ac_file_in; do
22851       case $f in
22852       -) echo $tmp/stdin ;;
22853       [\\/$]*)
22854          # Absolute (can't be DOS-style, as IFS=:)
22855          test -f "$f" || { { echo "$as_me:22855: error: cannot find input file: $f" >&5
22856 echo "$as_me: error: cannot find input file: $f" >&2;}
22857    { (exit 1); exit 1; }; }
22858          echo $f;;
22859       *) # Relative
22860          if test -f "$f"; then
22861            # Build tree
22862            echo $f
22863          elif test -f "$srcdir/$f"; then
22864            # Source tree
22865            echo $srcdir/$f
22866          else
22867            # /dev/null tree
22868            { { echo "$as_me:22868: error: cannot find input file: $f" >&5
22869 echo "$as_me: error: cannot find input file: $f" >&2;}
22870    { (exit 1); exit 1; }; }
22871          fi;;
22872       esac
22873     done` || { (exit 1); exit 1; }
22874 EOF
22875 cat >>$CONFIG_STATUS <<\EOF
22876   ac_warn_datarootdir=no
22877   if test x"$ac_file" != x-; then
22878     for ac_item in $ac_file_inputs
22879     do
22880       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
22881       if test -n "$ac_seen"; then
22882         ac_used=`grep '@datarootdir@' $ac_item`
22883         if test -z "$ac_used"; then
22884           { echo "$as_me:22884: WARNING: datarootdir was used implicitly but not set:
22885 $ac_seen" >&5
22886 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
22887 $ac_seen" >&2;}
22888           ac_warn_datarootdir=yes
22889         fi
22890       fi
22891       ac_seen=`grep '${datarootdir}' $ac_item`
22892       if test -n "$ac_seen"; then
22893         { echo "$as_me:22893: WARNING: datarootdir was used explicitly but not set:
22894 $ac_seen" >&5
22895 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
22896 $ac_seen" >&2;}
22897         ac_warn_datarootdir=yes
22898       fi
22899     done
22900   fi
22901
22902 if test "x$ac_warn_datarootdir" = xyes; then
22903   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
22904 fi
22905
22906 EOF
22907 cat >>$CONFIG_STATUS <<EOF
22908   sed "$ac_vpsub
22909 $extrasub
22910 EOF
22911 cat >>$CONFIG_STATUS <<\EOF
22912 :t
22913 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22914 s,@configure_input@,$configure_input,;t t
22915 s,@srcdir@,$ac_srcdir,;t t
22916 s,@top_srcdir@,$ac_top_srcdir,;t t
22917 s,@INSTALL@,$ac_INSTALL,;t t
22918 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22919   rm -f $tmp/stdin
22920   if test x"$ac_file" != x-; then
22921     cp $tmp/out $ac_file
22922
22923     for ac_name in prefix exec_prefix datarootdir
22924     do
22925         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
22926         if test -n "$ac_seen"; then
22927             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
22928             if test -z "$ac_init"; then
22929               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
22930               { echo "$as_me:22930: WARNING: Variable $ac_name is used but was not set:
22931 $ac_seen" >&5
22932 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
22933 $ac_seen" >&2;}
22934             fi
22935         fi
22936     done
22937     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
22938     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
22939     if test -s $tmp/out; then
22940       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
22941       { echo "$as_me:22941: WARNING: Some variables may not be substituted:
22942 $ac_seen" >&5
22943 echo "$as_me: WARNING: Some variables may not be substituted:
22944 $ac_seen" >&2;}
22945     fi
22946   else
22947     cat $tmp/out
22948   fi
22949   rm -f $tmp/out
22950
22951 done
22952 EOF
22953 cat >>$CONFIG_STATUS <<\EOF
22954
22955 #
22956 # CONFIG_HEADER section.
22957 #
22958
22959 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22960 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22961 #
22962 # ac_d sets the value in "#define NAME VALUE" lines.
22963 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22964 ac_dB='[        ].*$,\1#\2'
22965 ac_dC=' '
22966 ac_dD=',;t'
22967 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22968 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22969 ac_iB='\([      ]\),\1#\2define\3'
22970 ac_iC=' '
22971 ac_iD='\4,;t'
22972 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22973 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22974 ac_uB='$,\1#\2define\3'
22975 ac_uC=' '
22976 ac_uD=',;t'
22977
22978 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22979   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22980   case $ac_file in
22981   - | *:- | *:-:* ) # input from stdin
22982         cat >$tmp/stdin
22983         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22984         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22985   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22986         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22987   * )   ac_file_in=$ac_file.in ;;
22988   esac
22989
22990   test x"$ac_file" != x- && { echo "$as_me:22990: creating $ac_file" >&5
22991 echo "$as_me: creating $ac_file" >&6;}
22992
22993   # First look for the input files in the build tree, otherwise in the
22994   # src tree.
22995   ac_file_inputs=`IFS=:
22996     for f in $ac_file_in; do
22997       case $f in
22998       -) echo $tmp/stdin ;;
22999       [\\/$]*)
23000          # Absolute (can't be DOS-style, as IFS=:)
23001          test -f "$f" || { { echo "$as_me:23001: error: cannot find input file: $f" >&5
23002 echo "$as_me: error: cannot find input file: $f" >&2;}
23003    { (exit 1); exit 1; }; }
23004          echo $f;;
23005       *) # Relative
23006          if test -f "$f"; then
23007            # Build tree
23008            echo $f
23009          elif test -f "$srcdir/$f"; then
23010            # Source tree
23011            echo $srcdir/$f
23012          else
23013            # /dev/null tree
23014            { { echo "$as_me:23014: error: cannot find input file: $f" >&5
23015 echo "$as_me: error: cannot find input file: $f" >&2;}
23016    { (exit 1); exit 1; }; }
23017          fi;;
23018       esac
23019     done` || { (exit 1); exit 1; }
23020   # Remove the trailing spaces.
23021   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23022
23023 EOF
23024
23025 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23026 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23027 # be either 'cat' or 'sort'.
23028 cat confdefs.h | uniq >conftest.vals
23029
23030 # Break up conftest.vals because some shells have a limit on
23031 # the size of here documents, and old seds have small limits too.
23032
23033 rm -f conftest.tail
23034 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23035 while grep . conftest.vals >/dev/null
23036 do
23037   # Write chunks of a limited-size here document to conftest.frag.
23038   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23039   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23040   echo 'CEOF' >> $CONFIG_STATUS
23041   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23042   rm -f conftest.vals
23043   mv conftest.tail conftest.vals
23044 done
23045 rm -f conftest.vals
23046
23047 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23048 # marker @DEFS@.
23049 echo '  cat >> conftest.edit <<CEOF
23050 /@DEFS@/r conftest.frag
23051 /@DEFS@/d
23052 CEOF
23053 sed -f conftest.edit $tmp/in > $tmp/out
23054 rm -f $tmp/in
23055 mv $tmp/out $tmp/in
23056 rm -f conftest.edit conftest.frag
23057 ' >> $CONFIG_STATUS
23058
23059 cat >>$CONFIG_STATUS <<\EOF
23060   # Let's still pretend it is `configure' which instantiates (i.e., don't
23061   # use $as_me), people would be surprised to read:
23062   #    /* config.h.  Generated automatically by config.status.  */
23063   if test x"$ac_file" = x-; then
23064     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23065   else
23066     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23067   fi
23068   cat $tmp/in >>$tmp/config.h
23069   rm -f $tmp/in
23070   if test x"$ac_file" != x-; then
23071     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23072       { echo "$as_me:23072: $ac_file is unchanged" >&5
23073 echo "$as_me: $ac_file is unchanged" >&6;}
23074     else
23075       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23076          X"$ac_file" : 'X\(//\)[^/]' \| \
23077          X"$ac_file" : 'X\(//\)$' \| \
23078          X"$ac_file" : 'X\(/\)' \| \
23079          .     : '\(.\)' 2>/dev/null ||
23080 echo X"$ac_file" |
23081     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23082           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23083           /^X\(\/\/\)$/{ s//\1/; q; }
23084           /^X\(\/\).*/{ s//\1/; q; }
23085           s/.*/./; q'`
23086       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23087         { case "$ac_dir" in
23088   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23089   *)                      as_incr_dir=.;;
23090 esac
23091 as_dummy="$ac_dir"
23092 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23093   case $as_mkdir_dir in
23094     # Skip DOS drivespec
23095     ?:) as_incr_dir=$as_mkdir_dir ;;
23096     *)
23097       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23098       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23099     ;;
23100   esac
23101 done; }
23102
23103       fi
23104       rm -f $ac_file
23105       mv $tmp/config.h $ac_file
23106     fi
23107   else
23108     cat $tmp/config.h
23109     rm -f $tmp/config.h
23110   fi
23111 done
23112 EOF
23113 cat >>$CONFIG_STATUS <<\EOF
23114 #
23115 # CONFIG_COMMANDS section.
23116 #
23117 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23118   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23119   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23120
23121   case $ac_dest in
23122     default )
23123 if test "x$cf_with_tests" != xno ; then
23124
23125 for cf_dir in test
23126 do
23127         if test ! -d $srcdir/$cf_dir; then
23128                 continue
23129         elif test -f $srcdir/$cf_dir/programs; then
23130                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23131         fi
23132 done
23133
23134 fi
23135
23136 cf_prefix=$LIB_PREFIX
23137
23138 case $cf_cv_shlib_version in #(vi
23139 cygdll|msysdll|mingw)
23140         TINFO_NAME=$TINFO_ARG_SUFFIX
23141         TINFO_SUFFIX=.dll
23142         ;;
23143 esac
23144
23145 if test -n "$TINFO_SUFFIX" ; then
23146         case $TINFO_SUFFIX in
23147         tw*)
23148                 TINFO_NAME="${TINFO_NAME}tw"
23149                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
23150                 ;;
23151         t*)
23152                 TINFO_NAME="${TINFO_NAME}t"
23153                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
23154                 ;;
23155         w*)
23156                 TINFO_NAME="${TINFO_NAME}w"
23157                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
23158                 ;;
23159         esac
23160 fi
23161
23162 for cf_dir in $SRC_SUBDIRS
23163 do
23164         if test ! -d $srcdir/$cf_dir ; then
23165                 continue
23166         elif test -f $srcdir/$cf_dir/modules; then
23167
23168                 SHARED_LIB=
23169                 Libs_To_Make=
23170
23171                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23172                 then
23173                         cat >>$cf_dir/Makefile <<CF_EOF
23174
23175 # Generated by CF_LIB_RULES
23176 resulting.map: $UNALTERED_SYMS
23177         sed -e "s/NCURSES_/NCURSES${cf_cv_abi_version}_/g" < $UNALTERED_SYMS >\$@
23178
23179 clean::
23180         rm -f resulting.map
23181 CF_EOF
23182                 fi
23183
23184                 for cf_item in $cf_LIST_MODELS
23185                 do
23186
23187         case X$cf_item in #(vi
23188         Xlibtool) #(vi
23189                 cf_suffix='.la'
23190                 cf_depsuf=$cf_suffix
23191                 ;;
23192         Xdebug) #(vi
23193                 cf_suffix='_g.a'
23194                 cf_depsuf=$cf_suffix
23195                 ;;
23196         Xprofile) #(vi
23197                 cf_suffix='_p.a'
23198                 cf_depsuf=$cf_suffix
23199                 ;;
23200         Xshared) #(vi
23201                 case $cf_cv_system_name in
23202                 aix[5-7]*) #(vi
23203                         cf_suffix='.so'
23204                         cf_depsuf=$cf_suffix
23205                         ;;
23206                 cygwin*|msys*|mingw*) #(vi
23207                         cf_suffix='.dll'
23208                         cf_depsuf='.dll.a'
23209                         ;;
23210                 darwin*) #(vi
23211                         cf_suffix='.dylib'
23212                         cf_depsuf=$cf_suffix
23213                         ;;
23214                 hpux*) #(vi
23215                         case $target in
23216                         ia64*) #(vi
23217                                 cf_suffix='.so'
23218                                 cf_depsuf=$cf_suffix
23219                                 ;;
23220                         *) #(vi
23221                                 cf_suffix='.sl'
23222                                 cf_depsuf=$cf_suffix
23223                                 ;;
23224                         esac
23225                         ;;
23226                 *) #(vi
23227                         cf_suffix='.so'
23228                         cf_depsuf=$cf_suffix
23229                         ;;
23230                 esac
23231                 ;;
23232         *)
23233                 cf_suffix='.a'
23234                 cf_depsuf=$cf_suffix
23235                 ;;
23236         esac
23237         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23238         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23239
23240                         cf_libname=$cf_dir
23241                         test "$cf_dir" = c++ && cf_libname=ncurses++
23242                         if test $cf_item = shared ; then
23243                                 if test -n "${LIB_SUFFIX}"
23244                                 then
23245                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
23246                                 else
23247                                         cf_shared_suffix="$cf_suffix"
23248                                 fi
23249                                 if test "$cf_cv_do_symlinks" = yes ; then
23250                                         cf_version_name=
23251
23252                                         case "$cf_cv_shlib_version" in #(vi
23253                                         rel) #(vi
23254                                                 cf_version_name=REL_VERSION
23255                                                 ;;
23256                                         abi)
23257                                                 cf_version_name=ABI_VERSION
23258                                                 ;;
23259                                         esac
23260
23261                                         if test -n "$cf_version_name"
23262                                         then
23263                                                 case "$cf_cv_system_name" in #(vi
23264                                                 darwin*)
23265                                                         # "w", etc?
23266                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23267                                                         ;; #(vi
23268                                                 *)
23269                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23270                                                         ;;
23271                                                 esac
23272                                         fi
23273                                         if test -n "${LIB_SUFFIX}"
23274                                         then
23275                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
23276                                         else
23277                                                 cf_shared_suffix="$cf_suffix"
23278                                         fi
23279                                 fi
23280                                 # cygwin needs import library, and has unique naming convention
23281                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23282                                 # use 'cyg' prefix for shared lib.
23283                                 case $cf_cv_shlib_version in #(vi
23284                                 cygdll) #(vi
23285                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23286                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
23287                                         continue
23288                                         ;;
23289                                 msysdll) #(vi
23290                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23291                                         Libs_To_Make="$Libs_To_Make ../lib/msys-${cf_libname}${cf_cygsuf}"
23292                                         continue
23293                                         ;;
23294                                 mingw)
23295                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23296                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
23297                                         continue
23298                                         ;;
23299                                 esac
23300                         fi
23301                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23302                 done
23303
23304                 if test $cf_dir = ncurses ; then
23305                         cf_subsets="$LIB_SUBSETS"
23306                         cf_r_parts="$cf_subsets"
23307                         cf_liblist="$Libs_To_Make"
23308
23309                         while test -n "$cf_r_parts"
23310                         do
23311                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
23312                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
23313                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
23314                                         cf_item=
23315                                         case $cf_l_parts in #(vi
23316                                         *termlib*) #(vi
23317                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
23318                                                 ;;
23319                                         *ticlib*)
23320                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
23321                                                 ;;
23322                                         *)
23323                                                 break
23324                                                 ;;
23325                                         esac
23326                                         if test -n "$cf_item"; then
23327                                                 Libs_To_Make="$cf_item $Libs_To_Make"
23328                                         fi
23329                                 else
23330                                         break
23331                                 fi
23332                         done
23333                 else
23334                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23335                 fi
23336
23337                 if test $cf_dir = c++; then
23338                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23339                                 cf_list=
23340                                 for cf_item in $Libs_To_Make
23341                                 do
23342                                         case $cf_item in
23343                                         *.a)
23344                                                 ;;
23345                                         *)
23346                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23347                                                 ;;
23348                                         esac
23349                                         for cf_test in $cf_list
23350                                         do
23351                                                 if test "$cf_test" = "$cf_item"
23352                                                 then
23353                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23354                                                         cf_item=
23355                                                         break
23356                                                 fi
23357                                         done
23358                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
23359                                 done
23360                                 Libs_To_Make="$cf_list"
23361                         fi
23362                 fi
23363
23364                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23365                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23366                         $cf_dir/Makefile >$cf_dir/Makefile.out
23367                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23368
23369                 $AWK -f $srcdir/mk-0th.awk \
23370                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23371                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23372
23373                 for cf_subset in $cf_subsets
23374                 do
23375                         cf_subdirs=
23376                         for cf_item in $cf_LIST_MODELS
23377                         do
23378
23379                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23380
23381 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23382
23383                         CXX_MODEL=$cf_ITEM
23384                         if test "$CXX_MODEL" = SHARED; then
23385                                 case $cf_cv_shlib_version in #(vi
23386                                 cygdll|msysdll|mingw) #(vi
23387                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23388
23389 echo "${as_me:-configure}:23389: testing overriding CXX_MODEL to SHARED ..." 1>&5
23390
23391                                         with_shared_cxx=yes
23392                                         ;;
23393                                 *)
23394                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23395                                         ;;
23396                                 esac
23397                         fi
23398
23399         case X$cf_item in #(vi
23400         Xlibtool) #(vi
23401                 cf_suffix='.la'
23402                 cf_depsuf=$cf_suffix
23403                 ;;
23404         Xdebug) #(vi
23405                 cf_suffix='_g.a'
23406                 cf_depsuf=$cf_suffix
23407                 ;;
23408         Xprofile) #(vi
23409                 cf_suffix='_p.a'
23410                 cf_depsuf=$cf_suffix
23411                 ;;
23412         Xshared) #(vi
23413                 case $cf_cv_system_name in
23414                 aix[5-7]*) #(vi
23415                         cf_suffix='.so'
23416                         cf_depsuf=$cf_suffix
23417                         ;;
23418                 cygwin*|msys*|mingw*) #(vi
23419                         cf_suffix='.dll'
23420                         cf_depsuf='.dll.a'
23421                         ;;
23422                 darwin*) #(vi
23423                         cf_suffix='.dylib'
23424                         cf_depsuf=$cf_suffix
23425                         ;;
23426                 hpux*) #(vi
23427                         case $target in
23428                         ia64*) #(vi
23429                                 cf_suffix='.so'
23430                                 cf_depsuf=$cf_suffix
23431                                 ;;
23432                         *) #(vi
23433                                 cf_suffix='.sl'
23434                                 cf_depsuf=$cf_suffix
23435                                 ;;
23436                         esac
23437                         ;;
23438                 *) #(vi
23439                         cf_suffix='.so'
23440                         cf_depsuf=$cf_suffix
23441                         ;;
23442                 esac
23443                 ;;
23444         *)
23445                 cf_suffix='.a'
23446                 cf_depsuf=$cf_suffix
23447                 ;;
23448         esac
23449         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23450         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23451
23452         case $cf_item in
23453         libtool) cf_subdir='obj_lo'  ;;
23454         normal)  cf_subdir='objects' ;;
23455         debug)   cf_subdir='obj_g' ;;
23456         profile) cf_subdir='obj_p' ;;
23457         shared)
23458                 case $cf_cv_system_name in #(vi
23459                 cygwin|msys) #(vi
23460                         cf_subdir='objects' ;;
23461                 *)
23462                         cf_subdir='obj_s' ;;
23463                 esac
23464         esac
23465
23466                         # Test for case where we build libtinfo with a different name.
23467                         cf_libname=$cf_dir
23468                         if test $cf_dir = ncurses ; then
23469                                 case $cf_subset in
23470                                 *base*)
23471                                         cf_libname=${cf_libname}$LIB_SUFFIX
23472                                         ;;
23473                                 *termlib*)
23474                                         cf_libname=$TINFO_LIB_SUFFIX
23475                                         ;;
23476                                 ticlib*)
23477                                         cf_libname=$TICS_LIB_SUFFIX
23478                                         ;;
23479                                 esac
23480                         elif test $cf_dir = c++ ; then
23481                                 cf_libname=ncurses++$LIB_SUFFIX
23482                         else
23483                                 cf_libname=${cf_libname}$LIB_SUFFIX
23484                         fi
23485                         if test -n "${DFT_ARG_SUFFIX}" ; then
23486                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
23487                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
23488                         fi
23489
23490                         # These dependencies really are for development, not
23491                         # builds, but they are useful in porting, too.
23492                         cf_depend="../include/ncurses_cfg.h"
23493                         if test "$srcdir" = "."; then
23494                                 cf_reldir="."
23495                         else
23496                                 cf_reldir="\${srcdir}"
23497                         fi
23498
23499                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
23500                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
23501                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
23502                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
23503                         fi
23504
23505                         cf_dir_suffix=
23506                         old_cf_suffix="$cf_suffix"
23507                         if test "$cf_cv_shlib_version_infix" = yes ; then
23508                         if test -n "$LIB_SUFFIX" ; then
23509                                 case $LIB_SUFFIX in
23510                                 tw*)
23511                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
23512                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
23513                                         cf_dir_suffix=tw
23514                                         ;;
23515                                 t*)
23516                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
23517                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
23518                                         cf_dir_suffix=t
23519                                         ;;
23520                                 w*)
23521                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
23522                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
23523                                         cf_dir_suffix=w
23524                                         ;;
23525                                 esac
23526                         fi
23527                         fi
23528
23529                         $AWK -f $srcdir/mk-1st.awk \
23530                                 name=${cf_libname}${cf_dir_suffix} \
23531                                 traces=$LIB_TRACING \
23532                                 MODEL=$cf_ITEM \
23533                                 CXX_MODEL=$CXX_MODEL \
23534                                 model=$cf_subdir \
23535                                 prefix=$cf_prefix \
23536                                 suffix=$cf_suffix \
23537                                 subset=$cf_subset \
23538                                 driver=$cf_cv_term_driver \
23539                                 SymLink="$LN_S" \
23540                                 TermlibRoot=$TINFO_NAME \
23541                                 TermlibSuffix=$TINFO_SUFFIX \
23542                                 ShlibVer=$cf_cv_shlib_version \
23543                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
23544                                 ReLink=${cf_cv_do_relink:-no} \
23545                                 DoLinks=$cf_cv_do_symlinks \
23546                                 rmSoLocs=$cf_cv_rm_so_locs \
23547                                 ldconfig="$LDCONFIG" \
23548                                 overwrite=$WITH_OVERWRITE \
23549                                 depend="$cf_depend" \
23550                                 host="$host" \
23551                                 libtool_version="$LIBTOOL_VERSION" \
23552                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23553
23554                         cf_suffix="$old_cf_suffix"
23555
23556                         for cf_subdir2 in $cf_subdirs lib
23557                         do
23558                                 test $cf_subdir = $cf_subdir2 && break
23559                         done
23560                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
23561                         $AWK -f $srcdir/mk-2nd.awk \
23562                                 name=$cf_dir \
23563                                 traces=$LIB_TRACING \
23564                                 MODEL=$cf_ITEM \
23565                                 model=$cf_subdir \
23566                                 subset=$cf_subset \
23567                                 srcdir=$srcdir \
23568                                 echo=$WITH_ECHO \
23569                                 crenames=$cf_cv_prog_CC_c_o \
23570                                 cxxrenames=$cf_cv_prog_CXX_c_o \
23571                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23572                         cf_subdirs="$cf_subdirs $cf_subdir"
23573                         done
23574                 done
23575         fi
23576
23577         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
23578 done
23579
23580 for cf_dir in $SRC_SUBDIRS
23581 do
23582         if test ! -d $srcdir/$cf_dir ; then
23583                 continue
23584         fi
23585
23586         if test -f $cf_dir/Makefile ; then
23587                 case "$cf_dir" in
23588                 Ada95) #(vi
23589                         echo 'libs \' >> Makefile
23590                         echo 'install.libs \' >> Makefile
23591                         echo 'uninstall.libs ::' >> Makefile
23592                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
23593                         ;;
23594                 esac
23595         fi
23596
23597         if test -f $srcdir/$cf_dir/modules; then
23598                 echo >> Makefile
23599                 if test -f $srcdir/$cf_dir/headers; then
23600 cat >> Makefile <<CF_EOF
23601 install.includes \\
23602 uninstall.includes \\
23603 CF_EOF
23604                 fi
23605 if test "$cf_dir" != "c++" ; then
23606 echo 'lint \' >> Makefile
23607 fi
23608 cat >> Makefile <<CF_EOF
23609 libs \\
23610 lintlib \\
23611 install.libs \\
23612 uninstall.libs \\
23613 install.$cf_dir \\
23614 uninstall.$cf_dir ::
23615         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23616 CF_EOF
23617         elif test -f $srcdir/$cf_dir/headers; then
23618 cat >> Makefile <<CF_EOF
23619
23620 libs \\
23621 install.libs \\
23622 uninstall.libs \\
23623 install.includes \\
23624 uninstall.includes ::
23625         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23626 CF_EOF
23627 fi
23628 done
23629
23630 if test "x$cf_with_db_install" = xyes; then
23631 cat >> Makefile <<CF_EOF
23632
23633 install.libs uninstall.libs \\
23634 install.data uninstall.data ::
23635 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23636 CF_EOF
23637 else
23638 cat >> Makefile <<CF_EOF
23639
23640 install.libs uninstall.libs ::
23641         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23642 CF_EOF
23643 fi
23644
23645 if test "x$cf_with_manpages" = xyes; then
23646 cat >> Makefile <<CF_EOF
23647
23648 install.man \\
23649 uninstall.man ::
23650         cd man && \${MAKE} \${TOP_MFLAGS} \$@
23651 CF_EOF
23652 fi
23653
23654 cat >> Makefile <<CF_EOF
23655
23656 distclean ::
23657         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
23658         rm -f headers.sh headers.sed mk_shared_lib.sh
23659         rm -f edit_man.* man_alias.*
23660         rm -rf \${DIRS_TO_MAKE}
23661 CF_EOF
23662
23663 # Special case: tack's manpage lives in its own directory.
23664 if test "x$cf_with_manpages" = xyes; then
23665 if test -d tack ; then
23666 if test -f $srcdir/$tack.h; then
23667 cat >> Makefile <<CF_EOF
23668
23669 install.man \\
23670 uninstall.man ::
23671         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
23672 CF_EOF
23673 fi
23674 fi
23675 fi
23676
23677 rm -f headers.sed headers.sh
23678
23679 echo creating headers.sh
23680 cat >headers.sh <<CF_EOF
23681 #! /bin/sh
23682 # This shell script is generated by the 'configure' script.  It is invoked in a
23683 # subdirectory of the build tree.  It generates a sed-script in the parent
23684 # directory that is used to adjust includes for header files that reside in a
23685 # subdirectory of /usr/include, etc.
23686 PRG=""
23687 while test \$# != 3
23688 do
23689 PRG="\$PRG \$1"; shift
23690 done
23691 DST=\$1
23692 REF=\$2
23693 SRC=\$3
23694 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
23695 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
23696 echo installing \$SRC in \$DST
23697 CF_EOF
23698
23699 if test $WITH_CURSES_H = yes; then
23700         cat >>headers.sh <<CF_EOF
23701 case \$DST in
23702 /*/include/*)
23703         END=\`basename \$DST\`
23704         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23705         do
23706                 NAME=\`basename \$i\`
23707                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23708         done
23709         ;;
23710 *)
23711         echo "" >> \$TMPSED
23712         ;;
23713 esac
23714 CF_EOF
23715
23716 else
23717         cat >>headers.sh <<CF_EOF
23718 case \$DST in
23719 /*/include/*)
23720         END=\`basename \$DST\`
23721         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23722         do
23723                 NAME=\`basename \$i\`
23724                 if test "\$NAME" = "curses.h"
23725                 then
23726                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23727                         NAME=ncurses.h
23728                 fi
23729                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23730         done
23731         ;;
23732 *)
23733         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23734         ;;
23735 esac
23736 CF_EOF
23737 fi
23738 cat >>headers.sh <<CF_EOF
23739 rm -f \$TMPSRC
23740 sed -f \$TMPSED \$SRC > \$TMPSRC
23741 NAME=\`basename \$SRC\`
23742 CF_EOF
23743 if test $WITH_CURSES_H != yes; then
23744         cat >>headers.sh <<CF_EOF
23745 test "\$NAME" = "curses.h" && NAME=ncurses.h
23746 CF_EOF
23747 fi
23748 cat >>headers.sh <<CF_EOF
23749 # Just in case someone gzip'd manpages, remove the conflicting copy.
23750 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
23751
23752 eval \$PRG \$TMPSRC \$DST/\$NAME
23753 rm -f \$TMPSRC \$TMPSED
23754 CF_EOF
23755
23756 chmod 0755 headers.sh
23757
23758 for cf_dir in $SRC_SUBDIRS
23759 do
23760         if test ! -d $srcdir/$cf_dir ; then
23761                 continue
23762         fi
23763
23764         if test -f $srcdir/$cf_dir/headers; then
23765                 $AWK -f $srcdir/mk-hdr.awk \
23766                         subset="$LIB_SUBSETS" \
23767                         compat="$WITH_CURSES_H" \
23768                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
23769         fi
23770
23771         if test -f $srcdir/$cf_dir/modules; then
23772                 if test "$cf_dir" != "c++" ; then
23773                         cat >>$cf_dir/Makefile <<"CF_EOF"
23774 depend : ${AUTO_SRC}
23775         makedepend -- ${CPPFLAGS} -- ${C_SRC}
23776
23777 # DO NOT DELETE THIS LINE -- make depend depends on it.
23778 CF_EOF
23779                 fi
23780         fi
23781 done
23782
23783 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23784 if test -z "$USE_OLD_MAKERULES" ; then
23785         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
23786 fi
23787 fi
23788  ;;
23789   esac
23790 done
23791 EOF
23792
23793 cat >>$CONFIG_STATUS <<\EOF
23794
23795 { (exit 0); exit 0; }
23796 EOF
23797 chmod +x $CONFIG_STATUS
23798 ac_clean_files=$ac_clean_files_save
23799
23800 # configure is writing to config.log, and then calls config.status.
23801 # config.status does its own redirection, appending to config.log.
23802 # Unfortunately, on DOS this fails, as config.log is still kept open
23803 # by configure, so config.status won't be able to write to it; its
23804 # output is simply discarded.  So we exec the FD to /dev/null,
23805 # effectively closing config.log, so it can be properly (re)opened and
23806 # appended to by config.status.  When coming back to configure, we
23807 # need to make the FD available again.
23808 if test "$no_create" != yes; then
23809   ac_cs_success=:
23810   exec 5>/dev/null
23811   $SHELL $CONFIG_STATUS || ac_cs_success=false
23812   exec 5>>config.log
23813   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23814   # would make configure fail if this is the last instruction.
23815   $ac_cs_success || { (exit 1); exit 1; }
23816 fi
23817 ${MAKE:-make} preinstall