]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.0 - patch 20160521
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.630 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20150926.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tests         suppress build/install with test-programs
713   --without-curses-h      install curses.h as ncurses.h only
714   --with-pkg-config{=path} enable/disable use of pkg-config
715   --with-pkg-config-libdir=XXX use given directory for installing pc-files
716   --enable-pc-files       generate and install .pc files for pkg-config
717   --with-pc-suffix        suffixes pc-files
718   --enable-mixed-case     tic should assume mixed-case filenames
719   --with-install-prefix   prefixes actual install-location ($DESTDIR)
720 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
721   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
722   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
723   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
724   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
725   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
726   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
727 Options to Specify the Libraries Built/Used:
728   --disable-libtool-version  enable to use libtool's incompatible naming scheme
729   --with-libtool          generate libraries with libtool
730   --with-shared           generate shared-libraries
731   --with-normal           generate normal-libraries (default)
732   --with-debug            generate debug-libraries (default)
733   --with-profile          generate profile-libraries
734   --with-cxx-shared       generate C++ shared-libraries
735   --with-lib-prefix       override library-prefix
736   --with-termlib          generate separate terminfo library
737   --with-ticlib           generate separate tic library
738   --with-gpm              use Alessandro Rubini's GPM library
739   --without-dlsym         do not use dlsym() to load GPM dynamically
740   --with-sysmouse         use sysmouse (FreeBSD console)
741   --enable-rpath          use rpath option when generating shared libraries
742   --disable-relink        relink shared libraries during install
743   --with-shlib-version=X  Specify rel or abi version for shared libs
744   --with-libtool-opts=XXX specify additional libtool options
745   --with-export-syms=XXX  limit exported symbols using libtool
746   --with-versioned-syms=X markup versioned symbols using ld
747   --disable-lib-suffixes  disable library suffixes
748   --disable-rpath-hack    don't add rpath options for additional libraries
749 Fine-Tuning Your Configuration:
750   --with-extra-suffix=X   append extra suffix to header/library paths
751   --disable-overwrite     put headers in subdir, omit link to -lcurses
752   --disable-database      do not use terminfo, only fallbacks/termcap
753   --with-database=XXX     specify terminfo source to install
754   --with-hashed-db        specify hashed-database library
755   --with-fallbacks=XXX    specify list of fallback terminal descriptions
756   --without-xterm-new     specify if xterm terminfo should be old version
757   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
758   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
759   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
760   --disable-big-core      assume machine has little memory
761   --disable-big-strings   assume compiler has only standard-size strings
762   --enable-termcap        compile in termcap fallback support
763   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
764   --enable-getcap         fast termcap load, no xrefs to terminfo
765   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
766   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
767   --disable-root-environ  restrict environment when running as root
768   --enable-symlinks       make tic use symbolic links not hard links
769   --enable-broken_linker  compile with broken-linker support code
770   --enable-bsdpad         recognize BSD-style prefix padding
771   --enable-widec          compile with wide-char/UTF-8 code
772   --disable-lp64          allow chtype to be long (ignore _LP64)
773   --disable-largefile     omit support for large files
774   --disable-tparm-varargs compile tparm() without varargs interface
775   --disable-tic-depends   link tic library without explicit dependency on ncurses library
776   --with-bool=TYPE        override fallback type of bool variable
777   --with-caps=alt         compile with alternate Caps file
778   --with-chtype=TYPE      override type of chtype
779   --with-ospeed=TYPE      override type of ospeed variable
780   --with-mmask-t=TYPE     override type of mmask_t
781   --with-ccharw-max=XXX   override size CCHARW_MAX
782   --with-tparm-arg=TYPE   override parameter type of tparm
783   --with-rcs-ids          compile-in RCS identifiers
784 Options to Specify How Manpages are Installed:
785   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
786                           optionally formatted/catonly, e.g., gzip,formatted
787   --with-manpage-renames  specify manpage-renaming
788   --with-manpage-aliases  specify manpage-aliases using .so
789   --with-manpage-symlinks specify manpage-aliases using symlinks
790   --with-manpage-tbl      specify manpage processing with tbl
791 Extensions:
792   --disable-ext-funcs     disable function-extensions
793   --enable-sp-funcs       enable SCREEN-extensions
794   --enable-term-driver    enable terminal-driver
795   --enable-const          compile with extra/non-standard const
796   --enable-ext-colors     compile for 256-color support
797   --enable-ext-mouse      compile for extended mouse-encoding
798   --enable-ext-putwin     compile with extended putwin/screendump
799   --enable-no-padding     compile with $NCURSES_NO_PADDING code
800   --enable-signed-char    compile using signed Boolean's in term.h
801   --enable-sigwinch       compile with SIGWINCH handler
802   --enable-tcap-names     compile with user-definable terminal capabilities
803 Development Code:
804   --without-develop       disable development options
805   --enable-hard-tabs      compile with hard-tabs code
806   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
807 Experimental Code:
808   --disable-assumed-color do not assume anything about default-colors
809   --disable-hashmap       compile without hashmap scrolling-optimization
810   --enable-colorfgbg      compile-in experimental $COLORFGBG code
811   --enable-interop        compile-in interop bindings
812   --with-pthread          use POSIX thread library
813   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
814   --enable-weak-symbols   enable weak-symbols for pthreads
815   --enable-reentrant      compile with reentrant code
816   --with-wrap-prefix=XXX  override prefix used for public variables
817   --enable-safe-sprintf   compile with experimental safe-sprintf code
818   --disable-scroll-hints  compile without scroll-hints code
819   --enable-wgetch-events  compile with wgetch-events code
820 Testing/development Options:
821   --disable-echo          do not display "compiling" commands
822   --enable-warnings       build: turn on GCC compiler warnings
823   --enable-string-hacks   work around bogus compiler/loader warnings
824   --enable-assertions     test: turn on generation of assertion code
825   --with-dmalloc          test: use Gray Watson's dmalloc library
826   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
827   --with-valgrind         test: use valgrind
828   --disable-leaks         test: free permanent memory, analyze leaks
829   --enable-expanded       test: generate functions for certain macros
830   --disable-macros        test: use functions rather than macros
831   --with-trace            test: add trace() function to all models of ncurses
832   --disable-gnat-projects test: disable GNAT projects even if usable
833 Ada95 Binding Options:
834   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
835   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
836   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
837   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
838
839 Some influential environment variables:
840   CC          C compiler command
841   CFLAGS      C compiler flags
842   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
843               nonstandard directory <lib dir>
844   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
845               headers in a nonstandard directory <include dir>
846   CPP         C preprocessor
847   CXX         C++ compiler command
848   CXXFLAGS    C++ compiler flags
849   CXXCPP      C++ preprocessor
850
851 Use these variables to override the choices made by `configure' or to help
852 it to find libraries and programs with nonstandard names/locations.
853
854 EOF
855 fi
856
857 if test "$ac_init_help" = "recursive"; then
858   # If there are subdirs, report their specific --help.
859   ac_popdir=`pwd`
860   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
861     cd $ac_subdir
862     # A "../" for each directory in /$ac_subdir.
863     ac_dots=`echo $ac_subdir |
864              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
865
866     case $srcdir in
867     .) # No --srcdir option.  We are building in place.
868       ac_sub_srcdir=$srcdir ;;
869     [\\/]* | ?:[\\/]* ) # Absolute path.
870       ac_sub_srcdir=$srcdir/$ac_subdir ;;
871     *) # Relative path.
872       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
873     esac
874
875     # Check for guested configure; otherwise get Cygnus style configure.
876     if test -f $ac_sub_srcdir/configure.gnu; then
877       echo
878       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
879     elif test -f $ac_sub_srcdir/configure; then
880       echo
881       $SHELL $ac_sub_srcdir/configure  --help=recursive
882     elif test -f $ac_sub_srcdir/configure.ac ||
883            test -f $ac_sub_srcdir/configure.in; then
884       echo
885       $ac_configure --help
886     else
887       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
888     fi
889     cd $ac_popdir
890   done
891 fi
892
893 test -n "$ac_init_help" && exit 0
894 if $ac_init_version; then
895   cat <<\EOF
896
897 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
898 Free Software Foundation, Inc.
899 This configure script is free software; the Free Software Foundation
900 gives unlimited permission to copy, distribute and modify it.
901 EOF
902   exit 0
903 fi
904 exec 5>config.log
905 cat >&5 <<EOF
906 This file contains any messages produced by compilers while
907 running configure, to aid debugging if configure makes a mistake.
908
909 It was created by $as_me, which was
910 generated by GNU Autoconf 2.52.20150926.  Invocation command line was
911
912   $ $0 $@
913
914 EOF
915 {
916 cat <<_ASUNAME
917 ## ---------- ##
918 ## Platform.  ##
919 ## ---------- ##
920
921 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
922 uname -m = `(uname -m) 2>/dev/null || echo unknown`
923 uname -r = `(uname -r) 2>/dev/null || echo unknown`
924 uname -s = `(uname -s) 2>/dev/null || echo unknown`
925 uname -v = `(uname -v) 2>/dev/null || echo unknown`
926
927 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
928 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
929
930 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
931 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
932 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
933 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
934 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
935 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
936 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
937
938 PATH = $PATH
939
940 _ASUNAME
941 } >&5
942
943 cat >&5 <<EOF
944 ## ------------ ##
945 ## Core tests.  ##
946 ## ------------ ##
947
948 EOF
949
950 # Keep a trace of the command line.
951 # Strip out --no-create and --no-recursion so they do not pile up.
952 # Also quote any args containing shell meta-characters.
953 ac_configure_args=
954 ac_sep=
955 for ac_arg
956 do
957   case $ac_arg in
958   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
959   | --no-cr | --no-c) ;;
960   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
962   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
963     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
964     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
965     ac_sep=" " ;;
966   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
967      ac_sep=" " ;;
968   esac
969   # Get rid of the leading space.
970 done
971
972 # When interrupted or exit'd, cleanup temporary files, and complete
973 # config.log.  We remove comments because anyway the quotes in there
974 # would cause problems or look ugly.
975 trap 'exit_status=$?
976   # Save into config.log some information that might help in debugging.
977   echo >&5
978   echo "## ----------------- ##" >&5
979   echo "## Cache variables.  ##" >&5
980   echo "## ----------------- ##" >&5
981   echo >&5
982   # The following way of writing the cache mishandles newlines in values,
983 {
984   (set) 2>&1 |
985     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
986     *ac_space=\ *)
987       sed -n \
988         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
989           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
990       ;;
991     *)
992       sed -n \
993         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
994       ;;
995     esac;
996 } >&5
997   sed "/^$/d" confdefs.h >conftest.log
998   if test -s conftest.log; then
999     echo >&5
1000     echo "## ------------ ##" >&5
1001     echo "## confdefs.h.  ##" >&5
1002     echo "## ------------ ##" >&5
1003     echo >&5
1004     cat conftest.log >&5
1005   fi
1006   (echo; echo) >&5
1007   test "$ac_signal" != 0 &&
1008     echo "$as_me: caught signal $ac_signal" >&5
1009   echo "$as_me: exit $exit_status" >&5
1010   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1011     exit $exit_status
1012      ' 0
1013 for ac_signal in 1 2 13 15; do
1014   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1015 done
1016 ac_signal=0
1017
1018 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1019 rm -rf conftest* confdefs.h
1020 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1021 echo >confdefs.h
1022
1023 # Let the site file select an alternate cache file if it wants to.
1024 # Prefer explicitly selected file to automatically selected ones.
1025 if test -z "$CONFIG_SITE"; then
1026   if test "x$prefix" != xNONE; then
1027     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1028   else
1029     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1030   fi
1031 fi
1032 for ac_site_file in $CONFIG_SITE; do
1033   if test -r "$ac_site_file"; then
1034     { echo "$as_me:1034: loading site script $ac_site_file" >&5
1035 echo "$as_me: loading site script $ac_site_file" >&6;}
1036     cat "$ac_site_file" >&5
1037     . "$ac_site_file"
1038   fi
1039 done
1040
1041 if test -r "$cache_file"; then
1042   # Some versions of bash will fail to source /dev/null (special
1043   # files actually), so we avoid doing that.
1044   if test -f "$cache_file"; then
1045     { echo "$as_me:1045: loading cache $cache_file" >&5
1046 echo "$as_me: loading cache $cache_file" >&6;}
1047     case $cache_file in
1048       [\\/]* | ?:[\\/]* ) . $cache_file;;
1049       *)                      . ./$cache_file;;
1050     esac
1051   fi
1052 else
1053   { echo "$as_me:1053: creating cache $cache_file" >&5
1054 echo "$as_me: creating cache $cache_file" >&6;}
1055   >$cache_file
1056 fi
1057
1058 # Check that the precious variables saved in the cache have kept the same
1059 # value.
1060 ac_cache_corrupted=false
1061 for ac_var in `(set) 2>&1 |
1062                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1063   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1064   eval ac_new_set=\$ac_env_${ac_var}_set
1065   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1066   eval ac_new_val="\$ac_env_${ac_var}_value"
1067   case $ac_old_set,$ac_new_set in
1068     set,)
1069       { echo "$as_me:1069: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1070 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1071       ac_cache_corrupted=: ;;
1072     ,set)
1073       { echo "$as_me:1073: error: \`$ac_var' was not set in the previous run" >&5
1074 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1075       ac_cache_corrupted=: ;;
1076     ,);;
1077     *)
1078       if test "x$ac_old_val" != "x$ac_new_val"; then
1079         { echo "$as_me:1079: error: \`$ac_var' has changed since the previous run:" >&5
1080 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1081         { echo "$as_me:1081:   former value:  $ac_old_val" >&5
1082 echo "$as_me:   former value:  $ac_old_val" >&2;}
1083         { echo "$as_me:1083:   current value: $ac_new_val" >&5
1084 echo "$as_me:   current value: $ac_new_val" >&2;}
1085         ac_cache_corrupted=:
1086       fi;;
1087   esac
1088   # Pass precious variables to config.status.  It doesn't matter if
1089   # we pass some twice (in addition to the command line arguments).
1090   if test "$ac_new_set" = set; then
1091     case $ac_new_val in
1092     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1093       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1094       ac_configure_args="$ac_configure_args '$ac_arg'"
1095       ;;
1096     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1097        ;;
1098     esac
1099   fi
1100 done
1101 if $ac_cache_corrupted; then
1102   { echo "$as_me:1102: error: changes in the environment can compromise the build" >&5
1103 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1104   { { echo "$as_me:1104: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1105 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1106    { (exit 1); exit 1; }; }
1107 fi
1108
1109 ac_ext=c
1110 ac_cpp='$CPP $CPPFLAGS'
1111 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1112 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1113 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1114 ac_main_return=return
1115
1116 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1117   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1118                    ECHO_T='     ' ;;
1119   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1120   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1121 esac
1122 echo "#! $SHELL" >conftest.sh
1123 echo  "exit 0"   >>conftest.sh
1124 chmod +x conftest.sh
1125 if { (echo "$as_me:1125: PATH=\".;.\"; conftest.sh") >&5
1126   (PATH=".;."; conftest.sh) 2>&5
1127   ac_status=$?
1128   echo "$as_me:1128: \$? = $ac_status" >&5
1129   (exit $ac_status); }; then
1130   ac_path_separator=';'
1131 else
1132   ac_path_separator=:
1133 fi
1134 PATH_SEPARATOR="$ac_path_separator"
1135 rm -f conftest.sh
1136
1137 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1138
1139 top_builddir=`pwd`
1140
1141 echo "$as_me:1141: checking for egrep" >&5
1142 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1143 if test "${ac_cv_prog_egrep+set}" = set; then
1144   echo $ECHO_N "(cached) $ECHO_C" >&6
1145 else
1146   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1147                 then ac_cv_prog_egrep='grep -E'
1148                 else ac_cv_prog_egrep='egrep'
1149         fi
1150 fi
1151 echo "$as_me:1151: result: $ac_cv_prog_egrep" >&5
1152 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1153         EGREP=$ac_cv_prog_egrep
1154
1155         test -z "$EGREP" && { { echo "$as_me:1155: error: No egrep program found" >&5
1156 echo "$as_me: error: No egrep program found" >&2;}
1157    { (exit 1); exit 1; }; }
1158
1159 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1160 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1161 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1162 cf_cv_abi_version=${NCURSES_MAJOR}
1163 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1164 cf_cv_timestamp=`date`
1165 echo "$as_me:1165: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1166 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1167
1168 if test -f $srcdir/VERSION ; then
1169         echo "$as_me:1169: checking for package version" >&5
1170 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1171
1172         # if there are not enough fields, cut returns the last one...
1173         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1174         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1175         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1176
1177         # this is how CF_BUNDLED_INTL uses $VERSION:
1178         VERSION="$cf_field1"
1179
1180         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1181         test -z "$VERSION_MAJOR" && { { echo "$as_me:1181: error: missing major-version" >&5
1182 echo "$as_me: error: missing major-version" >&2;}
1183    { (exit 1); exit 1; }; }
1184
1185         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1186         test -z "$VERSION_MINOR" && { { echo "$as_me:1186: error: missing minor-version" >&5
1187 echo "$as_me: error: missing minor-version" >&2;}
1188    { (exit 1); exit 1; }; }
1189
1190         echo "$as_me:1190: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1191 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1192
1193         echo "$as_me:1193: checking for package patch date" >&5
1194 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1195         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1196         case .$VERSION_PATCH in
1197         (.)
1198                 { { echo "$as_me:1198: error: missing patch-date $VERSION_PATCH" >&5
1199 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1200    { (exit 1); exit 1; }; }
1201                 ;;
1202         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1203                 ;;
1204         (*)
1205                 { { echo "$as_me:1205: error: illegal patch-date $VERSION_PATCH" >&5
1206 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1207    { (exit 1); exit 1; }; }
1208                 ;;
1209         esac
1210         echo "$as_me:1210: result: $VERSION_PATCH" >&5
1211 echo "${ECHO_T}$VERSION_PATCH" >&6
1212 else
1213         { { echo "$as_me:1213: error: did not find $srcdir/VERSION" >&5
1214 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1215    { (exit 1); exit 1; }; }
1216 fi
1217
1218 # show the actual data that we have for versions:
1219 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1220
1221 echo "${as_me:-configure}:1221: testing ABI VERSION $VERSION ..." 1>&5
1222
1223 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1224
1225 echo "${as_me:-configure}:1225: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1226
1227 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1228
1229 echo "${as_me:-configure}:1229: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1230
1231 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1232
1233 echo "${as_me:-configure}:1233: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1234
1235         cf_PACKAGE=NCURSES
1236         PACKAGE=ncurses
1237
1238 cat >>confdefs.h <<EOF
1239 #define PACKAGE "$PACKAGE"
1240 EOF
1241
1242 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1243
1244         cat >>confdefs.h <<EOF
1245 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1246 EOF
1247
1248         cat >>confdefs.h <<EOF
1249 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1250 EOF
1251
1252 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1253
1254 # Check whether --with-rel-version or --without-rel-version was given.
1255 if test "${with_rel_version+set}" = set; then
1256   withval="$with_rel_version"
1257   { echo "$as_me:1257: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1258 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1259  cf_cv_rel_version=$withval
1260 fi;
1261
1262  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1263  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1264
1265 if test -n "$NCURSES_MAJOR" ; then
1266   case $NCURSES_MAJOR in
1267   ([0-9]*)
1268         ;;
1269   (*)
1270         { { echo "$as_me:1270: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1271 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1272    { (exit 1); exit 1; }; }
1273         ;;
1274   esac
1275 else
1276   { { echo "$as_me:1276: error: Release major-version value is empty" >&5
1277 echo "$as_me: error: Release major-version value is empty" >&2;}
1278    { (exit 1); exit 1; }; }
1279 fi
1280
1281 if test -n "$NCURSES_MINOR" ; then
1282   case $NCURSES_MINOR in
1283   ([0-9]*)
1284         ;;
1285   (*)
1286         { { echo "$as_me:1286: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1287 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1288    { (exit 1); exit 1; }; }
1289         ;;
1290   esac
1291 else
1292   { { echo "$as_me:1292: error: Release minor-version value is empty" >&5
1293 echo "$as_me: error: Release minor-version value is empty" >&2;}
1294    { (exit 1); exit 1; }; }
1295 fi
1296
1297 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1298
1299 # Check whether --with-abi-version or --without-abi-version was given.
1300 if test "${with_abi_version+set}" = set; then
1301   withval="$with_abi_version"
1302
1303         if test "x$cf_cv_abi_version" != "x$withval"
1304         then
1305                 { echo "$as_me:1305: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1306 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1307                 case $cf_cv_rel_version in
1308                 (5.*)
1309                         cf_cv_rel_version=$withval.0
1310                         ;;
1311                 (6.*)
1312                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1313                         ;;
1314                 esac
1315         fi
1316         cf_cv_abi_version=$withval
1317 fi;
1318
1319 if test -n "$cf_cv_abi_version" ; then
1320   case $cf_cv_abi_version in
1321   ([0-9]*)
1322         ;;
1323   (*)
1324         { { echo "$as_me:1324: error: ABI version is not a number: $cf_cv_abi_version" >&5
1325 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1326    { (exit 1); exit 1; }; }
1327         ;;
1328   esac
1329 else
1330   { { echo "$as_me:1330: error: ABI version value is empty" >&5
1331 echo "$as_me: error: ABI version value is empty" >&2;}
1332    { (exit 1); exit 1; }; }
1333 fi
1334
1335 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1336 then
1337         case $cf_cv_rel_version in
1338         (5.*)
1339                 cf_cv_rel_version=$with_abi_version.0
1340                 ;;
1341         esac
1342 fi
1343
1344 ac_aux_dir=
1345 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1346   if test -f $ac_dir/install-sh; then
1347     ac_aux_dir=$ac_dir
1348     ac_install_sh="$ac_aux_dir/install-sh -c"
1349     break
1350   elif test -f $ac_dir/install.sh; then
1351     ac_aux_dir=$ac_dir
1352     ac_install_sh="$ac_aux_dir/install.sh -c"
1353     break
1354   elif test -f $ac_dir/shtool; then
1355     ac_aux_dir=$ac_dir
1356     ac_install_sh="$ac_aux_dir/shtool install -c"
1357     break
1358   fi
1359 done
1360 if test -z "$ac_aux_dir"; then
1361   { { echo "$as_me:1361: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1362 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1363    { (exit 1); exit 1; }; }
1364 fi
1365 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1366 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1367 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1368
1369 # Make sure we can run config.sub.
1370 $ac_config_sub sun4 >/dev/null 2>&1 ||
1371   { { echo "$as_me:1371: error: cannot run $ac_config_sub" >&5
1372 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1373    { (exit 1); exit 1; }; }
1374
1375 echo "$as_me:1375: checking build system type" >&5
1376 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1377 if test "${ac_cv_build+set}" = set; then
1378   echo $ECHO_N "(cached) $ECHO_C" >&6
1379 else
1380   ac_cv_build_alias=$build_alias
1381 test -z "$ac_cv_build_alias" &&
1382   ac_cv_build_alias=`$ac_config_guess`
1383 test -z "$ac_cv_build_alias" &&
1384   { { echo "$as_me:1384: error: cannot guess build type; you must specify one" >&5
1385 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1386    { (exit 1); exit 1; }; }
1387 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1388   { { echo "$as_me:1388: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1389 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1390    { (exit 1); exit 1; }; }
1391
1392 fi
1393 echo "$as_me:1393: result: $ac_cv_build" >&5
1394 echo "${ECHO_T}$ac_cv_build" >&6
1395 build=$ac_cv_build
1396 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1397 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1398 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1399
1400 echo "$as_me:1400: checking host system type" >&5
1401 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1402 if test "${ac_cv_host+set}" = set; then
1403   echo $ECHO_N "(cached) $ECHO_C" >&6
1404 else
1405   ac_cv_host_alias=$host_alias
1406 test -z "$ac_cv_host_alias" &&
1407   ac_cv_host_alias=$ac_cv_build_alias
1408 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1409   { { echo "$as_me:1409: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1410 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1411    { (exit 1); exit 1; }; }
1412
1413 fi
1414 echo "$as_me:1414: result: $ac_cv_host" >&5
1415 echo "${ECHO_T}$ac_cv_host" >&6
1416 host=$ac_cv_host
1417 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1418 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1419 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1420
1421 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1422         echo "$as_me:1422: checking target system type" >&5
1423 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1424 if test "${ac_cv_target+set}" = set; then
1425   echo $ECHO_N "(cached) $ECHO_C" >&6
1426 else
1427   ac_cv_target_alias=$target_alias
1428 test "x$ac_cv_target_alias" = "x" &&
1429   ac_cv_target_alias=$ac_cv_host_alias
1430 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1431   { { echo "$as_me:1431: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1432 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1433    { (exit 1); exit 1; }; }
1434
1435 fi
1436 echo "$as_me:1436: result: $ac_cv_target" >&5
1437 echo "${ECHO_T}$ac_cv_target" >&6
1438 target=$ac_cv_target
1439 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1440 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1441 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1442
1443 # The aliases save the names the user supplied, while $host etc.
1444 # will get canonicalized.
1445 test -n "$target_alias" &&
1446   test "$program_prefix$program_suffix$program_transform_name" = \
1447     NONENONEs,x,x, &&
1448   program_prefix=${target_alias}-
1449         system_name="$host_os"
1450 else
1451         system_name="`(uname -s -r) 2>/dev/null`"
1452         if test -z "$system_name" ; then
1453                 system_name="`(hostname) 2>/dev/null`"
1454         fi
1455 fi
1456 test -n "$system_name" &&
1457 cat >>confdefs.h <<EOF
1458 #define SYSTEM_NAME "$system_name"
1459 EOF
1460
1461 if test "${cf_cv_system_name+set}" = set; then
1462   echo $ECHO_N "(cached) $ECHO_C" >&6
1463 else
1464   cf_cv_system_name="$system_name"
1465 fi
1466
1467 test -z "$system_name" && system_name="$cf_cv_system_name"
1468 test -n "$cf_cv_system_name" && echo "$as_me:1468: result: Configuring for $cf_cv_system_name" >&5
1469 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1470
1471 if test ".$system_name" != ".$cf_cv_system_name" ; then
1472         echo "$as_me:1472: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1473 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1474         { { echo "$as_me:1474: error: \"Please remove config.cache and try again.\"" >&5
1475 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1476    { (exit 1); exit 1; }; }
1477 fi
1478
1479 # Check whether --with-system-type or --without-system-type was given.
1480 if test "${with_system_type+set}" = set; then
1481   withval="$with_system_type"
1482   { echo "$as_me:1482: WARNING: overriding system type to $withval" >&5
1483 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1484         cf_cv_system_name=$withval
1485         host_os=$withval
1486
1487 fi;
1488
1489 ###     Save the given $CFLAGS to allow user-override.
1490 cf_user_CFLAGS="$CFLAGS"
1491
1492 ###     Default install-location
1493
1494 echo "$as_me:1494: checking for prefix" >&5
1495 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1496 if test "x$prefix" = "xNONE" ; then
1497         case "$cf_cv_system_name" in
1498                 # non-vendor systems don't have a conflict
1499         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1500                 prefix=/usr
1501                 ;;
1502         (*)     prefix=$ac_default_prefix
1503                 ;;
1504         esac
1505 fi
1506 echo "$as_me:1506: result: $prefix" >&5
1507 echo "${ECHO_T}$prefix" >&6
1508
1509 if test "x$prefix" = "xNONE" ; then
1510 echo "$as_me:1510: checking for default include-directory" >&5
1511 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1512 test -n "$verbose" && echo 1>&6
1513 for cf_symbol in \
1514         $includedir \
1515         $includedir/ncurses \
1516         $prefix/include \
1517         $prefix/include/ncurses \
1518         /usr/local/include \
1519         /usr/local/include/ncurses \
1520         /usr/include \
1521         /usr/include/ncurses
1522 do
1523         cf_dir=`eval echo $cf_symbol`
1524         if test -f $cf_dir/curses.h ; then
1525         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1526                 includedir="$cf_symbol"
1527                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1528                 break
1529         fi
1530         fi
1531         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1532 done
1533 echo "$as_me:1533: result: $includedir" >&5
1534 echo "${ECHO_T}$includedir" >&6
1535 fi
1536
1537 ### Defaults for ncurses ABI
1538
1539 case x$cf_cv_abi_version in
1540 (x[6789])
1541         cf_dft_ext_colors=yes
1542         cf_dft_ext_const=yes
1543         cf_dft_ext_mouse=yes
1544         cf_dft_ext_putwin=yes
1545         cf_dft_ext_spfuncs=yes
1546         cf_dft_filter_syms=yes
1547         cf_dft_chtype=uint32_t
1548         cf_dft_mmask_t=uint32_t
1549         cf_dft_interop=yes
1550         cf_dft_tparm_arg=intptr_t
1551         cf_dft_with_lp64=yes
1552         ;;
1553 (*)
1554         cf_dft_ext_colors=no
1555         cf_dft_ext_const=no
1556         cf_dft_ext_mouse=no
1557         cf_dft_ext_putwin=no
1558         cf_dft_ext_spfuncs=no
1559         cf_dft_filter_syms=no
1560         cf_dft_chtype=auto
1561         cf_dft_mmask_t=auto
1562         cf_dft_interop=no
1563         cf_dft_tparm_arg=long
1564         cf_dft_with_lp64=no
1565         ;;
1566 esac
1567
1568 ###     Checks for programs.
1569
1570 # Check whether --with-ada or --without-ada was given.
1571 if test "${with_ada+set}" = set; then
1572   withval="$with_ada"
1573   cf_with_ada=$withval
1574 else
1575   cf_with_ada=yes
1576 fi;
1577 if test "x$cf_with_ada" = xyes
1578 then
1579         cf_PROG_CC="gnatgcc gcc cc"
1580 else
1581         cf_PROG_CC="gcc cc"
1582 fi
1583
1584 ac_ext=c
1585 ac_cpp='$CPP $CPPFLAGS'
1586 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1587 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1588 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1589 ac_main_return=return
1590 if test -n "$ac_tool_prefix"; then
1591   for ac_prog in $cf_PROG_CC
1592   do
1593     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1594 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1595 echo "$as_me:1595: checking for $ac_word" >&5
1596 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1597 if test "${ac_cv_prog_CC+set}" = set; then
1598   echo $ECHO_N "(cached) $ECHO_C" >&6
1599 else
1600   if test -n "$CC"; then
1601   ac_cv_prog_CC="$CC" # Let the user override the test.
1602 else
1603   ac_save_IFS=$IFS; IFS=$ac_path_separator
1604 ac_dummy="$PATH"
1605 for ac_dir in $ac_dummy; do
1606   IFS=$ac_save_IFS
1607   test -z "$ac_dir" && ac_dir=.
1608   $as_executable_p "$ac_dir/$ac_word" || continue
1609 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1610 echo "$as_me:1610: found $ac_dir/$ac_word" >&5
1611 break
1612 done
1613
1614 fi
1615 fi
1616 CC=$ac_cv_prog_CC
1617 if test -n "$CC"; then
1618   echo "$as_me:1618: result: $CC" >&5
1619 echo "${ECHO_T}$CC" >&6
1620 else
1621   echo "$as_me:1621: result: no" >&5
1622 echo "${ECHO_T}no" >&6
1623 fi
1624
1625     test -n "$CC" && break
1626   done
1627 fi
1628 if test -z "$CC"; then
1629   ac_ct_CC=$CC
1630   for ac_prog in $cf_PROG_CC
1631 do
1632   # Extract the first word of "$ac_prog", so it can be a program name with args.
1633 set dummy $ac_prog; ac_word=$2
1634 echo "$as_me:1634: checking for $ac_word" >&5
1635 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1636 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1637   echo $ECHO_N "(cached) $ECHO_C" >&6
1638 else
1639   if test -n "$ac_ct_CC"; then
1640   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1641 else
1642   ac_save_IFS=$IFS; IFS=$ac_path_separator
1643 ac_dummy="$PATH"
1644 for ac_dir in $ac_dummy; do
1645   IFS=$ac_save_IFS
1646   test -z "$ac_dir" && ac_dir=.
1647   $as_executable_p "$ac_dir/$ac_word" || continue
1648 ac_cv_prog_ac_ct_CC="$ac_prog"
1649 echo "$as_me:1649: found $ac_dir/$ac_word" >&5
1650 break
1651 done
1652
1653 fi
1654 fi
1655 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1656 if test -n "$ac_ct_CC"; then
1657   echo "$as_me:1657: result: $ac_ct_CC" >&5
1658 echo "${ECHO_T}$ac_ct_CC" >&6
1659 else
1660   echo "$as_me:1660: result: no" >&5
1661 echo "${ECHO_T}no" >&6
1662 fi
1663
1664   test -n "$ac_ct_CC" && break
1665 done
1666
1667   CC=$ac_ct_CC
1668 fi
1669
1670 test -z "$CC" && { { echo "$as_me:1670: error: no acceptable cc found in \$PATH" >&5
1671 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1672    { (exit 1); exit 1; }; }
1673
1674 # Provide some information about the compiler.
1675 echo "$as_me:1675:" \
1676      "checking for C compiler version" >&5
1677 ac_compiler=`set X $ac_compile; echo $2`
1678 { (eval echo "$as_me:1678: \"$ac_compiler --version </dev/null >&5\"") >&5
1679   (eval $ac_compiler --version </dev/null >&5) 2>&5
1680   ac_status=$?
1681   echo "$as_me:1681: \$? = $ac_status" >&5
1682   (exit $ac_status); }
1683 { (eval echo "$as_me:1683: \"$ac_compiler -v </dev/null >&5\"") >&5
1684   (eval $ac_compiler -v </dev/null >&5) 2>&5
1685   ac_status=$?
1686   echo "$as_me:1686: \$? = $ac_status" >&5
1687   (exit $ac_status); }
1688 { (eval echo "$as_me:1688: \"$ac_compiler -V </dev/null >&5\"") >&5
1689   (eval $ac_compiler -V </dev/null >&5) 2>&5
1690   ac_status=$?
1691   echo "$as_me:1691: \$? = $ac_status" >&5
1692   (exit $ac_status); }
1693
1694 cat >conftest.$ac_ext <<_ACEOF
1695 #line 1695 "configure"
1696 #include "confdefs.h"
1697
1698 int
1699 main ()
1700 {
1701
1702   ;
1703   return 0;
1704 }
1705 _ACEOF
1706 ac_clean_files_save=$ac_clean_files
1707 ac_clean_files="$ac_clean_files a.out a.exe"
1708 # Try to create an executable without -o first, disregard a.out.
1709 # It will help us diagnose broken compilers, and finding out an intuition
1710 # of exeext.
1711 echo "$as_me:1711: checking for C compiler default output" >&5
1712 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1713 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1714 if { (eval echo "$as_me:1714: \"$ac_link_default\"") >&5
1715   (eval $ac_link_default) 2>&5
1716   ac_status=$?
1717   echo "$as_me:1717: \$? = $ac_status" >&5
1718   (exit $ac_status); }; then
1719   # Find the output, starting from the most likely.  This scheme is
1720 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1721 # resort.
1722 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1723                 ls a.out conftest 2>/dev/null;
1724                 ls a.* conftest.* 2>/dev/null`; do
1725   case $ac_file in
1726     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1727     a.out ) # We found the default executable, but exeext='' is most
1728             # certainly right.
1729             break;;
1730     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1731           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1732           export ac_cv_exeext
1733           break;;
1734     * ) break;;
1735   esac
1736 done
1737 else
1738   echo "$as_me: failed program was:" >&5
1739 cat conftest.$ac_ext >&5
1740 { { echo "$as_me:1740: error: C compiler cannot create executables" >&5
1741 echo "$as_me: error: C compiler cannot create executables" >&2;}
1742    { (exit 77); exit 77; }; }
1743 fi
1744
1745 ac_exeext=$ac_cv_exeext
1746 echo "$as_me:1746: result: $ac_file" >&5
1747 echo "${ECHO_T}$ac_file" >&6
1748
1749 # Check the compiler produces executables we can run.  If not, either
1750 # the compiler is broken, or we cross compile.
1751 echo "$as_me:1751: checking whether the C compiler works" >&5
1752 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1753 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1754 # If not cross compiling, check that we can run a simple program.
1755 if test "$cross_compiling" != yes; then
1756   if { ac_try='./$ac_file'
1757   { (eval echo "$as_me:1757: \"$ac_try\"") >&5
1758   (eval $ac_try) 2>&5
1759   ac_status=$?
1760   echo "$as_me:1760: \$? = $ac_status" >&5
1761   (exit $ac_status); }; }; then
1762     cross_compiling=no
1763   else
1764     if test "$cross_compiling" = maybe; then
1765         cross_compiling=yes
1766     else
1767         { { echo "$as_me:1767: error: cannot run C compiled programs.
1768 If you meant to cross compile, use \`--host'." >&5
1769 echo "$as_me: error: cannot run C compiled programs.
1770 If you meant to cross compile, use \`--host'." >&2;}
1771    { (exit 1); exit 1; }; }
1772     fi
1773   fi
1774 fi
1775 echo "$as_me:1775: result: yes" >&5
1776 echo "${ECHO_T}yes" >&6
1777
1778 rm -f a.out a.exe conftest$ac_cv_exeext
1779 ac_clean_files=$ac_clean_files_save
1780 # Check the compiler produces executables we can run.  If not, either
1781 # the compiler is broken, or we cross compile.
1782 echo "$as_me:1782: checking whether we are cross compiling" >&5
1783 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1784 echo "$as_me:1784: result: $cross_compiling" >&5
1785 echo "${ECHO_T}$cross_compiling" >&6
1786
1787 echo "$as_me:1787: checking for executable suffix" >&5
1788 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1789 if { (eval echo "$as_me:1789: \"$ac_link\"") >&5
1790   (eval $ac_link) 2>&5
1791   ac_status=$?
1792   echo "$as_me:1792: \$? = $ac_status" >&5
1793   (exit $ac_status); }; then
1794   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1795 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1796 # work properly (i.e., refer to `conftest.exe'), while it won't with
1797 # `rm'.
1798 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1799   case $ac_file in
1800     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1801     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1802           export ac_cv_exeext
1803           break;;
1804     * ) break;;
1805   esac
1806 done
1807 else
1808   { { echo "$as_me:1808: error: cannot compute EXEEXT: cannot compile and link" >&5
1809 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1810    { (exit 1); exit 1; }; }
1811 fi
1812
1813 rm -f conftest$ac_cv_exeext
1814 echo "$as_me:1814: result: $ac_cv_exeext" >&5
1815 echo "${ECHO_T}$ac_cv_exeext" >&6
1816
1817 rm -f conftest.$ac_ext
1818 EXEEXT=$ac_cv_exeext
1819 ac_exeext=$EXEEXT
1820 echo "$as_me:1820: checking for object suffix" >&5
1821 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1822 if test "${ac_cv_objext+set}" = set; then
1823   echo $ECHO_N "(cached) $ECHO_C" >&6
1824 else
1825   cat >conftest.$ac_ext <<_ACEOF
1826 #line 1826 "configure"
1827 #include "confdefs.h"
1828
1829 int
1830 main ()
1831 {
1832
1833   ;
1834   return 0;
1835 }
1836 _ACEOF
1837 rm -f conftest.o conftest.obj
1838 if { (eval echo "$as_me:1838: \"$ac_compile\"") >&5
1839   (eval $ac_compile) 2>&5
1840   ac_status=$?
1841   echo "$as_me:1841: \$? = $ac_status" >&5
1842   (exit $ac_status); }; then
1843   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1844   case $ac_file in
1845     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1846     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1847        break;;
1848   esac
1849 done
1850 else
1851   echo "$as_me: failed program was:" >&5
1852 cat conftest.$ac_ext >&5
1853 { { echo "$as_me:1853: error: cannot compute OBJEXT: cannot compile" >&5
1854 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1855    { (exit 1); exit 1; }; }
1856 fi
1857
1858 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1859 fi
1860 echo "$as_me:1860: result: $ac_cv_objext" >&5
1861 echo "${ECHO_T}$ac_cv_objext" >&6
1862 OBJEXT=$ac_cv_objext
1863 ac_objext=$OBJEXT
1864 echo "$as_me:1864: checking whether we are using the GNU C compiler" >&5
1865 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1866 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1867   echo $ECHO_N "(cached) $ECHO_C" >&6
1868 else
1869   cat >conftest.$ac_ext <<_ACEOF
1870 #line 1870 "configure"
1871 #include "confdefs.h"
1872
1873 int
1874 main ()
1875 {
1876 #ifndef __GNUC__
1877        choke me
1878 #endif
1879
1880   ;
1881   return 0;
1882 }
1883 _ACEOF
1884 rm -f conftest.$ac_objext
1885 if { (eval echo "$as_me:1885: \"$ac_compile\"") >&5
1886   (eval $ac_compile) 2>&5
1887   ac_status=$?
1888   echo "$as_me:1888: \$? = $ac_status" >&5
1889   (exit $ac_status); } &&
1890          { ac_try='test -s conftest.$ac_objext'
1891   { (eval echo "$as_me:1891: \"$ac_try\"") >&5
1892   (eval $ac_try) 2>&5
1893   ac_status=$?
1894   echo "$as_me:1894: \$? = $ac_status" >&5
1895   (exit $ac_status); }; }; then
1896   ac_compiler_gnu=yes
1897 else
1898   echo "$as_me: failed program was:" >&5
1899 cat conftest.$ac_ext >&5
1900 ac_compiler_gnu=no
1901 fi
1902 rm -f conftest.$ac_objext conftest.$ac_ext
1903 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1904
1905 fi
1906 echo "$as_me:1906: result: $ac_cv_c_compiler_gnu" >&5
1907 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1908 GCC=`test $ac_compiler_gnu = yes && echo yes`
1909 ac_test_CFLAGS=${CFLAGS+set}
1910 ac_save_CFLAGS=$CFLAGS
1911 CFLAGS="-g"
1912 echo "$as_me:1912: checking whether $CC accepts -g" >&5
1913 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1914 if test "${ac_cv_prog_cc_g+set}" = set; then
1915   echo $ECHO_N "(cached) $ECHO_C" >&6
1916 else
1917   cat >conftest.$ac_ext <<_ACEOF
1918 #line 1918 "configure"
1919 #include "confdefs.h"
1920
1921 int
1922 main ()
1923 {
1924
1925   ;
1926   return 0;
1927 }
1928 _ACEOF
1929 rm -f conftest.$ac_objext
1930 if { (eval echo "$as_me:1930: \"$ac_compile\"") >&5
1931   (eval $ac_compile) 2>&5
1932   ac_status=$?
1933   echo "$as_me:1933: \$? = $ac_status" >&5
1934   (exit $ac_status); } &&
1935          { ac_try='test -s conftest.$ac_objext'
1936   { (eval echo "$as_me:1936: \"$ac_try\"") >&5
1937   (eval $ac_try) 2>&5
1938   ac_status=$?
1939   echo "$as_me:1939: \$? = $ac_status" >&5
1940   (exit $ac_status); }; }; then
1941   ac_cv_prog_cc_g=yes
1942 else
1943   echo "$as_me: failed program was:" >&5
1944 cat conftest.$ac_ext >&5
1945 ac_cv_prog_cc_g=no
1946 fi
1947 rm -f conftest.$ac_objext conftest.$ac_ext
1948 fi
1949 echo "$as_me:1949: result: $ac_cv_prog_cc_g" >&5
1950 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1951 if test "$ac_test_CFLAGS" = set; then
1952   CFLAGS=$ac_save_CFLAGS
1953 elif test $ac_cv_prog_cc_g = yes; then
1954   if test "$GCC" = yes; then
1955     CFLAGS="-g -O2"
1956   else
1957     CFLAGS="-g"
1958   fi
1959 else
1960   if test "$GCC" = yes; then
1961     CFLAGS="-O2"
1962   else
1963     CFLAGS=
1964   fi
1965 fi
1966 # Some people use a C++ compiler to compile C.  Since we use `exit',
1967 # in C++ we need to declare it.  In case someone uses the same compiler
1968 # for both compiling C and C++ we need to have the C++ compiler decide
1969 # the declaration of exit, since it's the most demanding environment.
1970 cat >conftest.$ac_ext <<_ACEOF
1971 #ifndef __cplusplus
1972   choke me
1973 #endif
1974 _ACEOF
1975 rm -f conftest.$ac_objext
1976 if { (eval echo "$as_me:1976: \"$ac_compile\"") >&5
1977   (eval $ac_compile) 2>&5
1978   ac_status=$?
1979   echo "$as_me:1979: \$? = $ac_status" >&5
1980   (exit $ac_status); } &&
1981          { ac_try='test -s conftest.$ac_objext'
1982   { (eval echo "$as_me:1982: \"$ac_try\"") >&5
1983   (eval $ac_try) 2>&5
1984   ac_status=$?
1985   echo "$as_me:1985: \$? = $ac_status" >&5
1986   (exit $ac_status); }; }; then
1987   for ac_declaration in \
1988    ''\
1989    '#include <stdlib.h>' \
1990    'extern "C" void std::exit (int) throw (); using std::exit;' \
1991    'extern "C" void std::exit (int); using std::exit;' \
1992    'extern "C" void exit (int) throw ();' \
1993    'extern "C" void exit (int);' \
1994    'void exit (int);'
1995 do
1996   cat >conftest.$ac_ext <<_ACEOF
1997 #line 1997 "configure"
1998 #include "confdefs.h"
1999 #include <stdlib.h>
2000 $ac_declaration
2001 int
2002 main ()
2003 {
2004 exit (42);
2005   ;
2006   return 0;
2007 }
2008 _ACEOF
2009 rm -f conftest.$ac_objext
2010 if { (eval echo "$as_me:2010: \"$ac_compile\"") >&5
2011   (eval $ac_compile) 2>&5
2012   ac_status=$?
2013   echo "$as_me:2013: \$? = $ac_status" >&5
2014   (exit $ac_status); } &&
2015          { ac_try='test -s conftest.$ac_objext'
2016   { (eval echo "$as_me:2016: \"$ac_try\"") >&5
2017   (eval $ac_try) 2>&5
2018   ac_status=$?
2019   echo "$as_me:2019: \$? = $ac_status" >&5
2020   (exit $ac_status); }; }; then
2021   :
2022 else
2023   echo "$as_me: failed program was:" >&5
2024 cat conftest.$ac_ext >&5
2025 continue
2026 fi
2027 rm -f conftest.$ac_objext conftest.$ac_ext
2028   cat >conftest.$ac_ext <<_ACEOF
2029 #line 2029 "configure"
2030 #include "confdefs.h"
2031 $ac_declaration
2032 int
2033 main ()
2034 {
2035 exit (42);
2036   ;
2037   return 0;
2038 }
2039 _ACEOF
2040 rm -f conftest.$ac_objext
2041 if { (eval echo "$as_me:2041: \"$ac_compile\"") >&5
2042   (eval $ac_compile) 2>&5
2043   ac_status=$?
2044   echo "$as_me:2044: \$? = $ac_status" >&5
2045   (exit $ac_status); } &&
2046          { ac_try='test -s conftest.$ac_objext'
2047   { (eval echo "$as_me:2047: \"$ac_try\"") >&5
2048   (eval $ac_try) 2>&5
2049   ac_status=$?
2050   echo "$as_me:2050: \$? = $ac_status" >&5
2051   (exit $ac_status); }; }; then
2052   break
2053 else
2054   echo "$as_me: failed program was:" >&5
2055 cat conftest.$ac_ext >&5
2056 fi
2057 rm -f conftest.$ac_objext conftest.$ac_ext
2058 done
2059 rm -rf conftest*
2060 if test -n "$ac_declaration"; then
2061   echo '#ifdef __cplusplus' >>confdefs.h
2062   echo $ac_declaration      >>confdefs.h
2063   echo '#endif'             >>confdefs.h
2064 fi
2065
2066 else
2067   echo "$as_me: failed program was:" >&5
2068 cat conftest.$ac_ext >&5
2069 fi
2070 rm -f conftest.$ac_objext conftest.$ac_ext
2071 ac_ext=c
2072 ac_cpp='$CPP $CPPFLAGS'
2073 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2074 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2075 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2076 ac_main_return=return
2077
2078 GCC_VERSION=none
2079 if test "$GCC" = yes ; then
2080         echo "$as_me:2080: checking version of $CC" >&5
2081 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2082         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2083         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2084         echo "$as_me:2084: result: $GCC_VERSION" >&5
2085 echo "${ECHO_T}$GCC_VERSION" >&6
2086 fi
2087
2088 echo "$as_me:2088: checking for $CC option to accept ANSI C" >&5
2089 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2090 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2091   echo $ECHO_N "(cached) $ECHO_C" >&6
2092 else
2093   ac_cv_prog_cc_stdc=no
2094 ac_save_CC=$CC
2095 cat >conftest.$ac_ext <<_ACEOF
2096 #line 2096 "configure"
2097 #include "confdefs.h"
2098 #include <stdarg.h>
2099 #include <stdio.h>
2100 #include <sys/types.h>
2101 #include <sys/stat.h>
2102 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2103 struct buf { int x; };
2104 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2105 static char *e (p, i)
2106      char **p;
2107      int i;
2108 {
2109   return p[i];
2110 }
2111 static char *f (char * (*g) (char **, int), char **p, ...)
2112 {
2113   char *s;
2114   va_list v;
2115   va_start (v,p);
2116   s = g (p, va_arg (v,int));
2117   va_end (v);
2118   return s;
2119 }
2120 int test (int i, double x);
2121 struct s1 {int (*f) (int a);};
2122 struct s2 {int (*f) (double a);};
2123 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2124 int argc;
2125 char **argv;
2126 int
2127 main ()
2128 {
2129 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2130   ;
2131   return 0;
2132 }
2133 _ACEOF
2134 # Don't try gcc -ansi; that turns off useful extensions and
2135 # breaks some systems' header files.
2136 # AIX                   -qlanglvl=ansi
2137 # Ultrix and OSF/1      -std1
2138 # HP-UX 10.20 and later -Ae
2139 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2140 # SVR4                  -Xc -D__EXTENSIONS__
2141 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2142 do
2143   CC="$ac_save_CC $ac_arg"
2144   rm -f conftest.$ac_objext
2145 if { (eval echo "$as_me:2145: \"$ac_compile\"") >&5
2146   (eval $ac_compile) 2>&5
2147   ac_status=$?
2148   echo "$as_me:2148: \$? = $ac_status" >&5
2149   (exit $ac_status); } &&
2150          { ac_try='test -s conftest.$ac_objext'
2151   { (eval echo "$as_me:2151: \"$ac_try\"") >&5
2152   (eval $ac_try) 2>&5
2153   ac_status=$?
2154   echo "$as_me:2154: \$? = $ac_status" >&5
2155   (exit $ac_status); }; }; then
2156   ac_cv_prog_cc_stdc=$ac_arg
2157 break
2158 else
2159   echo "$as_me: failed program was:" >&5
2160 cat conftest.$ac_ext >&5
2161 fi
2162 rm -f conftest.$ac_objext
2163 done
2164 rm -f conftest.$ac_ext conftest.$ac_objext
2165 CC=$ac_save_CC
2166
2167 fi
2168
2169 case "x$ac_cv_prog_cc_stdc" in
2170   x|xno)
2171     echo "$as_me:2171: result: none needed" >&5
2172 echo "${ECHO_T}none needed" >&6 ;;
2173   *)
2174     echo "$as_me:2174: result: $ac_cv_prog_cc_stdc" >&5
2175 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2176     CC="$CC $ac_cv_prog_cc_stdc" ;;
2177 esac
2178
2179 # This should have been defined by AC_PROG_CC
2180 : ${CC:=cc}
2181
2182 echo "$as_me:2182: checking \$CC variable" >&5
2183 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2184 case "$CC" in
2185 (*[\ \  ]-*)
2186         echo "$as_me:2186: result: broken" >&5
2187 echo "${ECHO_T}broken" >&6
2188         { echo "$as_me:2188: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2189 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2190         # humor him...
2191         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ][      ]*//'`
2192         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2193
2194 cf_fix_cppflags=no
2195 cf_new_cflags=
2196 cf_new_cppflags=
2197 cf_new_extra_cppflags=
2198
2199 for cf_add_cflags in $cf_flags
2200 do
2201 case $cf_fix_cppflags in
2202 (no)
2203         case $cf_add_cflags in
2204         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2205                 case $cf_add_cflags in
2206                 (-D*)
2207                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2208
2209                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2210                                 && test -z "${cf_tst_cflags}" \
2211                                 && cf_fix_cppflags=yes
2212
2213                         if test $cf_fix_cppflags = yes ; then
2214                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2215                                 continue
2216                         elif test "${cf_tst_cflags}" = "\"'" ; then
2217                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2218                                 continue
2219                         fi
2220                         ;;
2221                 esac
2222                 case "$CPPFLAGS" in
2223                 (*$cf_add_cflags)
2224                         ;;
2225                 (*)
2226                         case $cf_add_cflags in
2227                         (-D*)
2228                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2229
2230 CPPFLAGS=`echo "$CPPFLAGS" | \
2231         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2232                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2233
2234                                 ;;
2235                         esac
2236                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2237                         ;;
2238                 esac
2239                 ;;
2240         (*)
2241                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2242                 ;;
2243         esac
2244         ;;
2245 (yes)
2246         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2247
2248         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2249
2250         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2251                 && test -z "${cf_tst_cflags}" \
2252                 && cf_fix_cppflags=no
2253         ;;
2254 esac
2255 done
2256
2257 if test -n "$cf_new_cflags" ; then
2258
2259         CFLAGS="$CFLAGS $cf_new_cflags"
2260 fi
2261
2262 if test -n "$cf_new_cppflags" ; then
2263
2264         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2265 fi
2266
2267 if test -n "$cf_new_extra_cppflags" ; then
2268
2269         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2270 fi
2271
2272         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2273
2274 echo "${as_me:-configure}:2274: testing resulting CC: '$CC' ..." 1>&5
2275
2276         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2277
2278 echo "${as_me:-configure}:2278: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2279
2280         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2281
2282 echo "${as_me:-configure}:2282: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2283
2284         ;;
2285 (*)
2286         echo "$as_me:2286: result: ok" >&5
2287 echo "${ECHO_T}ok" >&6
2288         ;;
2289 esac
2290
2291 ac_ext=c
2292 ac_cpp='$CPP $CPPFLAGS'
2293 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2294 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2295 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2296 ac_main_return=return
2297 echo "$as_me:2297: checking how to run the C preprocessor" >&5
2298 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2299 # On Suns, sometimes $CPP names a directory.
2300 if test -n "$CPP" && test -d "$CPP"; then
2301   CPP=
2302 fi
2303 if test -z "$CPP"; then
2304   if test "${ac_cv_prog_CPP+set}" = set; then
2305   echo $ECHO_N "(cached) $ECHO_C" >&6
2306 else
2307       # Double quotes because CPP needs to be expanded
2308     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2309     do
2310       ac_preproc_ok=false
2311 for ac_c_preproc_warn_flag in '' yes
2312 do
2313   # Use a header file that comes with gcc, so configuring glibc
2314   # with a fresh cross-compiler works.
2315   # On the NeXT, cc -E runs the code through the compiler's parser,
2316   # not just through cpp. "Syntax error" is here to catch this case.
2317   cat >conftest.$ac_ext <<_ACEOF
2318 #line 2318 "configure"
2319 #include "confdefs.h"
2320 #include <assert.h>
2321                      Syntax error
2322 _ACEOF
2323 if { (eval echo "$as_me:2323: \"$ac_cpp conftest.$ac_ext\"") >&5
2324   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2325   ac_status=$?
2326   egrep -v '^ *\+' conftest.er1 >conftest.err
2327   rm -f conftest.er1
2328   cat conftest.err >&5
2329   echo "$as_me:2329: \$? = $ac_status" >&5
2330   (exit $ac_status); } >/dev/null; then
2331   if test -s conftest.err; then
2332     ac_cpp_err=$ac_c_preproc_warn_flag
2333   else
2334     ac_cpp_err=
2335   fi
2336 else
2337   ac_cpp_err=yes
2338 fi
2339 if test -z "$ac_cpp_err"; then
2340   :
2341 else
2342   echo "$as_me: failed program was:" >&5
2343   cat conftest.$ac_ext >&5
2344   # Broken: fails on valid input.
2345 continue
2346 fi
2347 rm -f conftest.err conftest.$ac_ext
2348
2349   # OK, works on sane cases.  Now check whether non-existent headers
2350   # can be detected and how.
2351   cat >conftest.$ac_ext <<_ACEOF
2352 #line 2352 "configure"
2353 #include "confdefs.h"
2354 #include <ac_nonexistent.h>
2355 _ACEOF
2356 if { (eval echo "$as_me:2356: \"$ac_cpp conftest.$ac_ext\"") >&5
2357   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2358   ac_status=$?
2359   egrep -v '^ *\+' conftest.er1 >conftest.err
2360   rm -f conftest.er1
2361   cat conftest.err >&5
2362   echo "$as_me:2362: \$? = $ac_status" >&5
2363   (exit $ac_status); } >/dev/null; then
2364   if test -s conftest.err; then
2365     ac_cpp_err=$ac_c_preproc_warn_flag
2366   else
2367     ac_cpp_err=
2368   fi
2369 else
2370   ac_cpp_err=yes
2371 fi
2372 if test -z "$ac_cpp_err"; then
2373   # Broken: success on invalid input.
2374 continue
2375 else
2376   echo "$as_me: failed program was:" >&5
2377   cat conftest.$ac_ext >&5
2378   # Passes both tests.
2379 ac_preproc_ok=:
2380 break
2381 fi
2382 rm -f conftest.err conftest.$ac_ext
2383
2384 done
2385 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2386 rm -f conftest.err conftest.$ac_ext
2387 if $ac_preproc_ok; then
2388   break
2389 fi
2390
2391     done
2392     ac_cv_prog_CPP=$CPP
2393
2394 fi
2395   CPP=$ac_cv_prog_CPP
2396 else
2397   ac_cv_prog_CPP=$CPP
2398 fi
2399 echo "$as_me:2399: result: $CPP" >&5
2400 echo "${ECHO_T}$CPP" >&6
2401 ac_preproc_ok=false
2402 for ac_c_preproc_warn_flag in '' yes
2403 do
2404   # Use a header file that comes with gcc, so configuring glibc
2405   # with a fresh cross-compiler works.
2406   # On the NeXT, cc -E runs the code through the compiler's parser,
2407   # not just through cpp. "Syntax error" is here to catch this case.
2408   cat >conftest.$ac_ext <<_ACEOF
2409 #line 2409 "configure"
2410 #include "confdefs.h"
2411 #include <assert.h>
2412                      Syntax error
2413 _ACEOF
2414 if { (eval echo "$as_me:2414: \"$ac_cpp conftest.$ac_ext\"") >&5
2415   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2416   ac_status=$?
2417   egrep -v '^ *\+' conftest.er1 >conftest.err
2418   rm -f conftest.er1
2419   cat conftest.err >&5
2420   echo "$as_me:2420: \$? = $ac_status" >&5
2421   (exit $ac_status); } >/dev/null; then
2422   if test -s conftest.err; then
2423     ac_cpp_err=$ac_c_preproc_warn_flag
2424   else
2425     ac_cpp_err=
2426   fi
2427 else
2428   ac_cpp_err=yes
2429 fi
2430 if test -z "$ac_cpp_err"; then
2431   :
2432 else
2433   echo "$as_me: failed program was:" >&5
2434   cat conftest.$ac_ext >&5
2435   # Broken: fails on valid input.
2436 continue
2437 fi
2438 rm -f conftest.err conftest.$ac_ext
2439
2440   # OK, works on sane cases.  Now check whether non-existent headers
2441   # can be detected and how.
2442   cat >conftest.$ac_ext <<_ACEOF
2443 #line 2443 "configure"
2444 #include "confdefs.h"
2445 #include <ac_nonexistent.h>
2446 _ACEOF
2447 if { (eval echo "$as_me:2447: \"$ac_cpp conftest.$ac_ext\"") >&5
2448   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2449   ac_status=$?
2450   egrep -v '^ *\+' conftest.er1 >conftest.err
2451   rm -f conftest.er1
2452   cat conftest.err >&5
2453   echo "$as_me:2453: \$? = $ac_status" >&5
2454   (exit $ac_status); } >/dev/null; then
2455   if test -s conftest.err; then
2456     ac_cpp_err=$ac_c_preproc_warn_flag
2457   else
2458     ac_cpp_err=
2459   fi
2460 else
2461   ac_cpp_err=yes
2462 fi
2463 if test -z "$ac_cpp_err"; then
2464   # Broken: success on invalid input.
2465 continue
2466 else
2467   echo "$as_me: failed program was:" >&5
2468   cat conftest.$ac_ext >&5
2469   # Passes both tests.
2470 ac_preproc_ok=:
2471 break
2472 fi
2473 rm -f conftest.err conftest.$ac_ext
2474
2475 done
2476 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2477 rm -f conftest.err conftest.$ac_ext
2478 if $ac_preproc_ok; then
2479   :
2480 else
2481   { { echo "$as_me:2481: error: C preprocessor \"$CPP\" fails sanity check" >&5
2482 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2483    { (exit 1); exit 1; }; }
2484 fi
2485
2486 ac_ext=c
2487 ac_cpp='$CPP $CPPFLAGS'
2488 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2489 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2490 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2491 ac_main_return=return
2492
2493 if test $ac_cv_c_compiler_gnu = yes; then
2494     echo "$as_me:2494: checking whether $CC needs -traditional" >&5
2495 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2496 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2497   echo $ECHO_N "(cached) $ECHO_C" >&6
2498 else
2499     ac_pattern="Autoconf.*'x'"
2500   cat >conftest.$ac_ext <<_ACEOF
2501 #line 2501 "configure"
2502 #include "confdefs.h"
2503 #include <sgtty.h>
2504 int Autoconf = TIOCGETP;
2505 _ACEOF
2506 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2507   egrep "$ac_pattern" >/dev/null 2>&1; then
2508   ac_cv_prog_gcc_traditional=yes
2509 else
2510   ac_cv_prog_gcc_traditional=no
2511 fi
2512 rm -rf conftest*
2513
2514   if test $ac_cv_prog_gcc_traditional = no; then
2515     cat >conftest.$ac_ext <<_ACEOF
2516 #line 2516 "configure"
2517 #include "confdefs.h"
2518 #include <termio.h>
2519 int Autoconf = TCGETA;
2520 _ACEOF
2521 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2522   egrep "$ac_pattern" >/dev/null 2>&1; then
2523   ac_cv_prog_gcc_traditional=yes
2524 fi
2525 rm -rf conftest*
2526
2527   fi
2528 fi
2529 echo "$as_me:2529: result: $ac_cv_prog_gcc_traditional" >&5
2530 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2531   if test $ac_cv_prog_gcc_traditional = yes; then
2532     CC="$CC -traditional"
2533   fi
2534 fi
2535
2536 echo "$as_me:2536: checking whether $CC understands -c and -o together" >&5
2537 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2538 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2539   echo $ECHO_N "(cached) $ECHO_C" >&6
2540 else
2541
2542 cat > conftest.$ac_ext <<CF_EOF
2543 int main()
2544 {
2545         ${cf_cv_main_return:-return}(0);
2546 }
2547 CF_EOF
2548 # We do the test twice because some compilers refuse to overwrite an
2549 # existing .o file with -o, though they will create one.
2550 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2551 if { (eval echo "$as_me:2551: \"$ac_try\"") >&5
2552   (eval $ac_try) 2>&5
2553   ac_status=$?
2554   echo "$as_me:2554: \$? = $ac_status" >&5
2555   (exit $ac_status); } &&
2556   test -f conftest2.$ac_objext && { (eval echo "$as_me:2556: \"$ac_try\"") >&5
2557   (eval $ac_try) 2>&5
2558   ac_status=$?
2559   echo "$as_me:2559: \$? = $ac_status" >&5
2560   (exit $ac_status); };
2561 then
2562   eval cf_cv_prog_CC_c_o=yes
2563 else
2564   eval cf_cv_prog_CC_c_o=no
2565 fi
2566 rm -rf conftest*
2567
2568 fi
2569 if test $cf_cv_prog_CC_c_o = yes; then
2570   echo "$as_me:2570: result: yes" >&5
2571 echo "${ECHO_T}yes" >&6
2572 else
2573   echo "$as_me:2573: result: no" >&5
2574 echo "${ECHO_T}no" >&6
2575 fi
2576
2577 if test "$cross_compiling" = yes ; then
2578         LDCONFIG=:
2579 else
2580         case "$cf_cv_system_name" in
2581         (dragonfly*|mirbsd*|freebsd*)
2582                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2583                 ;;
2584         (*) LDPATH=$PATH:/sbin:/usr/sbin
2585                 # Extract the first word of "ldconfig", so it can be a program name with args.
2586 set dummy ldconfig; ac_word=$2
2587 echo "$as_me:2587: checking for $ac_word" >&5
2588 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2589 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2590   echo $ECHO_N "(cached) $ECHO_C" >&6
2591 else
2592   case $LDCONFIG in
2593   [\\/]* | ?:[\\/]*)
2594   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2595   ;;
2596   *)
2597   ac_save_IFS=$IFS; IFS=$ac_path_separator
2598 ac_dummy="$LDPATH"
2599 for ac_dir in $ac_dummy; do
2600   IFS=$ac_save_IFS
2601   test -z "$ac_dir" && ac_dir=.
2602   if $as_executable_p "$ac_dir/$ac_word"; then
2603    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2604    echo "$as_me:2604: found $ac_dir/$ac_word" >&5
2605    break
2606 fi
2607 done
2608
2609   ;;
2610 esac
2611 fi
2612 LDCONFIG=$ac_cv_path_LDCONFIG
2613
2614 if test -n "$LDCONFIG"; then
2615   echo "$as_me:2615: result: $LDCONFIG" >&5
2616 echo "${ECHO_T}$LDCONFIG" >&6
2617 else
2618   echo "$as_me:2618: result: no" >&5
2619 echo "${ECHO_T}no" >&6
2620 fi
2621
2622                 ;;
2623         esac
2624 fi
2625
2626 echo "$as_me:2626: checking if you want to ensure bool is consistent with C++" >&5
2627 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2628
2629 # Check whether --with-cxx or --without-cxx was given.
2630 if test "${with_cxx+set}" = set; then
2631   withval="$with_cxx"
2632   cf_with_cxx=$withval
2633 else
2634   cf_with_cxx=yes
2635 fi;
2636 echo "$as_me:2636: result: $cf_with_cxx" >&5
2637 echo "${ECHO_T}$cf_with_cxx" >&6
2638 if test "X$cf_with_cxx" = Xno ; then
2639         CXX=""
2640         GXX=""
2641 else
2642         # with autoconf 2.13, we can change the error to a warning:
2643                 ac_ext=cc
2644 ac_cpp='$CXXCPP $CPPFLAGS'
2645 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2646 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2647 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2648 ac_main_return=return
2649 if test -n "$ac_tool_prefix"; then
2650   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2651   do
2652     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2653 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2654 echo "$as_me:2654: checking for $ac_word" >&5
2655 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2656 if test "${ac_cv_prog_CXX+set}" = set; then
2657   echo $ECHO_N "(cached) $ECHO_C" >&6
2658 else
2659   if test -n "$CXX"; then
2660   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2661 else
2662   ac_save_IFS=$IFS; IFS=$ac_path_separator
2663 ac_dummy="$PATH"
2664 for ac_dir in $ac_dummy; do
2665   IFS=$ac_save_IFS
2666   test -z "$ac_dir" && ac_dir=.
2667   $as_executable_p "$ac_dir/$ac_word" || continue
2668 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2669 echo "$as_me:2669: found $ac_dir/$ac_word" >&5
2670 break
2671 done
2672
2673 fi
2674 fi
2675 CXX=$ac_cv_prog_CXX
2676 if test -n "$CXX"; then
2677   echo "$as_me:2677: result: $CXX" >&5
2678 echo "${ECHO_T}$CXX" >&6
2679 else
2680   echo "$as_me:2680: result: no" >&5
2681 echo "${ECHO_T}no" >&6
2682 fi
2683
2684     test -n "$CXX" && break
2685   done
2686 fi
2687 if test -z "$CXX"; then
2688   ac_ct_CXX=$CXX
2689   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2690 do
2691   # Extract the first word of "$ac_prog", so it can be a program name with args.
2692 set dummy $ac_prog; ac_word=$2
2693 echo "$as_me:2693: checking for $ac_word" >&5
2694 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2695 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2696   echo $ECHO_N "(cached) $ECHO_C" >&6
2697 else
2698   if test -n "$ac_ct_CXX"; then
2699   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2700 else
2701   ac_save_IFS=$IFS; IFS=$ac_path_separator
2702 ac_dummy="$PATH"
2703 for ac_dir in $ac_dummy; do
2704   IFS=$ac_save_IFS
2705   test -z "$ac_dir" && ac_dir=.
2706   $as_executable_p "$ac_dir/$ac_word" || continue
2707 ac_cv_prog_ac_ct_CXX="$ac_prog"
2708 echo "$as_me:2708: found $ac_dir/$ac_word" >&5
2709 break
2710 done
2711
2712 fi
2713 fi
2714 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2715 if test -n "$ac_ct_CXX"; then
2716   echo "$as_me:2716: result: $ac_ct_CXX" >&5
2717 echo "${ECHO_T}$ac_ct_CXX" >&6
2718 else
2719   echo "$as_me:2719: result: no" >&5
2720 echo "${ECHO_T}no" >&6
2721 fi
2722
2723   test -n "$ac_ct_CXX" && break
2724 done
2725 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2726
2727   CXX=$ac_ct_CXX
2728 fi
2729
2730 # Provide some information about the compiler.
2731 echo "$as_me:2731:" \
2732      "checking for C++ compiler version" >&5
2733 ac_compiler=`set X $ac_compile; echo $2`
2734 { (eval echo "$as_me:2734: \"$ac_compiler --version </dev/null >&5\"") >&5
2735   (eval $ac_compiler --version </dev/null >&5) 2>&5
2736   ac_status=$?
2737   echo "$as_me:2737: \$? = $ac_status" >&5
2738   (exit $ac_status); }
2739 { (eval echo "$as_me:2739: \"$ac_compiler -v </dev/null >&5\"") >&5
2740   (eval $ac_compiler -v </dev/null >&5) 2>&5
2741   ac_status=$?
2742   echo "$as_me:2742: \$? = $ac_status" >&5
2743   (exit $ac_status); }
2744 { (eval echo "$as_me:2744: \"$ac_compiler -V </dev/null >&5\"") >&5
2745   (eval $ac_compiler -V </dev/null >&5) 2>&5
2746   ac_status=$?
2747   echo "$as_me:2747: \$? = $ac_status" >&5
2748   (exit $ac_status); }
2749
2750 echo "$as_me:2750: checking whether we are using the GNU C++ compiler" >&5
2751 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2752 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2753   echo $ECHO_N "(cached) $ECHO_C" >&6
2754 else
2755   cat >conftest.$ac_ext <<_ACEOF
2756 #line 2756 "configure"
2757 #include "confdefs.h"
2758
2759 int
2760 main ()
2761 {
2762 #ifndef __GNUC__
2763        choke me
2764 #endif
2765
2766   ;
2767   return 0;
2768 }
2769 _ACEOF
2770 rm -f conftest.$ac_objext
2771 if { (eval echo "$as_me:2771: \"$ac_compile\"") >&5
2772   (eval $ac_compile) 2>&5
2773   ac_status=$?
2774   echo "$as_me:2774: \$? = $ac_status" >&5
2775   (exit $ac_status); } &&
2776          { ac_try='test -s conftest.$ac_objext'
2777   { (eval echo "$as_me:2777: \"$ac_try\"") >&5
2778   (eval $ac_try) 2>&5
2779   ac_status=$?
2780   echo "$as_me:2780: \$? = $ac_status" >&5
2781   (exit $ac_status); }; }; then
2782   ac_compiler_gnu=yes
2783 else
2784   echo "$as_me: failed program was:" >&5
2785 cat conftest.$ac_ext >&5
2786 ac_compiler_gnu=no
2787 fi
2788 rm -f conftest.$ac_objext conftest.$ac_ext
2789 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2790
2791 fi
2792 echo "$as_me:2792: result: $ac_cv_cxx_compiler_gnu" >&5
2793 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2794 GXX=`test $ac_compiler_gnu = yes && echo yes`
2795 ac_test_CXXFLAGS=${CXXFLAGS+set}
2796 ac_save_CXXFLAGS=$CXXFLAGS
2797 CXXFLAGS="-g"
2798 echo "$as_me:2798: checking whether $CXX accepts -g" >&5
2799 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2800 if test "${ac_cv_prog_cxx_g+set}" = set; then
2801   echo $ECHO_N "(cached) $ECHO_C" >&6
2802 else
2803   cat >conftest.$ac_ext <<_ACEOF
2804 #line 2804 "configure"
2805 #include "confdefs.h"
2806
2807 int
2808 main ()
2809 {
2810
2811   ;
2812   return 0;
2813 }
2814 _ACEOF
2815 rm -f conftest.$ac_objext
2816 if { (eval echo "$as_me:2816: \"$ac_compile\"") >&5
2817   (eval $ac_compile) 2>&5
2818   ac_status=$?
2819   echo "$as_me:2819: \$? = $ac_status" >&5
2820   (exit $ac_status); } &&
2821          { ac_try='test -s conftest.$ac_objext'
2822   { (eval echo "$as_me:2822: \"$ac_try\"") >&5
2823   (eval $ac_try) 2>&5
2824   ac_status=$?
2825   echo "$as_me:2825: \$? = $ac_status" >&5
2826   (exit $ac_status); }; }; then
2827   ac_cv_prog_cxx_g=yes
2828 else
2829   echo "$as_me: failed program was:" >&5
2830 cat conftest.$ac_ext >&5
2831 ac_cv_prog_cxx_g=no
2832 fi
2833 rm -f conftest.$ac_objext conftest.$ac_ext
2834 fi
2835 echo "$as_me:2835: result: $ac_cv_prog_cxx_g" >&5
2836 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2837 if test "$ac_test_CXXFLAGS" = set; then
2838   CXXFLAGS=$ac_save_CXXFLAGS
2839 elif test $ac_cv_prog_cxx_g = yes; then
2840   if test "$GXX" = yes; then
2841     CXXFLAGS="-g -O2"
2842   else
2843     CXXFLAGS="-g"
2844   fi
2845 else
2846   if test "$GXX" = yes; then
2847     CXXFLAGS="-O2"
2848   else
2849     CXXFLAGS=
2850   fi
2851 fi
2852 for ac_declaration in \
2853    ''\
2854    '#include <stdlib.h>' \
2855    'extern "C" void std::exit (int) throw (); using std::exit;' \
2856    'extern "C" void std::exit (int); using std::exit;' \
2857    'extern "C" void exit (int) throw ();' \
2858    'extern "C" void exit (int);' \
2859    'void exit (int);'
2860 do
2861   cat >conftest.$ac_ext <<_ACEOF
2862 #line 2862 "configure"
2863 #include "confdefs.h"
2864 #include <stdlib.h>
2865 $ac_declaration
2866 int
2867 main ()
2868 {
2869 exit (42);
2870   ;
2871   return 0;
2872 }
2873 _ACEOF
2874 rm -f conftest.$ac_objext
2875 if { (eval echo "$as_me:2875: \"$ac_compile\"") >&5
2876   (eval $ac_compile) 2>&5
2877   ac_status=$?
2878   echo "$as_me:2878: \$? = $ac_status" >&5
2879   (exit $ac_status); } &&
2880          { ac_try='test -s conftest.$ac_objext'
2881   { (eval echo "$as_me:2881: \"$ac_try\"") >&5
2882   (eval $ac_try) 2>&5
2883   ac_status=$?
2884   echo "$as_me:2884: \$? = $ac_status" >&5
2885   (exit $ac_status); }; }; then
2886   :
2887 else
2888   echo "$as_me: failed program was:" >&5
2889 cat conftest.$ac_ext >&5
2890 continue
2891 fi
2892 rm -f conftest.$ac_objext conftest.$ac_ext
2893   cat >conftest.$ac_ext <<_ACEOF
2894 #line 2894 "configure"
2895 #include "confdefs.h"
2896 $ac_declaration
2897 int
2898 main ()
2899 {
2900 exit (42);
2901   ;
2902   return 0;
2903 }
2904 _ACEOF
2905 rm -f conftest.$ac_objext
2906 if { (eval echo "$as_me:2906: \"$ac_compile\"") >&5
2907   (eval $ac_compile) 2>&5
2908   ac_status=$?
2909   echo "$as_me:2909: \$? = $ac_status" >&5
2910   (exit $ac_status); } &&
2911          { ac_try='test -s conftest.$ac_objext'
2912   { (eval echo "$as_me:2912: \"$ac_try\"") >&5
2913   (eval $ac_try) 2>&5
2914   ac_status=$?
2915   echo "$as_me:2915: \$? = $ac_status" >&5
2916   (exit $ac_status); }; }; then
2917   break
2918 else
2919   echo "$as_me: failed program was:" >&5
2920 cat conftest.$ac_ext >&5
2921 fi
2922 rm -f conftest.$ac_objext conftest.$ac_ext
2923 done
2924 rm -rf conftest*
2925 if test -n "$ac_declaration"; then
2926   echo '#ifdef __cplusplus' >>confdefs.h
2927   echo $ac_declaration      >>confdefs.h
2928   echo '#endif'             >>confdefs.h
2929 fi
2930
2931 ac_ext=c
2932 ac_cpp='$CPP $CPPFLAGS'
2933 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2934 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2935 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2936 ac_main_return=return
2937
2938         ac_ext=cc
2939 ac_cpp='$CXXCPP $CPPFLAGS'
2940 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2941 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2942 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2943 ac_main_return=return
2944
2945         if test "x$cf_with_cxx" != xno
2946         then
2947                 # Several of the C++ configurations do not work, particularly when
2948                 # cross-compiling (20140913 -TD)
2949                 echo "$as_me:2949: checking if $CXX works" >&5
2950 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2951
2952                 save_CPPFLAGS="$CPPFLAGS"
2953                 eval cf_includedir=${includedir}
2954                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2955
2956 cat >conftest.$ac_ext <<_ACEOF
2957 #line 2957 "configure"
2958 #include "confdefs.h"
2959
2960 #include <stdlib.h>
2961 #include <stdio.h>
2962
2963 int
2964 main ()
2965 {
2966
2967                 printf("Hello world!\n")
2968
2969   ;
2970   return 0;
2971 }
2972 _ACEOF
2973 rm -f conftest.$ac_objext
2974 if { (eval echo "$as_me:2974: \"$ac_compile\"") >&5
2975   (eval $ac_compile) 2>&5
2976   ac_status=$?
2977   echo "$as_me:2977: \$? = $ac_status" >&5
2978   (exit $ac_status); } &&
2979          { ac_try='test -s conftest.$ac_objext'
2980   { (eval echo "$as_me:2980: \"$ac_try\"") >&5
2981   (eval $ac_try) 2>&5
2982   ac_status=$?
2983   echo "$as_me:2983: \$? = $ac_status" >&5
2984   (exit $ac_status); }; }; then
2985   cf_cxx_works=yes
2986 else
2987   echo "$as_me: failed program was:" >&5
2988 cat conftest.$ac_ext >&5
2989 cf_cxx_works=no
2990 fi
2991 rm -f conftest.$ac_objext conftest.$ac_ext
2992                 CPPFLAGS="$save_CPPFLAGS"
2993
2994                 echo "$as_me:2994: result: $cf_cxx_works" >&5
2995 echo "${ECHO_T}$cf_cxx_works" >&6
2996                 if test "x$cf_cxx_works" = xno
2997                 then
2998                         { echo "$as_me:2998: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
2999 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3000                         cf_with_cxx=no; CXX=""; GXX="";
3001                 fi
3002         fi
3003         ac_ext=c
3004 ac_cpp='$CPP $CPPFLAGS'
3005 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3006 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3007 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3008 ac_main_return=return
3009
3010         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3011         if test "$CXX" = "g++" ; then
3012                 # Extract the first word of "g++", so it can be a program name with args.
3013 set dummy g++; ac_word=$2
3014 echo "$as_me:3014: checking for $ac_word" >&5
3015 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3016 if test "${ac_cv_path_CXX+set}" = set; then
3017   echo $ECHO_N "(cached) $ECHO_C" >&6
3018 else
3019   case $CXX in
3020   [\\/]* | ?:[\\/]*)
3021   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3022   ;;
3023   *)
3024   ac_save_IFS=$IFS; IFS=$ac_path_separator
3025 ac_dummy="$PATH"
3026 for ac_dir in $ac_dummy; do
3027   IFS=$ac_save_IFS
3028   test -z "$ac_dir" && ac_dir=.
3029   if $as_executable_p "$ac_dir/$ac_word"; then
3030    ac_cv_path_CXX="$ac_dir/$ac_word"
3031    echo "$as_me:3031: found $ac_dir/$ac_word" >&5
3032    break
3033 fi
3034 done
3035
3036   ;;
3037 esac
3038 fi
3039 CXX=$ac_cv_path_CXX
3040
3041 if test -n "$CXX"; then
3042   echo "$as_me:3042: result: $CXX" >&5
3043 echo "${ECHO_T}$CXX" >&6
3044 else
3045   echo "$as_me:3045: result: no" >&5
3046 echo "${ECHO_T}no" >&6
3047 fi
3048
3049         fi
3050         case "x$CXX" in
3051         (x|xg++)
3052                 { echo "$as_me:3052: WARNING: You don't have any C++ compiler, too bad" >&5
3053 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3054                 cf_with_cxx=no; CXX=""; GXX="";
3055                 ;;
3056         esac
3057 fi
3058
3059 GXX_VERSION=none
3060 if test "$GXX" = yes; then
3061         echo "$as_me:3061: checking version of ${CXX:-g++}" >&5
3062 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3063         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3064         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3065         echo "$as_me:3065: result: $GXX_VERSION" >&5
3066 echo "${ECHO_T}$GXX_VERSION" >&6
3067 fi
3068
3069 case $GXX_VERSION in
3070 (1*|2.[0-6]*)
3071         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3072         # cf_cxx_library=no
3073         { echo "$as_me:3073: WARNING: templates do not work" >&5
3074 echo "$as_me: WARNING: templates do not work" >&2;}
3075         ;;
3076 esac
3077
3078 echo "$as_me:3078: checking if you want to build C++ binding and demo" >&5
3079 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3080
3081 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3082 if test "${with_cxx_binding+set}" = set; then
3083   withval="$with_cxx_binding"
3084   cf_with_cxx_binding=$withval
3085 else
3086   cf_with_cxx_binding=$cf_with_cxx
3087 fi;
3088 echo "$as_me:3088: result: $cf_with_cxx_binding" >&5
3089 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3090
3091 echo "$as_me:3091: checking if you want to build with Ada95" >&5
3092 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3093 echo "$as_me:3093: result: $cf_with_ada" >&5
3094 echo "${ECHO_T}$cf_with_ada" >&6
3095
3096 echo "$as_me:3096: checking if you want to install terminal database" >&5
3097 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3098
3099 # Check whether --enable-db-install or --disable-db-install was given.
3100 if test "${enable_db_install+set}" = set; then
3101   enableval="$enable_db_install"
3102   cf_with_db_install=$enableval
3103 else
3104   cf_with_db_install=yes
3105 fi;
3106 echo "$as_me:3106: result: $cf_with_db_install" >&5
3107 echo "${ECHO_T}$cf_with_db_install" >&6
3108
3109 echo "$as_me:3109: checking if you want to install manpages" >&5
3110 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3111
3112 # Check whether --with-manpages or --without-manpages was given.
3113 if test "${with_manpages+set}" = set; then
3114   withval="$with_manpages"
3115   cf_with_manpages=$withval
3116 else
3117   cf_with_manpages=yes
3118 fi;
3119 echo "$as_me:3119: result: $cf_with_manpages" >&5
3120 echo "${ECHO_T}$cf_with_manpages" >&6
3121
3122 echo "$as_me:3122: checking if you want to build programs such as tic" >&5
3123 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3124
3125 # Check whether --with-progs or --without-progs was given.
3126 if test "${with_progs+set}" = set; then
3127   withval="$with_progs"
3128   cf_with_progs=$withval
3129 else
3130   cf_with_progs=yes
3131 fi;
3132 echo "$as_me:3132: result: $cf_with_progs" >&5
3133 echo "${ECHO_T}$cf_with_progs" >&6
3134
3135 echo "$as_me:3135: checking if you want to build test-programs" >&5
3136 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3137
3138 # Check whether --with-tests or --without-tests was given.
3139 if test "${with_tests+set}" = set; then
3140   withval="$with_tests"
3141   cf_with_tests=$withval
3142 else
3143   cf_with_tests=yes
3144 fi;
3145 echo "$as_me:3145: result: $cf_with_tests" >&5
3146 echo "${ECHO_T}$cf_with_tests" >&6
3147
3148 echo "$as_me:3148: checking if you wish to install curses.h" >&5
3149 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3150
3151 # Check whether --with-curses-h or --without-curses-h was given.
3152 if test "${with_curses_h+set}" = set; then
3153   withval="$with_curses_h"
3154   with_curses_h=$withval
3155 else
3156   with_curses_h=yes
3157 fi;
3158 echo "$as_me:3158: result: $with_curses_h" >&5
3159 echo "${ECHO_T}$with_curses_h" >&6
3160
3161 modules_to_build="ncurses"
3162 if test "X$cf_with_progs" != Xno ; then
3163 modules_to_build="$modules_to_build progs tack"
3164 fi
3165 modules_to_build="$modules_to_build panel menu form"
3166
3167 test "$program_prefix" != NONE &&
3168   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3169 # Use a double $ so make ignores it.
3170 test "$program_suffix" != NONE &&
3171   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3172 # Double any \ or $.  echo might interpret backslashes.
3173 # By default was `s,x,x', remove it if useless.
3174 cat <<\_ACEOF >conftest.sed
3175 s/[\\$]/&&/g;s/;s,x,x,$//
3176 _ACEOF
3177 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3178 rm conftest.sed
3179
3180 for ac_prog in mawk gawk nawk awk
3181 do
3182   # Extract the first word of "$ac_prog", so it can be a program name with args.
3183 set dummy $ac_prog; ac_word=$2
3184 echo "$as_me:3184: checking for $ac_word" >&5
3185 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3186 if test "${ac_cv_prog_AWK+set}" = set; then
3187   echo $ECHO_N "(cached) $ECHO_C" >&6
3188 else
3189   if test -n "$AWK"; then
3190   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3191 else
3192   ac_save_IFS=$IFS; IFS=$ac_path_separator
3193 ac_dummy="$PATH"
3194 for ac_dir in $ac_dummy; do
3195   IFS=$ac_save_IFS
3196   test -z "$ac_dir" && ac_dir=.
3197   $as_executable_p "$ac_dir/$ac_word" || continue
3198 ac_cv_prog_AWK="$ac_prog"
3199 echo "$as_me:3199: found $ac_dir/$ac_word" >&5
3200 break
3201 done
3202
3203 fi
3204 fi
3205 AWK=$ac_cv_prog_AWK
3206 if test -n "$AWK"; then
3207   echo "$as_me:3207: result: $AWK" >&5
3208 echo "${ECHO_T}$AWK" >&6
3209 else
3210   echo "$as_me:3210: result: no" >&5
3211 echo "${ECHO_T}no" >&6
3212 fi
3213
3214   test -n "$AWK" && break
3215 done
3216
3217 test -z "$AWK" && { { echo "$as_me:3217: error: No awk program found" >&5
3218 echo "$as_me: error: No awk program found" >&2;}
3219    { (exit 1); exit 1; }; }
3220
3221 echo "$as_me:3221: checking for egrep" >&5
3222 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3223 if test "${ac_cv_prog_egrep+set}" = set; then
3224   echo $ECHO_N "(cached) $ECHO_C" >&6
3225 else
3226   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3227                 then ac_cv_prog_egrep='grep -E'
3228                 else ac_cv_prog_egrep='egrep'
3229         fi
3230 fi
3231 echo "$as_me:3231: result: $ac_cv_prog_egrep" >&5
3232 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3233         EGREP=$ac_cv_prog_egrep
3234
3235         test -z "$EGREP" && { { echo "$as_me:3235: error: No egrep program found" >&5
3236 echo "$as_me: error: No egrep program found" >&2;}
3237    { (exit 1); exit 1; }; }
3238
3239 # Find a good install program.  We prefer a C program (faster),
3240 # so one script is as good as another.  But avoid the broken or
3241 # incompatible versions:
3242 # SysV /etc/install, /usr/sbin/install
3243 # SunOS /usr/etc/install
3244 # IRIX /sbin/install
3245 # AIX /bin/install
3246 # AmigaOS /C/install, which installs bootblocks on floppy discs
3247 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3248 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3249 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3250 # ./install, which can be erroneously created by make from ./install.sh.
3251 echo "$as_me:3251: checking for a BSD compatible install" >&5
3252 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3253 if test -z "$INSTALL"; then
3254 if test "${ac_cv_path_install+set}" = set; then
3255   echo $ECHO_N "(cached) $ECHO_C" >&6
3256 else
3257     ac_save_IFS=$IFS; IFS=$ac_path_separator
3258   for ac_dir in $PATH; do
3259     IFS=$ac_save_IFS
3260     # Account for people who put trailing slashes in PATH elements.
3261     case $ac_dir/ in
3262     / | ./ | .// | /cC/* \
3263     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3264     | /usr/ucb/* ) ;;
3265     *)
3266       # OSF1 and SCO ODT 3.0 have their own names for install.
3267       # Don't use installbsd from OSF since it installs stuff as root
3268       # by default.
3269       for ac_prog in ginstall scoinst install; do
3270         if $as_executable_p "$ac_dir/$ac_prog"; then
3271           if test $ac_prog = install &&
3272             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3273             # AIX install.  It has an incompatible calling convention.
3274             :
3275           elif test $ac_prog = install &&
3276             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3277             # program-specific install script used by HP pwplus--don't use.
3278             :
3279           else
3280             ac_cv_path_install="$ac_dir/$ac_prog -c"
3281             break 2
3282           fi
3283         fi
3284       done
3285       ;;
3286     esac
3287   done
3288
3289 fi
3290   if test "${ac_cv_path_install+set}" = set; then
3291     INSTALL=$ac_cv_path_install
3292   else
3293     # As a last resort, use the slow shell script.  We don't cache a
3294     # path for INSTALL within a source directory, because that will
3295     # break other packages using the cache if that directory is
3296     # removed, or if the path is relative.
3297     INSTALL=$ac_install_sh
3298   fi
3299 fi
3300 echo "$as_me:3300: result: $INSTALL" >&5
3301 echo "${ECHO_T}$INSTALL" >&6
3302
3303 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3304 # It thinks the first close brace ends the variable substitution.
3305 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3306
3307 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3308
3309 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3310
3311 case $INSTALL in
3312 (/*)
3313         ;;
3314 (*)
3315         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3316         test -z "$cf_dir" && cf_dir=.
3317         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3318         ;;
3319 esac
3320
3321 for ac_prog in tdlint lint alint splint lclint
3322 do
3323   # Extract the first word of "$ac_prog", so it can be a program name with args.
3324 set dummy $ac_prog; ac_word=$2
3325 echo "$as_me:3325: checking for $ac_word" >&5
3326 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3327 if test "${ac_cv_prog_LINT+set}" = set; then
3328   echo $ECHO_N "(cached) $ECHO_C" >&6
3329 else
3330   if test -n "$LINT"; then
3331   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3332 else
3333   ac_save_IFS=$IFS; IFS=$ac_path_separator
3334 ac_dummy="$PATH"
3335 for ac_dir in $ac_dummy; do
3336   IFS=$ac_save_IFS
3337   test -z "$ac_dir" && ac_dir=.
3338   $as_executable_p "$ac_dir/$ac_word" || continue
3339 ac_cv_prog_LINT="$ac_prog"
3340 echo "$as_me:3340: found $ac_dir/$ac_word" >&5
3341 break
3342 done
3343
3344 fi
3345 fi
3346 LINT=$ac_cv_prog_LINT
3347 if test -n "$LINT"; then
3348   echo "$as_me:3348: result: $LINT" >&5
3349 echo "${ECHO_T}$LINT" >&6
3350 else
3351   echo "$as_me:3351: result: no" >&5
3352 echo "${ECHO_T}no" >&6
3353 fi
3354
3355   test -n "$LINT" && break
3356 done
3357
3358 echo "$as_me:3358: checking whether ln -s works" >&5
3359 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3360 LN_S=$as_ln_s
3361 if test "$LN_S" = "ln -s"; then
3362   echo "$as_me:3362: result: yes" >&5
3363 echo "${ECHO_T}yes" >&6
3364 else
3365   echo "$as_me:3365: result: no, using $LN_S" >&5
3366 echo "${ECHO_T}no, using $LN_S" >&6
3367 fi
3368
3369 echo "$as_me:3369: checking if $LN_S -f options work" >&5
3370 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3371
3372 rm -f conf$$.src conf$$dst
3373 echo >conf$$.dst
3374 echo first >conf$$.src
3375 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3376         cf_prog_ln_sf=yes
3377 else
3378         cf_prog_ln_sf=no
3379 fi
3380 rm -f conf$$.dst conf$$src
3381 echo "$as_me:3381: result: $cf_prog_ln_sf" >&5
3382 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3383
3384 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3385
3386 echo "$as_me:3386: checking for long file names" >&5
3387 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3388 if test "${ac_cv_sys_long_file_names+set}" = set; then
3389   echo $ECHO_N "(cached) $ECHO_C" >&6
3390 else
3391   ac_cv_sys_long_file_names=yes
3392 # Test for long file names in all the places we know might matter:
3393 #      .                the current directory, where building will happen
3394 #      $prefix/lib      where we will be installing things
3395 #      $exec_prefix/lib likewise
3396 # eval it to expand exec_prefix.
3397 #      $TMPDIR          if set, where it might want to write temporary files
3398 # if $TMPDIR is not set:
3399 #      /tmp             where it might want to write temporary files
3400 #      /var/tmp         likewise
3401 #      /usr/tmp         likewise
3402 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3403   ac_tmpdirs=$TMPDIR
3404 else
3405   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3406 fi
3407 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3408   test -d $ac_dir || continue
3409   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3410   ac_xdir=$ac_dir/cf$$
3411   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3412   ac_tf1=$ac_xdir/conftest9012345
3413   ac_tf2=$ac_xdir/conftest9012346
3414   (echo 1 >$ac_tf1) 2>/dev/null
3415   (echo 2 >$ac_tf2) 2>/dev/null
3416   ac_val=`cat $ac_tf1 2>/dev/null`
3417   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3418     ac_cv_sys_long_file_names=no
3419     rm -rf $ac_xdir 2>/dev/null
3420     break
3421   fi
3422   rm -rf $ac_xdir 2>/dev/null
3423 done
3424 fi
3425 echo "$as_me:3425: result: $ac_cv_sys_long_file_names" >&5
3426 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3427 if test $ac_cv_sys_long_file_names = yes; then
3428
3429 cat >>confdefs.h <<\EOF
3430 #define HAVE_LONG_FILE_NAMES 1
3431 EOF
3432
3433 fi
3434
3435 # if we find pkg-config, check if we should install the ".pc" files.
3436
3437 echo "$as_me:3437: checking if you want to use pkg-config" >&5
3438 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3439
3440 # Check whether --with-pkg-config or --without-pkg-config was given.
3441 if test "${with_pkg_config+set}" = set; then
3442   withval="$with_pkg_config"
3443   cf_pkg_config=$withval
3444 else
3445   cf_pkg_config=yes
3446 fi;
3447 echo "$as_me:3447: result: $cf_pkg_config" >&5
3448 echo "${ECHO_T}$cf_pkg_config" >&6
3449
3450 case $cf_pkg_config in
3451 (no)
3452         PKG_CONFIG=none
3453         ;;
3454 (yes)
3455
3456 if test -n "$ac_tool_prefix"; then
3457   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3458 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3459 echo "$as_me:3459: checking for $ac_word" >&5
3460 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3461 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3462   echo $ECHO_N "(cached) $ECHO_C" >&6
3463 else
3464   case $PKG_CONFIG in
3465   [\\/]* | ?:[\\/]*)
3466   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3467   ;;
3468   *)
3469   ac_save_IFS=$IFS; IFS=$ac_path_separator
3470 ac_dummy="$PATH"
3471 for ac_dir in $ac_dummy; do
3472   IFS=$ac_save_IFS
3473   test -z "$ac_dir" && ac_dir=.
3474   if $as_executable_p "$ac_dir/$ac_word"; then
3475    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3476    echo "$as_me:3476: found $ac_dir/$ac_word" >&5
3477    break
3478 fi
3479 done
3480
3481   ;;
3482 esac
3483 fi
3484 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3485
3486 if test -n "$PKG_CONFIG"; then
3487   echo "$as_me:3487: result: $PKG_CONFIG" >&5
3488 echo "${ECHO_T}$PKG_CONFIG" >&6
3489 else
3490   echo "$as_me:3490: result: no" >&5
3491 echo "${ECHO_T}no" >&6
3492 fi
3493
3494 fi
3495 if test -z "$ac_cv_path_PKG_CONFIG"; then
3496   ac_pt_PKG_CONFIG=$PKG_CONFIG
3497   # Extract the first word of "pkg-config", so it can be a program name with args.
3498 set dummy pkg-config; ac_word=$2
3499 echo "$as_me:3499: checking for $ac_word" >&5
3500 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3501 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3502   echo $ECHO_N "(cached) $ECHO_C" >&6
3503 else
3504   case $ac_pt_PKG_CONFIG in
3505   [\\/]* | ?:[\\/]*)
3506   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3507   ;;
3508   *)
3509   ac_save_IFS=$IFS; IFS=$ac_path_separator
3510 ac_dummy="$PATH"
3511 for ac_dir in $ac_dummy; do
3512   IFS=$ac_save_IFS
3513   test -z "$ac_dir" && ac_dir=.
3514   if $as_executable_p "$ac_dir/$ac_word"; then
3515    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3516    echo "$as_me:3516: found $ac_dir/$ac_word" >&5
3517    break
3518 fi
3519 done
3520
3521   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3522   ;;
3523 esac
3524 fi
3525 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3526
3527 if test -n "$ac_pt_PKG_CONFIG"; then
3528   echo "$as_me:3528: result: $ac_pt_PKG_CONFIG" >&5
3529 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3530 else
3531   echo "$as_me:3531: result: no" >&5
3532 echo "${ECHO_T}no" >&6
3533 fi
3534
3535   PKG_CONFIG=$ac_pt_PKG_CONFIG
3536 else
3537   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3538 fi
3539
3540         ;;
3541 (*)
3542         PKG_CONFIG=$withval
3543         ;;
3544 esac
3545
3546 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3547 if test "$PKG_CONFIG" != none ; then
3548
3549 if test "x$prefix" != xNONE; then
3550         cf_path_syntax="$prefix"
3551 else
3552         cf_path_syntax="$ac_default_prefix"
3553 fi
3554
3555 case ".$PKG_CONFIG" in
3556 (.\$\(*\)*|.\'*\'*)
3557         ;;
3558 (..|./*|.\\*)
3559         ;;
3560 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3561         ;;
3562 (.\${*prefix}*|.\${*dir}*)
3563         eval PKG_CONFIG="$PKG_CONFIG"
3564         case ".$PKG_CONFIG" in
3565         (.NONE/*)
3566                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3567                 ;;
3568         esac
3569         ;;
3570 (.no|.NONE/*)
3571         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3572         ;;
3573 (*)
3574         { { echo "$as_me:3574: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3575 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3576    { (exit 1); exit 1; }; }
3577         ;;
3578 esac
3579
3580 elif test "x$cf_pkg_config" != xno ; then
3581         { echo "$as_me:3581: WARNING: pkg-config is not installed" >&5
3582 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3583 fi
3584
3585 case $PKG_CONFIG in
3586 (no|none|yes)
3587         echo "$as_me:3587: checking for pkg-config library directory" >&5
3588 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3589         ;;
3590 (*)
3591         echo "$as_me:3591: checking for $PKG_CONFIG library directory" >&5
3592 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3593         ;;
3594 esac
3595
3596 PKG_CONFIG_LIBDIR=no
3597
3598 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3599 if test "${with_pkg_config_libdir+set}" = set; then
3600   withval="$with_pkg_config_libdir"
3601   PKG_CONFIG_LIBDIR=$withval
3602 else
3603   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3604 fi;
3605
3606 case x$PKG_CONFIG_LIBDIR in
3607 (x/*)
3608         ;;
3609 (xyes)
3610         # Look for the library directory using the same prefix as the executable
3611         if test "x$PKG_CONFIG" = xnone
3612         then
3613                 cf_path=$prefix
3614         else
3615                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3616         fi
3617
3618         # If you don't like using the default architecture, you have to specify the
3619         # intended library directory and corresponding compiler/linker options.
3620         #
3621         # This case allows for Debian's 2014-flavor of multiarch, along with the
3622         # most common variations before that point.  Some other variants spell the
3623         # directory differently, e.g., "pkg-config", and put it in unusual places.
3624         # pkg-config has always been poorly standardized, which is ironic...
3625         case x`(arch) 2>/dev/null` in
3626         (*64)
3627                 cf_search_path="\
3628                         $cf_path/lib/*64-linux-gnu \
3629                         $cf_path/share \
3630                         $cf_path/lib64 \
3631                         $cf_path/lib32 \
3632                         $cf_path/lib"
3633                 ;;
3634         (*)
3635                 cf_search_path="\
3636                         $cf_path/lib/*-linux-gnu \
3637                         $cf_path/share \
3638                         $cf_path/lib32 \
3639                         $cf_path/lib \
3640                         $cf_path/libdata"
3641                 ;;
3642         esac
3643
3644         test -n "$verbose" && echo "    list..." 1>&6
3645
3646 echo "${as_me:-configure}:3646: testing list... ..." 1>&5
3647
3648         for cf_config in $cf_search_path
3649         do
3650                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3651
3652 echo "${as_me:-configure}:3652: testing checking $cf_config/pkgconfig ..." 1>&5
3653
3654                 if test -d $cf_config/pkgconfig
3655                 then
3656                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3657                         echo "$as_me:3657: checking done" >&5
3658 echo $ECHO_N "checking done... $ECHO_C" >&6
3659                         break
3660                 fi
3661         done
3662         ;;
3663 (*)
3664         ;;
3665 esac
3666
3667 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3668         echo "$as_me:3668: result: $PKG_CONFIG_LIBDIR" >&5
3669 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3670 fi
3671
3672 if test "x$PKG_CONFIG" != xnone
3673 then
3674         echo "$as_me:3674: checking if we should install .pc files for $PKG_CONFIG" >&5
3675 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3676 else
3677         echo "$as_me:3677: checking if we should install .pc files" >&5
3678 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3679 fi
3680
3681 # Check whether --enable-pc-files or --disable-pc-files was given.
3682 if test "${enable_pc_files+set}" = set; then
3683   enableval="$enable_pc_files"
3684   enable_pc_files=$enableval
3685 else
3686   enable_pc_files=no
3687 fi;
3688 echo "$as_me:3688: result: $enable_pc_files" >&5
3689 echo "${ECHO_T}$enable_pc_files" >&6
3690
3691 if test "x$enable_pc_files" != xno
3692 then
3693         MAKE_PC_FILES=
3694         case "x$PKG_CONFIG_LIBDIR" in
3695         (xno|xyes)
3696                 { echo "$as_me:3696: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3697 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3698                 ;;
3699         (*)
3700
3701 if test "x$prefix" != xNONE; then
3702         cf_path_syntax="$prefix"
3703 else
3704         cf_path_syntax="$ac_default_prefix"
3705 fi
3706
3707 case ".$PKG_CONFIG_LIBDIR" in
3708 (.\$\(*\)*|.\'*\'*)
3709         ;;
3710 (..|./*|.\\*)
3711         ;;
3712 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3713         ;;
3714 (.\${*prefix}*|.\${*dir}*)
3715         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3716         case ".$PKG_CONFIG_LIBDIR" in
3717         (.NONE/*)
3718                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3719                 ;;
3720         esac
3721         ;;
3722 (.no|.NONE/*)
3723         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3724         ;;
3725 (*)
3726         { { echo "$as_me:3726: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3727 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3728    { (exit 1); exit 1; }; }
3729         ;;
3730 esac
3731
3732                 ;;
3733         esac
3734 else
3735         MAKE_PC_FILES="#"
3736 fi
3737
3738 if test -z "$MAKE_PC_FILES"
3739 then
3740         echo "$as_me:3740: checking for suffix to add to pc-files" >&5
3741 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3742
3743 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3744 if test "${with_pc_suffix+set}" = set; then
3745   withval="$with_pc_suffix"
3746   case "x$withval" in
3747         (xyes|xno)
3748                 PC_MODULE_SUFFIX=
3749                 ;;
3750         (*)     PC_MODULE_SUFFIX="$withval"
3751                 ;;
3752         esac
3753 fi;
3754         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3755         echo "$as_me:3755: result: $PC_MODULE_SUFFIX" >&5
3756 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3757         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3758
3759 fi
3760
3761 echo "$as_me:3761: checking if we should assume mixed-case filenames" >&5
3762 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3763
3764 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3765 if test "${enable_mixed_case+set}" = set; then
3766   enableval="$enable_mixed_case"
3767   enable_mixedcase=$enableval
3768 else
3769   enable_mixedcase=auto
3770 fi;
3771 echo "$as_me:3771: result: $enable_mixedcase" >&5
3772 echo "${ECHO_T}$enable_mixedcase" >&6
3773 if test "$enable_mixedcase" = "auto" ; then
3774
3775 echo "$as_me:3775: checking if filesystem supports mixed-case filenames" >&5
3776 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3777 if test "${cf_cv_mixedcase+set}" = set; then
3778   echo $ECHO_N "(cached) $ECHO_C" >&6
3779 else
3780
3781 if test "$cross_compiling" = yes ; then
3782         case $target_alias in
3783         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3784                 cf_cv_mixedcase=no
3785                 ;;
3786         (*)
3787                 cf_cv_mixedcase=yes
3788                 ;;
3789         esac
3790 else
3791         rm -f conftest CONFTEST
3792         echo test >conftest
3793         if test -f CONFTEST ; then
3794                 cf_cv_mixedcase=no
3795         else
3796                 cf_cv_mixedcase=yes
3797         fi
3798         rm -f conftest CONFTEST
3799 fi
3800
3801 fi
3802 echo "$as_me:3802: result: $cf_cv_mixedcase" >&5
3803 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3804 test "$cf_cv_mixedcase" = yes &&
3805 cat >>confdefs.h <<\EOF
3806 #define MIXEDCASE_FILENAMES 1
3807 EOF
3808
3809 else
3810         cf_cv_mixedcase=$enable_mixedcase
3811         if test "x$enable_mixedcase" = "xyes" ; then
3812
3813 cat >>confdefs.h <<\EOF
3814 #define MIXEDCASE_FILENAMES 1
3815 EOF
3816
3817         fi
3818 fi
3819
3820 # do this after mixed-case option (tags/TAGS is not as important as tic).
3821 echo "$as_me:3821: checking whether ${MAKE-make} sets \${MAKE}" >&5
3822 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3823 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3824 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3825   echo $ECHO_N "(cached) $ECHO_C" >&6
3826 else
3827   cat >conftest.make <<\EOF
3828 all:
3829         @echo 'ac_maketemp="${MAKE}"'
3830 EOF
3831 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3832 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3833 if test -n "$ac_maketemp"; then
3834   eval ac_cv_prog_make_${ac_make}_set=yes
3835 else
3836   eval ac_cv_prog_make_${ac_make}_set=no
3837 fi
3838 rm -f conftest.make
3839 fi
3840 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3841   echo "$as_me:3841: result: yes" >&5
3842 echo "${ECHO_T}yes" >&6
3843   SET_MAKE=
3844 else
3845   echo "$as_me:3845: result: no" >&5
3846 echo "${ECHO_T}no" >&6
3847   SET_MAKE="MAKE=${MAKE-make}"
3848 fi
3849
3850 for ac_prog in exctags ctags
3851 do
3852   # Extract the first word of "$ac_prog", so it can be a program name with args.
3853 set dummy $ac_prog; ac_word=$2
3854 echo "$as_me:3854: checking for $ac_word" >&5
3855 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3856 if test "${ac_cv_prog_CTAGS+set}" = set; then
3857   echo $ECHO_N "(cached) $ECHO_C" >&6
3858 else
3859   if test -n "$CTAGS"; then
3860   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3861 else
3862   ac_save_IFS=$IFS; IFS=$ac_path_separator
3863 ac_dummy="$PATH"
3864 for ac_dir in $ac_dummy; do
3865   IFS=$ac_save_IFS
3866   test -z "$ac_dir" && ac_dir=.
3867   $as_executable_p "$ac_dir/$ac_word" || continue
3868 ac_cv_prog_CTAGS="$ac_prog"
3869 echo "$as_me:3869: found $ac_dir/$ac_word" >&5
3870 break
3871 done
3872
3873 fi
3874 fi
3875 CTAGS=$ac_cv_prog_CTAGS
3876 if test -n "$CTAGS"; then
3877   echo "$as_me:3877: result: $CTAGS" >&5
3878 echo "${ECHO_T}$CTAGS" >&6
3879 else
3880   echo "$as_me:3880: result: no" >&5
3881 echo "${ECHO_T}no" >&6
3882 fi
3883
3884   test -n "$CTAGS" && break
3885 done
3886
3887 for ac_prog in exetags etags
3888 do
3889   # Extract the first word of "$ac_prog", so it can be a program name with args.
3890 set dummy $ac_prog; ac_word=$2
3891 echo "$as_me:3891: checking for $ac_word" >&5
3892 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3893 if test "${ac_cv_prog_ETAGS+set}" = set; then
3894   echo $ECHO_N "(cached) $ECHO_C" >&6
3895 else
3896   if test -n "$ETAGS"; then
3897   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3898 else
3899   ac_save_IFS=$IFS; IFS=$ac_path_separator
3900 ac_dummy="$PATH"
3901 for ac_dir in $ac_dummy; do
3902   IFS=$ac_save_IFS
3903   test -z "$ac_dir" && ac_dir=.
3904   $as_executable_p "$ac_dir/$ac_word" || continue
3905 ac_cv_prog_ETAGS="$ac_prog"
3906 echo "$as_me:3906: found $ac_dir/$ac_word" >&5
3907 break
3908 done
3909
3910 fi
3911 fi
3912 ETAGS=$ac_cv_prog_ETAGS
3913 if test -n "$ETAGS"; then
3914   echo "$as_me:3914: result: $ETAGS" >&5
3915 echo "${ECHO_T}$ETAGS" >&6
3916 else
3917   echo "$as_me:3917: result: no" >&5
3918 echo "${ECHO_T}no" >&6
3919 fi
3920
3921   test -n "$ETAGS" && break
3922 done
3923
3924 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3925 set dummy ${CTAGS:-ctags}; ac_word=$2
3926 echo "$as_me:3926: checking for $ac_word" >&5
3927 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3928 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3929   echo $ECHO_N "(cached) $ECHO_C" >&6
3930 else
3931   if test -n "$MAKE_LOWER_TAGS"; then
3932   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3933 else
3934   ac_save_IFS=$IFS; IFS=$ac_path_separator
3935 ac_dummy="$PATH"
3936 for ac_dir in $ac_dummy; do
3937   IFS=$ac_save_IFS
3938   test -z "$ac_dir" && ac_dir=.
3939   $as_executable_p "$ac_dir/$ac_word" || continue
3940 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3941 echo "$as_me:3941: found $ac_dir/$ac_word" >&5
3942 break
3943 done
3944
3945   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3946 fi
3947 fi
3948 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3949 if test -n "$MAKE_LOWER_TAGS"; then
3950   echo "$as_me:3950: result: $MAKE_LOWER_TAGS" >&5
3951 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3952 else
3953   echo "$as_me:3953: result: no" >&5
3954 echo "${ECHO_T}no" >&6
3955 fi
3956
3957 if test "$cf_cv_mixedcase" = yes ; then
3958         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3959 set dummy ${ETAGS:-etags}; 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_MAKE_UPPER_TAGS+set}" = set; then
3963   echo $ECHO_N "(cached) $ECHO_C" >&6
3964 else
3965   if test -n "$MAKE_UPPER_TAGS"; then
3966   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # 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_MAKE_UPPER_TAGS="yes"
3975 echo "$as_me:3975: found $ac_dir/$ac_word" >&5
3976 break
3977 done
3978
3979   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3980 fi
3981 fi
3982 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3983 if test -n "$MAKE_UPPER_TAGS"; then
3984   echo "$as_me:3984: result: $MAKE_UPPER_TAGS" >&5
3985 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3986 else
3987   echo "$as_me:3987: result: no" >&5
3988 echo "${ECHO_T}no" >&6
3989 fi
3990
3991 else
3992         MAKE_UPPER_TAGS=no
3993 fi
3994
3995 if test "$MAKE_UPPER_TAGS" = yes ; then
3996         MAKE_UPPER_TAGS=
3997 else
3998         MAKE_UPPER_TAGS="#"
3999 fi
4000
4001 if test "$MAKE_LOWER_TAGS" = yes ; then
4002         MAKE_LOWER_TAGS=
4003 else
4004         MAKE_LOWER_TAGS="#"
4005 fi
4006
4007 echo "$as_me:4007: checking for makeflags variable" >&5
4008 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4009 if test "${cf_cv_makeflags+set}" = set; then
4010   echo $ECHO_N "(cached) $ECHO_C" >&6
4011 else
4012
4013         cf_cv_makeflags=''
4014         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4015         do
4016                 cat >cf_makeflags.tmp <<CF_EOF
4017 SHELL = $SHELL
4018 all :
4019         @ echo '.$cf_option'
4020 CF_EOF
4021                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4022                 case "$cf_result" in
4023                 (.*k|.*kw)
4024                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4025                         case "$cf_result" in
4026                         (.*CC=*)        cf_cv_makeflags=
4027                                 ;;
4028                         (*)     cf_cv_makeflags=$cf_option
4029                                 ;;
4030                         esac
4031                         break
4032                         ;;
4033                 (.-)    ;;
4034                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
4035                         ;;
4036                 esac
4037         done
4038         rm -f cf_makeflags.tmp
4039
4040 fi
4041 echo "$as_me:4041: result: $cf_cv_makeflags" >&5
4042 echo "${ECHO_T}$cf_cv_makeflags" >&6
4043
4044 if test -n "$ac_tool_prefix"; then
4045   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4046 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4047 echo "$as_me:4047: checking for $ac_word" >&5
4048 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4049 if test "${ac_cv_prog_RANLIB+set}" = set; then
4050   echo $ECHO_N "(cached) $ECHO_C" >&6
4051 else
4052   if test -n "$RANLIB"; then
4053   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4054 else
4055   ac_save_IFS=$IFS; IFS=$ac_path_separator
4056 ac_dummy="$PATH"
4057 for ac_dir in $ac_dummy; do
4058   IFS=$ac_save_IFS
4059   test -z "$ac_dir" && ac_dir=.
4060   $as_executable_p "$ac_dir/$ac_word" || continue
4061 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4062 echo "$as_me:4062: found $ac_dir/$ac_word" >&5
4063 break
4064 done
4065
4066 fi
4067 fi
4068 RANLIB=$ac_cv_prog_RANLIB
4069 if test -n "$RANLIB"; then
4070   echo "$as_me:4070: result: $RANLIB" >&5
4071 echo "${ECHO_T}$RANLIB" >&6
4072 else
4073   echo "$as_me:4073: result: no" >&5
4074 echo "${ECHO_T}no" >&6
4075 fi
4076
4077 fi
4078 if test -z "$ac_cv_prog_RANLIB"; then
4079   ac_ct_RANLIB=$RANLIB
4080   # Extract the first word of "ranlib", so it can be a program name with args.
4081 set dummy ranlib; ac_word=$2
4082 echo "$as_me:4082: checking for $ac_word" >&5
4083 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4084 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4085   echo $ECHO_N "(cached) $ECHO_C" >&6
4086 else
4087   if test -n "$ac_ct_RANLIB"; then
4088   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4089 else
4090   ac_save_IFS=$IFS; IFS=$ac_path_separator
4091 ac_dummy="$PATH"
4092 for ac_dir in $ac_dummy; do
4093   IFS=$ac_save_IFS
4094   test -z "$ac_dir" && ac_dir=.
4095   $as_executable_p "$ac_dir/$ac_word" || continue
4096 ac_cv_prog_ac_ct_RANLIB="ranlib"
4097 echo "$as_me:4097: found $ac_dir/$ac_word" >&5
4098 break
4099 done
4100
4101   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4102 fi
4103 fi
4104 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4105 if test -n "$ac_ct_RANLIB"; then
4106   echo "$as_me:4106: result: $ac_ct_RANLIB" >&5
4107 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4108 else
4109   echo "$as_me:4109: result: no" >&5
4110 echo "${ECHO_T}no" >&6
4111 fi
4112
4113   RANLIB=$ac_ct_RANLIB
4114 else
4115   RANLIB="$ac_cv_prog_RANLIB"
4116 fi
4117
4118 if test -n "$ac_tool_prefix"; then
4119   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4120 set dummy ${ac_tool_prefix}ld; ac_word=$2
4121 echo "$as_me:4121: checking for $ac_word" >&5
4122 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4123 if test "${ac_cv_prog_LD+set}" = set; then
4124   echo $ECHO_N "(cached) $ECHO_C" >&6
4125 else
4126   if test -n "$LD"; then
4127   ac_cv_prog_LD="$LD" # Let the user override the test.
4128 else
4129   ac_save_IFS=$IFS; IFS=$ac_path_separator
4130 ac_dummy="$PATH"
4131 for ac_dir in $ac_dummy; do
4132   IFS=$ac_save_IFS
4133   test -z "$ac_dir" && ac_dir=.
4134   $as_executable_p "$ac_dir/$ac_word" || continue
4135 ac_cv_prog_LD="${ac_tool_prefix}ld"
4136 echo "$as_me:4136: found $ac_dir/$ac_word" >&5
4137 break
4138 done
4139
4140 fi
4141 fi
4142 LD=$ac_cv_prog_LD
4143 if test -n "$LD"; then
4144   echo "$as_me:4144: result: $LD" >&5
4145 echo "${ECHO_T}$LD" >&6
4146 else
4147   echo "$as_me:4147: result: no" >&5
4148 echo "${ECHO_T}no" >&6
4149 fi
4150
4151 fi
4152 if test -z "$ac_cv_prog_LD"; then
4153   ac_ct_LD=$LD
4154   # Extract the first word of "ld", so it can be a program name with args.
4155 set dummy ld; ac_word=$2
4156 echo "$as_me:4156: checking for $ac_word" >&5
4157 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4158 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4159   echo $ECHO_N "(cached) $ECHO_C" >&6
4160 else
4161   if test -n "$ac_ct_LD"; then
4162   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4163 else
4164   ac_save_IFS=$IFS; IFS=$ac_path_separator
4165 ac_dummy="$PATH"
4166 for ac_dir in $ac_dummy; do
4167   IFS=$ac_save_IFS
4168   test -z "$ac_dir" && ac_dir=.
4169   $as_executable_p "$ac_dir/$ac_word" || continue
4170 ac_cv_prog_ac_ct_LD="ld"
4171 echo "$as_me:4171: found $ac_dir/$ac_word" >&5
4172 break
4173 done
4174
4175   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4176 fi
4177 fi
4178 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4179 if test -n "$ac_ct_LD"; then
4180   echo "$as_me:4180: result: $ac_ct_LD" >&5
4181 echo "${ECHO_T}$ac_ct_LD" >&6
4182 else
4183   echo "$as_me:4183: result: no" >&5
4184 echo "${ECHO_T}no" >&6
4185 fi
4186
4187   LD=$ac_ct_LD
4188 else
4189   LD="$ac_cv_prog_LD"
4190 fi
4191
4192 if test -n "$ac_tool_prefix"; then
4193   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4194 set dummy ${ac_tool_prefix}ar; ac_word=$2
4195 echo "$as_me:4195: checking for $ac_word" >&5
4196 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4197 if test "${ac_cv_prog_AR+set}" = set; then
4198   echo $ECHO_N "(cached) $ECHO_C" >&6
4199 else
4200   if test -n "$AR"; then
4201   ac_cv_prog_AR="$AR" # Let the user override the test.
4202 else
4203   ac_save_IFS=$IFS; IFS=$ac_path_separator
4204 ac_dummy="$PATH"
4205 for ac_dir in $ac_dummy; do
4206   IFS=$ac_save_IFS
4207   test -z "$ac_dir" && ac_dir=.
4208   $as_executable_p "$ac_dir/$ac_word" || continue
4209 ac_cv_prog_AR="${ac_tool_prefix}ar"
4210 echo "$as_me:4210: found $ac_dir/$ac_word" >&5
4211 break
4212 done
4213
4214 fi
4215 fi
4216 AR=$ac_cv_prog_AR
4217 if test -n "$AR"; then
4218   echo "$as_me:4218: result: $AR" >&5
4219 echo "${ECHO_T}$AR" >&6
4220 else
4221   echo "$as_me:4221: result: no" >&5
4222 echo "${ECHO_T}no" >&6
4223 fi
4224
4225 fi
4226 if test -z "$ac_cv_prog_AR"; then
4227   ac_ct_AR=$AR
4228   # Extract the first word of "ar", so it can be a program name with args.
4229 set dummy ar; ac_word=$2
4230 echo "$as_me:4230: checking for $ac_word" >&5
4231 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4232 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4233   echo $ECHO_N "(cached) $ECHO_C" >&6
4234 else
4235   if test -n "$ac_ct_AR"; then
4236   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4237 else
4238   ac_save_IFS=$IFS; IFS=$ac_path_separator
4239 ac_dummy="$PATH"
4240 for ac_dir in $ac_dummy; do
4241   IFS=$ac_save_IFS
4242   test -z "$ac_dir" && ac_dir=.
4243   $as_executable_p "$ac_dir/$ac_word" || continue
4244 ac_cv_prog_ac_ct_AR="ar"
4245 echo "$as_me:4245: found $ac_dir/$ac_word" >&5
4246 break
4247 done
4248
4249   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4250 fi
4251 fi
4252 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4253 if test -n "$ac_ct_AR"; then
4254   echo "$as_me:4254: result: $ac_ct_AR" >&5
4255 echo "${ECHO_T}$ac_ct_AR" >&6
4256 else
4257   echo "$as_me:4257: result: no" >&5
4258 echo "${ECHO_T}no" >&6
4259 fi
4260
4261   AR=$ac_ct_AR
4262 else
4263   AR="$ac_cv_prog_AR"
4264 fi
4265
4266 if test -n "$ac_tool_prefix"; then
4267   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4268 set dummy ${ac_tool_prefix}nm; ac_word=$2
4269 echo "$as_me:4269: checking for $ac_word" >&5
4270 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4271 if test "${ac_cv_prog_NM+set}" = set; then
4272   echo $ECHO_N "(cached) $ECHO_C" >&6
4273 else
4274   if test -n "$NM"; then
4275   ac_cv_prog_NM="$NM" # Let the user override the test.
4276 else
4277   ac_save_IFS=$IFS; IFS=$ac_path_separator
4278 ac_dummy="$PATH"
4279 for ac_dir in $ac_dummy; do
4280   IFS=$ac_save_IFS
4281   test -z "$ac_dir" && ac_dir=.
4282   $as_executable_p "$ac_dir/$ac_word" || continue
4283 ac_cv_prog_NM="${ac_tool_prefix}nm"
4284 echo "$as_me:4284: found $ac_dir/$ac_word" >&5
4285 break
4286 done
4287
4288 fi
4289 fi
4290 NM=$ac_cv_prog_NM
4291 if test -n "$NM"; then
4292   echo "$as_me:4292: result: $NM" >&5
4293 echo "${ECHO_T}$NM" >&6
4294 else
4295   echo "$as_me:4295: result: no" >&5
4296 echo "${ECHO_T}no" >&6
4297 fi
4298
4299 fi
4300 if test -z "$ac_cv_prog_NM"; then
4301   ac_ct_NM=$NM
4302   # Extract the first word of "nm", so it can be a program name with args.
4303 set dummy nm; ac_word=$2
4304 echo "$as_me:4304: checking for $ac_word" >&5
4305 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4306 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4307   echo $ECHO_N "(cached) $ECHO_C" >&6
4308 else
4309   if test -n "$ac_ct_NM"; then
4310   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4311 else
4312   ac_save_IFS=$IFS; IFS=$ac_path_separator
4313 ac_dummy="$PATH"
4314 for ac_dir in $ac_dummy; do
4315   IFS=$ac_save_IFS
4316   test -z "$ac_dir" && ac_dir=.
4317   $as_executable_p "$ac_dir/$ac_word" || continue
4318 ac_cv_prog_ac_ct_NM="nm"
4319 echo "$as_me:4319: found $ac_dir/$ac_word" >&5
4320 break
4321 done
4322
4323   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4324 fi
4325 fi
4326 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4327 if test -n "$ac_ct_NM"; then
4328   echo "$as_me:4328: result: $ac_ct_NM" >&5
4329 echo "${ECHO_T}$ac_ct_NM" >&6
4330 else
4331   echo "$as_me:4331: result: no" >&5
4332 echo "${ECHO_T}no" >&6
4333 fi
4334
4335   NM=$ac_ct_NM
4336 else
4337   NM="$ac_cv_prog_NM"
4338 fi
4339
4340 if test -n "$ac_tool_prefix"; then
4341   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4342 set dummy ${ac_tool_prefix}ar; ac_word=$2
4343 echo "$as_me:4343: checking for $ac_word" >&5
4344 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4345 if test "${ac_cv_prog_AR+set}" = set; then
4346   echo $ECHO_N "(cached) $ECHO_C" >&6
4347 else
4348   if test -n "$AR"; then
4349   ac_cv_prog_AR="$AR" # Let the user override the test.
4350 else
4351   ac_save_IFS=$IFS; IFS=$ac_path_separator
4352 ac_dummy="$PATH"
4353 for ac_dir in $ac_dummy; do
4354   IFS=$ac_save_IFS
4355   test -z "$ac_dir" && ac_dir=.
4356   $as_executable_p "$ac_dir/$ac_word" || continue
4357 ac_cv_prog_AR="${ac_tool_prefix}ar"
4358 echo "$as_me:4358: found $ac_dir/$ac_word" >&5
4359 break
4360 done
4361
4362 fi
4363 fi
4364 AR=$ac_cv_prog_AR
4365 if test -n "$AR"; then
4366   echo "$as_me:4366: result: $AR" >&5
4367 echo "${ECHO_T}$AR" >&6
4368 else
4369   echo "$as_me:4369: result: no" >&5
4370 echo "${ECHO_T}no" >&6
4371 fi
4372
4373 fi
4374 if test -z "$ac_cv_prog_AR"; then
4375   ac_ct_AR=$AR
4376   # Extract the first word of "ar", so it can be a program name with args.
4377 set dummy ar; ac_word=$2
4378 echo "$as_me:4378: checking for $ac_word" >&5
4379 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4380 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4381   echo $ECHO_N "(cached) $ECHO_C" >&6
4382 else
4383   if test -n "$ac_ct_AR"; then
4384   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4385 else
4386   ac_save_IFS=$IFS; IFS=$ac_path_separator
4387 ac_dummy="$PATH"
4388 for ac_dir in $ac_dummy; do
4389   IFS=$ac_save_IFS
4390   test -z "$ac_dir" && ac_dir=.
4391   $as_executable_p "$ac_dir/$ac_word" || continue
4392 ac_cv_prog_ac_ct_AR="ar"
4393 echo "$as_me:4393: found $ac_dir/$ac_word" >&5
4394 break
4395 done
4396
4397   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4398 fi
4399 fi
4400 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4401 if test -n "$ac_ct_AR"; then
4402   echo "$as_me:4402: result: $ac_ct_AR" >&5
4403 echo "${ECHO_T}$ac_ct_AR" >&6
4404 else
4405   echo "$as_me:4405: result: no" >&5
4406 echo "${ECHO_T}no" >&6
4407 fi
4408
4409   AR=$ac_ct_AR
4410 else
4411   AR="$ac_cv_prog_AR"
4412 fi
4413
4414 echo "$as_me:4414: checking for options to update archives" >&5
4415 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4416 if test "${cf_cv_ar_flags+set}" = set; then
4417   echo $ECHO_N "(cached) $ECHO_C" >&6
4418 else
4419
4420         cf_cv_ar_flags=unknown
4421         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4422         do
4423
4424                 # check if $ARFLAGS already contains this choice
4425                 if test "x$ARFLAGS" != "x" ; then
4426                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4427                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4428                                 cf_cv_ar_flags=
4429                                 break
4430                         fi
4431                 fi
4432
4433                 rm -f conftest.$ac_cv_objext
4434                 rm -f conftest.a
4435
4436                 cat >conftest.$ac_ext <<EOF
4437 #line 4437 "configure"
4438 int     testdata[3] = { 123, 456, 789 };
4439 EOF
4440                 if { (eval echo "$as_me:4440: \"$ac_compile\"") >&5
4441   (eval $ac_compile) 2>&5
4442   ac_status=$?
4443   echo "$as_me:4443: \$? = $ac_status" >&5
4444   (exit $ac_status); } ; then
4445                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4446                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4447                         if test -f conftest.a ; then
4448                                 cf_cv_ar_flags=$cf_ar_flags
4449                                 break
4450                         fi
4451                 else
4452                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4453
4454 echo "${as_me:-configure}:4454: testing cannot compile test-program ..." 1>&5
4455
4456                         break
4457                 fi
4458         done
4459         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4460
4461 fi
4462 echo "$as_me:4462: result: $cf_cv_ar_flags" >&5
4463 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4464
4465 if test -n "$ARFLAGS" ; then
4466         if test -n "$cf_cv_ar_flags" ; then
4467                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4468         fi
4469 else
4470         ARFLAGS=$cf_cv_ar_flags
4471 fi
4472
4473 echo "$as_me:4473: checking if you have specified an install-prefix" >&5
4474 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4475
4476 # Check whether --with-install-prefix or --without-install-prefix was given.
4477 if test "${with_install_prefix+set}" = set; then
4478   withval="$with_install_prefix"
4479   case "x$withval" in
4480         (xyes|xno)
4481                 ;;
4482         (*)     DESTDIR="$withval"
4483                 ;;
4484         esac
4485 fi;
4486 echo "$as_me:4486: result: $DESTDIR" >&5
4487 echo "${ECHO_T}$DESTDIR" >&6
4488
4489 ###############################################################################
4490
4491 # If we're cross-compiling, allow the user to override the tools and their
4492 # options.  The configure script is oriented toward identifying the host
4493 # compiler, etc., but we need a build compiler to generate parts of the source.
4494
4495 if test "$cross_compiling" = yes ; then
4496
4497         # defaults that we might want to override
4498         : ${BUILD_CFLAGS:=''}
4499         : ${BUILD_CPPFLAGS:=''}
4500         : ${BUILD_LDFLAGS:=''}
4501         : ${BUILD_LIBS:=''}
4502         : ${BUILD_EXEEXT:='$x'}
4503         : ${BUILD_OBJEXT:='o'}
4504
4505 # Check whether --with-build-cc or --without-build-cc was given.
4506 if test "${with_build_cc+set}" = set; then
4507   withval="$with_build_cc"
4508   BUILD_CC="$withval"
4509 else
4510   for ac_prog in gcc cc cl
4511 do
4512   # Extract the first word of "$ac_prog", so it can be a program name with args.
4513 set dummy $ac_prog; ac_word=$2
4514 echo "$as_me:4514: checking for $ac_word" >&5
4515 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4516 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4517   echo $ECHO_N "(cached) $ECHO_C" >&6
4518 else
4519   if test -n "$BUILD_CC"; then
4520   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4521 else
4522   ac_save_IFS=$IFS; IFS=$ac_path_separator
4523 ac_dummy="$PATH"
4524 for ac_dir in $ac_dummy; do
4525   IFS=$ac_save_IFS
4526   test -z "$ac_dir" && ac_dir=.
4527   $as_executable_p "$ac_dir/$ac_word" || continue
4528 ac_cv_prog_BUILD_CC="$ac_prog"
4529 echo "$as_me:4529: found $ac_dir/$ac_word" >&5
4530 break
4531 done
4532
4533 fi
4534 fi
4535 BUILD_CC=$ac_cv_prog_BUILD_CC
4536 if test -n "$BUILD_CC"; then
4537   echo "$as_me:4537: result: $BUILD_CC" >&5
4538 echo "${ECHO_T}$BUILD_CC" >&6
4539 else
4540   echo "$as_me:4540: result: no" >&5
4541 echo "${ECHO_T}no" >&6
4542 fi
4543
4544   test -n "$BUILD_CC" && break
4545 done
4546
4547 fi;
4548         echo "$as_me:4548: checking for native build C compiler" >&5
4549 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4550         echo "$as_me:4550: result: $BUILD_CC" >&5
4551 echo "${ECHO_T}$BUILD_CC" >&6
4552
4553         echo "$as_me:4553: checking for native build C preprocessor" >&5
4554 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4555
4556 # Check whether --with-build-cpp or --without-build-cpp was given.
4557 if test "${with_build_cpp+set}" = set; then
4558   withval="$with_build_cpp"
4559   BUILD_CPP="$withval"
4560 else
4561   BUILD_CPP='${BUILD_CC} -E'
4562 fi;
4563         echo "$as_me:4563: result: $BUILD_CPP" >&5
4564 echo "${ECHO_T}$BUILD_CPP" >&6
4565
4566         echo "$as_me:4566: checking for native build C flags" >&5
4567 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4568
4569 # Check whether --with-build-cflags or --without-build-cflags was given.
4570 if test "${with_build_cflags+set}" = set; then
4571   withval="$with_build_cflags"
4572   BUILD_CFLAGS="$withval"
4573 fi;
4574         echo "$as_me:4574: result: $BUILD_CFLAGS" >&5
4575 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4576
4577         echo "$as_me:4577: checking for native build C preprocessor-flags" >&5
4578 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4579
4580 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4581 if test "${with_build_cppflags+set}" = set; then
4582   withval="$with_build_cppflags"
4583   BUILD_CPPFLAGS="$withval"
4584 fi;
4585         echo "$as_me:4585: result: $BUILD_CPPFLAGS" >&5
4586 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4587
4588         echo "$as_me:4588: checking for native build linker-flags" >&5
4589 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4590
4591 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4592 if test "${with_build_ldflags+set}" = set; then
4593   withval="$with_build_ldflags"
4594   BUILD_LDFLAGS="$withval"
4595 fi;
4596         echo "$as_me:4596: result: $BUILD_LDFLAGS" >&5
4597 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4598
4599         echo "$as_me:4599: checking for native build linker-libraries" >&5
4600 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4601
4602 # Check whether --with-build-libs or --without-build-libs was given.
4603 if test "${with_build_libs+set}" = set; then
4604   withval="$with_build_libs"
4605   BUILD_LIBS="$withval"
4606 fi;
4607         echo "$as_me:4607: result: $BUILD_LIBS" >&5
4608 echo "${ECHO_T}$BUILD_LIBS" >&6
4609
4610         # this assumes we're on Unix.
4611         BUILD_EXEEXT=
4612         BUILD_OBJEXT=o
4613
4614         : ${BUILD_CC:='${CC}'}
4615
4616         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4617                 { { echo "$as_me:4617: error: Cross-build requires two compilers.
4618 Use --with-build-cc to specify the native compiler." >&5
4619 echo "$as_me: error: Cross-build requires two compilers.
4620 Use --with-build-cc to specify the native compiler." >&2;}
4621    { (exit 1); exit 1; }; }
4622         fi
4623
4624 else
4625         : ${BUILD_CC:='${CC}'}
4626         : ${BUILD_CPP:='${CPP}'}
4627         : ${BUILD_CFLAGS:='${CFLAGS}'}
4628         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4629         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4630         : ${BUILD_LIBS:='${LIBS}'}
4631         : ${BUILD_EXEEXT:='$x'}
4632         : ${BUILD_OBJEXT:='o'}
4633 fi
4634
4635 ###############################################################################
4636
4637 ### Options to allow the user to specify the set of libraries which are used.
4638 ### Use "--without-normal --with-shared" to allow the default model to be
4639 ### shared, for example.
4640 cf_list_models=""
4641
4642 echo "$as_me:4642: checking if libtool -version-number should be used" >&5
4643 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4644
4645 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4646 if test "${enable_libtool_version+set}" = set; then
4647   enableval="$enable_libtool_version"
4648   test "$enableval" != no && enableval=yes
4649         if test "$enableval" != "yes" ; then
4650     cf_libtool_version=no
4651         else
4652                 cf_libtool_version=yes
4653         fi
4654 else
4655   enableval=yes
4656         cf_libtool_version=yes
4657
4658 fi;
4659 echo "$as_me:4659: result: $cf_libtool_version" >&5
4660 echo "${ECHO_T}$cf_libtool_version" >&6
4661
4662 if test "$cf_libtool_version" = yes ; then
4663         LIBTOOL_VERSION="-version-number"
4664 else
4665         LIBTOOL_VERSION="-version-info"
4666         case "x$VERSION" in
4667         (x)
4668                 { echo "$as_me:4668: WARNING: VERSION was not set" >&5
4669 echo "$as_me: WARNING: VERSION was not set" >&2;}
4670                 ;;
4671         (x*.*.*)
4672                 ABI_VERSION="$VERSION"
4673                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4674
4675 echo "${as_me:-configure}:4675: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4676
4677                 ;;
4678         (x*:*:*)
4679                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4680                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4681
4682 echo "${as_me:-configure}:4682: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4683
4684                 ;;
4685         (*)
4686                 { echo "$as_me:4686: WARNING: unexpected VERSION value: $VERSION" >&5
4687 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4688                 ;;
4689         esac
4690 fi
4691
4692 LIBTOOL=
4693
4694 # common library maintenance symbols that are convenient for libtool scripts:
4695 LIB_CREATE='${AR} -cr'
4696 LIB_OBJECT='${OBJECTS}'
4697 LIB_SUFFIX=.a
4698 LIB_PREP="$RANLIB"
4699
4700 # symbols used to prop libtool up to enable it to determine what it should be
4701 # doing:
4702 LIB_CLEAN=
4703 LIB_COMPILE=
4704 LIB_LINK='${CC}'
4705 LIB_INSTALL=
4706 LIB_UNINSTALL=
4707
4708 echo "$as_me:4708: checking if you want to build libraries with libtool" >&5
4709 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4710
4711 # Check whether --with-libtool or --without-libtool was given.
4712 if test "${with_libtool+set}" = set; then
4713   withval="$with_libtool"
4714   with_libtool=$withval
4715 else
4716   with_libtool=no
4717 fi;
4718 echo "$as_me:4718: result: $with_libtool" >&5
4719 echo "${ECHO_T}$with_libtool" >&6
4720 if test "$with_libtool" != "no"; then
4721
4722         if test "$with_libtool" != "yes" ; then
4723
4724 if test "x$prefix" != xNONE; then
4725         cf_path_syntax="$prefix"
4726 else
4727         cf_path_syntax="$ac_default_prefix"
4728 fi
4729
4730 case ".$with_libtool" in
4731 (.\$\(*\)*|.\'*\'*)
4732         ;;
4733 (..|./*|.\\*)
4734         ;;
4735 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4736         ;;
4737 (.\${*prefix}*|.\${*dir}*)
4738         eval with_libtool="$with_libtool"
4739         case ".$with_libtool" in
4740         (.NONE/*)
4741                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4742                 ;;
4743         esac
4744         ;;
4745 (.no|.NONE/*)
4746         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4747         ;;
4748 (*)
4749         { { echo "$as_me:4749: error: expected a pathname, not \"$with_libtool\"" >&5
4750 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4751    { (exit 1); exit 1; }; }
4752         ;;
4753 esac
4754
4755                 LIBTOOL=$with_libtool
4756         else
4757                 if test -n "$ac_tool_prefix"; then
4758   for ac_prog in libtool glibtool
4759   do
4760     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4761 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4762 echo "$as_me:4762: checking for $ac_word" >&5
4763 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4764 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4765   echo $ECHO_N "(cached) $ECHO_C" >&6
4766 else
4767   if test -n "$LIBTOOL"; then
4768   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4769 else
4770   ac_save_IFS=$IFS; IFS=$ac_path_separator
4771 ac_dummy="$PATH"
4772 for ac_dir in $ac_dummy; do
4773   IFS=$ac_save_IFS
4774   test -z "$ac_dir" && ac_dir=.
4775   $as_executable_p "$ac_dir/$ac_word" || continue
4776 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4777 echo "$as_me:4777: found $ac_dir/$ac_word" >&5
4778 break
4779 done
4780
4781 fi
4782 fi
4783 LIBTOOL=$ac_cv_prog_LIBTOOL
4784 if test -n "$LIBTOOL"; then
4785   echo "$as_me:4785: result: $LIBTOOL" >&5
4786 echo "${ECHO_T}$LIBTOOL" >&6
4787 else
4788   echo "$as_me:4788: result: no" >&5
4789 echo "${ECHO_T}no" >&6
4790 fi
4791
4792     test -n "$LIBTOOL" && break
4793   done
4794 fi
4795 if test -z "$LIBTOOL"; then
4796   ac_ct_LIBTOOL=$LIBTOOL
4797   for ac_prog in libtool glibtool
4798 do
4799   # Extract the first word of "$ac_prog", so it can be a program name with args.
4800 set dummy $ac_prog; ac_word=$2
4801 echo "$as_me:4801: checking for $ac_word" >&5
4802 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4803 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4804   echo $ECHO_N "(cached) $ECHO_C" >&6
4805 else
4806   if test -n "$ac_ct_LIBTOOL"; then
4807   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4808 else
4809   ac_save_IFS=$IFS; IFS=$ac_path_separator
4810 ac_dummy="$PATH"
4811 for ac_dir in $ac_dummy; do
4812   IFS=$ac_save_IFS
4813   test -z "$ac_dir" && ac_dir=.
4814   $as_executable_p "$ac_dir/$ac_word" || continue
4815 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4816 echo "$as_me:4816: found $ac_dir/$ac_word" >&5
4817 break
4818 done
4819
4820 fi
4821 fi
4822 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4823 if test -n "$ac_ct_LIBTOOL"; then
4824   echo "$as_me:4824: result: $ac_ct_LIBTOOL" >&5
4825 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4826 else
4827   echo "$as_me:4827: result: no" >&5
4828 echo "${ECHO_T}no" >&6
4829 fi
4830
4831   test -n "$ac_ct_LIBTOOL" && break
4832 done
4833 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4834
4835   LIBTOOL=$ac_ct_LIBTOOL
4836 fi
4837
4838 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4839 then
4840         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.].*//'`
4841 else
4842         cf_cv_libtool_version=
4843 fi
4844 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4845
4846                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4847                 then
4848
4849 unset ac_cv_prog_ac_ct_LIBTOOL
4850 unset ac_ct_LIBTOOL
4851 unset LIBTOOL
4852
4853                         if test -n "$ac_tool_prefix"; then
4854   for ac_prog in glibtool
4855   do
4856     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4857 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4858 echo "$as_me:4858: checking for $ac_word" >&5
4859 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4860 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4861   echo $ECHO_N "(cached) $ECHO_C" >&6
4862 else
4863   if test -n "$LIBTOOL"; then
4864   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4865 else
4866   ac_save_IFS=$IFS; IFS=$ac_path_separator
4867 ac_dummy="$PATH"
4868 for ac_dir in $ac_dummy; do
4869   IFS=$ac_save_IFS
4870   test -z "$ac_dir" && ac_dir=.
4871   $as_executable_p "$ac_dir/$ac_word" || continue
4872 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4873 echo "$as_me:4873: found $ac_dir/$ac_word" >&5
4874 break
4875 done
4876
4877 fi
4878 fi
4879 LIBTOOL=$ac_cv_prog_LIBTOOL
4880 if test -n "$LIBTOOL"; then
4881   echo "$as_me:4881: result: $LIBTOOL" >&5
4882 echo "${ECHO_T}$LIBTOOL" >&6
4883 else
4884   echo "$as_me:4884: result: no" >&5
4885 echo "${ECHO_T}no" >&6
4886 fi
4887
4888     test -n "$LIBTOOL" && break
4889   done
4890 fi
4891 if test -z "$LIBTOOL"; then
4892   ac_ct_LIBTOOL=$LIBTOOL
4893   for ac_prog in glibtool
4894 do
4895   # Extract the first word of "$ac_prog", so it can be a program name with args.
4896 set dummy $ac_prog; ac_word=$2
4897 echo "$as_me:4897: checking for $ac_word" >&5
4898 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4899 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4900   echo $ECHO_N "(cached) $ECHO_C" >&6
4901 else
4902   if test -n "$ac_ct_LIBTOOL"; then
4903   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4904 else
4905   ac_save_IFS=$IFS; IFS=$ac_path_separator
4906 ac_dummy="$PATH"
4907 for ac_dir in $ac_dummy; do
4908   IFS=$ac_save_IFS
4909   test -z "$ac_dir" && ac_dir=.
4910   $as_executable_p "$ac_dir/$ac_word" || continue
4911 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4912 echo "$as_me:4912: found $ac_dir/$ac_word" >&5
4913 break
4914 done
4915
4916 fi
4917 fi
4918 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4919 if test -n "$ac_ct_LIBTOOL"; then
4920   echo "$as_me:4920: result: $ac_ct_LIBTOOL" >&5
4921 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4922 else
4923   echo "$as_me:4923: result: no" >&5
4924 echo "${ECHO_T}no" >&6
4925 fi
4926
4927   test -n "$ac_ct_LIBTOOL" && break
4928 done
4929 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4930
4931   LIBTOOL=$ac_ct_LIBTOOL
4932 fi
4933
4934 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4935 then
4936         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.].*//'`
4937 else
4938         cf_cv_libtool_version=
4939 fi
4940 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4941
4942                 fi
4943         fi
4944         if test -z "$LIBTOOL" ; then
4945                 { { echo "$as_me:4945: error: Cannot find libtool" >&5
4946 echo "$as_me: error: Cannot find libtool" >&2;}
4947    { (exit 1); exit 1; }; }
4948         fi
4949         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4950         LIB_OBJECT='${OBJECTS:.o=.lo}'
4951         LIB_SUFFIX=.la
4952         LIB_CLEAN='${LIBTOOL} --mode=clean'
4953         LIB_COMPILE='${LIBTOOL} --mode=compile'
4954         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4955         LIB_INSTALL='${LIBTOOL} --mode=install'
4956         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4957         LIB_PREP=:
4958
4959 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4960 then
4961         echo "$as_me:4961: checking version of $LIBTOOL" >&5
4962 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4963
4964 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4965 then
4966         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.].*//'`
4967 else
4968         cf_cv_libtool_version=
4969 fi
4970 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4971
4972         echo "$as_me:4972: result: $cf_cv_libtool_version" >&5
4973 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4974         if test -z "$cf_cv_libtool_version" ; then
4975                 { { echo "$as_me:4975: error: This is not GNU libtool" >&5
4976 echo "$as_me: error: This is not GNU libtool" >&2;}
4977    { (exit 1); exit 1; }; }
4978         fi
4979 else
4980         { { echo "$as_me:4980: error: GNU libtool has not been found" >&5
4981 echo "$as_me: error: GNU libtool has not been found" >&2;}
4982    { (exit 1); exit 1; }; }
4983 fi
4984
4985         # special hack to add -no-undefined (which libtool should do for itself)
4986         LT_UNDEF=
4987         case "$cf_cv_system_name" in
4988         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
4989                 LT_UNDEF=-no-undefined
4990                 ;;
4991         esac
4992
4993         # special hack to add --tag option for C++ compiler
4994         case $cf_cv_libtool_version in
4995         (1.[5-9]*|[2-9].[0-9.a-z]*)
4996                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4997                 LIBTOOL="$LIBTOOL --tag=CC"
4998                 ;;
4999         (*)
5000                 LIBTOOL_CXX="$LIBTOOL"
5001                 ;;
5002         esac
5003 else
5004         LIBTOOL=""
5005         LIBTOOL_CXX=""
5006 fi
5007
5008 test -z "$LIBTOOL" && ECHO_LT=
5009
5010 if test "$with_libtool" != "no" ; then
5011
5012 cf_list_models="$cf_list_models libtool"
5013
5014 else
5015
5016 echo "$as_me:5016: checking if you want to build shared libraries" >&5
5017 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5018
5019 # Check whether --with-shared or --without-shared was given.
5020 if test "${with_shared+set}" = set; then
5021   withval="$with_shared"
5022   with_shared=$withval
5023 else
5024   with_shared=no
5025 fi;
5026 echo "$as_me:5026: result: $with_shared" >&5
5027 echo "${ECHO_T}$with_shared" >&6
5028 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5029
5030 echo "$as_me:5030: checking if you want to build static libraries" >&5
5031 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5032
5033 # Check whether --with-normal or --without-normal was given.
5034 if test "${with_normal+set}" = set; then
5035   withval="$with_normal"
5036   with_normal=$withval
5037 else
5038   with_normal=yes
5039 fi;
5040 echo "$as_me:5040: result: $with_normal" >&5
5041 echo "${ECHO_T}$with_normal" >&6
5042 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5043
5044 echo "$as_me:5044: checking if you want to build debug libraries" >&5
5045 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5046
5047 # Check whether --with-debug or --without-debug was given.
5048 if test "${with_debug+set}" = set; then
5049   withval="$with_debug"
5050   with_debug=$withval
5051 else
5052   with_debug=yes
5053 fi;
5054 echo "$as_me:5054: result: $with_debug" >&5
5055 echo "${ECHO_T}$with_debug" >&6
5056 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5057
5058 echo "$as_me:5058: checking if you want to build profiling libraries" >&5
5059 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5060
5061 # Check whether --with-profile or --without-profile was given.
5062 if test "${with_profile+set}" = set; then
5063   withval="$with_profile"
5064   with_profile=$withval
5065 else
5066   with_profile=no
5067 fi;
5068 echo "$as_me:5068: result: $with_profile" >&5
5069 echo "${ECHO_T}$with_profile" >&6
5070 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5071
5072 fi
5073
5074 if test "X$cf_with_cxx_binding" != Xno; then
5075 if test "x$with_shared" = "xyes"; then
5076 echo "$as_me:5076: checking if you want to build C++ shared libraries" >&5
5077 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5078
5079 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5080 if test "${with_cxx_shared+set}" = set; then
5081   withval="$with_cxx_shared"
5082   with_shared_cxx=$withval
5083 else
5084   with_shared_cxx=no
5085 fi;
5086 echo "$as_me:5086: result: $with_shared_cxx" >&5
5087 echo "${ECHO_T}$with_shared_cxx" >&6
5088 fi
5089 fi
5090
5091 ###############################################################################
5092
5093 echo "$as_me:5093: checking for specified models" >&5
5094 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5095 test -z "$cf_list_models" && cf_list_models=normal
5096 test "$with_libtool" != "no" && cf_list_models=libtool
5097 echo "$as_me:5097: result: $cf_list_models" >&5
5098 echo "${ECHO_T}$cf_list_models" >&6
5099
5100 ### Use the first model as the default, and save its suffix for use in building
5101 ### up test-applications.
5102 echo "$as_me:5102: checking for default model" >&5
5103 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5104 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5105 echo "$as_me:5105: result: $DFT_LWR_MODEL" >&5
5106 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5107
5108 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5109
5110 TICS_NAME=tic
5111
5112 TINFO_NAME=tinfo
5113
5114 LIB_NAME=ncurses
5115
5116 LIB_DIR=../lib
5117 LIB_2ND=../../lib
5118
5119 echo "$as_me:5119: checking if you want to have a library-prefix" >&5
5120 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5121
5122 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5123 if test "${with_lib_prefix+set}" = set; then
5124   withval="$with_lib_prefix"
5125   with_lib_prefix=$withval
5126 else
5127   with_lib_prefix=auto
5128 fi;
5129 echo "$as_me:5129: result: $with_lib_prefix" >&5
5130 echo "${ECHO_T}$with_lib_prefix" >&6
5131
5132 if test $with_lib_prefix = auto
5133 then
5134
5135         case $cf_cv_system_name in
5136         (OS/2*|os2*)
5137                 if test "$DFT_LWR_MODEL" = libtool; then
5138                         LIB_PREFIX='lib'
5139                 else
5140                         LIB_PREFIX=''
5141                 fi
5142                 ;;
5143         (*)     LIB_PREFIX='lib'
5144                 ;;
5145         esac
5146 cf_prefix=$LIB_PREFIX
5147
5148 elif test $with_lib_prefix = no
5149 then
5150         LIB_PREFIX=
5151 else
5152         LIB_PREFIX=$with_lib_prefix
5153 fi
5154
5155 LIB_SUFFIX=
5156
5157         echo "$as_me:5157: checking for PATH separator" >&5
5158 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5159         case $cf_cv_system_name in
5160         (os2*)  PATH_SEPARATOR=';'  ;;
5161         (*)     ${PATH_SEPARATOR:=':'}  ;;
5162         esac
5163
5164         echo "$as_me:5164: result: $PATH_SEPARATOR" >&5
5165 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5166
5167 ###############################################################################
5168
5169 echo "$as_me:5169: checking if you want to build a separate terminfo library" >&5
5170 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5171
5172 # Check whether --with-termlib or --without-termlib was given.
5173 if test "${with_termlib+set}" = set; then
5174   withval="$with_termlib"
5175   with_termlib=$withval
5176 else
5177   with_termlib=no
5178 fi;
5179 echo "$as_me:5179: result: $with_termlib" >&5
5180 echo "${ECHO_T}$with_termlib" >&6
5181
5182 echo "$as_me:5182: checking if you want to build a separate tic library" >&5
5183 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5184
5185 # Check whether --with-ticlib or --without-ticlib was given.
5186 if test "${with_ticlib+set}" = set; then
5187   withval="$with_ticlib"
5188   with_ticlib=$withval
5189 else
5190   with_ticlib=no
5191 fi;
5192 echo "$as_me:5192: result: $with_ticlib" >&5
5193 echo "${ECHO_T}$with_ticlib" >&6
5194
5195 ### Checks for special libraries, must be done up-front.
5196 SHLIB_LIST=""
5197
5198 echo "$as_me:5198: checking if you want to link with the GPM mouse library" >&5
5199 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5200
5201 # Check whether --with-gpm or --without-gpm was given.
5202 if test "${with_gpm+set}" = set; then
5203   withval="$with_gpm"
5204   with_gpm=$withval
5205 else
5206   with_gpm=maybe
5207 fi;
5208 echo "$as_me:5208: result: $with_gpm" >&5
5209 echo "${ECHO_T}$with_gpm" >&6
5210
5211 if test "$with_gpm" != no ; then
5212         echo "$as_me:5212: checking for gpm.h" >&5
5213 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5214 if test "${ac_cv_header_gpm_h+set}" = set; then
5215   echo $ECHO_N "(cached) $ECHO_C" >&6
5216 else
5217   cat >conftest.$ac_ext <<_ACEOF
5218 #line 5218 "configure"
5219 #include "confdefs.h"
5220 #include <gpm.h>
5221 _ACEOF
5222 if { (eval echo "$as_me:5222: \"$ac_cpp conftest.$ac_ext\"") >&5
5223   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5224   ac_status=$?
5225   egrep -v '^ *\+' conftest.er1 >conftest.err
5226   rm -f conftest.er1
5227   cat conftest.err >&5
5228   echo "$as_me:5228: \$? = $ac_status" >&5
5229   (exit $ac_status); } >/dev/null; then
5230   if test -s conftest.err; then
5231     ac_cpp_err=$ac_c_preproc_warn_flag
5232   else
5233     ac_cpp_err=
5234   fi
5235 else
5236   ac_cpp_err=yes
5237 fi
5238 if test -z "$ac_cpp_err"; then
5239   ac_cv_header_gpm_h=yes
5240 else
5241   echo "$as_me: failed program was:" >&5
5242   cat conftest.$ac_ext >&5
5243   ac_cv_header_gpm_h=no
5244 fi
5245 rm -f conftest.err conftest.$ac_ext
5246 fi
5247 echo "$as_me:5247: result: $ac_cv_header_gpm_h" >&5
5248 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5249 if test $ac_cv_header_gpm_h = yes; then
5250
5251 cat >>confdefs.h <<\EOF
5252 #define HAVE_GPM_H 1
5253 EOF
5254
5255                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5256                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5257
5258 echo "${as_me:-configure}:5258: testing assuming we really have GPM library ..." 1>&5
5259
5260 cat >>confdefs.h <<\EOF
5261 #define HAVE_LIBGPM 1
5262 EOF
5263
5264                 else
5265                         echo "$as_me:5265: checking for Gpm_Open in -lgpm" >&5
5266 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5267 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5268   echo $ECHO_N "(cached) $ECHO_C" >&6
5269 else
5270   ac_check_lib_save_LIBS=$LIBS
5271 LIBS="-lgpm  $LIBS"
5272 cat >conftest.$ac_ext <<_ACEOF
5273 #line 5273 "configure"
5274 #include "confdefs.h"
5275
5276 /* Override any gcc2 internal prototype to avoid an error.  */
5277 #ifdef __cplusplus
5278 extern "C"
5279 #endif
5280 /* We use char because int might match the return type of a gcc2
5281    builtin and then its argument prototype would still apply.  */
5282 char Gpm_Open ();
5283 int
5284 main ()
5285 {
5286 Gpm_Open ();
5287   ;
5288   return 0;
5289 }
5290 _ACEOF
5291 rm -f conftest.$ac_objext conftest$ac_exeext
5292 if { (eval echo "$as_me:5292: \"$ac_link\"") >&5
5293   (eval $ac_link) 2>&5
5294   ac_status=$?
5295   echo "$as_me:5295: \$? = $ac_status" >&5
5296   (exit $ac_status); } &&
5297          { ac_try='test -s conftest$ac_exeext'
5298   { (eval echo "$as_me:5298: \"$ac_try\"") >&5
5299   (eval $ac_try) 2>&5
5300   ac_status=$?
5301   echo "$as_me:5301: \$? = $ac_status" >&5
5302   (exit $ac_status); }; }; then
5303   ac_cv_lib_gpm_Gpm_Open=yes
5304 else
5305   echo "$as_me: failed program was:" >&5
5306 cat conftest.$ac_ext >&5
5307 ac_cv_lib_gpm_Gpm_Open=no
5308 fi
5309 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5310 LIBS=$ac_check_lib_save_LIBS
5311 fi
5312 echo "$as_me:5312: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5313 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5314 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5315   :
5316 else
5317
5318                                 { { echo "$as_me:5318: error: Cannot link with GPM library" >&5
5319 echo "$as_me: error: Cannot link with GPM library" >&2;}
5320    { (exit 1); exit 1; }; }
5321                 fi
5322                 with_gpm=yes
5323
5324 fi
5325
5326 else
5327
5328                 test "$with_gpm" != maybe && { echo "$as_me:5328: WARNING: Cannot find GPM header" >&5
5329 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5330                 with_gpm=no
5331
5332 fi
5333
5334 fi
5335
5336 if test "$with_gpm" != no ; then
5337         echo "$as_me:5337: checking if you want to load GPM dynamically" >&5
5338 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5339
5340 # Check whether --with-dlsym or --without-dlsym was given.
5341 if test "${with_dlsym+set}" = set; then
5342   withval="$with_dlsym"
5343   with_dlsym=$withval
5344 else
5345   with_dlsym=yes
5346 fi;
5347         echo "$as_me:5347: result: $with_dlsym" >&5
5348 echo "${ECHO_T}$with_dlsym" >&6
5349         if test "x$with_dlsym" = xyes ; then
5350
5351 cf_have_dlsym=no
5352 echo "$as_me:5352: checking for dlsym" >&5
5353 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5354 if test "${ac_cv_func_dlsym+set}" = set; then
5355   echo $ECHO_N "(cached) $ECHO_C" >&6
5356 else
5357   cat >conftest.$ac_ext <<_ACEOF
5358 #line 5358 "configure"
5359 #include "confdefs.h"
5360 /* System header to define __stub macros and hopefully few prototypes,
5361     which can conflict with char dlsym (); below.  */
5362 #include <assert.h>
5363 /* Override any gcc2 internal prototype to avoid an error.  */
5364 #ifdef __cplusplus
5365 extern "C"
5366 #endif
5367 /* We use char because int might match the return type of a gcc2
5368    builtin and then its argument prototype would still apply.  */
5369 char dlsym ();
5370 char (*f) ();
5371
5372 int
5373 main ()
5374 {
5375 /* The GNU C library defines this for functions which it implements
5376     to always fail with ENOSYS.  Some functions are actually named
5377     something starting with __ and the normal name is an alias.  */
5378 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5379 choke me
5380 #else
5381 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5382 #endif
5383
5384   ;
5385   return 0;
5386 }
5387 _ACEOF
5388 rm -f conftest.$ac_objext conftest$ac_exeext
5389 if { (eval echo "$as_me:5389: \"$ac_link\"") >&5
5390   (eval $ac_link) 2>&5
5391   ac_status=$?
5392   echo "$as_me:5392: \$? = $ac_status" >&5
5393   (exit $ac_status); } &&
5394          { ac_try='test -s conftest$ac_exeext'
5395   { (eval echo "$as_me:5395: \"$ac_try\"") >&5
5396   (eval $ac_try) 2>&5
5397   ac_status=$?
5398   echo "$as_me:5398: \$? = $ac_status" >&5
5399   (exit $ac_status); }; }; then
5400   ac_cv_func_dlsym=yes
5401 else
5402   echo "$as_me: failed program was:" >&5
5403 cat conftest.$ac_ext >&5
5404 ac_cv_func_dlsym=no
5405 fi
5406 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5407 fi
5408 echo "$as_me:5408: result: $ac_cv_func_dlsym" >&5
5409 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5410 if test $ac_cv_func_dlsym = yes; then
5411   cf_have_dlsym=yes
5412 else
5413
5414 cf_have_libdl=no
5415 echo "$as_me:5415: checking for dlsym in -ldl" >&5
5416 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5417 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5418   echo $ECHO_N "(cached) $ECHO_C" >&6
5419 else
5420   ac_check_lib_save_LIBS=$LIBS
5421 LIBS="-ldl  $LIBS"
5422 cat >conftest.$ac_ext <<_ACEOF
5423 #line 5423 "configure"
5424 #include "confdefs.h"
5425
5426 /* Override any gcc2 internal prototype to avoid an error.  */
5427 #ifdef __cplusplus
5428 extern "C"
5429 #endif
5430 /* We use char because int might match the return type of a gcc2
5431    builtin and then its argument prototype would still apply.  */
5432 char dlsym ();
5433 int
5434 main ()
5435 {
5436 dlsym ();
5437   ;
5438   return 0;
5439 }
5440 _ACEOF
5441 rm -f conftest.$ac_objext conftest$ac_exeext
5442 if { (eval echo "$as_me:5442: \"$ac_link\"") >&5
5443   (eval $ac_link) 2>&5
5444   ac_status=$?
5445   echo "$as_me:5445: \$? = $ac_status" >&5
5446   (exit $ac_status); } &&
5447          { ac_try='test -s conftest$ac_exeext'
5448   { (eval echo "$as_me:5448: \"$ac_try\"") >&5
5449   (eval $ac_try) 2>&5
5450   ac_status=$?
5451   echo "$as_me:5451: \$? = $ac_status" >&5
5452   (exit $ac_status); }; }; then
5453   ac_cv_lib_dl_dlsym=yes
5454 else
5455   echo "$as_me: failed program was:" >&5
5456 cat conftest.$ac_ext >&5
5457 ac_cv_lib_dl_dlsym=no
5458 fi
5459 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5460 LIBS=$ac_check_lib_save_LIBS
5461 fi
5462 echo "$as_me:5462: result: $ac_cv_lib_dl_dlsym" >&5
5463 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5464 if test $ac_cv_lib_dl_dlsym = yes; then
5465
5466         cf_have_dlsym=yes
5467         cf_have_libdl=yes
5468 fi
5469
5470 fi
5471
5472 if test "$cf_have_dlsym" = yes ; then
5473         test "$cf_have_libdl" = yes && {
5474 cf_add_libs="-ldl"
5475 # Filter out duplicates - this happens with badly-designed ".pc" files...
5476 for cf_add_1lib in $LIBS
5477 do
5478         for cf_add_2lib in $cf_add_libs
5479         do
5480                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5481                 then
5482                         cf_add_1lib=
5483                         break
5484                 fi
5485         done
5486         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5487 done
5488 LIBS="$cf_add_libs"
5489  }
5490
5491         echo "$as_me:5491: checking whether able to link to dl*() functions" >&5
5492 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5493         cat >conftest.$ac_ext <<_ACEOF
5494 #line 5494 "configure"
5495 #include "confdefs.h"
5496 #include <dlfcn.h>
5497 int
5498 main ()
5499 {
5500
5501                 void *obj;
5502                 if ((obj = dlopen("filename", 0)) != 0) {
5503                         if (dlsym(obj, "symbolname") == 0) {
5504                         dlclose(obj);
5505                         }
5506                 }
5507   ;
5508   return 0;
5509 }
5510 _ACEOF
5511 rm -f conftest.$ac_objext conftest$ac_exeext
5512 if { (eval echo "$as_me:5512: \"$ac_link\"") >&5
5513   (eval $ac_link) 2>&5
5514   ac_status=$?
5515   echo "$as_me:5515: \$? = $ac_status" >&5
5516   (exit $ac_status); } &&
5517          { ac_try='test -s conftest$ac_exeext'
5518   { (eval echo "$as_me:5518: \"$ac_try\"") >&5
5519   (eval $ac_try) 2>&5
5520   ac_status=$?
5521   echo "$as_me:5521: \$? = $ac_status" >&5
5522   (exit $ac_status); }; }; then
5523
5524 cat >>confdefs.h <<\EOF
5525 #define HAVE_LIBDL 1
5526 EOF
5527
5528 else
5529   echo "$as_me: failed program was:" >&5
5530 cat conftest.$ac_ext >&5
5531
5532                 { { echo "$as_me:5532: error: Cannot link test program for libdl" >&5
5533 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5534    { (exit 1); exit 1; }; }
5535 fi
5536 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5537         echo "$as_me:5537: result: ok" >&5
5538 echo "${ECHO_T}ok" >&6
5539 else
5540         { { echo "$as_me:5540: error: Cannot find dlsym function" >&5
5541 echo "$as_me: error: Cannot find dlsym function" >&2;}
5542    { (exit 1); exit 1; }; }
5543 fi
5544
5545                 if test "x$with_gpm" != xyes ; then
5546                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5547
5548 echo "${as_me:-configure}:5548: testing assuming soname for gpm is $with_gpm ..." 1>&5
5549
5550                         cf_cv_gpm_soname="$with_gpm"
5551                 else
5552
5553 echo "$as_me:5553: checking for soname of gpm library" >&5
5554 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5555 if test "${cf_cv_gpm_soname+set}" = set; then
5556   echo $ECHO_N "(cached) $ECHO_C" >&6
5557 else
5558
5559 cf_cv_gpm_soname=unknown
5560 if test "$cross_compiling" != yes ; then
5561 cat >conftest.$ac_ext <<CF_EOF
5562 #include <gpm.h>
5563 int main()
5564 {
5565 if (Gpm_Open(0,0)) Gpm_Close();
5566         ${cf_cv_main_return:-return}(0);
5567 }
5568 CF_EOF
5569 cf_save_LIBS="$LIBS"
5570
5571 cf_add_libs="-lgpm"
5572 # Filter out duplicates - this happens with badly-designed ".pc" files...
5573 for cf_add_1lib in $LIBS
5574 do
5575         for cf_add_2lib in $cf_add_libs
5576         do
5577                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5578                 then
5579                         cf_add_1lib=
5580                         break
5581                 fi
5582         done
5583         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5584 done
5585 LIBS="$cf_add_libs"
5586
5587         if { (eval echo "$as_me:5587: \"$ac_compile\"") >&5
5588   (eval $ac_compile) 2>&5
5589   ac_status=$?
5590   echo "$as_me:5590: \$? = $ac_status" >&5
5591   (exit $ac_status); } ; then
5592                 if { (eval echo "$as_me:5592: \"$ac_link\"") >&5
5593   (eval $ac_link) 2>&5
5594   ac_status=$?
5595   echo "$as_me:5595: \$? = $ac_status" >&5
5596   (exit $ac_status); } ; then
5597                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5598                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5599                 fi
5600         fi
5601 rm -rf conftest*
5602 LIBS="$cf_save_LIBS"
5603 fi
5604
5605 fi
5606 echo "$as_me:5606: result: $cf_cv_gpm_soname" >&5
5607 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5608
5609                 fi
5610                 test "$cf_cv_gpm_soname" != "unknown" &&
5611 cat >>confdefs.h <<EOF
5612 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5613 EOF
5614
5615                 SHLIB_LIST="-ldl $SHLIB_LIST"
5616         else
5617                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5618
5619 cf_add_libs="-lgpm"
5620 # Filter out duplicates - this happens with badly-designed ".pc" files...
5621 for cf_add_1lib in $TEST_LIBS
5622 do
5623         for cf_add_2lib in $cf_add_libs
5624         do
5625                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5626                 then
5627                         cf_add_1lib=
5628                         break
5629                 fi
5630         done
5631         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5632 done
5633 TEST_LIBS="$cf_add_libs"
5634
5635         fi
5636
5637 cat >>confdefs.h <<\EOF
5638 #define HAVE_LIBGPM 1
5639 EOF
5640
5641 echo "$as_me:5641: checking for Gpm_Wgetch in -lgpm" >&5
5642 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5643 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5644   echo $ECHO_N "(cached) $ECHO_C" >&6
5645 else
5646   ac_check_lib_save_LIBS=$LIBS
5647 LIBS="-lgpm  $LIBS"
5648 cat >conftest.$ac_ext <<_ACEOF
5649 #line 5649 "configure"
5650 #include "confdefs.h"
5651
5652 /* Override any gcc2 internal prototype to avoid an error.  */
5653 #ifdef __cplusplus
5654 extern "C"
5655 #endif
5656 /* We use char because int might match the return type of a gcc2
5657    builtin and then its argument prototype would still apply.  */
5658 char Gpm_Wgetch ();
5659 int
5660 main ()
5661 {
5662 Gpm_Wgetch ();
5663   ;
5664   return 0;
5665 }
5666 _ACEOF
5667 rm -f conftest.$ac_objext conftest$ac_exeext
5668 if { (eval echo "$as_me:5668: \"$ac_link\"") >&5
5669   (eval $ac_link) 2>&5
5670   ac_status=$?
5671   echo "$as_me:5671: \$? = $ac_status" >&5
5672   (exit $ac_status); } &&
5673          { ac_try='test -s conftest$ac_exeext'
5674   { (eval echo "$as_me:5674: \"$ac_try\"") >&5
5675   (eval $ac_try) 2>&5
5676   ac_status=$?
5677   echo "$as_me:5677: \$? = $ac_status" >&5
5678   (exit $ac_status); }; }; then
5679   ac_cv_lib_gpm_Gpm_Wgetch=yes
5680 else
5681   echo "$as_me: failed program was:" >&5
5682 cat conftest.$ac_ext >&5
5683 ac_cv_lib_gpm_Gpm_Wgetch=no
5684 fi
5685 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5686 LIBS=$ac_check_lib_save_LIBS
5687 fi
5688 echo "$as_me:5688: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5689 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5690 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5691
5692 echo "$as_me:5692: checking if GPM is weakly bound to curses library" >&5
5693 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5694 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5695   echo $ECHO_N "(cached) $ECHO_C" >&6
5696 else
5697
5698 cf_cv_check_gpm_wgetch=unknown
5699 if test "$cross_compiling" != yes ; then
5700
5701 cat >conftest.$ac_ext <<CF_EOF
5702 #include <gpm.h>
5703 int main()
5704 {
5705         Gpm_Wgetch();
5706         ${cf_cv_main_return:-return}(0);
5707 }
5708 CF_EOF
5709
5710         cf_save_LIBS="$LIBS"
5711         # This only works if we can look at the symbol table.  If a shared
5712         # library is stripped for install, we cannot use that.  So we're forced
5713         # to rely on the static library, noting that some packagers may not
5714         # include it.
5715         LIBS="-static -lgpm -dynamic $LIBS"
5716         if { (eval echo "$as_me:5716: \"$ac_compile\"") >&5
5717   (eval $ac_compile) 2>&5
5718   ac_status=$?
5719   echo "$as_me:5719: \$? = $ac_status" >&5
5720   (exit $ac_status); } ; then
5721                 if { (eval echo "$as_me:5721: \"$ac_link\"") >&5
5722   (eval $ac_link) 2>&5
5723   ac_status=$?
5724   echo "$as_me:5724: \$? = $ac_status" >&5
5725   (exit $ac_status); } ; then
5726                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5727                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5728                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5729                 fi
5730         fi
5731         rm -rf conftest*
5732         LIBS="$cf_save_LIBS"
5733 fi
5734
5735 fi
5736 echo "$as_me:5736: result: $cf_cv_check_gpm_wgetch" >&5
5737 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5738
5739 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5740         { echo "$as_me:5740: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5741 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5742 fi
5743
5744 fi
5745
5746 fi
5747
5748 # not everyone has "test -c"
5749 if test -c /dev/sysmouse 2>/dev/null ; then
5750 echo "$as_me:5750: checking if you want to use sysmouse" >&5
5751 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5752
5753 # Check whether --with-sysmouse or --without-sysmouse was given.
5754 if test "${with_sysmouse+set}" = set; then
5755   withval="$with_sysmouse"
5756   cf_with_sysmouse=$withval
5757 else
5758   cf_with_sysmouse=maybe
5759 fi;
5760         if test "$cf_with_sysmouse" != no ; then
5761         cat >conftest.$ac_ext <<_ACEOF
5762 #line 5762 "configure"
5763 #include "confdefs.h"
5764
5765 #include <osreldate.h>
5766 #if (__FreeBSD_version >= 400017)
5767 #include <sys/consio.h>
5768 #include <sys/fbio.h>
5769 #else
5770 #include <machine/console.h>
5771 #endif
5772
5773 int
5774 main ()
5775 {
5776
5777         struct mouse_info the_mouse;
5778         ioctl(0, CONS_MOUSECTL, &the_mouse);
5779
5780   ;
5781   return 0;
5782 }
5783 _ACEOF
5784 rm -f conftest.$ac_objext
5785 if { (eval echo "$as_me:5785: \"$ac_compile\"") >&5
5786   (eval $ac_compile) 2>&5
5787   ac_status=$?
5788   echo "$as_me:5788: \$? = $ac_status" >&5
5789   (exit $ac_status); } &&
5790          { ac_try='test -s conftest.$ac_objext'
5791   { (eval echo "$as_me:5791: \"$ac_try\"") >&5
5792   (eval $ac_try) 2>&5
5793   ac_status=$?
5794   echo "$as_me:5794: \$? = $ac_status" >&5
5795   (exit $ac_status); }; }; then
5796   cf_with_sysmouse=yes
5797 else
5798   echo "$as_me: failed program was:" >&5
5799 cat conftest.$ac_ext >&5
5800 cf_with_sysmouse=no
5801 fi
5802 rm -f conftest.$ac_objext conftest.$ac_ext
5803         fi
5804 echo "$as_me:5804: result: $cf_with_sysmouse" >&5
5805 echo "${ECHO_T}$cf_with_sysmouse" >&6
5806 test "$cf_with_sysmouse" = yes &&
5807 cat >>confdefs.h <<\EOF
5808 #define USE_SYSMOUSE 1
5809 EOF
5810
5811 fi
5812
5813 if test X"$CC_G_OPT" = X"" ; then
5814         CC_G_OPT='-g'
5815         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5816 fi
5817
5818 if test X"$CXX_G_OPT" = X"" ; then
5819         CXX_G_OPT='-g'
5820         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5821 fi
5822
5823 echo "$as_me:5823: checking for default loader flags" >&5
5824 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5825 case $DFT_LWR_MODEL in
5826 (libtool) LD_MODEL=''   ;;
5827 (normal)  LD_MODEL=''   ;;
5828 (debug)   LD_MODEL=$CC_G_OPT ;;
5829 (profile) LD_MODEL='-pg';;
5830 (shared)  LD_MODEL=''   ;;
5831 esac
5832 echo "$as_me:5832: result: $LD_MODEL" >&5
5833 echo "${ECHO_T}$LD_MODEL" >&6
5834
5835 case $DFT_LWR_MODEL in
5836 (shared)
5837
5838 echo "$as_me:5838: checking if rpath option should be used" >&5
5839 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5840
5841 # Check whether --enable-rpath or --disable-rpath was given.
5842 if test "${enable_rpath+set}" = set; then
5843   enableval="$enable_rpath"
5844   cf_cv_enable_rpath=$enableval
5845 else
5846   cf_cv_enable_rpath=no
5847 fi;
5848 echo "$as_me:5848: result: $cf_cv_enable_rpath" >&5
5849 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5850
5851 echo "$as_me:5851: checking if shared libraries should be relinked during install" >&5
5852 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5853
5854 # Check whether --enable-relink or --disable-relink was given.
5855 if test "${enable_relink+set}" = set; then
5856   enableval="$enable_relink"
5857   cf_cv_do_relink=$enableval
5858 else
5859   cf_cv_do_relink=yes
5860 fi;
5861 echo "$as_me:5861: result: $cf_cv_do_relink" >&5
5862 echo "${ECHO_T}$cf_cv_do_relink" >&6
5863         ;;
5864 esac
5865
5866 # we will build libraries one-level down.
5867 rel_builddir=..
5868
5869 LD_RPATH_OPT=
5870 echo "$as_me:5870: checking for an rpath option" >&5
5871 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5872 case $cf_cv_system_name in
5873 (irix*)
5874         if test "$GCC" = yes; then
5875                 LD_RPATH_OPT="-Wl,-rpath,"
5876         else
5877                 LD_RPATH_OPT="-rpath "
5878         fi
5879         ;;
5880 (linux*|gnu*|k*bsd*-gnu|freebsd*)
5881         LD_RPATH_OPT="-Wl,-rpath,"
5882         ;;
5883 (openbsd[2-9].*|mirbsd*)
5884         LD_RPATH_OPT="-Wl,-rpath,"
5885         ;;
5886 (dragonfly*)
5887         LD_RPATH_OPT="-rpath "
5888         ;;
5889 (netbsd*)
5890         LD_RPATH_OPT="-Wl,-rpath,"
5891         ;;
5892 (osf*|mls+*)
5893         LD_RPATH_OPT="-rpath "
5894         ;;
5895 (solaris2*)
5896         LD_RPATH_OPT="-R"
5897         ;;
5898 (*)
5899         ;;
5900 esac
5901 echo "$as_me:5901: result: $LD_RPATH_OPT" >&5
5902 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5903
5904 case "x$LD_RPATH_OPT" in
5905 (x-R*)
5906         echo "$as_me:5906: checking if we need a space after rpath option" >&5
5907 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5908         cf_save_LIBS="$LIBS"
5909
5910 cf_add_libs="${LD_RPATH_OPT}$libdir"
5911 # Filter out duplicates - this happens with badly-designed ".pc" files...
5912 for cf_add_1lib in $LIBS
5913 do
5914         for cf_add_2lib in $cf_add_libs
5915         do
5916                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5917                 then
5918                         cf_add_1lib=
5919                         break
5920                 fi
5921         done
5922         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5923 done
5924 LIBS="$cf_add_libs"
5925
5926         cat >conftest.$ac_ext <<_ACEOF
5927 #line 5927 "configure"
5928 #include "confdefs.h"
5929
5930 int
5931 main ()
5932 {
5933
5934   ;
5935   return 0;
5936 }
5937 _ACEOF
5938 rm -f conftest.$ac_objext conftest$ac_exeext
5939 if { (eval echo "$as_me:5939: \"$ac_link\"") >&5
5940   (eval $ac_link) 2>&5
5941   ac_status=$?
5942   echo "$as_me:5942: \$? = $ac_status" >&5
5943   (exit $ac_status); } &&
5944          { ac_try='test -s conftest$ac_exeext'
5945   { (eval echo "$as_me:5945: \"$ac_try\"") >&5
5946   (eval $ac_try) 2>&5
5947   ac_status=$?
5948   echo "$as_me:5948: \$? = $ac_status" >&5
5949   (exit $ac_status); }; }; then
5950   cf_rpath_space=no
5951 else
5952   echo "$as_me: failed program was:" >&5
5953 cat conftest.$ac_ext >&5
5954 cf_rpath_space=yes
5955 fi
5956 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5957         LIBS="$cf_save_LIBS"
5958         echo "$as_me:5958: result: $cf_rpath_space" >&5
5959 echo "${ECHO_T}$cf_rpath_space" >&6
5960         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5961         ;;
5962 esac
5963
5964         RM_SHARED_OPTS=
5965         LOCAL_LDFLAGS=
5966         LOCAL_LDFLAGS2=
5967         LD_SHARED_OPTS=
5968         INSTALL_LIB="-m 644"
5969         : ${rel_builddir:=.}
5970
5971         shlibdir=$libdir
5972
5973         MAKE_DLLS="#"
5974
5975         cf_cv_do_symlinks=no
5976         cf_ld_rpath_opt=
5977         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5978
5979         echo "$as_me:5979: checking if release/abi version should be used for shared libs" >&5
5980 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5981
5982 # Check whether --with-shlib-version or --without-shlib-version was given.
5983 if test "${with_shlib_version+set}" = set; then
5984   withval="$with_shlib_version"
5985   test -z "$withval" && withval=auto
5986         case $withval in
5987         (yes)
5988                 cf_cv_shlib_version=auto
5989                 ;;
5990         (rel|abi|auto)
5991                 cf_cv_shlib_version=$withval
5992                 ;;
5993         (*)
5994                 echo "$as_me:5994: result: $withval" >&5
5995 echo "${ECHO_T}$withval" >&6
5996                 { { echo "$as_me:5996: error: option value must be one of: rel, abi, or auto" >&5
5997 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5998    { (exit 1); exit 1; }; }
5999                 ;;
6000         esac
6001
6002 else
6003   cf_cv_shlib_version=auto
6004 fi;
6005         echo "$as_me:6005: result: $cf_cv_shlib_version" >&5
6006 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6007
6008         cf_cv_rm_so_locs=no
6009         cf_try_cflags=
6010
6011         # Some less-capable ports of gcc support only -fpic
6012         CC_SHARED_OPTS=
6013         if test "$GCC" = yes
6014         then
6015                 echo "$as_me:6015: checking which $CC option to use" >&5
6016 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6017                 cf_save_CFLAGS="$CFLAGS"
6018                 for CC_SHARED_OPTS in -fPIC -fpic ''
6019                 do
6020                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6021                         cat >conftest.$ac_ext <<_ACEOF
6022 #line 6022 "configure"
6023 #include "confdefs.h"
6024 #include <stdio.h>
6025 int
6026 main ()
6027 {
6028 int x = 1
6029   ;
6030   return 0;
6031 }
6032 _ACEOF
6033 rm -f conftest.$ac_objext
6034 if { (eval echo "$as_me:6034: \"$ac_compile\"") >&5
6035   (eval $ac_compile) 2>&5
6036   ac_status=$?
6037   echo "$as_me:6037: \$? = $ac_status" >&5
6038   (exit $ac_status); } &&
6039          { ac_try='test -s conftest.$ac_objext'
6040   { (eval echo "$as_me:6040: \"$ac_try\"") >&5
6041   (eval $ac_try) 2>&5
6042   ac_status=$?
6043   echo "$as_me:6043: \$? = $ac_status" >&5
6044   (exit $ac_status); }; }; then
6045   break
6046 else
6047   echo "$as_me: failed program was:" >&5
6048 cat conftest.$ac_ext >&5
6049 fi
6050 rm -f conftest.$ac_objext conftest.$ac_ext
6051                 done
6052                 echo "$as_me:6052: result: $CC_SHARED_OPTS" >&5
6053 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6054                 CFLAGS="$cf_save_CFLAGS"
6055         fi
6056
6057         cf_cv_shlib_version_infix=no
6058
6059         case $cf_cv_system_name in
6060         (aix4.3-9*|aix[5-7]*)
6061                 if test "$GCC" = yes; then
6062                         CC_SHARED_OPTS='-Wl,-brtl'
6063                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6064                 else
6065                         CC_SHARED_OPTS='-brtl'
6066                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6067                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6068                 fi
6069                 ;;
6070         (beos*)
6071                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6072                 ;;
6073         (cygwin*)
6074                 CC_SHARED_OPTS=
6075                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6076                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6077                 cf_cv_shlib_version=cygdll
6078                 cf_cv_shlib_version_infix=cygdll
6079                 shlibdir=$bindir
6080                 MAKE_DLLS=
6081                 cat >mk_shared_lib.sh <<-CF_EOF
6082                 #!$SHELL
6083                 SHARED_LIB=\$1
6084                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6085                 shift
6086                 cat <<-EOF
6087                 Linking shared library
6088                 ** SHARED_LIB \$SHARED_LIB
6089                 ** IMPORT_LIB \$IMPORT_LIB
6090 EOF
6091                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6092 CF_EOF
6093                 chmod +x mk_shared_lib.sh
6094                 ;;
6095         (msys*)
6096                 CC_SHARED_OPTS=
6097                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6098                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6099                 cf_cv_shlib_version=msysdll
6100                 cf_cv_shlib_version_infix=msysdll
6101                 shlibdir=$bindir
6102                 MAKE_DLLS=
6103                 cat >mk_shared_lib.sh <<-CF_EOF
6104                 #!$SHELL
6105                 SHARED_LIB=\$1
6106                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6107                 shift
6108                 cat <<-EOF
6109                 Linking shared library
6110                 ** SHARED_LIB \$SHARED_LIB
6111                 ** IMPORT_LIB \$IMPORT_LIB
6112 EOF
6113                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6114 CF_EOF
6115                 chmod +x mk_shared_lib.sh
6116                 ;;
6117         (darwin*)
6118                 cf_try_cflags="no-cpp-precomp"
6119                 CC_SHARED_OPTS="-dynamic"
6120                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6121                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6122                 cf_cv_shlib_version_infix=yes
6123                 echo "$as_me:6123: checking if ld -search_paths_first works" >&5
6124 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6125 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6126   echo $ECHO_N "(cached) $ECHO_C" >&6
6127 else
6128
6129                         cf_save_LDFLAGS=$LDFLAGS
6130                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6131                         cat >conftest.$ac_ext <<_ACEOF
6132 #line 6132 "configure"
6133 #include "confdefs.h"
6134
6135 int
6136 main ()
6137 {
6138 int i;
6139   ;
6140   return 0;
6141 }
6142 _ACEOF
6143 rm -f conftest.$ac_objext conftest$ac_exeext
6144 if { (eval echo "$as_me:6144: \"$ac_link\"") >&5
6145   (eval $ac_link) 2>&5
6146   ac_status=$?
6147   echo "$as_me:6147: \$? = $ac_status" >&5
6148   (exit $ac_status); } &&
6149          { ac_try='test -s conftest$ac_exeext'
6150   { (eval echo "$as_me:6150: \"$ac_try\"") >&5
6151   (eval $ac_try) 2>&5
6152   ac_status=$?
6153   echo "$as_me:6153: \$? = $ac_status" >&5
6154   (exit $ac_status); }; }; then
6155   cf_cv_ldflags_search_paths_first=yes
6156 else
6157   echo "$as_me: failed program was:" >&5
6158 cat conftest.$ac_ext >&5
6159 cf_cv_ldflags_search_paths_first=no
6160 fi
6161 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6162                                 LDFLAGS=$cf_save_LDFLAGS
6163 fi
6164 echo "$as_me:6164: result: $cf_cv_ldflags_search_paths_first" >&5
6165 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6166                 if test $cf_cv_ldflags_search_paths_first = yes; then
6167                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6168                 fi
6169                 ;;
6170         (hpux[7-8]*)
6171                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6172                 if test "$GCC" != yes; then
6173                         CC_SHARED_OPTS='+Z'
6174                 fi
6175                 MK_SHARED_LIB='${LD} -b -o $@'
6176                 INSTALL_LIB="-m 555"
6177                 ;;
6178         (hpux*)
6179                 # (tested with gcc 2.7.2 -- I don't have c89)
6180                 if test "$GCC" = yes; then
6181                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6182                 else
6183                         CC_SHARED_OPTS='+Z'
6184                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6185                 fi
6186                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6187                 # HP-UX shared libraries must be executable, and should be
6188                 # readonly to exploit a quirk in the memory manager.
6189                 INSTALL_LIB="-m 555"
6190                 ;;
6191         (interix*)
6192                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6193                 if test "$cf_cv_shlib_version" = rel; then
6194                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6195                 else
6196                         cf_shared_soname='`basename `'
6197                 fi
6198                 CC_SHARED_OPTS=
6199                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6200                 ;;
6201         (irix*)
6202                 if test "$cf_cv_enable_rpath" = yes ; then
6203                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6204                 fi
6205                 # tested with IRIX 5.2 and 'cc'.
6206                 if test "$GCC" != yes; then
6207                         CC_SHARED_OPTS='-KPIC'
6208                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6209                 else
6210                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6211                 fi
6212                 cf_cv_rm_so_locs=yes
6213                 ;;
6214         (linux*|gnu*|k*bsd*-gnu)
6215                 if test "$DFT_LWR_MODEL" = "shared" ; then
6216                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6217                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6218                 fi
6219                 if test "$cf_cv_enable_rpath" = yes ; then
6220                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6221                 fi
6222
6223         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6224         if test "$cf_cv_shlib_version" = rel; then
6225                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6226         else
6227                 cf_cv_shared_soname='`basename $@`'
6228         fi
6229
6230                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6231                 ;;
6232         (mingw*)
6233                 cf_cv_shlib_version=mingw
6234                 cf_cv_shlib_version_infix=mingw
6235                 shlibdir=$bindir
6236                 MAKE_DLLS=
6237                 if test "$DFT_LWR_MODEL" = "shared" ; then
6238                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6239                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6240                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6241                 fi
6242                 CC_SHARED_OPTS=
6243                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6244                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6245                 cat >mk_shared_lib.sh <<-CF_EOF
6246                 #!$SHELL
6247                 SHARED_LIB=\$1
6248                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6249                 shift
6250                 cat <<-EOF
6251                 Linking shared library
6252                 ** SHARED_LIB \$SHARED_LIB
6253                 ** IMPORT_LIB \$IMPORT_LIB
6254 EOF
6255                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6256 CF_EOF
6257                 chmod +x mk_shared_lib.sh
6258                 ;;
6259         (openbsd[2-9].*|mirbsd*)
6260                 if test "$DFT_LWR_MODEL" = "shared" ; then
6261                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6262                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6263                 fi
6264                 if test "$cf_cv_enable_rpath" = yes ; then
6265                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6266                 fi
6267                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6268
6269         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6270         if test "$cf_cv_shlib_version" = rel; then
6271                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6272         else
6273                 cf_cv_shared_soname='`basename $@`'
6274         fi
6275
6276                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6277                 ;;
6278         (nto-qnx*|openbsd*|freebsd[12].*)
6279                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6280                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6281                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6282                 ;;
6283         (dragonfly*|freebsd*)
6284                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6285                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6286                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6287                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6288                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6289                 fi
6290
6291         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6292         if test "$cf_cv_shlib_version" = rel; then
6293                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6294         else
6295                 cf_cv_shared_soname='`basename $@`'
6296         fi
6297
6298                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6299                 ;;
6300         (netbsd*)
6301                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6302                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6303                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6304                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6305                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6306                         if test "$cf_cv_shlib_version" = auto; then
6307                         if test -f /usr/libexec/ld.elf_so; then
6308                                 cf_cv_shlib_version=abi
6309                         else
6310                                 cf_cv_shlib_version=rel
6311                         fi
6312                         fi
6313
6314         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6315         if test "$cf_cv_shlib_version" = rel; then
6316                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6317         else
6318                 cf_cv_shared_soname='`basename $@`'
6319         fi
6320
6321                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6322                 else
6323                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6324                 fi
6325                 ;;
6326         (osf*|mls+*)
6327                 # tested with OSF/1 V3.2 and 'cc'
6328                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6329                 # link with shared libs).
6330                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6331                 case $host_os in
6332                 (osf4*)
6333                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6334                         ;;
6335                 esac
6336                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6337                 if test "$DFT_LWR_MODEL" = "shared" ; then
6338                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6339                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6340                 fi
6341                 cf_cv_rm_so_locs=yes
6342                 ;;
6343         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6344                 # tested with osr5.0.5
6345                 if test "$GCC" != yes; then
6346                         CC_SHARED_OPTS='-belf -KPIC'
6347                 fi
6348                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6349                 if test "$cf_cv_enable_rpath" = yes ; then
6350                         # only way is to set LD_RUN_PATH but no switch for it
6351                         RUN_PATH=$libdir
6352                 fi
6353                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6354                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6355                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6356                 ;;
6357         (sunos4*)
6358                 # tested with SunOS 4.1.1 and gcc 2.7.0
6359                 if test "$GCC" != yes; then
6360                         CC_SHARED_OPTS='-KPIC'
6361                 fi
6362                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6363                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6364                 ;;
6365         (solaris2*)
6366                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6367                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6368                 if test "$DFT_LWR_MODEL" = "shared" ; then
6369                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6370                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6371                 fi
6372                 if test "$cf_cv_enable_rpath" = yes ; then
6373                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6374                 fi
6375
6376         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6377         if test "$cf_cv_shlib_version" = rel; then
6378                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6379         else
6380                 cf_cv_shared_soname='`basename $@`'
6381         fi
6382
6383                 if test "$GCC" != yes; then
6384                         cf_save_CFLAGS="$CFLAGS"
6385                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6386                         do
6387                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6388                                 cat >conftest.$ac_ext <<_ACEOF
6389 #line 6389 "configure"
6390 #include "confdefs.h"
6391 #include <stdio.h>
6392 int
6393 main ()
6394 {
6395 printf("Hello\n");
6396   ;
6397   return 0;
6398 }
6399 _ACEOF
6400 rm -f conftest.$ac_objext
6401 if { (eval echo "$as_me:6401: \"$ac_compile\"") >&5
6402   (eval $ac_compile) 2>&5
6403   ac_status=$?
6404   echo "$as_me:6404: \$? = $ac_status" >&5
6405   (exit $ac_status); } &&
6406          { ac_try='test -s conftest.$ac_objext'
6407   { (eval echo "$as_me:6407: \"$ac_try\"") >&5
6408   (eval $ac_try) 2>&5
6409   ac_status=$?
6410   echo "$as_me:6410: \$? = $ac_status" >&5
6411   (exit $ac_status); }; }; then
6412   break
6413 else
6414   echo "$as_me: failed program was:" >&5
6415 cat conftest.$ac_ext >&5
6416 fi
6417 rm -f conftest.$ac_objext conftest.$ac_ext
6418                         done
6419                         CFLAGS="$cf_save_CFLAGS"
6420                         CC_SHARED_OPTS=$cf_shared_opts
6421                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6422                 else
6423                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6424                 fi
6425                 ;;
6426         (sysv5uw7*|unix_sv*)
6427                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6428                 if test "$GCC" != yes; then
6429                         CC_SHARED_OPTS='-KPIC'
6430                 fi
6431                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6432                 ;;
6433         (*)
6434                 CC_SHARED_OPTS='unknown'
6435                 MK_SHARED_LIB='echo unknown'
6436                 ;;
6437         esac
6438
6439         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6440         case "$cf_cv_shlib_version" in
6441         (rel|abi)
6442                 case "$MK_SHARED_LIB" in
6443                 (*'-o $@')
6444                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6445                         ;;
6446                 (*)
6447                         { echo "$as_me:6447: WARNING: ignored --with-shlib-version" >&5
6448 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6449                         ;;
6450                 esac
6451                 ;;
6452         esac
6453
6454         if test -n "$cf_try_cflags"
6455         then
6456 cat > conftest.$ac_ext <<EOF
6457 #line 6457 "${as_me:-configure}"
6458 #include <stdio.h>
6459 int main(int argc, char *argv[])
6460 {
6461         printf("hello\n");
6462         return (argv[argc-1] == 0) ;
6463 }
6464 EOF
6465                 cf_save_CFLAGS="$CFLAGS"
6466                 for cf_opt in $cf_try_cflags
6467                 do
6468                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6469                         echo "$as_me:6469: checking if CFLAGS option -$cf_opt works" >&5
6470 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6471                         if { (eval echo "$as_me:6471: \"$ac_compile\"") >&5
6472   (eval $ac_compile) 2>&5
6473   ac_status=$?
6474   echo "$as_me:6474: \$? = $ac_status" >&5
6475   (exit $ac_status); }; then
6476                                 echo "$as_me:6476: result: yes" >&5
6477 echo "${ECHO_T}yes" >&6
6478                                 cf_save_CFLAGS="$CFLAGS"
6479                         else
6480                                 echo "$as_me:6480: result: no" >&5
6481 echo "${ECHO_T}no" >&6
6482                         fi
6483                 done
6484                 CFLAGS="$cf_save_CFLAGS"
6485         fi
6486
6487         # RPATH_LIST is a colon-separated list of directories
6488         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6489         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6490
6491         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6492
6493         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6494
6495 echo "${as_me:-configure}:6495: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6496
6497         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6498
6499 echo "${as_me:-configure}:6499: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6500
6501 for model in $cf_list_models; do
6502         case $model in
6503         (libtool)
6504
6505 echo "$as_me:6505: checking for additional libtool options" >&5
6506 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6507
6508 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6509 if test "${with_libtool_opts+set}" = set; then
6510   withval="$with_libtool_opts"
6511   with_libtool_opts=$withval
6512 else
6513   with_libtool_opts=no
6514 fi;
6515 echo "$as_me:6515: result: $with_libtool_opts" >&5
6516 echo "${ECHO_T}$with_libtool_opts" >&6
6517
6518 case .$with_libtool_opts in
6519 (.yes|.no|.)
6520         ;;
6521 (*)
6522         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6523         ;;
6524 esac
6525
6526 echo "$as_me:6526: checking if exported-symbols file should be used" >&5
6527 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6528
6529 # Check whether --with-export-syms or --without-export-syms was given.
6530 if test "${with_export_syms+set}" = set; then
6531   withval="$with_export_syms"
6532   with_export_syms=$withval
6533 else
6534   with_export_syms=no
6535 fi;
6536 if test "x$with_export_syms" = xyes
6537 then
6538         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6539
6540 fi
6541 echo "$as_me:6541: result: $with_export_syms" >&5
6542 echo "${ECHO_T}$with_export_syms" >&6
6543 if test "x$with_export_syms" != xno
6544 then
6545         EXPORT_SYMS="-export-symbols $with_export_syms"
6546
6547 fi
6548
6549                 ;;
6550         (shared)
6551                 if test "$CC_SHARED_OPTS" = "unknown"; then
6552                         { { echo "$as_me:6552: error: Shared libraries are not supported in this version" >&5
6553 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6554    { (exit 1); exit 1; }; }
6555                 fi
6556                 # workaround for inept transition to PIE vs PIC...
6557                 echo "$as_me:6557: checking if current CFLAGS link properly" >&5
6558 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6559                 cat >conftest.$ac_ext <<_ACEOF
6560 #line 6560 "configure"
6561 #include "confdefs.h"
6562 #include <stdio.h>
6563 int
6564 main ()
6565 {
6566 printf("Hello work\n");
6567   ;
6568   return 0;
6569 }
6570 _ACEOF
6571 rm -f conftest.$ac_objext conftest$ac_exeext
6572 if { (eval echo "$as_me:6572: \"$ac_link\"") >&5
6573   (eval $ac_link) 2>&5
6574   ac_status=$?
6575   echo "$as_me:6575: \$? = $ac_status" >&5
6576   (exit $ac_status); } &&
6577          { ac_try='test -s conftest$ac_exeext'
6578   { (eval echo "$as_me:6578: \"$ac_try\"") >&5
6579   (eval $ac_try) 2>&5
6580   ac_status=$?
6581   echo "$as_me:6581: \$? = $ac_status" >&5
6582   (exit $ac_status); }; }; then
6583   cf_cflags_work=yes
6584 else
6585   echo "$as_me: failed program was:" >&5
6586 cat conftest.$ac_ext >&5
6587 cf_cflags_work=no
6588 fi
6589 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6590                 echo "$as_me:6590: result: $cf_cflags_work" >&5
6591 echo "${ECHO_T}$cf_cflags_work" >&6
6592                 if test "$cf_cflags_work" = no
6593                 then
6594                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6595
6596 echo "${as_me:-configure}:6596: testing try to work around by appending shared-options ..." 1>&5
6597
6598                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6599                 fi
6600
6601 echo "$as_me:6601: checking if versioned-symbols file should be used" >&5
6602 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6603
6604 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6605 if test "${with_versioned_syms+set}" = set; then
6606   withval="$with_versioned_syms"
6607   with_versioned_syms=$withval
6608 else
6609   with_versioned_syms=no
6610 fi;
6611 if test "x$with_versioned_syms" = xyes
6612 then
6613         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6614
6615 fi
6616 echo "$as_me:6616: result: $with_versioned_syms" >&5
6617 echo "${ECHO_T}$with_versioned_syms" >&6
6618
6619 RESULTING_SYMS=
6620 VERSIONED_SYMS=
6621 WILDCARD_SYMS=
6622
6623 if test "x$with_versioned_syms" != xno
6624 then
6625         RESULTING_SYMS=$with_versioned_syms
6626         case "x$MK_SHARED_LIB" in
6627         (*-Wl,*)
6628                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6629                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6630                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6631
6632 echo "${as_me:-configure}:6632: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6633
6634                 ;;
6635         (*-dy\ *)
6636                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6637                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6638                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6639
6640 echo "${as_me:-configure}:6640: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6641
6642                 ;;
6643         (*)
6644                 { echo "$as_me:6644: WARNING: this system does not support versioned-symbols" >&5
6645 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6646                 ;;
6647         esac
6648
6649         # Linux ld can selectively override scope, e.g., of symbols beginning with
6650         # "_" by first declaring some as global, and then using a wildcard to
6651         # declare the others as local.  Some other loaders cannot do this.  Check
6652         # by constructing a (very) simple shared library and inspecting its
6653         # symbols.
6654         if test "x$VERSIONED_SYMS" != "x"
6655         then
6656                 echo "$as_me:6656: checking if wildcards can be used to selectively omit symbols" >&5
6657 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6658                 WILDCARD_SYMS=no
6659
6660                 # make sources
6661                 rm -f conftest.*
6662
6663                 cat >conftest.ver <<EOF
6664 module_1.0 {
6665 global:
6666         globalf1;
6667 local:
6668         localf1;
6669 };
6670 module_2.0 {
6671 global:
6672         globalf2;
6673 local:
6674         localf2;
6675         _*;
6676 } module_1.0;
6677 submodule_1.0 {
6678 global:
6679         subglobalf1;
6680         _ismissing;
6681 local:
6682         sublocalf1;
6683 };
6684 submodule_2.0 {
6685 global:
6686         subglobalf2;
6687 local:
6688         sublocalf2;
6689         _*;
6690 } submodule_1.0;
6691 EOF
6692                 cat >conftest.$ac_ext <<EOF
6693 #line 6693 "configure"
6694 int     _ismissing(void) { return 1; }
6695 int     _localf1(void) { return 1; }
6696 int     _localf2(void) { return 2; }
6697 int     globalf1(void) { return 1; }
6698 int     globalf2(void) { return 2; }
6699 int     _sublocalf1(void) { return 1; }
6700 int     _sublocalf2(void) { return 2; }
6701 int     subglobalf1(void) { return 1; }
6702 int     subglobalf2(void) { return 2; }
6703 EOF
6704                 cat >conftest.mk <<EOF
6705 CC=${CC}
6706 CFLAGS=${CFLAGS}
6707 CPPFLAGS=${CPPFLAGS}
6708 LDFLAGS=${LDFLAGS}
6709 LIBS=${LIBS}
6710 VERSIONED_SYMS=${VERSIONED_SYMS}
6711 RESULTING_SYMS=conftest.ver
6712 MK_SHARED_LIB=${MK_SHARED_LIB}
6713 conftest.so: conftest.$ac_cv_objext
6714                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6715 EOF
6716
6717                 # compile source, make library
6718                 if make -f conftest.mk 2>&5 >/dev/null
6719                 then
6720                         # test for missing symbol in either Data or Text section
6721                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6722                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6723                 fi
6724                 echo "$as_me:6724: result: $WILDCARD_SYMS" >&5
6725 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6726                 rm -f conftest.*
6727         fi
6728 fi
6729
6730                 ;;
6731         esac
6732 done
6733
6734 # pretend that ncurses==ncursesw==ncursest
6735 echo "$as_me:6735: checking if you want to disable library suffixes" >&5
6736 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6737
6738 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6739 if test "${enable_lib_suffixes+set}" = set; then
6740   enableval="$enable_lib_suffixes"
6741   test "$enableval" != no && enableval=yes
6742         if test "$enableval" != "yes" ; then
6743     disable_lib_suffixes=yes
6744         else
6745                 disable_lib_suffixes=no
6746         fi
6747 else
6748   enableval=yes
6749         disable_lib_suffixes=no
6750
6751 fi;
6752 echo "$as_me:6752: result: $disable_lib_suffixes" >&5
6753 echo "${ECHO_T}$disable_lib_suffixes" >&6
6754
6755 ### If we're building with rpath, try to link non-standard libs that way too.
6756 if test "$DFT_LWR_MODEL" = "shared"; then
6757
6758 echo "$as_me:6758: checking if rpath-hack should be disabled" >&5
6759 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6760
6761 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6762 if test "${enable_rpath_hack+set}" = set; then
6763   enableval="$enable_rpath_hack"
6764   test "$enableval" != no && enableval=yes
6765         if test "$enableval" != "yes" ; then
6766     cf_disable_rpath_hack=yes
6767         else
6768                 cf_disable_rpath_hack=no
6769         fi
6770 else
6771   enableval=yes
6772         cf_disable_rpath_hack=no
6773
6774 fi;
6775 echo "$as_me:6775: result: $cf_disable_rpath_hack" >&5
6776 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6777 if test "$cf_disable_rpath_hack" = no ; then
6778
6779 echo "$as_me:6779: checking for updated LDFLAGS" >&5
6780 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6781 if test -n "$LD_RPATH_OPT" ; then
6782         echo "$as_me:6782: result: maybe" >&5
6783 echo "${ECHO_T}maybe" >&6
6784
6785         for ac_prog in ldd
6786 do
6787   # Extract the first word of "$ac_prog", so it can be a program name with args.
6788 set dummy $ac_prog; ac_word=$2
6789 echo "$as_me:6789: checking for $ac_word" >&5
6790 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6791 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6792   echo $ECHO_N "(cached) $ECHO_C" >&6
6793 else
6794   if test -n "$cf_ldd_prog"; then
6795   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6796 else
6797   ac_save_IFS=$IFS; IFS=$ac_path_separator
6798 ac_dummy="$PATH"
6799 for ac_dir in $ac_dummy; do
6800   IFS=$ac_save_IFS
6801   test -z "$ac_dir" && ac_dir=.
6802   $as_executable_p "$ac_dir/$ac_word" || continue
6803 ac_cv_prog_cf_ldd_prog="$ac_prog"
6804 echo "$as_me:6804: found $ac_dir/$ac_word" >&5
6805 break
6806 done
6807
6808 fi
6809 fi
6810 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6811 if test -n "$cf_ldd_prog"; then
6812   echo "$as_me:6812: result: $cf_ldd_prog" >&5
6813 echo "${ECHO_T}$cf_ldd_prog" >&6
6814 else
6815   echo "$as_me:6815: result: no" >&5
6816 echo "${ECHO_T}no" >&6
6817 fi
6818
6819   test -n "$cf_ldd_prog" && break
6820 done
6821 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6822
6823         cf_rpath_list="/usr/lib /lib"
6824         if test "$cf_ldd_prog" != no
6825         then
6826                 cf_rpath_oops=
6827
6828 cat >conftest.$ac_ext <<_ACEOF
6829 #line 6829 "configure"
6830 #include "confdefs.h"
6831 #include <stdio.h>
6832 int
6833 main ()
6834 {
6835 printf("Hello");
6836   ;
6837   return 0;
6838 }
6839 _ACEOF
6840 rm -f conftest.$ac_objext conftest$ac_exeext
6841 if { (eval echo "$as_me:6841: \"$ac_link\"") >&5
6842   (eval $ac_link) 2>&5
6843   ac_status=$?
6844   echo "$as_me:6844: \$? = $ac_status" >&5
6845   (exit $ac_status); } &&
6846          { ac_try='test -s conftest$ac_exeext'
6847   { (eval echo "$as_me:6847: \"$ac_try\"") >&5
6848   (eval $ac_try) 2>&5
6849   ac_status=$?
6850   echo "$as_me:6850: \$? = $ac_status" >&5
6851   (exit $ac_status); }; }; then
6852   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6853                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6854 else
6855   echo "$as_me: failed program was:" >&5
6856 cat conftest.$ac_ext >&5
6857 fi
6858 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6859
6860                 # If we passed the link-test, but get a "not found" on a given library,
6861                 # this could be due to inept reconfiguration of gcc to make it only
6862                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6863                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6864                 # /usr/local libraries.
6865                 if test -n "$cf_rpath_oops"
6866                 then
6867                         for cf_rpath_src in $cf_rpath_oops
6868                         do
6869                                 for cf_rpath_dir in \
6870                                         /usr/local \
6871                                         /usr/pkg \
6872                                         /opt/sfw
6873                                 do
6874                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6875                                         then
6876                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6877
6878 echo "${as_me:-configure}:6878: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6879
6880                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6881                                                 break
6882                                         fi
6883                                 done
6884                         done
6885                 fi
6886         fi
6887
6888         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6889
6890 echo "${as_me:-configure}:6890: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6891
6892 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6893
6894 echo "${as_me:-configure}:6894: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6895
6896 cf_rpath_dst=
6897 for cf_rpath_src in $LDFLAGS
6898 do
6899         case $cf_rpath_src in
6900         (-L*)
6901
6902                 # check if this refers to a directory which we will ignore
6903                 cf_rpath_skip=no
6904                 if test -n "$cf_rpath_list"
6905                 then
6906                         for cf_rpath_item in $cf_rpath_list
6907                         do
6908                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6909                                 then
6910                                         cf_rpath_skip=yes
6911                                         break
6912                                 fi
6913                         done
6914                 fi
6915
6916                 if test "$cf_rpath_skip" = no
6917                 then
6918                         # transform the option
6919                         if test "$LD_RPATH_OPT" = "-R " ; then
6920                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6921                         else
6922                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6923                         fi
6924
6925                         # if we have not already added this, add it now
6926                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6927                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6928                         then
6929                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6930
6931 echo "${as_me:-configure}:6931: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6932
6933                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6934                         fi
6935                 fi
6936                 ;;
6937         esac
6938         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6939 done
6940 LDFLAGS=$cf_rpath_dst
6941
6942 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6943
6944 echo "${as_me:-configure}:6944: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6945
6946 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6947
6948 echo "${as_me:-configure}:6948: testing ...checking LIBS $LIBS ..." 1>&5
6949
6950 cf_rpath_dst=
6951 for cf_rpath_src in $LIBS
6952 do
6953         case $cf_rpath_src in
6954         (-L*)
6955
6956                 # check if this refers to a directory which we will ignore
6957                 cf_rpath_skip=no
6958                 if test -n "$cf_rpath_list"
6959                 then
6960                         for cf_rpath_item in $cf_rpath_list
6961                         do
6962                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6963                                 then
6964                                         cf_rpath_skip=yes
6965                                         break
6966                                 fi
6967                         done
6968                 fi
6969
6970                 if test "$cf_rpath_skip" = no
6971                 then
6972                         # transform the option
6973                         if test "$LD_RPATH_OPT" = "-R " ; then
6974                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6975                         else
6976                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6977                         fi
6978
6979                         # if we have not already added this, add it now
6980                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6981                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6982                         then
6983                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6984
6985 echo "${as_me:-configure}:6985: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6986
6987                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6988                         fi
6989                 fi
6990                 ;;
6991         esac
6992         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6993 done
6994 LIBS=$cf_rpath_dst
6995
6996 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6997
6998 echo "${as_me:-configure}:6998: testing ...checked LIBS $LIBS ..." 1>&5
6999
7000         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7001
7002 echo "${as_me:-configure}:7002: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7003
7004 else
7005         echo "$as_me:7005: result: no" >&5
7006 echo "${ECHO_T}no" >&6
7007 fi
7008
7009 fi
7010
7011 fi
7012
7013 ###############################################################################
7014
7015 ###     use option --with-extra-suffix to append suffix to headers and libraries
7016 echo "$as_me:7016: checking if you wish to append extra suffix to header/library paths" >&5
7017 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7018 EXTRA_SUFFIX=
7019
7020 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7021 if test "${with_extra_suffix+set}" = set; then
7022   withval="$with_extra_suffix"
7023   case x$withval in
7024         (no)
7025                 ;;
7026         (xyes|x)
7027                 EXTRA_SUFFIX=$cf_cv_abi_version
7028                 ;;
7029         (*)
7030                 EXTRA_SUFFIX=$withval
7031                 ;;
7032         esac
7033
7034 fi;
7035 echo "$as_me:7035: result: $EXTRA_SUFFIX" >&5
7036 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7037
7038 ###     use option --disable-overwrite to leave out the link to -lcurses
7039 echo "$as_me:7039: checking if you wish to install ncurses overwriting curses" >&5
7040 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7041
7042 # Check whether --enable-overwrite or --disable-overwrite was given.
7043 if test "${enable_overwrite+set}" = set; then
7044   enableval="$enable_overwrite"
7045   with_overwrite=$enableval
7046 else
7047   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7048 fi;
7049 echo "$as_me:7049: result: $with_overwrite" >&5
7050 echo "${ECHO_T}$with_overwrite" >&6
7051
7052 echo "$as_me:7052: checking if external terminfo-database is used" >&5
7053 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7054
7055 # Check whether --enable-database or --disable-database was given.
7056 if test "${enable_database+set}" = set; then
7057   enableval="$enable_database"
7058   use_database=$enableval
7059 else
7060   use_database=yes
7061 fi;
7062 echo "$as_me:7062: result: $use_database" >&5
7063 echo "${ECHO_T}$use_database" >&6
7064
7065 case $host_os in
7066 (os2*)
7067         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7068         ;;
7069 (*)
7070         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7071         ;;
7072 esac
7073
7074 NCURSES_USE_DATABASE=0
7075 if test "$use_database" != no ; then
7076         NCURSES_USE_DATABASE=1
7077
7078         echo "$as_me:7078: checking which terminfo source-file will be installed" >&5
7079 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7080
7081 # Check whether --with-database or --without-database was given.
7082 if test "${with_database+set}" = set; then
7083   withval="$with_database"
7084   TERMINFO_SRC=$withval
7085 fi;
7086         echo "$as_me:7086: result: $TERMINFO_SRC" >&5
7087 echo "${ECHO_T}$TERMINFO_SRC" >&6
7088
7089         echo "$as_me:7089: checking whether to use hashed database instead of directory/tree" >&5
7090 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7091
7092 # Check whether --with-hashed-db or --without-hashed-db was given.
7093 if test "${with_hashed_db+set}" = set; then
7094   withval="$with_hashed_db"
7095
7096 else
7097   with_hashed_db=no
7098 fi;
7099         echo "$as_me:7099: result: $with_hashed_db" >&5
7100 echo "${ECHO_T}$with_hashed_db" >&6
7101 else
7102         with_hashed_db=no
7103 fi
7104
7105 echo "$as_me:7105: checking for list of fallback descriptions" >&5
7106 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7107
7108 # Check whether --with-fallbacks or --without-fallbacks was given.
7109 if test "${with_fallbacks+set}" = set; then
7110   withval="$with_fallbacks"
7111   with_fallback=$withval
7112 else
7113   with_fallback=
7114 fi;
7115 echo "$as_me:7115: result: $with_fallback" >&5
7116 echo "${ECHO_T}$with_fallback" >&6
7117 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7118
7119 echo "$as_me:7119: checking if you want modern xterm or antique" >&5
7120 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7121
7122 # Check whether --with-xterm-new or --without-xterm-new was given.
7123 if test "${with_xterm_new+set}" = set; then
7124   withval="$with_xterm_new"
7125   with_xterm_new=$withval
7126 else
7127   with_xterm_new=yes
7128 fi;
7129 case $with_xterm_new in
7130 (no) with_xterm_new=xterm-old;;
7131 (*)      with_xterm_new=xterm-new;;
7132 esac
7133 echo "$as_me:7133: result: $with_xterm_new" >&5
7134 echo "${ECHO_T}$with_xterm_new" >&6
7135 WHICH_XTERM=$with_xterm_new
7136
7137 echo "$as_me:7137: checking if xterm backspace sends BS or DEL" >&5
7138 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7139
7140 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7141 if test "${with_xterm_kbs+set}" = set; then
7142   withval="$with_xterm_kbs"
7143   with_xterm_kbs=$withval
7144 else
7145   with_xterm_kbs=BS
7146 fi;
7147 case x$with_xterm_kbs in
7148 (xyes|xno|xBS|xbs|x8)
7149         with_xterm_kbs=BS
7150         ;;
7151 (xDEL|xdel|x127)
7152         with_xterm_kbs=DEL
7153         ;;
7154 (*)
7155         with_xterm_kbs=$withval
7156         ;;
7157 esac
7158 echo "$as_me:7158: result: $with_xterm_kbs" >&5
7159 echo "${ECHO_T}$with_xterm_kbs" >&6
7160 XTERM_KBS=$with_xterm_kbs
7161
7162 MAKE_TERMINFO=
7163 if test "$use_database" = no ; then
7164         TERMINFO="${datadir}/terminfo"
7165         MAKE_TERMINFO="#"
7166 else
7167
7168 echo "$as_me:7168: checking for list of terminfo directories" >&5
7169 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7170
7171 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7172 if test "${with_terminfo_dirs+set}" = set; then
7173   withval="$with_terminfo_dirs"
7174
7175 else
7176   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
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
7190 (.\$\(*\)*|.\'*\'*)
7191         ;;
7192 (..|./*|.\\*)
7193         ;;
7194 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7195         ;;
7196 (.\${*prefix}*|.\${*dir}*)
7197         eval cf_src_path="$cf_src_path"
7198         case ".$cf_src_path" in
7199         (.NONE/*)
7200                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7201                 ;;
7202         esac
7203         ;;
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
7223 (xNONE*)
7224         TERMINFO_DIRS=$cf_dst_path
7225         ;;
7226 (*)
7227         TERMINFO_DIRS="$cf_dst_eval"
7228         ;;
7229 esac
7230
7231 echo "$as_me:7231: result: $TERMINFO_DIRS" >&5
7232 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7233 test -n "$TERMINFO_DIRS" &&
7234 cat >>confdefs.h <<EOF
7235 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7236 EOF
7237
7238 echo "$as_me:7238: checking for default terminfo directory" >&5
7239 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7240
7241 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7242 if test "${with_default_terminfo_dir+set}" = set; then
7243   withval="$with_default_terminfo_dir"
7244
7245 else
7246   withval="${TERMINFO:-${datadir}/terminfo}"
7247 fi; if test -n "${datadir}/terminfo" ; then
7248
7249 if test "x$prefix" != xNONE; then
7250         cf_path_syntax="$prefix"
7251 else
7252         cf_path_syntax="$ac_default_prefix"
7253 fi
7254
7255 case ".$withval" in
7256 (.\$\(*\)*|.\'*\'*)
7257         ;;
7258 (..|./*|.\\*)
7259         ;;
7260 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7261         ;;
7262 (.\${*prefix}*|.\${*dir}*)
7263         eval withval="$withval"
7264         case ".$withval" in
7265         (.NONE/*)
7266                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7267                 ;;
7268         esac
7269         ;;
7270 (.no|.NONE/*)
7271         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7272         ;;
7273 (*)
7274         { { echo "$as_me:7274: error: expected a pathname, not \"$withval\"" >&5
7275 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7276    { (exit 1); exit 1; }; }
7277         ;;
7278 esac
7279
7280 fi
7281 eval TERMINFO="$withval"
7282
7283 echo "$as_me:7283: result: $TERMINFO" >&5
7284 echo "${ECHO_T}$TERMINFO" >&6
7285
7286 cat >>confdefs.h <<EOF
7287 #define TERMINFO "$TERMINFO"
7288 EOF
7289
7290 fi
7291
7292 ###     use option --disable-big-core to make tic run on small machines
7293 ###     We need 4Mb, check if we can allocate 50% more than that.
7294 echo "$as_me:7294: checking if big-core option selected" >&5
7295 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7296
7297 # Check whether --enable-big-core or --disable-big-core was given.
7298 if test "${enable_big_core+set}" = set; then
7299   enableval="$enable_big_core"
7300   with_big_core=$enableval
7301 else
7302   if test "$cross_compiling" = yes; then
7303   with_big_core=no
7304 else
7305   cat >conftest.$ac_ext <<_ACEOF
7306 #line 7306 "configure"
7307 #include "confdefs.h"
7308
7309 #include <stdlib.h>
7310 #include <string.h>
7311 int main() {
7312         unsigned long n = 6000000L;
7313         char *s = malloc(n);
7314         if (s != 0)
7315                 s[0] = s[n-1] = 0;
7316         ${cf_cv_main_return:-return}(s == 0);
7317 }
7318 _ACEOF
7319 rm -f conftest$ac_exeext
7320 if { (eval echo "$as_me:7320: \"$ac_link\"") >&5
7321   (eval $ac_link) 2>&5
7322   ac_status=$?
7323   echo "$as_me:7323: \$? = $ac_status" >&5
7324   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7325   { (eval echo "$as_me:7325: \"$ac_try\"") >&5
7326   (eval $ac_try) 2>&5
7327   ac_status=$?
7328   echo "$as_me:7328: \$? = $ac_status" >&5
7329   (exit $ac_status); }; }; then
7330   with_big_core=yes
7331 else
7332   echo "$as_me: program exited with status $ac_status" >&5
7333 echo "$as_me: failed program was:" >&5
7334 cat conftest.$ac_ext >&5
7335 with_big_core=no
7336 fi
7337 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7338 fi
7339 fi;
7340 echo "$as_me:7340: result: $with_big_core" >&5
7341 echo "${ECHO_T}$with_big_core" >&6
7342 test "x$with_big_core" = "xyes" &&
7343 cat >>confdefs.h <<\EOF
7344 #define HAVE_BIG_CORE 1
7345 EOF
7346
7347 ### ISO C only guarantees 512-char strings, we have tables which load faster
7348 ### when constructed using "big" strings.  More than the C compiler, the awk
7349 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7350 echo "$as_me:7350: checking if big-strings option selected" >&5
7351 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7352
7353 # Check whether --enable-big-strings or --disable-big-strings was given.
7354 if test "${enable_big_strings+set}" = set; then
7355   enableval="$enable_big_strings"
7356   with_big_strings=$enableval
7357 else
7358
7359         case x$AWK in
7360         (x)
7361                 eval with_big_strings=no
7362                 ;;
7363         (*)
7364                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7365                         | $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
7366                         eval with_big_strings=yes
7367                 else
7368                         eval with_big_strings=no
7369                 fi
7370                 ;;
7371         esac
7372
7373 fi;
7374 echo "$as_me:7374: result: $with_big_strings" >&5
7375 echo "${ECHO_T}$with_big_strings" >&6
7376
7377 USE_BIG_STRINGS=0
7378 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7379
7380 ###     use option --enable-termcap to compile in the termcap fallback support
7381 echo "$as_me:7381: checking if you want termcap-fallback support" >&5
7382 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7383
7384 # Check whether --enable-termcap or --disable-termcap was given.
7385 if test "${enable_termcap+set}" = set; then
7386   enableval="$enable_termcap"
7387   with_termcap=$enableval
7388 else
7389   with_termcap=no
7390 fi;
7391 echo "$as_me:7391: result: $with_termcap" >&5
7392 echo "${ECHO_T}$with_termcap" >&6
7393
7394 NCURSES_USE_TERMCAP=0
7395 if test "x$with_termcap" != "xyes" ; then
7396         if test "$use_database" = no ; then
7397                 if test -z "$with_fallback" ; then
7398                         { { echo "$as_me:7398: error: You have disabled the database w/o specifying fallbacks" >&5
7399 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7400    { (exit 1); exit 1; }; }
7401                 fi
7402         fi
7403
7404 cat >>confdefs.h <<\EOF
7405 #define PURE_TERMINFO 1
7406 EOF
7407
7408 else
7409
7410         if test "$with_ticlib" != no ; then
7411                 { { echo "$as_me:7411: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7412 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7413    { (exit 1); exit 1; }; }
7414         fi
7415
7416         NCURSES_USE_TERMCAP=1
7417         echo "$as_me:7417: checking for list of termcap files" >&5
7418 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7419
7420 # Check whether --with-termpath or --without-termpath was given.
7421 if test "${with_termpath+set}" = set; then
7422   withval="$with_termpath"
7423
7424 else
7425   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7426 fi;
7427 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7428 cf_dst_path=
7429 for cf_src_path in $withval
7430 do
7431
7432 if test "x$prefix" != xNONE; then
7433         cf_path_syntax="$prefix"
7434 else
7435         cf_path_syntax="$ac_default_prefix"
7436 fi
7437
7438 case ".$cf_src_path" in
7439 (.\$\(*\)*|.\'*\'*)
7440         ;;
7441 (..|./*|.\\*)
7442         ;;
7443 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7444         ;;
7445 (.\${*prefix}*|.\${*dir}*)
7446         eval cf_src_path="$cf_src_path"
7447         case ".$cf_src_path" in
7448         (.NONE/*)
7449                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7450                 ;;
7451         esac
7452         ;;
7453 (.no|.NONE/*)
7454         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7455         ;;
7456 (*)
7457         { { echo "$as_me:7457: error: expected a pathname, not \"$cf_src_path\"" >&5
7458 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7459    { (exit 1); exit 1; }; }
7460         ;;
7461 esac
7462
7463   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7464   cf_dst_path="${cf_dst_path}${cf_src_path}"
7465 done
7466 IFS="$ac_save_ifs"
7467
7468 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7469 # so we have to check/work around.  We do prefer the result of "eval"...
7470 eval cf_dst_eval="$cf_dst_path"
7471 case "x$cf_dst_eval" in
7472 (xNONE*)
7473         TERMPATH=$cf_dst_path
7474         ;;
7475 (*)
7476         TERMPATH="$cf_dst_eval"
7477         ;;
7478 esac
7479
7480         echo "$as_me:7480: result: $TERMPATH" >&5
7481 echo "${ECHO_T}$TERMPATH" >&6
7482         test -n "$TERMPATH" &&
7483 cat >>confdefs.h <<EOF
7484 #define TERMPATH "$TERMPATH"
7485 EOF
7486
7487         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7488         echo "$as_me:7488: checking if fast termcap-loader is needed" >&5
7489 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7490
7491 # Check whether --enable-getcap or --disable-getcap was given.
7492 if test "${enable_getcap+set}" = set; then
7493   enableval="$enable_getcap"
7494   with_getcap=$enableval
7495 else
7496   with_getcap=no
7497 fi;
7498         echo "$as_me:7498: result: $with_getcap" >&5
7499 echo "${ECHO_T}$with_getcap" >&6
7500         test "x$with_getcap" = "xyes" &&
7501 cat >>confdefs.h <<\EOF
7502 #define USE_GETCAP 1
7503 EOF
7504
7505         echo "$as_me:7505: checking if translated termcaps will be cached in ~/.terminfo" >&5
7506 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7507
7508 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7509 if test "${enable_getcap_cache+set}" = set; then
7510   enableval="$enable_getcap_cache"
7511   with_getcap_cache=$enableval
7512 else
7513   with_getcap_cache=no
7514 fi;
7515         echo "$as_me:7515: result: $with_getcap_cache" >&5
7516 echo "${ECHO_T}$with_getcap_cache" >&6
7517         test "x$with_getcap_cache" = "xyes" &&
7518 cat >>confdefs.h <<\EOF
7519 #define USE_GETCAP_CACHE 1
7520 EOF
7521
7522 fi
7523
7524 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7525 echo "$as_me:7525: checking if ~/.terminfo is wanted" >&5
7526 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7527
7528 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7529 if test "${enable_home_terminfo+set}" = set; then
7530   enableval="$enable_home_terminfo"
7531   with_home_terminfo=$enableval
7532 else
7533   with_home_terminfo=yes
7534 fi;
7535 echo "$as_me:7535: result: $with_home_terminfo" >&5
7536 echo "${ECHO_T}$with_home_terminfo" >&6
7537 test "x$with_home_terminfo" = "xyes" &&
7538 cat >>confdefs.h <<\EOF
7539 #define USE_HOME_TERMINFO 1
7540 EOF
7541
7542 echo "$as_me:7542: checking if you want to use restricted environment when running as root" >&5
7543 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7544
7545 # Check whether --enable-root-environ or --disable-root-environ was given.
7546 if test "${enable_root_environ+set}" = set; then
7547   enableval="$enable_root_environ"
7548   with_root_environ=$enableval
7549 else
7550   with_root_environ=yes
7551 fi;
7552 echo "$as_me:7552: result: $with_root_environ" >&5
7553 echo "${ECHO_T}$with_root_environ" >&6
7554 test "x$with_root_environ" = xyes &&
7555 cat >>confdefs.h <<\EOF
7556 #define USE_ROOT_ENVIRON 1
7557 EOF
7558
7559 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7560 ###   to reduce storage requirements for the terminfo database.
7561
7562 for ac_func in \
7563         remove \
7564         unlink
7565 do
7566 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7567 echo "$as_me:7567: checking for $ac_func" >&5
7568 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7569 if eval "test \"\${$as_ac_var+set}\" = set"; then
7570   echo $ECHO_N "(cached) $ECHO_C" >&6
7571 else
7572   cat >conftest.$ac_ext <<_ACEOF
7573 #line 7573 "configure"
7574 #include "confdefs.h"
7575 /* System header to define __stub macros and hopefully few prototypes,
7576     which can conflict with char $ac_func (); below.  */
7577 #include <assert.h>
7578 /* Override any gcc2 internal prototype to avoid an error.  */
7579 #ifdef __cplusplus
7580 extern "C"
7581 #endif
7582 /* We use char because int might match the return type of a gcc2
7583    builtin and then its argument prototype would still apply.  */
7584 char $ac_func ();
7585 char (*f) ();
7586
7587 int
7588 main ()
7589 {
7590 /* The GNU C library defines this for functions which it implements
7591     to always fail with ENOSYS.  Some functions are actually named
7592     something starting with __ and the normal name is an alias.  */
7593 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7594 choke me
7595 #else
7596 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7597 #endif
7598
7599   ;
7600   return 0;
7601 }
7602 _ACEOF
7603 rm -f conftest.$ac_objext conftest$ac_exeext
7604 if { (eval echo "$as_me:7604: \"$ac_link\"") >&5
7605   (eval $ac_link) 2>&5
7606   ac_status=$?
7607   echo "$as_me:7607: \$? = $ac_status" >&5
7608   (exit $ac_status); } &&
7609          { ac_try='test -s conftest$ac_exeext'
7610   { (eval echo "$as_me:7610: \"$ac_try\"") >&5
7611   (eval $ac_try) 2>&5
7612   ac_status=$?
7613   echo "$as_me:7613: \$? = $ac_status" >&5
7614   (exit $ac_status); }; }; then
7615   eval "$as_ac_var=yes"
7616 else
7617   echo "$as_me: failed program was:" >&5
7618 cat conftest.$ac_ext >&5
7619 eval "$as_ac_var=no"
7620 fi
7621 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7622 fi
7623 echo "$as_me:7623: result: `eval echo '${'$as_ac_var'}'`" >&5
7624 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7625 if test `eval echo '${'$as_ac_var'}'` = yes; then
7626   cat >>confdefs.h <<EOF
7627 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7628 EOF
7629
7630 fi
7631 done
7632
7633 if test "$cross_compiling" = yes ; then
7634
7635 for ac_func in \
7636                 link \
7637                 symlink
7638 do
7639 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7640 echo "$as_me:7640: checking for $ac_func" >&5
7641 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7642 if eval "test \"\${$as_ac_var+set}\" = set"; then
7643   echo $ECHO_N "(cached) $ECHO_C" >&6
7644 else
7645   cat >conftest.$ac_ext <<_ACEOF
7646 #line 7646 "configure"
7647 #include "confdefs.h"
7648 /* System header to define __stub macros and hopefully few prototypes,
7649     which can conflict with char $ac_func (); below.  */
7650 #include <assert.h>
7651 /* Override any gcc2 internal prototype to avoid an error.  */
7652 #ifdef __cplusplus
7653 extern "C"
7654 #endif
7655 /* We use char because int might match the return type of a gcc2
7656    builtin and then its argument prototype would still apply.  */
7657 char $ac_func ();
7658 char (*f) ();
7659
7660 int
7661 main ()
7662 {
7663 /* The GNU C library defines this for functions which it implements
7664     to always fail with ENOSYS.  Some functions are actually named
7665     something starting with __ and the normal name is an alias.  */
7666 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7667 choke me
7668 #else
7669 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7670 #endif
7671
7672   ;
7673   return 0;
7674 }
7675 _ACEOF
7676 rm -f conftest.$ac_objext conftest$ac_exeext
7677 if { (eval echo "$as_me:7677: \"$ac_link\"") >&5
7678   (eval $ac_link) 2>&5
7679   ac_status=$?
7680   echo "$as_me:7680: \$? = $ac_status" >&5
7681   (exit $ac_status); } &&
7682          { ac_try='test -s conftest$ac_exeext'
7683   { (eval echo "$as_me:7683: \"$ac_try\"") >&5
7684   (eval $ac_try) 2>&5
7685   ac_status=$?
7686   echo "$as_me:7686: \$? = $ac_status" >&5
7687   (exit $ac_status); }; }; then
7688   eval "$as_ac_var=yes"
7689 else
7690   echo "$as_me: failed program was:" >&5
7691 cat conftest.$ac_ext >&5
7692 eval "$as_ac_var=no"
7693 fi
7694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7695 fi
7696 echo "$as_me:7696: result: `eval echo '${'$as_ac_var'}'`" >&5
7697 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7698 if test `eval echo '${'$as_ac_var'}'` = yes; then
7699   cat >>confdefs.h <<EOF
7700 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7701 EOF
7702
7703 fi
7704 done
7705
7706 else
7707         echo "$as_me:7707: checking if link/symlink functions work" >&5
7708 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7709 if test "${cf_cv_link_funcs+set}" = set; then
7710   echo $ECHO_N "(cached) $ECHO_C" >&6
7711 else
7712
7713                 cf_cv_link_funcs=
7714                 for cf_func in link symlink ; do
7715                         if test "$cross_compiling" = yes; then
7716
7717                         eval 'ac_cv_func_'$cf_func'=error'
7718 else
7719   cat >conftest.$ac_ext <<_ACEOF
7720 #line 7720 "configure"
7721 #include "confdefs.h"
7722
7723 #include <sys/types.h>
7724 #include <sys/stat.h>
7725 #ifdef HAVE_UNISTD_H
7726 #include <unistd.h>
7727 #endif
7728 int main()
7729 {
7730         int fail = 0;
7731         char *src = "config.log";
7732         char *dst = "conftest.chk";
7733         struct stat src_sb;
7734         struct stat dst_sb;
7735
7736         stat(src, &src_sb);
7737         fail = ($cf_func("config.log", "conftest.chk") < 0)
7738             || (stat(dst, &dst_sb) < 0)
7739             || (dst_sb.st_mtime != src_sb.st_mtime);
7740 #ifdef HAVE_UNLINK
7741         unlink(dst);
7742 #else
7743         remove(dst);
7744 #endif
7745         ${cf_cv_main_return:-return} (fail);
7746 }
7747
7748 _ACEOF
7749 rm -f conftest$ac_exeext
7750 if { (eval echo "$as_me:7750: \"$ac_link\"") >&5
7751   (eval $ac_link) 2>&5
7752   ac_status=$?
7753   echo "$as_me:7753: \$? = $ac_status" >&5
7754   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7755   { (eval echo "$as_me:7755: \"$ac_try\"") >&5
7756   (eval $ac_try) 2>&5
7757   ac_status=$?
7758   echo "$as_me:7758: \$? = $ac_status" >&5
7759   (exit $ac_status); }; }; then
7760
7761                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7762                         eval 'ac_cv_func_'$cf_func'=yes'
7763 else
7764   echo "$as_me: program exited with status $ac_status" >&5
7765 echo "$as_me: failed program was:" >&5
7766 cat conftest.$ac_ext >&5
7767
7768                         eval 'ac_cv_func_'$cf_func'=no'
7769 fi
7770 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7771 fi
7772                 done
7773                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7774
7775 fi
7776 echo "$as_me:7776: result: $cf_cv_link_funcs" >&5
7777 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7778         test "$ac_cv_func_link"    = yes &&
7779 cat >>confdefs.h <<\EOF
7780 #define HAVE_LINK 1
7781 EOF
7782
7783         test "$ac_cv_func_symlink" = yes &&
7784 cat >>confdefs.h <<\EOF
7785 #define HAVE_SYMLINK 1
7786 EOF
7787
7788 fi
7789
7790 with_links=no
7791 with_symlinks=no
7792
7793 # soft links (symbolic links) are useful for some systems where hard links do
7794 # not work, or to make it simpler to copy terminfo trees around.
7795 if test "x$ac_cv_func_symlink" = xyes ; then
7796         echo "$as_me:7796: checking if tic should use symbolic links" >&5
7797 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7798
7799 # Check whether --enable-symlinks or --disable-symlinks was given.
7800 if test "${enable_symlinks+set}" = set; then
7801   enableval="$enable_symlinks"
7802   with_symlinks=$enableval
7803 else
7804   with_symlinks=no
7805 fi;
7806         echo "$as_me:7806: result: $with_symlinks" >&5
7807 echo "${ECHO_T}$with_symlinks" >&6
7808 fi
7809
7810 # If we have hard links and did not choose to use soft links instead, there is
7811 # no reason to make this choice optional - use the hard links.
7812 if test "$with_symlinks" = no ; then
7813         echo "$as_me:7813: checking if tic should use hard links" >&5
7814 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7815         if test "x$ac_cv_func_link" = xyes ; then
7816                 with_links=yes
7817         else
7818                 with_links=no
7819         fi
7820         echo "$as_me:7820: result: $with_links" >&5
7821 echo "${ECHO_T}$with_links" >&6
7822 fi
7823
7824 test "x$with_links" = xyes &&
7825 cat >>confdefs.h <<\EOF
7826 #define USE_LINKS 1
7827 EOF
7828
7829 test "x$with_symlinks" = xyes &&
7830 cat >>confdefs.h <<\EOF
7831 #define USE_SYMLINKS 1
7832 EOF
7833
7834 ###   use option --enable-broken-linker to force on use of broken-linker support
7835 echo "$as_me:7835: checking if you want broken-linker support code" >&5
7836 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7837
7838 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7839 if test "${enable_broken_linker+set}" = set; then
7840   enableval="$enable_broken_linker"
7841   with_broken_linker=$enableval
7842 else
7843   with_broken_linker=${BROKEN_LINKER:-no}
7844 fi;
7845 echo "$as_me:7845: result: $with_broken_linker" >&5
7846 echo "${ECHO_T}$with_broken_linker" >&6
7847
7848 BROKEN_LINKER=0
7849 if test "x$with_broken_linker" = xyes ; then
7850
7851 cat >>confdefs.h <<\EOF
7852 #define BROKEN_LINKER 1
7853 EOF
7854
7855         BROKEN_LINKER=1
7856 elif test "$DFT_LWR_MODEL" = shared ; then
7857         case $cf_cv_system_name in
7858         (cygwin*)
7859
7860 cat >>confdefs.h <<\EOF
7861 #define BROKEN_LINKER 1
7862 EOF
7863
7864                 BROKEN_LINKER=1
7865                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7866
7867 echo "${as_me:-configure}:7867: testing cygwin linker is broken anyway ..." 1>&5
7868
7869                 ;;
7870         esac
7871 fi
7872
7873 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7874 echo "$as_me:7874: checking if tputs should process BSD-style prefix padding" >&5
7875 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7876
7877 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7878 if test "${enable_bsdpad+set}" = set; then
7879   enableval="$enable_bsdpad"
7880   with_bsdpad=$enableval
7881 else
7882   with_bsdpad=no
7883 fi;
7884 echo "$as_me:7884: result: $with_bsdpad" >&5
7885 echo "${ECHO_T}$with_bsdpad" >&6
7886 test "x$with_bsdpad" = xyes &&
7887 cat >>confdefs.h <<\EOF
7888 #define BSD_TPUTS 1
7889 EOF
7890
7891 ###   use option --enable-widec to turn on use of wide-character support
7892 NCURSES_CH_T=chtype
7893 NCURSES_LIBUTF8=0
7894
7895 NEED_WCHAR_H=0
7896 NCURSES_MBSTATE_T=0
7897 NCURSES_WCHAR_T=0
7898 NCURSES_WINT_T=0
7899
7900 # Check to define _XOPEN_SOURCE "automatically"
7901 CPPFLAGS_before_XOPEN="$CPPFLAGS"
7902
7903 cf_XOPEN_SOURCE=500
7904 cf_POSIX_C_SOURCE=199506L
7905 cf_xopen_source=
7906
7907 case $host_os in
7908 (aix[4-7]*)
7909         cf_xopen_source="-D_ALL_SOURCE"
7910         ;;
7911 (cygwin|msys)
7912         cf_XOPEN_SOURCE=600
7913         ;;
7914 (darwin[0-8].*)
7915         cf_xopen_source="-D_APPLE_C_SOURCE"
7916         ;;
7917 (darwin*)
7918         cf_xopen_source="-D_DARWIN_C_SOURCE"
7919         cf_XOPEN_SOURCE=
7920         ;;
7921 (freebsd*|dragonfly*)
7922         # 5.x headers associate
7923         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7924         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7925         cf_POSIX_C_SOURCE=200112L
7926         cf_XOPEN_SOURCE=600
7927         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7928         ;;
7929 (hpux11*)
7930         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7931         ;;
7932 (hpux*)
7933         cf_xopen_source="-D_HPUX_SOURCE"
7934         ;;
7935 (irix[56].*)
7936         cf_xopen_source="-D_SGI_SOURCE"
7937         cf_XOPEN_SOURCE=
7938         ;;
7939 (linux*|gnu*|mint*|k*bsd*-gnu)
7940
7941 echo "$as_me:7941: checking if we must define _GNU_SOURCE" >&5
7942 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7943 if test "${cf_cv_gnu_source+set}" = set; then
7944   echo $ECHO_N "(cached) $ECHO_C" >&6
7945 else
7946
7947 cat >conftest.$ac_ext <<_ACEOF
7948 #line 7948 "configure"
7949 #include "confdefs.h"
7950 #include <sys/types.h>
7951 int
7952 main ()
7953 {
7954
7955 #ifndef _XOPEN_SOURCE
7956 make an error
7957 #endif
7958   ;
7959   return 0;
7960 }
7961 _ACEOF
7962 rm -f conftest.$ac_objext
7963 if { (eval echo "$as_me:7963: \"$ac_compile\"") >&5
7964   (eval $ac_compile) 2>&5
7965   ac_status=$?
7966   echo "$as_me:7966: \$? = $ac_status" >&5
7967   (exit $ac_status); } &&
7968          { ac_try='test -s conftest.$ac_objext'
7969   { (eval echo "$as_me:7969: \"$ac_try\"") >&5
7970   (eval $ac_try) 2>&5
7971   ac_status=$?
7972   echo "$as_me:7972: \$? = $ac_status" >&5
7973   (exit $ac_status); }; }; then
7974   cf_cv_gnu_source=no
7975 else
7976   echo "$as_me: failed program was:" >&5
7977 cat conftest.$ac_ext >&5
7978 cf_save="$CPPFLAGS"
7979          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7980          cat >conftest.$ac_ext <<_ACEOF
7981 #line 7981 "configure"
7982 #include "confdefs.h"
7983 #include <sys/types.h>
7984 int
7985 main ()
7986 {
7987
7988 #ifdef _XOPEN_SOURCE
7989 make an error
7990 #endif
7991   ;
7992   return 0;
7993 }
7994 _ACEOF
7995 rm -f conftest.$ac_objext
7996 if { (eval echo "$as_me:7996: \"$ac_compile\"") >&5
7997   (eval $ac_compile) 2>&5
7998   ac_status=$?
7999   echo "$as_me:7999: \$? = $ac_status" >&5
8000   (exit $ac_status); } &&
8001          { ac_try='test -s conftest.$ac_objext'
8002   { (eval echo "$as_me:8002: \"$ac_try\"") >&5
8003   (eval $ac_try) 2>&5
8004   ac_status=$?
8005   echo "$as_me:8005: \$? = $ac_status" >&5
8006   (exit $ac_status); }; }; then
8007   cf_cv_gnu_source=no
8008 else
8009   echo "$as_me: failed program was:" >&5
8010 cat conftest.$ac_ext >&5
8011 cf_cv_gnu_source=yes
8012 fi
8013 rm -f conftest.$ac_objext conftest.$ac_ext
8014         CPPFLAGS="$cf_save"
8015
8016 fi
8017 rm -f conftest.$ac_objext conftest.$ac_ext
8018
8019 fi
8020 echo "$as_me:8020: result: $cf_cv_gnu_source" >&5
8021 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8022 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8023
8024         ;;
8025 (minix*)
8026         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
8027         ;;
8028 (mirbsd*)
8029         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8030         cf_XOPEN_SOURCE=
8031
8032 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8033
8034 cf_save_CFLAGS="$CFLAGS"
8035 cf_save_CPPFLAGS="$CPPFLAGS"
8036
8037 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8038         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8039                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8040
8041 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8042         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8043                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8044
8045 echo "$as_me:8045: checking if we should define _POSIX_C_SOURCE" >&5
8046 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8047 if test "${cf_cv_posix_c_source+set}" = set; then
8048   echo $ECHO_N "(cached) $ECHO_C" >&6
8049 else
8050
8051 echo "${as_me:-configure}:8051: testing if the symbol is already defined go no further ..." 1>&5
8052
8053         cat >conftest.$ac_ext <<_ACEOF
8054 #line 8054 "configure"
8055 #include "confdefs.h"
8056 #include <sys/types.h>
8057 int
8058 main ()
8059 {
8060
8061 #ifndef _POSIX_C_SOURCE
8062 make an error
8063 #endif
8064   ;
8065   return 0;
8066 }
8067 _ACEOF
8068 rm -f conftest.$ac_objext
8069 if { (eval echo "$as_me:8069: \"$ac_compile\"") >&5
8070   (eval $ac_compile) 2>&5
8071   ac_status=$?
8072   echo "$as_me:8072: \$? = $ac_status" >&5
8073   (exit $ac_status); } &&
8074          { ac_try='test -s conftest.$ac_objext'
8075   { (eval echo "$as_me:8075: \"$ac_try\"") >&5
8076   (eval $ac_try) 2>&5
8077   ac_status=$?
8078   echo "$as_me:8078: \$? = $ac_status" >&5
8079   (exit $ac_status); }; }; then
8080   cf_cv_posix_c_source=no
8081 else
8082   echo "$as_me: failed program was:" >&5
8083 cat conftest.$ac_ext >&5
8084 cf_want_posix_source=no
8085          case .$cf_POSIX_C_SOURCE in
8086          (.[12]??*)
8087                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8088                 ;;
8089          (.2)
8090                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8091                 cf_want_posix_source=yes
8092                 ;;
8093          (.*)
8094                 cf_want_posix_source=yes
8095                 ;;
8096          esac
8097          if test "$cf_want_posix_source" = yes ; then
8098                 cat >conftest.$ac_ext <<_ACEOF
8099 #line 8099 "configure"
8100 #include "confdefs.h"
8101 #include <sys/types.h>
8102 int
8103 main ()
8104 {
8105
8106 #ifdef _POSIX_SOURCE
8107 make an error
8108 #endif
8109   ;
8110   return 0;
8111 }
8112 _ACEOF
8113 rm -f conftest.$ac_objext
8114 if { (eval echo "$as_me:8114: \"$ac_compile\"") >&5
8115   (eval $ac_compile) 2>&5
8116   ac_status=$?
8117   echo "$as_me:8117: \$? = $ac_status" >&5
8118   (exit $ac_status); } &&
8119          { ac_try='test -s conftest.$ac_objext'
8120   { (eval echo "$as_me:8120: \"$ac_try\"") >&5
8121   (eval $ac_try) 2>&5
8122   ac_status=$?
8123   echo "$as_me:8123: \$? = $ac_status" >&5
8124   (exit $ac_status); }; }; then
8125   :
8126 else
8127   echo "$as_me: failed program was:" >&5
8128 cat conftest.$ac_ext >&5
8129 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8130 fi
8131 rm -f conftest.$ac_objext conftest.$ac_ext
8132          fi
8133
8134 echo "${as_me:-configure}:8134: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8135
8136          CFLAGS="$cf_trim_CFLAGS"
8137          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8138
8139 echo "${as_me:-configure}:8139: testing if the second compile does not leave our definition intact error ..." 1>&5
8140
8141          cat >conftest.$ac_ext <<_ACEOF
8142 #line 8142 "configure"
8143 #include "confdefs.h"
8144 #include <sys/types.h>
8145 int
8146 main ()
8147 {
8148
8149 #ifndef _POSIX_C_SOURCE
8150 make an error
8151 #endif
8152   ;
8153   return 0;
8154 }
8155 _ACEOF
8156 rm -f conftest.$ac_objext
8157 if { (eval echo "$as_me:8157: \"$ac_compile\"") >&5
8158   (eval $ac_compile) 2>&5
8159   ac_status=$?
8160   echo "$as_me:8160: \$? = $ac_status" >&5
8161   (exit $ac_status); } &&
8162          { ac_try='test -s conftest.$ac_objext'
8163   { (eval echo "$as_me:8163: \"$ac_try\"") >&5
8164   (eval $ac_try) 2>&5
8165   ac_status=$?
8166   echo "$as_me:8166: \$? = $ac_status" >&5
8167   (exit $ac_status); }; }; then
8168   :
8169 else
8170   echo "$as_me: failed program was:" >&5
8171 cat conftest.$ac_ext >&5
8172 cf_cv_posix_c_source=no
8173 fi
8174 rm -f conftest.$ac_objext conftest.$ac_ext
8175          CFLAGS="$cf_save_CFLAGS"
8176          CPPFLAGS="$cf_save_CPPFLAGS"
8177
8178 fi
8179 rm -f conftest.$ac_objext conftest.$ac_ext
8180
8181 fi
8182 echo "$as_me:8182: result: $cf_cv_posix_c_source" >&5
8183 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8184
8185 if test "$cf_cv_posix_c_source" != no ; then
8186         CFLAGS="$cf_trim_CFLAGS"
8187         CPPFLAGS="$cf_trim_CPPFLAGS"
8188
8189 cf_fix_cppflags=no
8190 cf_new_cflags=
8191 cf_new_cppflags=
8192 cf_new_extra_cppflags=
8193
8194 for cf_add_cflags in $cf_cv_posix_c_source
8195 do
8196 case $cf_fix_cppflags in
8197 (no)
8198         case $cf_add_cflags in
8199         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8200                 case $cf_add_cflags in
8201                 (-D*)
8202                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8203
8204                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8205                                 && test -z "${cf_tst_cflags}" \
8206                                 && cf_fix_cppflags=yes
8207
8208                         if test $cf_fix_cppflags = yes ; then
8209                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8210                                 continue
8211                         elif test "${cf_tst_cflags}" = "\"'" ; then
8212                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8213                                 continue
8214                         fi
8215                         ;;
8216                 esac
8217                 case "$CPPFLAGS" in
8218                 (*$cf_add_cflags)
8219                         ;;
8220                 (*)
8221                         case $cf_add_cflags in
8222                         (-D*)
8223                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8224
8225 CPPFLAGS=`echo "$CPPFLAGS" | \
8226         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8227                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8228
8229                                 ;;
8230                         esac
8231                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8232                         ;;
8233                 esac
8234                 ;;
8235         (*)
8236                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8237                 ;;
8238         esac
8239         ;;
8240 (yes)
8241         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8242
8243         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8244
8245         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8246                 && test -z "${cf_tst_cflags}" \
8247                 && cf_fix_cppflags=no
8248         ;;
8249 esac
8250 done
8251
8252 if test -n "$cf_new_cflags" ; then
8253
8254         CFLAGS="$CFLAGS $cf_new_cflags"
8255 fi
8256
8257 if test -n "$cf_new_cppflags" ; then
8258
8259         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8260 fi
8261
8262 if test -n "$cf_new_extra_cppflags" ; then
8263
8264         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8265 fi
8266
8267 fi
8268
8269         ;;
8270 (netbsd*)
8271         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8272         ;;
8273 (openbsd[4-9]*)
8274         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8275         cf_xopen_source="-D_BSD_SOURCE"
8276         cf_XOPEN_SOURCE=600
8277         ;;
8278 (openbsd*)
8279         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8280         ;;
8281 (os2*)
8282         cf_XOPEN_SOURCE=
8283         ;;
8284 (osf[45]*)
8285         cf_xopen_source="-D_OSF_SOURCE"
8286         ;;
8287 (nto-qnx*)
8288         cf_xopen_source="-D_QNX_SOURCE"
8289         ;;
8290 (sco*)
8291         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8292         ;;
8293 (solaris2.*)
8294         cf_xopen_source="-D__EXTENSIONS__"
8295         cf_cv_xopen_source=broken
8296         ;;
8297 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8298         cf_XOPEN_SOURCE=
8299         cf_POSIX_C_SOURCE=
8300         ;;
8301 (*)
8302
8303 echo "$as_me:8303: checking if we should define _XOPEN_SOURCE" >&5
8304 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8305 if test "${cf_cv_xopen_source+set}" = set; then
8306   echo $ECHO_N "(cached) $ECHO_C" >&6
8307 else
8308
8309         cat >conftest.$ac_ext <<_ACEOF
8310 #line 8310 "configure"
8311 #include "confdefs.h"
8312
8313 #include <stdlib.h>
8314 #include <string.h>
8315 #include <sys/types.h>
8316
8317 int
8318 main ()
8319 {
8320
8321 #ifndef _XOPEN_SOURCE
8322 make an error
8323 #endif
8324   ;
8325   return 0;
8326 }
8327 _ACEOF
8328 rm -f conftest.$ac_objext
8329 if { (eval echo "$as_me:8329: \"$ac_compile\"") >&5
8330   (eval $ac_compile) 2>&5
8331   ac_status=$?
8332   echo "$as_me:8332: \$? = $ac_status" >&5
8333   (exit $ac_status); } &&
8334          { ac_try='test -s conftest.$ac_objext'
8335   { (eval echo "$as_me:8335: \"$ac_try\"") >&5
8336   (eval $ac_try) 2>&5
8337   ac_status=$?
8338   echo "$as_me:8338: \$? = $ac_status" >&5
8339   (exit $ac_status); }; }; then
8340   cf_cv_xopen_source=no
8341 else
8342   echo "$as_me: failed program was:" >&5
8343 cat conftest.$ac_ext >&5
8344 cf_save="$CPPFLAGS"
8345          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8346          cat >conftest.$ac_ext <<_ACEOF
8347 #line 8347 "configure"
8348 #include "confdefs.h"
8349
8350 #include <stdlib.h>
8351 #include <string.h>
8352 #include <sys/types.h>
8353
8354 int
8355 main ()
8356 {
8357
8358 #ifdef _XOPEN_SOURCE
8359 make an error
8360 #endif
8361   ;
8362   return 0;
8363 }
8364 _ACEOF
8365 rm -f conftest.$ac_objext
8366 if { (eval echo "$as_me:8366: \"$ac_compile\"") >&5
8367   (eval $ac_compile) 2>&5
8368   ac_status=$?
8369   echo "$as_me:8369: \$? = $ac_status" >&5
8370   (exit $ac_status); } &&
8371          { ac_try='test -s conftest.$ac_objext'
8372   { (eval echo "$as_me:8372: \"$ac_try\"") >&5
8373   (eval $ac_try) 2>&5
8374   ac_status=$?
8375   echo "$as_me:8375: \$? = $ac_status" >&5
8376   (exit $ac_status); }; }; then
8377   cf_cv_xopen_source=no
8378 else
8379   echo "$as_me: failed program was:" >&5
8380 cat conftest.$ac_ext >&5
8381 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8382 fi
8383 rm -f conftest.$ac_objext conftest.$ac_ext
8384         CPPFLAGS="$cf_save"
8385
8386 fi
8387 rm -f conftest.$ac_objext conftest.$ac_ext
8388
8389 fi
8390 echo "$as_me:8390: result: $cf_cv_xopen_source" >&5
8391 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8392
8393 if test "$cf_cv_xopen_source" != no ; then
8394
8395 CFLAGS=`echo "$CFLAGS" | \
8396         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8397                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8398
8399 CPPFLAGS=`echo "$CPPFLAGS" | \
8400         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8401                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8402
8403         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8404
8405 cf_fix_cppflags=no
8406 cf_new_cflags=
8407 cf_new_cppflags=
8408 cf_new_extra_cppflags=
8409
8410 for cf_add_cflags in $cf_temp_xopen_source
8411 do
8412 case $cf_fix_cppflags in
8413 (no)
8414         case $cf_add_cflags in
8415         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8416                 case $cf_add_cflags in
8417                 (-D*)
8418                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8419
8420                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8421                                 && test -z "${cf_tst_cflags}" \
8422                                 && cf_fix_cppflags=yes
8423
8424                         if test $cf_fix_cppflags = yes ; then
8425                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8426                                 continue
8427                         elif test "${cf_tst_cflags}" = "\"'" ; then
8428                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8429                                 continue
8430                         fi
8431                         ;;
8432                 esac
8433                 case "$CPPFLAGS" in
8434                 (*$cf_add_cflags)
8435                         ;;
8436                 (*)
8437                         case $cf_add_cflags in
8438                         (-D*)
8439                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8440
8441 CPPFLAGS=`echo "$CPPFLAGS" | \
8442         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8443                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8444
8445                                 ;;
8446                         esac
8447                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8448                         ;;
8449                 esac
8450                 ;;
8451         (*)
8452                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8453                 ;;
8454         esac
8455         ;;
8456 (yes)
8457         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8458
8459         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8460
8461         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8462                 && test -z "${cf_tst_cflags}" \
8463                 && cf_fix_cppflags=no
8464         ;;
8465 esac
8466 done
8467
8468 if test -n "$cf_new_cflags" ; then
8469
8470         CFLAGS="$CFLAGS $cf_new_cflags"
8471 fi
8472
8473 if test -n "$cf_new_cppflags" ; then
8474
8475         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8476 fi
8477
8478 if test -n "$cf_new_extra_cppflags" ; then
8479
8480         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8481 fi
8482
8483 fi
8484
8485 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8486
8487 cf_save_CFLAGS="$CFLAGS"
8488 cf_save_CPPFLAGS="$CPPFLAGS"
8489
8490 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8491         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8492                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8493
8494 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8495         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8496                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8497
8498 echo "$as_me:8498: checking if we should define _POSIX_C_SOURCE" >&5
8499 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8500 if test "${cf_cv_posix_c_source+set}" = set; then
8501   echo $ECHO_N "(cached) $ECHO_C" >&6
8502 else
8503
8504 echo "${as_me:-configure}:8504: testing if the symbol is already defined go no further ..." 1>&5
8505
8506         cat >conftest.$ac_ext <<_ACEOF
8507 #line 8507 "configure"
8508 #include "confdefs.h"
8509 #include <sys/types.h>
8510 int
8511 main ()
8512 {
8513
8514 #ifndef _POSIX_C_SOURCE
8515 make an error
8516 #endif
8517   ;
8518   return 0;
8519 }
8520 _ACEOF
8521 rm -f conftest.$ac_objext
8522 if { (eval echo "$as_me:8522: \"$ac_compile\"") >&5
8523   (eval $ac_compile) 2>&5
8524   ac_status=$?
8525   echo "$as_me:8525: \$? = $ac_status" >&5
8526   (exit $ac_status); } &&
8527          { ac_try='test -s conftest.$ac_objext'
8528   { (eval echo "$as_me:8528: \"$ac_try\"") >&5
8529   (eval $ac_try) 2>&5
8530   ac_status=$?
8531   echo "$as_me:8531: \$? = $ac_status" >&5
8532   (exit $ac_status); }; }; then
8533   cf_cv_posix_c_source=no
8534 else
8535   echo "$as_me: failed program was:" >&5
8536 cat conftest.$ac_ext >&5
8537 cf_want_posix_source=no
8538          case .$cf_POSIX_C_SOURCE in
8539          (.[12]??*)
8540                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8541                 ;;
8542          (.2)
8543                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8544                 cf_want_posix_source=yes
8545                 ;;
8546          (.*)
8547                 cf_want_posix_source=yes
8548                 ;;
8549          esac
8550          if test "$cf_want_posix_source" = yes ; then
8551                 cat >conftest.$ac_ext <<_ACEOF
8552 #line 8552 "configure"
8553 #include "confdefs.h"
8554 #include <sys/types.h>
8555 int
8556 main ()
8557 {
8558
8559 #ifdef _POSIX_SOURCE
8560 make an error
8561 #endif
8562   ;
8563   return 0;
8564 }
8565 _ACEOF
8566 rm -f conftest.$ac_objext
8567 if { (eval echo "$as_me:8567: \"$ac_compile\"") >&5
8568   (eval $ac_compile) 2>&5
8569   ac_status=$?
8570   echo "$as_me:8570: \$? = $ac_status" >&5
8571   (exit $ac_status); } &&
8572          { ac_try='test -s conftest.$ac_objext'
8573   { (eval echo "$as_me:8573: \"$ac_try\"") >&5
8574   (eval $ac_try) 2>&5
8575   ac_status=$?
8576   echo "$as_me:8576: \$? = $ac_status" >&5
8577   (exit $ac_status); }; }; then
8578   :
8579 else
8580   echo "$as_me: failed program was:" >&5
8581 cat conftest.$ac_ext >&5
8582 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8583 fi
8584 rm -f conftest.$ac_objext conftest.$ac_ext
8585          fi
8586
8587 echo "${as_me:-configure}:8587: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8588
8589          CFLAGS="$cf_trim_CFLAGS"
8590          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8591
8592 echo "${as_me:-configure}:8592: testing if the second compile does not leave our definition intact error ..." 1>&5
8593
8594          cat >conftest.$ac_ext <<_ACEOF
8595 #line 8595 "configure"
8596 #include "confdefs.h"
8597 #include <sys/types.h>
8598 int
8599 main ()
8600 {
8601
8602 #ifndef _POSIX_C_SOURCE
8603 make an error
8604 #endif
8605   ;
8606   return 0;
8607 }
8608 _ACEOF
8609 rm -f conftest.$ac_objext
8610 if { (eval echo "$as_me:8610: \"$ac_compile\"") >&5
8611   (eval $ac_compile) 2>&5
8612   ac_status=$?
8613   echo "$as_me:8613: \$? = $ac_status" >&5
8614   (exit $ac_status); } &&
8615          { ac_try='test -s conftest.$ac_objext'
8616   { (eval echo "$as_me:8616: \"$ac_try\"") >&5
8617   (eval $ac_try) 2>&5
8618   ac_status=$?
8619   echo "$as_me:8619: \$? = $ac_status" >&5
8620   (exit $ac_status); }; }; then
8621   :
8622 else
8623   echo "$as_me: failed program was:" >&5
8624 cat conftest.$ac_ext >&5
8625 cf_cv_posix_c_source=no
8626 fi
8627 rm -f conftest.$ac_objext conftest.$ac_ext
8628          CFLAGS="$cf_save_CFLAGS"
8629          CPPFLAGS="$cf_save_CPPFLAGS"
8630
8631 fi
8632 rm -f conftest.$ac_objext conftest.$ac_ext
8633
8634 fi
8635 echo "$as_me:8635: result: $cf_cv_posix_c_source" >&5
8636 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8637
8638 if test "$cf_cv_posix_c_source" != no ; then
8639         CFLAGS="$cf_trim_CFLAGS"
8640         CPPFLAGS="$cf_trim_CPPFLAGS"
8641
8642 cf_fix_cppflags=no
8643 cf_new_cflags=
8644 cf_new_cppflags=
8645 cf_new_extra_cppflags=
8646
8647 for cf_add_cflags in $cf_cv_posix_c_source
8648 do
8649 case $cf_fix_cppflags in
8650 (no)
8651         case $cf_add_cflags in
8652         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8653                 case $cf_add_cflags in
8654                 (-D*)
8655                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8656
8657                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8658                                 && test -z "${cf_tst_cflags}" \
8659                                 && cf_fix_cppflags=yes
8660
8661                         if test $cf_fix_cppflags = yes ; then
8662                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8663                                 continue
8664                         elif test "${cf_tst_cflags}" = "\"'" ; then
8665                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8666                                 continue
8667                         fi
8668                         ;;
8669                 esac
8670                 case "$CPPFLAGS" in
8671                 (*$cf_add_cflags)
8672                         ;;
8673                 (*)
8674                         case $cf_add_cflags in
8675                         (-D*)
8676                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8677
8678 CPPFLAGS=`echo "$CPPFLAGS" | \
8679         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8680                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8681
8682                                 ;;
8683                         esac
8684                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8685                         ;;
8686                 esac
8687                 ;;
8688         (*)
8689                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8690                 ;;
8691         esac
8692         ;;
8693 (yes)
8694         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8695
8696         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8697
8698         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8699                 && test -z "${cf_tst_cflags}" \
8700                 && cf_fix_cppflags=no
8701         ;;
8702 esac
8703 done
8704
8705 if test -n "$cf_new_cflags" ; then
8706
8707         CFLAGS="$CFLAGS $cf_new_cflags"
8708 fi
8709
8710 if test -n "$cf_new_cppflags" ; then
8711
8712         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8713 fi
8714
8715 if test -n "$cf_new_extra_cppflags" ; then
8716
8717         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8718 fi
8719
8720 fi
8721
8722         ;;
8723 esac
8724
8725 if test -n "$cf_xopen_source" ; then
8726
8727 cf_fix_cppflags=no
8728 cf_new_cflags=
8729 cf_new_cppflags=
8730 cf_new_extra_cppflags=
8731
8732 for cf_add_cflags in $cf_xopen_source
8733 do
8734 case $cf_fix_cppflags in
8735 (no)
8736         case $cf_add_cflags in
8737         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8738                 case $cf_add_cflags in
8739                 (-D*)
8740                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8741
8742                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8743                                 && test -z "${cf_tst_cflags}" \
8744                                 && cf_fix_cppflags=yes
8745
8746                         if test $cf_fix_cppflags = yes ; then
8747                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8748                                 continue
8749                         elif test "${cf_tst_cflags}" = "\"'" ; then
8750                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8751                                 continue
8752                         fi
8753                         ;;
8754                 esac
8755                 case "$CPPFLAGS" in
8756                 (*$cf_add_cflags)
8757                         ;;
8758                 (*)
8759                         case $cf_add_cflags in
8760                         (-D*)
8761                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8762
8763 CPPFLAGS=`echo "$CPPFLAGS" | \
8764         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8765                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8766
8767                                 ;;
8768                         esac
8769                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8770                         ;;
8771                 esac
8772                 ;;
8773         (*)
8774                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8775                 ;;
8776         esac
8777         ;;
8778 (yes)
8779         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8780
8781         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8782
8783         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8784                 && test -z "${cf_tst_cflags}" \
8785                 && cf_fix_cppflags=no
8786         ;;
8787 esac
8788 done
8789
8790 if test -n "$cf_new_cflags" ; then
8791         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8792
8793 echo "${as_me:-configure}:8793: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8794
8795         CFLAGS="$CFLAGS $cf_new_cflags"
8796 fi
8797
8798 if test -n "$cf_new_cppflags" ; then
8799         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8800
8801 echo "${as_me:-configure}:8801: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8802
8803         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8804 fi
8805
8806 if test -n "$cf_new_extra_cppflags" ; then
8807         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8808
8809 echo "${as_me:-configure}:8809: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8810
8811         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8812 fi
8813
8814 fi
8815
8816 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8817         echo "$as_me:8817: checking if _XOPEN_SOURCE really is set" >&5
8818 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8819         cat >conftest.$ac_ext <<_ACEOF
8820 #line 8820 "configure"
8821 #include "confdefs.h"
8822 #include <stdlib.h>
8823 int
8824 main ()
8825 {
8826
8827 #ifndef _XOPEN_SOURCE
8828 make an error
8829 #endif
8830   ;
8831   return 0;
8832 }
8833 _ACEOF
8834 rm -f conftest.$ac_objext
8835 if { (eval echo "$as_me:8835: \"$ac_compile\"") >&5
8836   (eval $ac_compile) 2>&5
8837   ac_status=$?
8838   echo "$as_me:8838: \$? = $ac_status" >&5
8839   (exit $ac_status); } &&
8840          { ac_try='test -s conftest.$ac_objext'
8841   { (eval echo "$as_me:8841: \"$ac_try\"") >&5
8842   (eval $ac_try) 2>&5
8843   ac_status=$?
8844   echo "$as_me:8844: \$? = $ac_status" >&5
8845   (exit $ac_status); }; }; then
8846   cf_XOPEN_SOURCE_set=yes
8847 else
8848   echo "$as_me: failed program was:" >&5
8849 cat conftest.$ac_ext >&5
8850 cf_XOPEN_SOURCE_set=no
8851 fi
8852 rm -f conftest.$ac_objext conftest.$ac_ext
8853         echo "$as_me:8853: result: $cf_XOPEN_SOURCE_set" >&5
8854 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8855         if test $cf_XOPEN_SOURCE_set = yes
8856         then
8857                 cat >conftest.$ac_ext <<_ACEOF
8858 #line 8858 "configure"
8859 #include "confdefs.h"
8860 #include <stdlib.h>
8861 int
8862 main ()
8863 {
8864
8865 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8866 make an error
8867 #endif
8868   ;
8869   return 0;
8870 }
8871 _ACEOF
8872 rm -f conftest.$ac_objext
8873 if { (eval echo "$as_me:8873: \"$ac_compile\"") >&5
8874   (eval $ac_compile) 2>&5
8875   ac_status=$?
8876   echo "$as_me:8876: \$? = $ac_status" >&5
8877   (exit $ac_status); } &&
8878          { ac_try='test -s conftest.$ac_objext'
8879   { (eval echo "$as_me:8879: \"$ac_try\"") >&5
8880   (eval $ac_try) 2>&5
8881   ac_status=$?
8882   echo "$as_me:8882: \$? = $ac_status" >&5
8883   (exit $ac_status); }; }; then
8884   cf_XOPEN_SOURCE_set_ok=yes
8885 else
8886   echo "$as_me: failed program was:" >&5
8887 cat conftest.$ac_ext >&5
8888 cf_XOPEN_SOURCE_set_ok=no
8889 fi
8890 rm -f conftest.$ac_objext conftest.$ac_ext
8891                 if test $cf_XOPEN_SOURCE_set_ok = no
8892                 then
8893                         { echo "$as_me:8893: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8894 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8895                 fi
8896         else
8897
8898 echo "$as_me:8898: checking if we should define _XOPEN_SOURCE" >&5
8899 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8900 if test "${cf_cv_xopen_source+set}" = set; then
8901   echo $ECHO_N "(cached) $ECHO_C" >&6
8902 else
8903
8904         cat >conftest.$ac_ext <<_ACEOF
8905 #line 8905 "configure"
8906 #include "confdefs.h"
8907
8908 #include <stdlib.h>
8909 #include <string.h>
8910 #include <sys/types.h>
8911
8912 int
8913 main ()
8914 {
8915
8916 #ifndef _XOPEN_SOURCE
8917 make an error
8918 #endif
8919   ;
8920   return 0;
8921 }
8922 _ACEOF
8923 rm -f conftest.$ac_objext
8924 if { (eval echo "$as_me:8924: \"$ac_compile\"") >&5
8925   (eval $ac_compile) 2>&5
8926   ac_status=$?
8927   echo "$as_me:8927: \$? = $ac_status" >&5
8928   (exit $ac_status); } &&
8929          { ac_try='test -s conftest.$ac_objext'
8930   { (eval echo "$as_me:8930: \"$ac_try\"") >&5
8931   (eval $ac_try) 2>&5
8932   ac_status=$?
8933   echo "$as_me:8933: \$? = $ac_status" >&5
8934   (exit $ac_status); }; }; then
8935   cf_cv_xopen_source=no
8936 else
8937   echo "$as_me: failed program was:" >&5
8938 cat conftest.$ac_ext >&5
8939 cf_save="$CPPFLAGS"
8940          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8941          cat >conftest.$ac_ext <<_ACEOF
8942 #line 8942 "configure"
8943 #include "confdefs.h"
8944
8945 #include <stdlib.h>
8946 #include <string.h>
8947 #include <sys/types.h>
8948
8949 int
8950 main ()
8951 {
8952
8953 #ifdef _XOPEN_SOURCE
8954 make an error
8955 #endif
8956   ;
8957   return 0;
8958 }
8959 _ACEOF
8960 rm -f conftest.$ac_objext
8961 if { (eval echo "$as_me:8961: \"$ac_compile\"") >&5
8962   (eval $ac_compile) 2>&5
8963   ac_status=$?
8964   echo "$as_me:8964: \$? = $ac_status" >&5
8965   (exit $ac_status); } &&
8966          { ac_try='test -s conftest.$ac_objext'
8967   { (eval echo "$as_me:8967: \"$ac_try\"") >&5
8968   (eval $ac_try) 2>&5
8969   ac_status=$?
8970   echo "$as_me:8970: \$? = $ac_status" >&5
8971   (exit $ac_status); }; }; then
8972   cf_cv_xopen_source=no
8973 else
8974   echo "$as_me: failed program was:" >&5
8975 cat conftest.$ac_ext >&5
8976 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8977 fi
8978 rm -f conftest.$ac_objext conftest.$ac_ext
8979         CPPFLAGS="$cf_save"
8980
8981 fi
8982 rm -f conftest.$ac_objext conftest.$ac_ext
8983
8984 fi
8985 echo "$as_me:8985: result: $cf_cv_xopen_source" >&5
8986 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8987
8988 if test "$cf_cv_xopen_source" != no ; then
8989
8990 CFLAGS=`echo "$CFLAGS" | \
8991         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8992                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8993
8994 CPPFLAGS=`echo "$CPPFLAGS" | \
8995         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8996                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8997
8998         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8999
9000 cf_fix_cppflags=no
9001 cf_new_cflags=
9002 cf_new_cppflags=
9003 cf_new_extra_cppflags=
9004
9005 for cf_add_cflags in $cf_temp_xopen_source
9006 do
9007 case $cf_fix_cppflags in
9008 (no)
9009         case $cf_add_cflags in
9010         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9011                 case $cf_add_cflags in
9012                 (-D*)
9013                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9014
9015                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9016                                 && test -z "${cf_tst_cflags}" \
9017                                 && cf_fix_cppflags=yes
9018
9019                         if test $cf_fix_cppflags = yes ; then
9020                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9021                                 continue
9022                         elif test "${cf_tst_cflags}" = "\"'" ; then
9023                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9024                                 continue
9025                         fi
9026                         ;;
9027                 esac
9028                 case "$CPPFLAGS" in
9029                 (*$cf_add_cflags)
9030                         ;;
9031                 (*)
9032                         case $cf_add_cflags in
9033                         (-D*)
9034                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9035
9036 CPPFLAGS=`echo "$CPPFLAGS" | \
9037         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9038                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9039
9040                                 ;;
9041                         esac
9042                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9043                         ;;
9044                 esac
9045                 ;;
9046         (*)
9047                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9048                 ;;
9049         esac
9050         ;;
9051 (yes)
9052         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9053
9054         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9055
9056         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9057                 && test -z "${cf_tst_cflags}" \
9058                 && cf_fix_cppflags=no
9059         ;;
9060 esac
9061 done
9062
9063 if test -n "$cf_new_cflags" ; then
9064
9065         CFLAGS="$CFLAGS $cf_new_cflags"
9066 fi
9067
9068 if test -n "$cf_new_cppflags" ; then
9069
9070         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9071 fi
9072
9073 if test -n "$cf_new_extra_cppflags" ; then
9074
9075         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9076 fi
9077
9078 fi
9079
9080         fi
9081 fi
9082
9083 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9084
9085 # Work around breakage on OS X
9086
9087 echo "$as_me:9087: checking if SIGWINCH is defined" >&5
9088 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9089 if test "${cf_cv_define_sigwinch+set}" = set; then
9090   echo $ECHO_N "(cached) $ECHO_C" >&6
9091 else
9092
9093         cat >conftest.$ac_ext <<_ACEOF
9094 #line 9094 "configure"
9095 #include "confdefs.h"
9096
9097 #include <sys/types.h>
9098 #include <sys/signal.h>
9099
9100 int
9101 main ()
9102 {
9103 int x = SIGWINCH
9104   ;
9105   return 0;
9106 }
9107 _ACEOF
9108 rm -f conftest.$ac_objext
9109 if { (eval echo "$as_me:9109: \"$ac_compile\"") >&5
9110   (eval $ac_compile) 2>&5
9111   ac_status=$?
9112   echo "$as_me:9112: \$? = $ac_status" >&5
9113   (exit $ac_status); } &&
9114          { ac_try='test -s conftest.$ac_objext'
9115   { (eval echo "$as_me:9115: \"$ac_try\"") >&5
9116   (eval $ac_try) 2>&5
9117   ac_status=$?
9118   echo "$as_me:9118: \$? = $ac_status" >&5
9119   (exit $ac_status); }; }; then
9120   cf_cv_define_sigwinch=yes
9121 else
9122   echo "$as_me: failed program was:" >&5
9123 cat conftest.$ac_ext >&5
9124 cat >conftest.$ac_ext <<_ACEOF
9125 #line 9125 "configure"
9126 #include "confdefs.h"
9127
9128 #undef _XOPEN_SOURCE
9129 #undef _POSIX_SOURCE
9130 #undef _POSIX_C_SOURCE
9131 #include <sys/types.h>
9132 #include <sys/signal.h>
9133
9134 int
9135 main ()
9136 {
9137 int x = SIGWINCH
9138   ;
9139   return 0;
9140 }
9141 _ACEOF
9142 rm -f conftest.$ac_objext
9143 if { (eval echo "$as_me:9143: \"$ac_compile\"") >&5
9144   (eval $ac_compile) 2>&5
9145   ac_status=$?
9146   echo "$as_me:9146: \$? = $ac_status" >&5
9147   (exit $ac_status); } &&
9148          { ac_try='test -s conftest.$ac_objext'
9149   { (eval echo "$as_me:9149: \"$ac_try\"") >&5
9150   (eval $ac_try) 2>&5
9151   ac_status=$?
9152   echo "$as_me:9152: \$? = $ac_status" >&5
9153   (exit $ac_status); }; }; then
9154   cf_cv_define_sigwinch=maybe
9155 else
9156   echo "$as_me: failed program was:" >&5
9157 cat conftest.$ac_ext >&5
9158 cf_cv_define_sigwinch=no
9159 fi
9160 rm -f conftest.$ac_objext conftest.$ac_ext
9161
9162 fi
9163 rm -f conftest.$ac_objext conftest.$ac_ext
9164
9165 fi
9166 echo "$as_me:9166: result: $cf_cv_define_sigwinch" >&5
9167 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9168
9169 if test "$cf_cv_define_sigwinch" = maybe ; then
9170 echo "$as_me:9170: checking for actual SIGWINCH definition" >&5
9171 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9172 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9173   echo $ECHO_N "(cached) $ECHO_C" >&6
9174 else
9175
9176 cf_cv_fixup_sigwinch=unknown
9177 cf_sigwinch=32
9178 while test $cf_sigwinch != 1
9179 do
9180         cat >conftest.$ac_ext <<_ACEOF
9181 #line 9181 "configure"
9182 #include "confdefs.h"
9183
9184 #undef _XOPEN_SOURCE
9185 #undef _POSIX_SOURCE
9186 #undef _POSIX_C_SOURCE
9187 #include <sys/types.h>
9188 #include <sys/signal.h>
9189
9190 int
9191 main ()
9192 {
9193
9194 #if SIGWINCH != $cf_sigwinch
9195 make an error
9196 #endif
9197 int x = SIGWINCH
9198   ;
9199   return 0;
9200 }
9201 _ACEOF
9202 rm -f conftest.$ac_objext
9203 if { (eval echo "$as_me:9203: \"$ac_compile\"") >&5
9204   (eval $ac_compile) 2>&5
9205   ac_status=$?
9206   echo "$as_me:9206: \$? = $ac_status" >&5
9207   (exit $ac_status); } &&
9208          { ac_try='test -s conftest.$ac_objext'
9209   { (eval echo "$as_me:9209: \"$ac_try\"") >&5
9210   (eval $ac_try) 2>&5
9211   ac_status=$?
9212   echo "$as_me:9212: \$? = $ac_status" >&5
9213   (exit $ac_status); }; }; then
9214   cf_cv_fixup_sigwinch=$cf_sigwinch
9215          break
9216 else
9217   echo "$as_me: failed program was:" >&5
9218 cat conftest.$ac_ext >&5
9219 fi
9220 rm -f conftest.$ac_objext conftest.$ac_ext
9221
9222 cf_sigwinch=`expr $cf_sigwinch - 1`
9223 done
9224
9225 fi
9226 echo "$as_me:9226: result: $cf_cv_fixup_sigwinch" >&5
9227 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9228
9229         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9230                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9231         fi
9232 fi
9233
9234 # Checks for CODESET support.
9235
9236 echo "$as_me:9236: checking for nl_langinfo and CODESET" >&5
9237 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9238 if test "${am_cv_langinfo_codeset+set}" = set; then
9239   echo $ECHO_N "(cached) $ECHO_C" >&6
9240 else
9241   cat >conftest.$ac_ext <<_ACEOF
9242 #line 9242 "configure"
9243 #include "confdefs.h"
9244 #include <langinfo.h>
9245 int
9246 main ()
9247 {
9248 char* cs = nl_langinfo(CODESET);
9249   ;
9250   return 0;
9251 }
9252 _ACEOF
9253 rm -f conftest.$ac_objext conftest$ac_exeext
9254 if { (eval echo "$as_me:9254: \"$ac_link\"") >&5
9255   (eval $ac_link) 2>&5
9256   ac_status=$?
9257   echo "$as_me:9257: \$? = $ac_status" >&5
9258   (exit $ac_status); } &&
9259          { ac_try='test -s conftest$ac_exeext'
9260   { (eval echo "$as_me:9260: \"$ac_try\"") >&5
9261   (eval $ac_try) 2>&5
9262   ac_status=$?
9263   echo "$as_me:9263: \$? = $ac_status" >&5
9264   (exit $ac_status); }; }; then
9265   am_cv_langinfo_codeset=yes
9266 else
9267   echo "$as_me: failed program was:" >&5
9268 cat conftest.$ac_ext >&5
9269 am_cv_langinfo_codeset=no
9270 fi
9271 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9272
9273 fi
9274 echo "$as_me:9274: result: $am_cv_langinfo_codeset" >&5
9275 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9276         if test $am_cv_langinfo_codeset = yes; then
9277
9278 cat >>confdefs.h <<\EOF
9279 #define HAVE_LANGINFO_CODESET 1
9280 EOF
9281
9282         fi
9283
9284 # use these variables to work around a defect in gcc's fixincludes.
9285 NCURSES_OK_WCHAR_T=
9286 NCURSES_OK_WINT_T=
9287
9288 echo "$as_me:9288: checking if you want wide-character code" >&5
9289 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9290
9291 # Check whether --enable-widec or --disable-widec was given.
9292 if test "${enable_widec+set}" = set; then
9293   enableval="$enable_widec"
9294   with_widec=$enableval
9295 else
9296   with_widec=no
9297 fi;
9298 echo "$as_me:9298: result: $with_widec" >&5
9299 echo "${ECHO_T}$with_widec" >&6
9300
9301 NCURSES_WCWIDTH_GRAPHICS=1
9302
9303 if test "x$with_widec" = xyes ; then
9304         if test "x$disable_lib_suffixes" = xno ; then
9305                 LIB_SUFFIX="w${LIB_SUFFIX}"
9306         fi
9307
9308 cat >>confdefs.h <<\EOF
9309 #define USE_WIDEC_SUPPORT 1
9310 EOF
9311
9312 cat >>confdefs.h <<\EOF
9313 #define NCURSES_WIDECHAR 1
9314 EOF
9315
9316 echo "$as_me:9316: checking if wchar.h can be used as is" >&5
9317 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9318 if test "${cf_cv_wchar_h_okay+set}" = set; then
9319   echo $ECHO_N "(cached) $ECHO_C" >&6
9320 else
9321
9322 cat >conftest.$ac_ext <<_ACEOF
9323 #line 9323 "configure"
9324 #include "confdefs.h"
9325
9326 #include <stdlib.h>
9327 #include <wchar.h>
9328
9329 int
9330 main ()
9331 {
9332
9333         wint_t foo = 0;
9334         int bar = iswpunct(foo)
9335   ;
9336   return 0;
9337 }
9338 _ACEOF
9339 rm -f conftest.$ac_objext
9340 if { (eval echo "$as_me:9340: \"$ac_compile\"") >&5
9341   (eval $ac_compile) 2>&5
9342   ac_status=$?
9343   echo "$as_me:9343: \$? = $ac_status" >&5
9344   (exit $ac_status); } &&
9345          { ac_try='test -s conftest.$ac_objext'
9346   { (eval echo "$as_me:9346: \"$ac_try\"") >&5
9347   (eval $ac_try) 2>&5
9348   ac_status=$?
9349   echo "$as_me:9349: \$? = $ac_status" >&5
9350   (exit $ac_status); }; }; then
9351   cf_cv_wchar_h_okay=yes
9352 else
9353   echo "$as_me: failed program was:" >&5
9354 cat conftest.$ac_ext >&5
9355 cf_cv_wchar_h_okay=no
9356 fi
9357 rm -f conftest.$ac_objext conftest.$ac_ext
9358 fi
9359 echo "$as_me:9359: result: $cf_cv_wchar_h_okay" >&5
9360 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9361
9362 if test $cf_cv_wchar_h_okay = no
9363 then
9364
9365 echo "$as_me:9365: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9366 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9367 cat >conftest.$ac_ext <<_ACEOF
9368 #line 9368 "configure"
9369 #include "confdefs.h"
9370 #include <sys/types.h>
9371
9372 int
9373 main ()
9374 {
9375
9376 #ifndef _XOPEN_SOURCE_EXTENDED
9377 make an error
9378 #endif
9379   ;
9380   return 0;
9381 }
9382 _ACEOF
9383 rm -f conftest.$ac_objext
9384 if { (eval echo "$as_me:9384: \"$ac_compile\"") >&5
9385   (eval $ac_compile) 2>&5
9386   ac_status=$?
9387   echo "$as_me:9387: \$? = $ac_status" >&5
9388   (exit $ac_status); } &&
9389          { ac_try='test -s conftest.$ac_objext'
9390   { (eval echo "$as_me:9390: \"$ac_try\"") >&5
9391   (eval $ac_try) 2>&5
9392   ac_status=$?
9393   echo "$as_me:9393: \$? = $ac_status" >&5
9394   (exit $ac_status); }; }; then
9395   cf_result=no
9396 else
9397   echo "$as_me: failed program was:" >&5
9398 cat conftest.$ac_ext >&5
9399 cf_result=yes
9400 fi
9401 rm -f conftest.$ac_objext conftest.$ac_ext
9402 echo "$as_me:9402: result: $cf_result" >&5
9403 echo "${ECHO_T}$cf_result" >&6
9404
9405 if test "$cf_result" = yes ; then
9406         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9407 elif test "x" != "x" ; then
9408         echo "$as_me:9408: checking checking for compatible value versus " >&5
9409 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9410         cat >conftest.$ac_ext <<_ACEOF
9411 #line 9411 "configure"
9412 #include "confdefs.h"
9413 #include <sys/types.h>
9414
9415 int
9416 main ()
9417 {
9418
9419 #if _XOPEN_SOURCE_EXTENDED- < 0
9420 make an error
9421 #endif
9422   ;
9423   return 0;
9424 }
9425 _ACEOF
9426 rm -f conftest.$ac_objext
9427 if { (eval echo "$as_me:9427: \"$ac_compile\"") >&5
9428   (eval $ac_compile) 2>&5
9429   ac_status=$?
9430   echo "$as_me:9430: \$? = $ac_status" >&5
9431   (exit $ac_status); } &&
9432          { ac_try='test -s conftest.$ac_objext'
9433   { (eval echo "$as_me:9433: \"$ac_try\"") >&5
9434   (eval $ac_try) 2>&5
9435   ac_status=$?
9436   echo "$as_me:9436: \$? = $ac_status" >&5
9437   (exit $ac_status); }; }; then
9438   cf_result=yes
9439 else
9440   echo "$as_me: failed program was:" >&5
9441 cat conftest.$ac_ext >&5
9442 cf_result=no
9443 fi
9444 rm -f conftest.$ac_objext conftest.$ac_ext
9445         echo "$as_me:9445: result: $cf_result" >&5
9446 echo "${ECHO_T}$cf_result" >&6
9447         if test "$cf_result" = no ; then
9448                 # perhaps we can override it - try...
9449                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9450         fi
9451 fi
9452
9453 fi
9454
9455 echo "$as_me:9455: checking if wcwidth agrees graphics are single-width" >&5
9456 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
9457 if test "${cf_cv_wcwidth_graphics+set}" = set; then
9458   echo $ECHO_N "(cached) $ECHO_C" >&6
9459 else
9460
9461 cat >conftest.in <<CF_EOF
9462 -       VT100 symbols
9463 0x250c  upper left corner
9464 0x2514  lower left corner
9465 0x2510  upper right corner
9466 0x2518  lower right corner
9467 0x251c  tee pointing left
9468 0x2524  tee pointing right
9469 0x2534  tee pointing up
9470 0x252c  tee pointing down
9471 0x2500  horizontal line
9472 0x2502  vertical line
9473 0x253c  large plus or crossover
9474 0x23ba  scan line 1
9475 0x23bd  scan line 9
9476 0x25c6  diamond
9477 0x2592  checker board (stipple)
9478 0x00b0  degree symbol
9479 0x00b1  plus/minus
9480 0x00b7  bullet
9481 -       Teletype 5410v1 symbols
9482 0x2190  arrow pointing left
9483 0x2192  arrow pointing right
9484 0x2193  arrow pointing down
9485 0x2191  arrow pointing up
9486 0x2592  board of squares
9487 0x2603  lantern symbol
9488 0x25ae  solid square block
9489 -       these defaults were invented for ncurses
9490 0x23bb  scan line 3
9491 0x23bc  scan line 7
9492 0x2264  less-than-or-equal-to
9493 0x2265  greater-than-or-equal-to
9494 0x03c0  greek pi
9495 0x2260  not-equal
9496 0x00a3  pound-sterling symbol
9497 -       thick-line-drawing
9498 0x250f  upper left corner
9499 0x2517  lower left corner
9500 0x2513  upper right corner
9501 0x251b  lower right corner
9502 0x2523  tee pointing left
9503 0x252b  tee pointing right
9504 0x253b  tee pointing up
9505 0x2533  tee pointing down
9506 0x2501  horizontal line
9507 0x2503  vertical line
9508 0x254b  large plus or crossover
9509 -       double-line-drawing
9510 0x2554  upper left corner
9511 0x255a  lower left corner
9512 0x2557  upper right corner
9513 0x255d  lower right corner
9514 0x2563  tee pointing left
9515 0x2560  tee pointing right
9516 0x2569  tee pointing up
9517 0x2566  tee pointing down
9518 0x2550  horizontal line
9519 0x2551  vertical line
9520 0x256c  large plus or crossover
9521 CF_EOF
9522 if test "$cross_compiling" = yes; then
9523   cf_cv_wcwidth_graphics=unknown
9524 else
9525   cat >conftest.$ac_ext <<_ACEOF
9526 #line 9526 "configure"
9527 #include "confdefs.h"
9528
9529 #include <locale.h>
9530 #include <stdio.h>
9531 #include <wchar.h>
9532
9533 #define MY_LEN 80
9534
9535 int
9536 main(void)
9537 {
9538         FILE *fp;
9539         int value;
9540         char buffer[MY_LEN + 1];
9541         char notes[MY_LEN + 1];
9542         int totals = 0;
9543         int passed = 0;
9544
9545         if (setlocale(LC_ALL, "en_US.UTF8") ||
9546                 setlocale(LC_ALL, "en_US.UTF-8") ||
9547                 setlocale(LC_ALL, "en_US.utf8") ||
9548                 setlocale(LC_ALL, "en_US.utf-8")) {
9549                 if ((fp = fopen("conftest.in", "r")) != 0) {
9550                         while (fgets(buffer, MY_LEN, fp) != 0) {
9551                                 if (*buffer == '-') {
9552                                         fprintf(stderr, "\t%s", buffer);
9553                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
9554                                         ++totals;
9555                                         if (wcwidth(value) == 1)
9556                                                 ++passed;
9557                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
9558                                 } else {
9559                                         fprintf(stderr, "?\t%s", buffer);
9560                                 }
9561                         }
9562                 }
9563         }
9564         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
9565         return (totals == passed) ? 0 : 1;
9566 }
9567
9568 _ACEOF
9569 rm -f conftest$ac_exeext
9570 if { (eval echo "$as_me:9570: \"$ac_link\"") >&5
9571   (eval $ac_link) 2>&5
9572   ac_status=$?
9573   echo "$as_me:9573: \$? = $ac_status" >&5
9574   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9575   { (eval echo "$as_me:9575: \"$ac_try\"") >&5
9576   (eval $ac_try) 2>&5
9577   ac_status=$?
9578   echo "$as_me:9578: \$? = $ac_status" >&5
9579   (exit $ac_status); }; }; then
9580   cf_cv_wcwidth_graphics=yes
9581 else
9582   echo "$as_me: program exited with status $ac_status" >&5
9583 echo "$as_me: failed program was:" >&5
9584 cat conftest.$ac_ext >&5
9585 cf_cv_wcwidth_graphics=no
9586 fi
9587 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9588 fi
9589
9590 fi
9591 echo "$as_me:9591: result: $cf_cv_wcwidth_graphics" >&5
9592 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
9593
9594         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
9595
9596         # with_overwrite=no
9597         NCURSES_CH_T=cchar_t
9598
9599 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9600 do
9601 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9602 echo "$as_me:9602: checking for $ac_func" >&5
9603 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9604 if eval "test \"\${$as_ac_var+set}\" = set"; then
9605   echo $ECHO_N "(cached) $ECHO_C" >&6
9606 else
9607   cat >conftest.$ac_ext <<_ACEOF
9608 #line 9608 "configure"
9609 #include "confdefs.h"
9610 /* System header to define __stub macros and hopefully few prototypes,
9611     which can conflict with char $ac_func (); below.  */
9612 #include <assert.h>
9613 /* Override any gcc2 internal prototype to avoid an error.  */
9614 #ifdef __cplusplus
9615 extern "C"
9616 #endif
9617 /* We use char because int might match the return type of a gcc2
9618    builtin and then its argument prototype would still apply.  */
9619 char $ac_func ();
9620 char (*f) ();
9621
9622 int
9623 main ()
9624 {
9625 /* The GNU C library defines this for functions which it implements
9626     to always fail with ENOSYS.  Some functions are actually named
9627     something starting with __ and the normal name is an alias.  */
9628 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9629 choke me
9630 #else
9631 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9632 #endif
9633
9634   ;
9635   return 0;
9636 }
9637 _ACEOF
9638 rm -f conftest.$ac_objext conftest$ac_exeext
9639 if { (eval echo "$as_me:9639: \"$ac_link\"") >&5
9640   (eval $ac_link) 2>&5
9641   ac_status=$?
9642   echo "$as_me:9642: \$? = $ac_status" >&5
9643   (exit $ac_status); } &&
9644          { ac_try='test -s conftest$ac_exeext'
9645   { (eval echo "$as_me:9645: \"$ac_try\"") >&5
9646   (eval $ac_try) 2>&5
9647   ac_status=$?
9648   echo "$as_me:9648: \$? = $ac_status" >&5
9649   (exit $ac_status); }; }; then
9650   eval "$as_ac_var=yes"
9651 else
9652   echo "$as_me: failed program was:" >&5
9653 cat conftest.$ac_ext >&5
9654 eval "$as_ac_var=no"
9655 fi
9656 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9657 fi
9658 echo "$as_me:9658: result: `eval echo '${'$as_ac_var'}'`" >&5
9659 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9660 if test `eval echo '${'$as_ac_var'}'` = yes; then
9661   cat >>confdefs.h <<EOF
9662 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9663 EOF
9664
9665 fi
9666 done
9667
9668         if test "x$ac_cv_func_putwc" != xyes ; then
9669
9670 echo "$as_me:9670: checking for multibyte character support" >&5
9671 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9672 if test "${cf_cv_utf8_lib+set}" = set; then
9673   echo $ECHO_N "(cached) $ECHO_C" >&6
9674 else
9675
9676         cf_save_LIBS="$LIBS"
9677         cat >conftest.$ac_ext <<_ACEOF
9678 #line 9678 "configure"
9679 #include "confdefs.h"
9680
9681 #include <stdlib.h>
9682 int
9683 main ()
9684 {
9685 putwc(0,0);
9686   ;
9687   return 0;
9688 }
9689 _ACEOF
9690 rm -f conftest.$ac_objext conftest$ac_exeext
9691 if { (eval echo "$as_me:9691: \"$ac_link\"") >&5
9692   (eval $ac_link) 2>&5
9693   ac_status=$?
9694   echo "$as_me:9694: \$? = $ac_status" >&5
9695   (exit $ac_status); } &&
9696          { ac_try='test -s conftest$ac_exeext'
9697   { (eval echo "$as_me:9697: \"$ac_try\"") >&5
9698   (eval $ac_try) 2>&5
9699   ac_status=$?
9700   echo "$as_me:9700: \$? = $ac_status" >&5
9701   (exit $ac_status); }; }; then
9702   cf_cv_utf8_lib=yes
9703 else
9704   echo "$as_me: failed program was:" >&5
9705 cat conftest.$ac_ext >&5
9706
9707 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9708 # will be set on completion of the AC_TRY_LINK below.
9709 cf_cv_header_path_utf8=
9710 cf_cv_library_path_utf8=
9711
9712 echo "${as_me:-configure}:9712: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9713
9714 cf_save_LIBS="$LIBS"
9715
9716 cat >conftest.$ac_ext <<_ACEOF
9717 #line 9717 "configure"
9718 #include "confdefs.h"
9719
9720 #include <libutf8.h>
9721 int
9722 main ()
9723 {
9724 putwc(0,0);
9725   ;
9726   return 0;
9727 }
9728 _ACEOF
9729 rm -f conftest.$ac_objext conftest$ac_exeext
9730 if { (eval echo "$as_me:9730: \"$ac_link\"") >&5
9731   (eval $ac_link) 2>&5
9732   ac_status=$?
9733   echo "$as_me:9733: \$? = $ac_status" >&5
9734   (exit $ac_status); } &&
9735          { ac_try='test -s conftest$ac_exeext'
9736   { (eval echo "$as_me:9736: \"$ac_try\"") >&5
9737   (eval $ac_try) 2>&5
9738   ac_status=$?
9739   echo "$as_me:9739: \$? = $ac_status" >&5
9740   (exit $ac_status); }; }; then
9741
9742         cf_cv_find_linkage_utf8=yes
9743         cf_cv_header_path_utf8=/usr/include
9744         cf_cv_library_path_utf8=/usr/lib
9745
9746 else
9747   echo "$as_me: failed program was:" >&5
9748 cat conftest.$ac_ext >&5
9749
9750 LIBS="-lutf8  $cf_save_LIBS"
9751
9752 cat >conftest.$ac_ext <<_ACEOF
9753 #line 9753 "configure"
9754 #include "confdefs.h"
9755
9756 #include <libutf8.h>
9757 int
9758 main ()
9759 {
9760 putwc(0,0);
9761   ;
9762   return 0;
9763 }
9764 _ACEOF
9765 rm -f conftest.$ac_objext conftest$ac_exeext
9766 if { (eval echo "$as_me:9766: \"$ac_link\"") >&5
9767   (eval $ac_link) 2>&5
9768   ac_status=$?
9769   echo "$as_me:9769: \$? = $ac_status" >&5
9770   (exit $ac_status); } &&
9771          { ac_try='test -s conftest$ac_exeext'
9772   { (eval echo "$as_me:9772: \"$ac_try\"") >&5
9773   (eval $ac_try) 2>&5
9774   ac_status=$?
9775   echo "$as_me:9775: \$? = $ac_status" >&5
9776   (exit $ac_status); }; }; then
9777
9778         cf_cv_find_linkage_utf8=yes
9779         cf_cv_header_path_utf8=/usr/include
9780         cf_cv_library_path_utf8=/usr/lib
9781         cf_cv_library_file_utf8="-lutf8"
9782
9783 else
9784   echo "$as_me: failed program was:" >&5
9785 cat conftest.$ac_ext >&5
9786
9787         cf_cv_find_linkage_utf8=no
9788         LIBS="$cf_save_LIBS"
9789
9790         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
9791
9792 echo "${as_me:-configure}:9792: testing find linkage for utf8 library ..." 1>&5
9793
9794 echo "${as_me:-configure}:9794: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9795
9796         cf_save_CPPFLAGS="$CPPFLAGS"
9797         cf_test_CPPFLAGS="$CPPFLAGS"
9798
9799 cf_search=
9800
9801 # collect the current set of include-directories from compiler flags
9802 cf_header_path_list=""
9803 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9804         for cf_header_path in $CPPFLAGS $CFLAGS
9805         do
9806                 case $cf_header_path in
9807                 (-I*)
9808                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9809
9810 test "x$cf_header_path" != "xNONE" && \
9811 test -d "$cf_header_path" && \
9812  {
9813         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9814         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9815         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9816         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9817         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9818         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9819 }
9820
9821                         cf_header_path_list="$cf_header_path_list $cf_search"
9822                         ;;
9823                 esac
9824         done
9825 fi
9826
9827 # add the variations for the package we are looking for
9828
9829 cf_search=
9830
9831 test "x$prefix" != "xNONE" && \
9832 test -d "$prefix" && \
9833  {
9834         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9835         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9836         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9837         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9838         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9839         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9840 }
9841
9842 for cf_subdir_prefix in \
9843         /usr \
9844         /usr/local \
9845         /usr/pkg \
9846         /opt \
9847         /opt/local \
9848         $HOME
9849 do
9850
9851 test "x$cf_subdir_prefix" != "x$prefix" && \
9852 test -d "$cf_subdir_prefix" && \
9853 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9854         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9855         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9856         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9857         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9858         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9859         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9860 }
9861
9862 done
9863
9864 test "$includedir" != NONE && \
9865 test "$includedir" != "/usr/include" && \
9866 test -d "$includedir" && {
9867         test -d $includedir &&    cf_search="$cf_search $includedir"
9868         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9869 }
9870
9871 test "$oldincludedir" != NONE && \
9872 test "$oldincludedir" != "/usr/include" && \
9873 test -d "$oldincludedir" && {
9874         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9875         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9876 }
9877
9878 cf_search="$cf_search $cf_header_path_list"
9879
9880         for cf_cv_header_path_utf8 in $cf_search
9881         do
9882                 if test -d $cf_cv_header_path_utf8 ; then
9883                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9884
9885 echo "${as_me:-configure}:9885: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9886
9887                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9888                         cat >conftest.$ac_ext <<_ACEOF
9889 #line 9889 "configure"
9890 #include "confdefs.h"
9891
9892 #include <libutf8.h>
9893 int
9894 main ()
9895 {
9896 putwc(0,0);
9897   ;
9898   return 0;
9899 }
9900 _ACEOF
9901 rm -f conftest.$ac_objext
9902 if { (eval echo "$as_me:9902: \"$ac_compile\"") >&5
9903   (eval $ac_compile) 2>&5
9904   ac_status=$?
9905   echo "$as_me:9905: \$? = $ac_status" >&5
9906   (exit $ac_status); } &&
9907          { ac_try='test -s conftest.$ac_objext'
9908   { (eval echo "$as_me:9908: \"$ac_try\"") >&5
9909   (eval $ac_try) 2>&5
9910   ac_status=$?
9911   echo "$as_me:9911: \$? = $ac_status" >&5
9912   (exit $ac_status); }; }; then
9913
9914                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9915
9916 echo "${as_me:-configure}:9916: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9917
9918                                 cf_cv_find_linkage_utf8=maybe
9919                                 cf_test_CPPFLAGS="$CPPFLAGS"
9920                                 break
9921 else
9922   echo "$as_me: failed program was:" >&5
9923 cat conftest.$ac_ext >&5
9924
9925                                 CPPFLAGS="$cf_save_CPPFLAGS"
9926
9927 fi
9928 rm -f conftest.$ac_objext conftest.$ac_ext
9929                 fi
9930         done
9931
9932         if test "$cf_cv_find_linkage_utf8" = maybe ; then
9933
9934 echo "${as_me:-configure}:9934: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9935
9936                 cf_save_LIBS="$LIBS"
9937                 cf_save_LDFLAGS="$LDFLAGS"
9938
9939                 if test "$cf_cv_find_linkage_utf8" != yes ; then
9940
9941 cf_search=
9942 cf_library_path_list=""
9943 if test -n "${LDFLAGS}${LIBS}" ; then
9944         for cf_library_path in $LDFLAGS $LIBS
9945         do
9946                 case $cf_library_path in
9947                 (-L*)
9948                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9949
9950 test "x$cf_library_path" != "xNONE" && \
9951 test -d "$cf_library_path" && \
9952  {
9953         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9954         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9955         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9956         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9957         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9958         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9959 }
9960
9961                         cf_library_path_list="$cf_library_path_list $cf_search"
9962                         ;;
9963                 esac
9964         done
9965 fi
9966
9967 cf_search=
9968
9969 test "x$prefix" != "xNONE" && \
9970 test -d "$prefix" && \
9971  {
9972         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9973         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9974         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9975         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9976         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9977         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9978 }
9979
9980 for cf_subdir_prefix in \
9981         /usr \
9982         /usr/local \
9983         /usr/pkg \
9984         /opt \
9985         /opt/local \
9986         $HOME
9987 do
9988
9989 test "x$cf_subdir_prefix" != "x$prefix" && \
9990 test -d "$cf_subdir_prefix" && \
9991 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9992         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
9993         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9994         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
9995         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
9996         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
9997         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
9998 }
9999
10000 done
10001
10002 cf_search="$cf_library_path_list $cf_search"
10003
10004                         for cf_cv_library_path_utf8 in $cf_search
10005                         do
10006                                 if test -d $cf_cv_library_path_utf8 ; then
10007                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
10008
10009 echo "${as_me:-configure}:10009: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
10010
10011                                         CPPFLAGS="$cf_test_CPPFLAGS"
10012                                         LIBS="-lutf8  $cf_save_LIBS"
10013                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
10014                                         cat >conftest.$ac_ext <<_ACEOF
10015 #line 10015 "configure"
10016 #include "confdefs.h"
10017
10018 #include <libutf8.h>
10019 int
10020 main ()
10021 {
10022 putwc(0,0);
10023   ;
10024   return 0;
10025 }
10026 _ACEOF
10027 rm -f conftest.$ac_objext conftest$ac_exeext
10028 if { (eval echo "$as_me:10028: \"$ac_link\"") >&5
10029   (eval $ac_link) 2>&5
10030   ac_status=$?
10031   echo "$as_me:10031: \$? = $ac_status" >&5
10032   (exit $ac_status); } &&
10033          { ac_try='test -s conftest$ac_exeext'
10034   { (eval echo "$as_me:10034: \"$ac_try\"") >&5
10035   (eval $ac_try) 2>&5
10036   ac_status=$?
10037   echo "$as_me:10037: \$? = $ac_status" >&5
10038   (exit $ac_status); }; }; then
10039
10040                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
10041
10042 echo "${as_me:-configure}:10042: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
10043
10044                                         cf_cv_find_linkage_utf8=yes
10045                                         cf_cv_library_file_utf8="-lutf8"
10046                                         break
10047 else
10048   echo "$as_me: failed program was:" >&5
10049 cat conftest.$ac_ext >&5
10050
10051                                         CPPFLAGS="$cf_save_CPPFLAGS"
10052                                         LIBS="$cf_save_LIBS"
10053                                         LDFLAGS="$cf_save_LDFLAGS"
10054
10055 fi
10056 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10057                                 fi
10058                         done
10059                         CPPFLAGS="$cf_save_CPPFLAGS"
10060                         LDFLAGS="$cf_save_LDFLAGS"
10061                 fi
10062
10063         else
10064                 cf_cv_find_linkage_utf8=no
10065         fi
10066
10067 fi
10068 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10069
10070 fi
10071 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10072
10073 LIBS="$cf_save_LIBS"
10074
10075 if test "$cf_cv_find_linkage_utf8" = yes ; then
10076 cf_cv_utf8_lib=add-on
10077 else
10078 cf_cv_utf8_lib=no
10079 fi
10080
10081 fi
10082 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10083 fi
10084 echo "$as_me:10084: result: $cf_cv_utf8_lib" >&5
10085 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10086
10087 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10088 # ncurses/ncursesw:
10089 if test "$cf_cv_utf8_lib" = "add-on" ; then
10090
10091 cat >>confdefs.h <<\EOF
10092 #define HAVE_LIBUTF8_H 1
10093 EOF
10094
10095 if test -n "$cf_cv_header_path_utf8" ; then
10096   for cf_add_incdir in $cf_cv_header_path_utf8
10097   do
10098         while test $cf_add_incdir != /usr/include
10099         do
10100           if test -d $cf_add_incdir
10101           then
10102                 cf_have_incdir=no
10103                 if test -n "$CFLAGS$CPPFLAGS" ; then
10104                   # a loop is needed to ensure we can add subdirs of existing dirs
10105                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10106                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10107                           cf_have_incdir=yes; break
10108                         fi
10109                   done
10110                 fi
10111
10112                 if test "$cf_have_incdir" = no ; then
10113                   if test "$cf_add_incdir" = /usr/local/include ; then
10114                         if test "$GCC" = yes
10115                         then
10116                           cf_save_CPPFLAGS=$CPPFLAGS
10117                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10118                           cat >conftest.$ac_ext <<_ACEOF
10119 #line 10119 "configure"
10120 #include "confdefs.h"
10121 #include <stdio.h>
10122 int
10123 main ()
10124 {
10125 printf("Hello")
10126   ;
10127   return 0;
10128 }
10129 _ACEOF
10130 rm -f conftest.$ac_objext
10131 if { (eval echo "$as_me:10131: \"$ac_compile\"") >&5
10132   (eval $ac_compile) 2>&5
10133   ac_status=$?
10134   echo "$as_me:10134: \$? = $ac_status" >&5
10135   (exit $ac_status); } &&
10136          { ac_try='test -s conftest.$ac_objext'
10137   { (eval echo "$as_me:10137: \"$ac_try\"") >&5
10138   (eval $ac_try) 2>&5
10139   ac_status=$?
10140   echo "$as_me:10140: \$? = $ac_status" >&5
10141   (exit $ac_status); }; }; then
10142   :
10143 else
10144   echo "$as_me: failed program was:" >&5
10145 cat conftest.$ac_ext >&5
10146 cf_have_incdir=yes
10147 fi
10148 rm -f conftest.$ac_objext conftest.$ac_ext
10149                           CPPFLAGS=$cf_save_CPPFLAGS
10150                         fi
10151                   fi
10152                 fi
10153
10154                 if test "$cf_have_incdir" = no ; then
10155                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10156
10157 echo "${as_me:-configure}:10157: testing adding $cf_add_incdir to include-path ..." 1>&5
10158
10159                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10160
10161                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10162                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10163                   cf_add_incdir="$cf_top_incdir"
10164                 else
10165                   break
10166                 fi
10167           else
10168                 break
10169           fi
10170         done
10171   done
10172 fi
10173
10174 if test -n "$cf_cv_library_path_utf8" ; then
10175         for cf_add_libdir in $cf_cv_library_path_utf8
10176         do
10177                 if test $cf_add_libdir = /usr/lib ; then
10178                         :
10179                 elif test -d $cf_add_libdir
10180                 then
10181                         cf_have_libdir=no
10182                         if test -n "$LDFLAGS$LIBS" ; then
10183                                 # a loop is needed to ensure we can add subdirs of existing dirs
10184                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10185                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10186                                                 cf_have_libdir=yes; break
10187                                         fi
10188                                 done
10189                         fi
10190                         if test "$cf_have_libdir" = no ; then
10191                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10192
10193 echo "${as_me:-configure}:10193: testing adding $cf_add_libdir to library-path ..." 1>&5
10194
10195                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10196                         fi
10197                 fi
10198         done
10199 fi
10200
10201 cf_add_libs="$cf_cv_library_file_utf8"
10202 # Filter out duplicates - this happens with badly-designed ".pc" files...
10203 for cf_add_1lib in $LIBS
10204 do
10205         for cf_add_2lib in $cf_add_libs
10206         do
10207                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10208                 then
10209                         cf_add_1lib=
10210                         break
10211                 fi
10212         done
10213         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10214 done
10215 LIBS="$cf_add_libs"
10216
10217 fi
10218
10219                 if test "$cf_cv_utf8_lib" != no ; then
10220                         NCURSES_LIBUTF8=1
10221                 fi
10222         fi
10223
10224 # This is needed on Tru64 5.0 to declare mbstate_t
10225 echo "$as_me:10225: checking if we must include wchar.h to declare mbstate_t" >&5
10226 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10227 if test "${cf_cv_mbstate_t+set}" = set; then
10228   echo $ECHO_N "(cached) $ECHO_C" >&6
10229 else
10230
10231 cat >conftest.$ac_ext <<_ACEOF
10232 #line 10232 "configure"
10233 #include "confdefs.h"
10234
10235 #include <stdlib.h>
10236 #include <stdarg.h>
10237 #include <stdio.h>
10238 #ifdef HAVE_LIBUTF8_H
10239 #include <libutf8.h>
10240 #endif
10241 int
10242 main ()
10243 {
10244 mbstate_t state
10245   ;
10246   return 0;
10247 }
10248 _ACEOF
10249 rm -f conftest.$ac_objext
10250 if { (eval echo "$as_me:10250: \"$ac_compile\"") >&5
10251   (eval $ac_compile) 2>&5
10252   ac_status=$?
10253   echo "$as_me:10253: \$? = $ac_status" >&5
10254   (exit $ac_status); } &&
10255          { ac_try='test -s conftest.$ac_objext'
10256   { (eval echo "$as_me:10256: \"$ac_try\"") >&5
10257   (eval $ac_try) 2>&5
10258   ac_status=$?
10259   echo "$as_me:10259: \$? = $ac_status" >&5
10260   (exit $ac_status); }; }; then
10261   cf_cv_mbstate_t=no
10262 else
10263   echo "$as_me: failed program was:" >&5
10264 cat conftest.$ac_ext >&5
10265 cat >conftest.$ac_ext <<_ACEOF
10266 #line 10266 "configure"
10267 #include "confdefs.h"
10268
10269 #include <stdlib.h>
10270 #include <stdarg.h>
10271 #include <stdio.h>
10272 #include <wchar.h>
10273 #ifdef HAVE_LIBUTF8_H
10274 #include <libutf8.h>
10275 #endif
10276 int
10277 main ()
10278 {
10279 mbstate_t value
10280   ;
10281   return 0;
10282 }
10283 _ACEOF
10284 rm -f conftest.$ac_objext
10285 if { (eval echo "$as_me:10285: \"$ac_compile\"") >&5
10286   (eval $ac_compile) 2>&5
10287   ac_status=$?
10288   echo "$as_me:10288: \$? = $ac_status" >&5
10289   (exit $ac_status); } &&
10290          { ac_try='test -s conftest.$ac_objext'
10291   { (eval echo "$as_me:10291: \"$ac_try\"") >&5
10292   (eval $ac_try) 2>&5
10293   ac_status=$?
10294   echo "$as_me:10294: \$? = $ac_status" >&5
10295   (exit $ac_status); }; }; then
10296   cf_cv_mbstate_t=yes
10297 else
10298   echo "$as_me: failed program was:" >&5
10299 cat conftest.$ac_ext >&5
10300 cf_cv_mbstate_t=unknown
10301 fi
10302 rm -f conftest.$ac_objext conftest.$ac_ext
10303 fi
10304 rm -f conftest.$ac_objext conftest.$ac_ext
10305 fi
10306 echo "$as_me:10306: result: $cf_cv_mbstate_t" >&5
10307 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10308
10309 if test "$cf_cv_mbstate_t" = yes ; then
10310
10311 cat >>confdefs.h <<\EOF
10312 #define NEED_WCHAR_H 1
10313 EOF
10314
10315         NEED_WCHAR_H=1
10316 fi
10317
10318 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10319 if test "$cf_cv_mbstate_t" = unknown ; then
10320         NCURSES_MBSTATE_T=1
10321 fi
10322
10323 # This is needed on Tru64 5.0 to declare wchar_t
10324 echo "$as_me:10324: checking if we must include wchar.h to declare wchar_t" >&5
10325 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10326 if test "${cf_cv_wchar_t+set}" = set; then
10327   echo $ECHO_N "(cached) $ECHO_C" >&6
10328 else
10329
10330 cat >conftest.$ac_ext <<_ACEOF
10331 #line 10331 "configure"
10332 #include "confdefs.h"
10333
10334 #include <stdlib.h>
10335 #include <stdarg.h>
10336 #include <stdio.h>
10337 #ifdef HAVE_LIBUTF8_H
10338 #include <libutf8.h>
10339 #endif
10340 int
10341 main ()
10342 {
10343 wchar_t state
10344   ;
10345   return 0;
10346 }
10347 _ACEOF
10348 rm -f conftest.$ac_objext
10349 if { (eval echo "$as_me:10349: \"$ac_compile\"") >&5
10350   (eval $ac_compile) 2>&5
10351   ac_status=$?
10352   echo "$as_me:10352: \$? = $ac_status" >&5
10353   (exit $ac_status); } &&
10354          { ac_try='test -s conftest.$ac_objext'
10355   { (eval echo "$as_me:10355: \"$ac_try\"") >&5
10356   (eval $ac_try) 2>&5
10357   ac_status=$?
10358   echo "$as_me:10358: \$? = $ac_status" >&5
10359   (exit $ac_status); }; }; then
10360   cf_cv_wchar_t=no
10361 else
10362   echo "$as_me: failed program was:" >&5
10363 cat conftest.$ac_ext >&5
10364 cat >conftest.$ac_ext <<_ACEOF
10365 #line 10365 "configure"
10366 #include "confdefs.h"
10367
10368 #include <stdlib.h>
10369 #include <stdarg.h>
10370 #include <stdio.h>
10371 #include <wchar.h>
10372 #ifdef HAVE_LIBUTF8_H
10373 #include <libutf8.h>
10374 #endif
10375 int
10376 main ()
10377 {
10378 wchar_t value
10379   ;
10380   return 0;
10381 }
10382 _ACEOF
10383 rm -f conftest.$ac_objext
10384 if { (eval echo "$as_me:10384: \"$ac_compile\"") >&5
10385   (eval $ac_compile) 2>&5
10386   ac_status=$?
10387   echo "$as_me:10387: \$? = $ac_status" >&5
10388   (exit $ac_status); } &&
10389          { ac_try='test -s conftest.$ac_objext'
10390   { (eval echo "$as_me:10390: \"$ac_try\"") >&5
10391   (eval $ac_try) 2>&5
10392   ac_status=$?
10393   echo "$as_me:10393: \$? = $ac_status" >&5
10394   (exit $ac_status); }; }; then
10395   cf_cv_wchar_t=yes
10396 else
10397   echo "$as_me: failed program was:" >&5
10398 cat conftest.$ac_ext >&5
10399 cf_cv_wchar_t=unknown
10400 fi
10401 rm -f conftest.$ac_objext conftest.$ac_ext
10402 fi
10403 rm -f conftest.$ac_objext conftest.$ac_ext
10404 fi
10405 echo "$as_me:10405: result: $cf_cv_wchar_t" >&5
10406 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10407
10408 if test "$cf_cv_wchar_t" = yes ; then
10409
10410 cat >>confdefs.h <<\EOF
10411 #define NEED_WCHAR_H 1
10412 EOF
10413
10414         NEED_WCHAR_H=1
10415 fi
10416
10417 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10418 if test "$cf_cv_wchar_t" = unknown ; then
10419         NCURSES_WCHAR_T=1
10420 fi
10421
10422 # if we find wchar_t in either place, use substitution to provide a fallback.
10423 if test "$cf_cv_wchar_t" != unknown ; then
10424         NCURSES_OK_WCHAR_T=1
10425 fi
10426
10427 # This is needed on Tru64 5.0 to declare wint_t
10428 echo "$as_me:10428: checking if we must include wchar.h to declare wint_t" >&5
10429 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10430 if test "${cf_cv_wint_t+set}" = set; then
10431   echo $ECHO_N "(cached) $ECHO_C" >&6
10432 else
10433
10434 cat >conftest.$ac_ext <<_ACEOF
10435 #line 10435 "configure"
10436 #include "confdefs.h"
10437
10438 #include <stdlib.h>
10439 #include <stdarg.h>
10440 #include <stdio.h>
10441 #ifdef HAVE_LIBUTF8_H
10442 #include <libutf8.h>
10443 #endif
10444 int
10445 main ()
10446 {
10447 wint_t state
10448   ;
10449   return 0;
10450 }
10451 _ACEOF
10452 rm -f conftest.$ac_objext
10453 if { (eval echo "$as_me:10453: \"$ac_compile\"") >&5
10454   (eval $ac_compile) 2>&5
10455   ac_status=$?
10456   echo "$as_me:10456: \$? = $ac_status" >&5
10457   (exit $ac_status); } &&
10458          { ac_try='test -s conftest.$ac_objext'
10459   { (eval echo "$as_me:10459: \"$ac_try\"") >&5
10460   (eval $ac_try) 2>&5
10461   ac_status=$?
10462   echo "$as_me:10462: \$? = $ac_status" >&5
10463   (exit $ac_status); }; }; then
10464   cf_cv_wint_t=no
10465 else
10466   echo "$as_me: failed program was:" >&5
10467 cat conftest.$ac_ext >&5
10468 cat >conftest.$ac_ext <<_ACEOF
10469 #line 10469 "configure"
10470 #include "confdefs.h"
10471
10472 #include <stdlib.h>
10473 #include <stdarg.h>
10474 #include <stdio.h>
10475 #include <wchar.h>
10476 #ifdef HAVE_LIBUTF8_H
10477 #include <libutf8.h>
10478 #endif
10479 int
10480 main ()
10481 {
10482 wint_t value
10483   ;
10484   return 0;
10485 }
10486 _ACEOF
10487 rm -f conftest.$ac_objext
10488 if { (eval echo "$as_me:10488: \"$ac_compile\"") >&5
10489   (eval $ac_compile) 2>&5
10490   ac_status=$?
10491   echo "$as_me:10491: \$? = $ac_status" >&5
10492   (exit $ac_status); } &&
10493          { ac_try='test -s conftest.$ac_objext'
10494   { (eval echo "$as_me:10494: \"$ac_try\"") >&5
10495   (eval $ac_try) 2>&5
10496   ac_status=$?
10497   echo "$as_me:10497: \$? = $ac_status" >&5
10498   (exit $ac_status); }; }; then
10499   cf_cv_wint_t=yes
10500 else
10501   echo "$as_me: failed program was:" >&5
10502 cat conftest.$ac_ext >&5
10503 cf_cv_wint_t=unknown
10504 fi
10505 rm -f conftest.$ac_objext conftest.$ac_ext
10506 fi
10507 rm -f conftest.$ac_objext conftest.$ac_ext
10508 fi
10509 echo "$as_me:10509: result: $cf_cv_wint_t" >&5
10510 echo "${ECHO_T}$cf_cv_wint_t" >&6
10511
10512 if test "$cf_cv_wint_t" = yes ; then
10513
10514 cat >>confdefs.h <<\EOF
10515 #define NEED_WCHAR_H 1
10516 EOF
10517
10518         NEED_WCHAR_H=1
10519 fi
10520
10521 # if we do not find wint_t in either place, use substitution to provide a fallback.
10522 if test "$cf_cv_wint_t" = unknown ; then
10523         NCURSES_WINT_T=1
10524 fi
10525
10526 # if we find wint_t in either place, use substitution to provide a fallback.
10527 if test "$cf_cv_wint_t" != unknown ; then
10528         NCURSES_OK_WINT_T=1
10529 fi
10530
10531         if test "$NCURSES_MBSTATE_T" != 0; then
10532
10533 cat >>confdefs.h <<\EOF
10534 #define NEED_MBSTATE_T_DEF 1
10535 EOF
10536
10537         fi
10538 fi
10539
10540 ###   use option --disable-lp64 to allow long chtype
10541 echo "$as_me:10541: checking whether to enable _LP64 definition in curses.h" >&5
10542 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10543
10544 # Check whether --enable-lp64 or --disable-lp64 was given.
10545 if test "${enable_lp64+set}" = set; then
10546   enableval="$enable_lp64"
10547   with_lp64=$enableval
10548 else
10549   with_lp64=$cf_dft_with_lp64
10550 fi;
10551 echo "$as_me:10551: result: $with_lp64" >&5
10552 echo "${ECHO_T}$with_lp64" >&6
10553
10554 if test "x$with_lp64" = xyes ; then
10555         cf_cv_enable_lp64=1
10556 else
10557         cf_cv_enable_lp64=0
10558 fi
10559
10560 # Check whether --enable-largefile or --disable-largefile was given.
10561 if test "${enable_largefile+set}" = set; then
10562   enableval="$enable_largefile"
10563
10564 fi;
10565 if test "$enable_largefile" != no; then
10566
10567   echo "$as_me:10567: checking for special C compiler options needed for large files" >&5
10568 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10569 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10570   echo $ECHO_N "(cached) $ECHO_C" >&6
10571 else
10572   ac_cv_sys_largefile_CC=no
10573      if test "$GCC" != yes; then
10574        ac_save_CC=$CC
10575        while :; do
10576          # IRIX 6.2 and later do not support large files by default,
10577          # so use the C compiler's -n32 option if that helps.
10578          cat >conftest.$ac_ext <<_ACEOF
10579 #line 10579 "configure"
10580 #include "confdefs.h"
10581 #include <sys/types.h>
10582  /* Check that off_t can represent 2**63 - 1 correctly.
10583     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10584     since some C++ compilers masquerading as C compilers
10585     incorrectly reject 9223372036854775807.  */
10586 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10587   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10588                        && LARGE_OFF_T % 2147483647 == 1)
10589                       ? 1 : -1];
10590 int
10591 main ()
10592 {
10593
10594   ;
10595   return 0;
10596 }
10597 _ACEOF
10598          rm -f conftest.$ac_objext
10599 if { (eval echo "$as_me:10599: \"$ac_compile\"") >&5
10600   (eval $ac_compile) 2>&5
10601   ac_status=$?
10602   echo "$as_me:10602: \$? = $ac_status" >&5
10603   (exit $ac_status); } &&
10604          { ac_try='test -s conftest.$ac_objext'
10605   { (eval echo "$as_me:10605: \"$ac_try\"") >&5
10606   (eval $ac_try) 2>&5
10607   ac_status=$?
10608   echo "$as_me:10608: \$? = $ac_status" >&5
10609   (exit $ac_status); }; }; then
10610   break
10611 else
10612   echo "$as_me: failed program was:" >&5
10613 cat conftest.$ac_ext >&5
10614 fi
10615 rm -f conftest.$ac_objext
10616          CC="$CC -n32"
10617          rm -f conftest.$ac_objext
10618 if { (eval echo "$as_me:10618: \"$ac_compile\"") >&5
10619   (eval $ac_compile) 2>&5
10620   ac_status=$?
10621   echo "$as_me:10621: \$? = $ac_status" >&5
10622   (exit $ac_status); } &&
10623          { ac_try='test -s conftest.$ac_objext'
10624   { (eval echo "$as_me:10624: \"$ac_try\"") >&5
10625   (eval $ac_try) 2>&5
10626   ac_status=$?
10627   echo "$as_me:10627: \$? = $ac_status" >&5
10628   (exit $ac_status); }; }; then
10629   ac_cv_sys_largefile_CC=' -n32'; break
10630 else
10631   echo "$as_me: failed program was:" >&5
10632 cat conftest.$ac_ext >&5
10633 fi
10634 rm -f conftest.$ac_objext
10635          break
10636        done
10637        CC=$ac_save_CC
10638        rm -f conftest.$ac_ext
10639     fi
10640 fi
10641 echo "$as_me:10641: result: $ac_cv_sys_largefile_CC" >&5
10642 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10643   if test "$ac_cv_sys_largefile_CC" != no; then
10644     CC=$CC$ac_cv_sys_largefile_CC
10645   fi
10646
10647   echo "$as_me:10647: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10648 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10649 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10650   echo $ECHO_N "(cached) $ECHO_C" >&6
10651 else
10652   while :; do
10653   ac_cv_sys_file_offset_bits=no
10654   cat >conftest.$ac_ext <<_ACEOF
10655 #line 10655 "configure"
10656 #include "confdefs.h"
10657 #include <sys/types.h>
10658  /* Check that off_t can represent 2**63 - 1 correctly.
10659     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10660     since some C++ compilers masquerading as C compilers
10661     incorrectly reject 9223372036854775807.  */
10662 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10663   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10664                        && LARGE_OFF_T % 2147483647 == 1)
10665                       ? 1 : -1];
10666 int
10667 main ()
10668 {
10669
10670   ;
10671   return 0;
10672 }
10673 _ACEOF
10674 rm -f conftest.$ac_objext
10675 if { (eval echo "$as_me:10675: \"$ac_compile\"") >&5
10676   (eval $ac_compile) 2>&5
10677   ac_status=$?
10678   echo "$as_me:10678: \$? = $ac_status" >&5
10679   (exit $ac_status); } &&
10680          { ac_try='test -s conftest.$ac_objext'
10681   { (eval echo "$as_me:10681: \"$ac_try\"") >&5
10682   (eval $ac_try) 2>&5
10683   ac_status=$?
10684   echo "$as_me:10684: \$? = $ac_status" >&5
10685   (exit $ac_status); }; }; then
10686   break
10687 else
10688   echo "$as_me: failed program was:" >&5
10689 cat conftest.$ac_ext >&5
10690 fi
10691 rm -f conftest.$ac_objext conftest.$ac_ext
10692   cat >conftest.$ac_ext <<_ACEOF
10693 #line 10693 "configure"
10694 #include "confdefs.h"
10695 #define _FILE_OFFSET_BITS 64
10696 #include <sys/types.h>
10697  /* Check that off_t can represent 2**63 - 1 correctly.
10698     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10699     since some C++ compilers masquerading as C compilers
10700     incorrectly reject 9223372036854775807.  */
10701 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10702   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10703                        && LARGE_OFF_T % 2147483647 == 1)
10704                       ? 1 : -1];
10705 int
10706 main ()
10707 {
10708
10709   ;
10710   return 0;
10711 }
10712 _ACEOF
10713 rm -f conftest.$ac_objext
10714 if { (eval echo "$as_me:10714: \"$ac_compile\"") >&5
10715   (eval $ac_compile) 2>&5
10716   ac_status=$?
10717   echo "$as_me:10717: \$? = $ac_status" >&5
10718   (exit $ac_status); } &&
10719          { ac_try='test -s conftest.$ac_objext'
10720   { (eval echo "$as_me:10720: \"$ac_try\"") >&5
10721   (eval $ac_try) 2>&5
10722   ac_status=$?
10723   echo "$as_me:10723: \$? = $ac_status" >&5
10724   (exit $ac_status); }; }; then
10725   ac_cv_sys_file_offset_bits=64; break
10726 else
10727   echo "$as_me: failed program was:" >&5
10728 cat conftest.$ac_ext >&5
10729 fi
10730 rm -f conftest.$ac_objext conftest.$ac_ext
10731   break
10732 done
10733 fi
10734 echo "$as_me:10734: result: $ac_cv_sys_file_offset_bits" >&5
10735 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10736 if test "$ac_cv_sys_file_offset_bits" != no; then
10737
10738 cat >>confdefs.h <<EOF
10739 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10740 EOF
10741
10742 fi
10743 rm -rf conftest*
10744   echo "$as_me:10744: checking for _LARGE_FILES value needed for large files" >&5
10745 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10746 if test "${ac_cv_sys_large_files+set}" = set; then
10747   echo $ECHO_N "(cached) $ECHO_C" >&6
10748 else
10749   while :; do
10750   ac_cv_sys_large_files=no
10751   cat >conftest.$ac_ext <<_ACEOF
10752 #line 10752 "configure"
10753 #include "confdefs.h"
10754 #include <sys/types.h>
10755  /* Check that off_t can represent 2**63 - 1 correctly.
10756     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10757     since some C++ compilers masquerading as C compilers
10758     incorrectly reject 9223372036854775807.  */
10759 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10760   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10761                        && LARGE_OFF_T % 2147483647 == 1)
10762                       ? 1 : -1];
10763 int
10764 main ()
10765 {
10766
10767   ;
10768   return 0;
10769 }
10770 _ACEOF
10771 rm -f conftest.$ac_objext
10772 if { (eval echo "$as_me:10772: \"$ac_compile\"") >&5
10773   (eval $ac_compile) 2>&5
10774   ac_status=$?
10775   echo "$as_me:10775: \$? = $ac_status" >&5
10776   (exit $ac_status); } &&
10777          { ac_try='test -s conftest.$ac_objext'
10778   { (eval echo "$as_me:10778: \"$ac_try\"") >&5
10779   (eval $ac_try) 2>&5
10780   ac_status=$?
10781   echo "$as_me:10781: \$? = $ac_status" >&5
10782   (exit $ac_status); }; }; then
10783   break
10784 else
10785   echo "$as_me: failed program was:" >&5
10786 cat conftest.$ac_ext >&5
10787 fi
10788 rm -f conftest.$ac_objext conftest.$ac_ext
10789   cat >conftest.$ac_ext <<_ACEOF
10790 #line 10790 "configure"
10791 #include "confdefs.h"
10792 #define _LARGE_FILES 1
10793 #include <sys/types.h>
10794  /* Check that off_t can represent 2**63 - 1 correctly.
10795     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10796     since some C++ compilers masquerading as C compilers
10797     incorrectly reject 9223372036854775807.  */
10798 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10799   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10800                        && LARGE_OFF_T % 2147483647 == 1)
10801                       ? 1 : -1];
10802 int
10803 main ()
10804 {
10805
10806   ;
10807   return 0;
10808 }
10809 _ACEOF
10810 rm -f conftest.$ac_objext
10811 if { (eval echo "$as_me:10811: \"$ac_compile\"") >&5
10812   (eval $ac_compile) 2>&5
10813   ac_status=$?
10814   echo "$as_me:10814: \$? = $ac_status" >&5
10815   (exit $ac_status); } &&
10816          { ac_try='test -s conftest.$ac_objext'
10817   { (eval echo "$as_me:10817: \"$ac_try\"") >&5
10818   (eval $ac_try) 2>&5
10819   ac_status=$?
10820   echo "$as_me:10820: \$? = $ac_status" >&5
10821   (exit $ac_status); }; }; then
10822   ac_cv_sys_large_files=1; break
10823 else
10824   echo "$as_me: failed program was:" >&5
10825 cat conftest.$ac_ext >&5
10826 fi
10827 rm -f conftest.$ac_objext conftest.$ac_ext
10828   break
10829 done
10830 fi
10831 echo "$as_me:10831: result: $ac_cv_sys_large_files" >&5
10832 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10833 if test "$ac_cv_sys_large_files" != no; then
10834
10835 cat >>confdefs.h <<EOF
10836 #define _LARGE_FILES $ac_cv_sys_large_files
10837 EOF
10838
10839 fi
10840 rm -rf conftest*
10841 fi
10842
10843         if test "$enable_largefile" != no ; then
10844         echo "$as_me:10844: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10845 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10846 if test "${ac_cv_sys_largefile_source+set}" = set; then
10847   echo $ECHO_N "(cached) $ECHO_C" >&6
10848 else
10849   while :; do
10850   ac_cv_sys_largefile_source=no
10851   cat >conftest.$ac_ext <<_ACEOF
10852 #line 10852 "configure"
10853 #include "confdefs.h"
10854 #include <stdio.h>
10855 int
10856 main ()
10857 {
10858 return !fseeko;
10859   ;
10860   return 0;
10861 }
10862 _ACEOF
10863 rm -f conftest.$ac_objext
10864 if { (eval echo "$as_me:10864: \"$ac_compile\"") >&5
10865   (eval $ac_compile) 2>&5
10866   ac_status=$?
10867   echo "$as_me:10867: \$? = $ac_status" >&5
10868   (exit $ac_status); } &&
10869          { ac_try='test -s conftest.$ac_objext'
10870   { (eval echo "$as_me:10870: \"$ac_try\"") >&5
10871   (eval $ac_try) 2>&5
10872   ac_status=$?
10873   echo "$as_me:10873: \$? = $ac_status" >&5
10874   (exit $ac_status); }; }; then
10875   break
10876 else
10877   echo "$as_me: failed program was:" >&5
10878 cat conftest.$ac_ext >&5
10879 fi
10880 rm -f conftest.$ac_objext conftest.$ac_ext
10881   cat >conftest.$ac_ext <<_ACEOF
10882 #line 10882 "configure"
10883 #include "confdefs.h"
10884 #define _LARGEFILE_SOURCE 1
10885 #include <stdio.h>
10886 int
10887 main ()
10888 {
10889 return !fseeko;
10890   ;
10891   return 0;
10892 }
10893 _ACEOF
10894 rm -f conftest.$ac_objext
10895 if { (eval echo "$as_me:10895: \"$ac_compile\"") >&5
10896   (eval $ac_compile) 2>&5
10897   ac_status=$?
10898   echo "$as_me:10898: \$? = $ac_status" >&5
10899   (exit $ac_status); } &&
10900          { ac_try='test -s conftest.$ac_objext'
10901   { (eval echo "$as_me:10901: \"$ac_try\"") >&5
10902   (eval $ac_try) 2>&5
10903   ac_status=$?
10904   echo "$as_me:10904: \$? = $ac_status" >&5
10905   (exit $ac_status); }; }; then
10906   ac_cv_sys_largefile_source=1; break
10907 else
10908   echo "$as_me: failed program was:" >&5
10909 cat conftest.$ac_ext >&5
10910 fi
10911 rm -f conftest.$ac_objext conftest.$ac_ext
10912   break
10913 done
10914 fi
10915 echo "$as_me:10915: result: $ac_cv_sys_largefile_source" >&5
10916 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10917 if test "$ac_cv_sys_largefile_source" != no; then
10918
10919 cat >>confdefs.h <<EOF
10920 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10921 EOF
10922
10923 fi
10924 rm -rf conftest*
10925
10926 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10927 # in glibc 2.1.3, but that breaks too many other things.
10928 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10929 echo "$as_me:10929: checking for fseeko" >&5
10930 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10931 if test "${ac_cv_func_fseeko+set}" = set; then
10932   echo $ECHO_N "(cached) $ECHO_C" >&6
10933 else
10934   cat >conftest.$ac_ext <<_ACEOF
10935 #line 10935 "configure"
10936 #include "confdefs.h"
10937 #include <stdio.h>
10938 int
10939 main ()
10940 {
10941 return fseeko && fseeko (stdin, 0, 0);
10942   ;
10943   return 0;
10944 }
10945 _ACEOF
10946 rm -f conftest.$ac_objext conftest$ac_exeext
10947 if { (eval echo "$as_me:10947: \"$ac_link\"") >&5
10948   (eval $ac_link) 2>&5
10949   ac_status=$?
10950   echo "$as_me:10950: \$? = $ac_status" >&5
10951   (exit $ac_status); } &&
10952          { ac_try='test -s conftest$ac_exeext'
10953   { (eval echo "$as_me:10953: \"$ac_try\"") >&5
10954   (eval $ac_try) 2>&5
10955   ac_status=$?
10956   echo "$as_me:10956: \$? = $ac_status" >&5
10957   (exit $ac_status); }; }; then
10958   ac_cv_func_fseeko=yes
10959 else
10960   echo "$as_me: failed program was:" >&5
10961 cat conftest.$ac_ext >&5
10962 ac_cv_func_fseeko=no
10963 fi
10964 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10965 fi
10966 echo "$as_me:10966: result: $ac_cv_func_fseeko" >&5
10967 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10968 if test $ac_cv_func_fseeko = yes; then
10969
10970 cat >>confdefs.h <<\EOF
10971 #define HAVE_FSEEKO 1
10972 EOF
10973
10974 fi
10975
10976         # Normally we would collect these definitions in the config.h,
10977         # but (like _XOPEN_SOURCE), some environments rely on having these
10978         # defined before any of the system headers are included.  Another
10979         # case comes up with C++, e.g., on AIX the compiler compiles the
10980         # header files by themselves before looking at the body files it is
10981         # told to compile.  For ncurses, those header files do not include
10982         # the config.h
10983         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10984         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10985         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10986
10987         echo "$as_me:10987: checking whether to use struct dirent64" >&5
10988 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10989 if test "${cf_cv_struct_dirent64+set}" = set; then
10990   echo $ECHO_N "(cached) $ECHO_C" >&6
10991 else
10992
10993                 cat >conftest.$ac_ext <<_ACEOF
10994 #line 10994 "configure"
10995 #include "confdefs.h"
10996
10997 #include <sys/types.h>
10998 #include <dirent.h>
10999
11000 int
11001 main ()
11002 {
11003
11004                 /* if transitional largefile support is setup, this is true */
11005                 extern struct dirent64 * readdir(DIR *);
11006                 struct dirent64 *x = readdir((DIR *)0);
11007                 struct dirent *y = readdir((DIR *)0);
11008                 int z = x - y;
11009
11010   ;
11011   return 0;
11012 }
11013 _ACEOF
11014 rm -f conftest.$ac_objext
11015 if { (eval echo "$as_me:11015: \"$ac_compile\"") >&5
11016   (eval $ac_compile) 2>&5
11017   ac_status=$?
11018   echo "$as_me:11018: \$? = $ac_status" >&5
11019   (exit $ac_status); } &&
11020          { ac_try='test -s conftest.$ac_objext'
11021   { (eval echo "$as_me:11021: \"$ac_try\"") >&5
11022   (eval $ac_try) 2>&5
11023   ac_status=$?
11024   echo "$as_me:11024: \$? = $ac_status" >&5
11025   (exit $ac_status); }; }; then
11026   cf_cv_struct_dirent64=yes
11027 else
11028   echo "$as_me: failed program was:" >&5
11029 cat conftest.$ac_ext >&5
11030 cf_cv_struct_dirent64=no
11031 fi
11032 rm -f conftest.$ac_objext conftest.$ac_ext
11033
11034 fi
11035 echo "$as_me:11035: result: $cf_cv_struct_dirent64" >&5
11036 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11037         test "$cf_cv_struct_dirent64" = yes &&
11038 cat >>confdefs.h <<\EOF
11039 #define HAVE_STRUCT_DIRENT64 1
11040 EOF
11041
11042         fi
11043
11044 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
11045 echo "$as_me:11045: checking if you want tparm not to use X/Open fixed-parameter list" >&5
11046 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
11047
11048 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
11049 if test "${enable_tparm_varargs+set}" = set; then
11050   enableval="$enable_tparm_varargs"
11051   with_tparm_varargs=$enableval
11052 else
11053   with_tparm_varargs=yes
11054 fi;
11055 echo "$as_me:11055: result: $with_tparm_varargs" >&5
11056 echo "${ECHO_T}$with_tparm_varargs" >&6
11057 NCURSES_TPARM_VARARGS=0
11058 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
11059
11060 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
11061 if test "$with_ticlib" != no ; then
11062 echo "$as_me:11062: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
11063 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
11064
11065 # Check whether --enable-tic-depends or --disable-tic-depends was given.
11066 if test "${enable_tic_depends+set}" = set; then
11067   enableval="$enable_tic_depends"
11068   with_tic_depends=$enableval
11069 else
11070   with_tic_depends=yes
11071 fi;
11072 echo "$as_me:11072: result: $with_tic_depends" >&5
11073 echo "${ECHO_T}$with_tic_depends" >&6
11074 else
11075         with_tic_depends=no
11076 fi
11077
11078 ###   use option --with-bool to override bool's type
11079 echo "$as_me:11079: checking for type of bool" >&5
11080 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
11081
11082 # Check whether --with-bool or --without-bool was given.
11083 if test "${with_bool+set}" = set; then
11084   withval="$with_bool"
11085   NCURSES_BOOL="$withval"
11086 else
11087   NCURSES_BOOL=auto
11088 fi;
11089 echo "$as_me:11089: result: $NCURSES_BOOL" >&5
11090 echo "${ECHO_T}$NCURSES_BOOL" >&6
11091
11092 echo "$as_me:11092: checking for alternate terminal capabilities file" >&5
11093 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
11094
11095 # Check whether --with-caps or --without-caps was given.
11096 if test "${with_caps+set}" = set; then
11097   withval="$with_caps"
11098   TERMINFO_CAPS=Caps.$withval
11099 else
11100   TERMINFO_CAPS=Caps
11101 fi;
11102 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
11103 echo "$as_me:11103: result: $TERMINFO_CAPS" >&5
11104 echo "${ECHO_T}$TERMINFO_CAPS" >&6
11105
11106 ###   use option --with-chtype to override chtype's type
11107 echo "$as_me:11107: checking for type of chtype" >&5
11108 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11109
11110 # Check whether --with-chtype or --without-chtype was given.
11111 if test "${with_chtype+set}" = set; then
11112   withval="$with_chtype"
11113   NCURSES_CHTYPE="$withval"
11114 else
11115   NCURSES_CHTYPE=$cf_dft_chtype
11116 fi;
11117 echo "$as_me:11117: result: $NCURSES_CHTYPE" >&5
11118 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
11119
11120 ###   use option --with-ospeed to override ospeed's type
11121 echo "$as_me:11121: checking for type of ospeed" >&5
11122 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
11123
11124 # Check whether --with-ospeed or --without-ospeed was given.
11125 if test "${with_ospeed+set}" = set; then
11126   withval="$with_ospeed"
11127   NCURSES_OSPEED="$withval"
11128 else
11129   NCURSES_OSPEED=short
11130 fi;
11131 echo "$as_me:11131: result: $NCURSES_OSPEED" >&5
11132 echo "${ECHO_T}$NCURSES_OSPEED" >&6
11133
11134 ###   use option --with-mmask-t to override mmask_t's type
11135 echo "$as_me:11135: checking for type of mmask_t" >&5
11136 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
11137
11138 # Check whether --with-mmask-t or --without-mmask-t was given.
11139 if test "${with_mmask_t+set}" = set; then
11140   withval="$with_mmask_t"
11141   NCURSES_MMASK_T="$withval"
11142 else
11143   NCURSES_MMASK_T=$cf_dft_mmask_t
11144 fi;
11145 echo "$as_me:11145: result: $NCURSES_MMASK_T" >&5
11146 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
11147
11148 ###   use option --with-ccharw-max to override CCHARW_MAX size
11149 echo "$as_me:11149: checking for size CCHARW_MAX" >&5
11150 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
11151
11152 # Check whether --with-ccharw-max or --without-ccharw-max was given.
11153 if test "${with_ccharw_max+set}" = set; then
11154   withval="$with_ccharw_max"
11155   NCURSES_CCHARW_MAX="$withval"
11156 else
11157   NCURSES_CCHARW_MAX=5
11158 fi;
11159 echo "$as_me:11159: result: $NCURSES_CCHARW_MAX" >&5
11160 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
11161
11162 ###   use option --with-tparm-arg to override tparm's argument type
11163 echo "$as_me:11163: checking for type of tparm args" >&5
11164 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
11165
11166 # Check whether --with-tparm-arg or --without-tparm-arg was given.
11167 if test "${with_tparm_arg+set}" = set; then
11168   withval="$with_tparm_arg"
11169   NCURSES_TPARM_ARG="$withval"
11170 else
11171   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
11172 fi;
11173 echo "$as_me:11173: result: $NCURSES_TPARM_ARG" >&5
11174 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
11175
11176 ### Enable compiling-in rcs id's
11177 echo "$as_me:11177: checking if RCS identifiers should be compiled-in" >&5
11178 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11179
11180 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11181 if test "${with_rcs_ids+set}" = set; then
11182   withval="$with_rcs_ids"
11183   with_rcs_ids=$withval
11184 else
11185   with_rcs_ids=no
11186 fi;
11187 echo "$as_me:11187: result: $with_rcs_ids" >&5
11188 echo "${ECHO_T}$with_rcs_ids" >&6
11189 test "x$with_rcs_ids" = xyes &&
11190 cat >>confdefs.h <<\EOF
11191 #define USE_RCS_IDS 1
11192 EOF
11193
11194 ###############################################################################
11195
11196 echo "$as_me:11196: checking format of man-pages" >&5
11197 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
11198
11199 # Check whether --with-manpage-format or --without-manpage-format was given.
11200 if test "${with_manpage_format+set}" = set; then
11201   withval="$with_manpage_format"
11202   MANPAGE_FORMAT=$withval
11203 else
11204   MANPAGE_FORMAT=unknown
11205 fi;
11206
11207 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
11208 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
11209
11210 cf_unknown=
11211
11212 case $MANPAGE_FORMAT in
11213 (unknown)
11214         if test -z "$MANPATH" ; then
11215                 MANPATH="/usr/man:/usr/share/man"
11216         fi
11217
11218         # look for the 'date' man-page (it's most likely to be installed!)
11219         MANPAGE_FORMAT=
11220         cf_preform=no
11221         cf_catonly=yes
11222         cf_example=date
11223
11224         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11225         for cf_dir in $MANPATH; do
11226                 test -z "$cf_dir" && cf_dir=/usr/man
11227                 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
11228                 do
11229                         cf_test=`echo $cf_name | sed -e 's/*//'`
11230                         if test "x$cf_test" = "x$cf_name" ; then
11231
11232                                 case "$cf_name" in
11233                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11234                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11235                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11236                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11237                                 esac
11238
11239                                 case "$cf_name" in
11240                                 ($cf_dir/man*)
11241                                         cf_catonly=no
11242                                         ;;
11243                                 ($cf_dir/cat*)
11244                                         cf_preform=yes
11245                                         ;;
11246                                 esac
11247                                 break
11248                         fi
11249
11250                         # if we found a match in either man* or cat*, stop looking
11251                         if test -n "$MANPAGE_FORMAT" ; then
11252                                 cf_found=no
11253                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11254                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11255                                 case "$cf_name" in
11256                                 ($cf_dir/cat*)
11257                                         cf_found=yes
11258                                         ;;
11259                                 esac
11260                                 test $cf_found=yes && break
11261                         fi
11262                 done
11263                 # only check the first directory in $MANPATH where we find manpages
11264                 if test -n "$MANPAGE_FORMAT" ; then
11265                         break
11266                 fi
11267         done
11268         # if we did not find the example, just assume it is normal
11269         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11270         IFS="$ac_save_ifs"
11271         ;;
11272 (*)
11273         for cf_option in $MANPAGE_FORMAT; do
11274         case $cf_option in
11275         (gzip|compress|BSDI|normal|formatted|catonly)
11276                 ;;
11277         (*)
11278                 cf_unknown="$cf_unknown $cf_option"
11279                 ;;
11280         esac
11281         done
11282         ;;
11283 esac
11284
11285 echo "$as_me:11285: result: $MANPAGE_FORMAT" >&5
11286 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11287 if test -n "$cf_unknown" ; then
11288         { echo "$as_me:11288: WARNING: Unexpected manpage-format $cf_unknown" >&5
11289 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11290 fi
11291
11292 echo "$as_me:11292: checking for manpage renaming" >&5
11293 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11294
11295 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11296 if test "${with_manpage_renames+set}" = set; then
11297   withval="$with_manpage_renames"
11298   MANPAGE_RENAMES=$withval
11299 else
11300   MANPAGE_RENAMES=yes
11301 fi;
11302
11303 case ".$MANPAGE_RENAMES" in
11304 (.no)
11305         ;;
11306 (.|.yes)
11307         # Debian 'man' program?
11308         if test -f /etc/debian_version ; then
11309                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11310         else
11311                 MANPAGE_RENAMES=no
11312         fi
11313         ;;
11314 esac
11315
11316 if test "$MANPAGE_RENAMES" != no ; then
11317         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11318                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11319         elif test ! -f $MANPAGE_RENAMES ; then
11320                 { { echo "$as_me:11320: error: not a filename: $MANPAGE_RENAMES" >&5
11321 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11322    { (exit 1); exit 1; }; }
11323         fi
11324
11325         test ! -d man && mkdir man
11326
11327         # Construct a sed-script to perform renaming within man-pages
11328         if test -n "$MANPAGE_RENAMES" ; then
11329                 test ! -d man && mkdir man
11330                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11331         fi
11332 fi
11333
11334 echo "$as_me:11334: result: $MANPAGE_RENAMES" >&5
11335 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11336
11337 echo "$as_me:11337: checking if manpage aliases will be installed" >&5
11338 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11339
11340 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11341 if test "${with_manpage_aliases+set}" = set; then
11342   withval="$with_manpage_aliases"
11343   MANPAGE_ALIASES=$withval
11344 else
11345   MANPAGE_ALIASES=yes
11346 fi;
11347
11348 echo "$as_me:11348: result: $MANPAGE_ALIASES" >&5
11349 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11350
11351 case "x$LN_S" in
11352 (xln*)
11353         cf_use_symlinks=yes
11354         ;;
11355 (*)
11356         cf_use_symlinks=no
11357         ;;
11358 esac
11359
11360 MANPAGE_SYMLINKS=no
11361 if test "$MANPAGE_ALIASES" = yes ; then
11362 echo "$as_me:11362: checking if manpage symlinks should be used" >&5
11363 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11364
11365 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11366 if test "${with_manpage_symlinks+set}" = set; then
11367   withval="$with_manpage_symlinks"
11368   MANPAGE_SYMLINKS=$withval
11369 else
11370   MANPAGE_SYMLINKS=$cf_use_symlinks
11371 fi;
11372
11373 if test "$$cf_use_symlinks" = no; then
11374 if test "$MANPAGE_SYMLINKS" = yes ; then
11375         { echo "$as_me:11375: WARNING: cannot make symlinks" >&5
11376 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11377         MANPAGE_SYMLINKS=no
11378 fi
11379 fi
11380
11381 echo "$as_me:11381: result: $MANPAGE_SYMLINKS" >&5
11382 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11383 fi
11384
11385 echo "$as_me:11385: checking for manpage tbl" >&5
11386 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11387
11388 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11389 if test "${with_manpage_tbl+set}" = set; then
11390   withval="$with_manpage_tbl"
11391   MANPAGE_TBL=$withval
11392 else
11393   MANPAGE_TBL=no
11394 fi;
11395
11396 echo "$as_me:11396: result: $MANPAGE_TBL" >&5
11397 echo "${ECHO_T}$MANPAGE_TBL" >&6
11398
11399 if test "$prefix" = "NONE" ; then
11400         cf_prefix="$ac_default_prefix"
11401 else
11402         cf_prefix="$prefix"
11403 fi
11404
11405 case "$MANPAGE_FORMAT" in
11406 (*catonly*)
11407         cf_format=yes
11408         cf_inboth=no
11409         ;;
11410 (*formatted*)
11411         cf_format=yes
11412         cf_inboth=yes
11413         ;;
11414 (*)
11415         cf_format=no
11416         cf_inboth=no
11417         ;;
11418 esac
11419
11420 test ! -d man && mkdir man
11421
11422 cf_so_strip=
11423 cf_compress=
11424 case "$MANPAGE_FORMAT" in
11425 (*compress*)
11426         cf_so_strip="Z"
11427         cf_compress=compress
11428         ;;
11429 (*gzip*)
11430         cf_so_strip="gz"
11431         cf_compress=gzip
11432         ;;
11433 esac
11434
11435 cf_edit_man=./edit_man.sh
11436 cf_man_alias=`pwd`/man_alias.sed
11437
11438 cat >$cf_edit_man <<CF_EOF
11439 #! $SHELL
11440 # this script is generated by the configure-script CF_MAN_PAGES macro.
11441
11442 prefix="$cf_prefix"
11443 datarootdir="$datarootdir"
11444 datadir="$datadir"
11445
11446 NCURSES_MAJOR="$NCURSES_MAJOR"
11447 NCURSES_MINOR="$NCURSES_MINOR"
11448 NCURSES_PATCH="$NCURSES_PATCH"
11449
11450 NCURSES_OSPEED="$NCURSES_OSPEED"
11451 TERMINFO="$TERMINFO"
11452
11453 INSTALL="$INSTALL"
11454 INSTALL_DATA="$INSTALL_DATA"
11455
11456 transform="$program_transform_name"
11457
11458 TMP=\${TMPDIR:=/tmp}/man\$\$
11459 trap "rm -f \$TMP" 0 1 2 5 15
11460
11461 form=\$1
11462 shift || exit 1
11463
11464 verb=\$1
11465 shift || exit 1
11466
11467 mandir=\$1
11468 shift || exit 1
11469
11470 srcdir=\$1
11471 top_srcdir=\$srcdir/..
11472 shift || exit 1
11473
11474 if test "\$form" = normal ; then
11475         if test "$cf_format" = yes ; then
11476         if test "$cf_inboth" = no ; then
11477                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11478                 exit $?
11479         fi
11480         fi
11481         cf_subdir=\$mandir/man
11482         cf_tables=$MANPAGE_TBL
11483 else
11484         cf_subdir=\$mandir/cat
11485         cf_tables=yes
11486 fi
11487
11488 # process the list of source-files
11489 for i in \$* ; do
11490 case \$i in
11491 (*.orig|*.rej) ;;
11492 (*.[0-9]*)
11493         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11494         if test \$verb = installing ; then
11495         if test ! -d \$cf_subdir\${section} ; then
11496                 mkdir -p \$cf_subdir\$section
11497         fi
11498         fi
11499
11500         # replace variables in man page
11501         if test ! -f $cf_man_alias ; then
11502 cat >>$cf_man_alias <<-CF_EOF2
11503                 s,@DATADIR@,\$datadir,g
11504                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11505                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11506                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11507                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11508                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11509                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11510 CF_EOF
11511
11512         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
11513         do
11514                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11515                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11516 cat >>$cf_edit_man <<-CF_EOF
11517                 s,@$cf_NAME@,$cf_name,g
11518 CF_EOF
11519         done
11520
11521 cat >>$cf_edit_man <<CF_EOF
11522 CF_EOF2
11523                 echo "...made $cf_man_alias"
11524         fi
11525
11526         aliases=
11527         cf_source=\`basename \$i\`
11528         inalias=\$cf_source
11529         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11530         if test ! -f \$inalias ; then
11531                 echo .. skipped \$cf_source
11532                 continue
11533         fi
11534 CF_EOF
11535
11536 if test "$MANPAGE_ALIASES" != no ; then
11537 cat >>$cf_edit_man <<CF_EOF
11538         nCurses=ignore.3x
11539         test $with_curses_h = yes && nCurses=ncurses.3x
11540         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11541 CF_EOF
11542 fi
11543
11544 if test "$MANPAGE_RENAMES" = no ; then
11545 cat >>$cf_edit_man <<CF_EOF
11546         # perform program transformations for section 1 man pages
11547         if test \$section = 1 ; then
11548                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11549         else
11550                 cf_target=\$cf_subdir\${section}/\$cf_source
11551         fi
11552 CF_EOF
11553 else
11554 cat >>$cf_edit_man <<CF_EOF
11555         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11556         if test -z "\$cf_target" ; then
11557                 echo '? missing rename for '\$cf_source
11558                 cf_target="\$cf_source"
11559         fi
11560         cf_target="\$cf_subdir\${section}/\${cf_target}"
11561
11562 CF_EOF
11563 fi
11564
11565 cat >>$cf_edit_man <<CF_EOF
11566         sed     -f $cf_man_alias \\
11567 CF_EOF
11568
11569 if test -f $MANPAGE_RENAMES ; then
11570 cat >>$cf_edit_man <<CF_EOF
11571                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11572 CF_EOF
11573 else
11574 cat >>$cf_edit_man <<CF_EOF
11575                 < \$i >\$TMP
11576 CF_EOF
11577 fi
11578
11579 cat >>$cf_edit_man <<CF_EOF
11580 if test \$cf_tables = yes ; then
11581         tbl \$TMP >\$TMP.out
11582         mv \$TMP.out \$TMP
11583 fi
11584 CF_EOF
11585
11586 if test $with_overwrite != yes ; then
11587 cat >>$cf_edit_man <<CF_EOF
11588         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11589         mv \$TMP.out \$TMP
11590 CF_EOF
11591 fi
11592
11593 if test $with_curses_h != yes ; then
11594 cat >>$cf_edit_man <<CF_EOF
11595         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11596         mv \$TMP.out \$TMP
11597 CF_EOF
11598 fi
11599
11600 cat >>$cf_edit_man <<CF_EOF
11601         if test \$form = format ; then
11602                 nroff -man \$TMP >\$TMP.out
11603                 mv \$TMP.out \$TMP
11604         fi
11605 CF_EOF
11606
11607 if test -n "$cf_compress" ; then
11608 cat >>$cf_edit_man <<CF_EOF
11609         if test \$verb = installing ; then
11610         if ( $cf_compress -f \$TMP )
11611         then
11612                 mv \$TMP.$cf_so_strip \$TMP
11613         fi
11614         fi
11615         cf_target="\$cf_target.$cf_so_strip"
11616 CF_EOF
11617 fi
11618
11619 case "$MANPAGE_FORMAT" in
11620 (*BSDI*)
11621 cat >>$cf_edit_man <<CF_EOF
11622         if test \$form = format ; then
11623                 # BSDI installs only .0 suffixes in the cat directories
11624                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11625         fi
11626 CF_EOF
11627   ;;
11628 esac
11629
11630 cat >>$cf_edit_man <<CF_EOF
11631         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11632         if test \$verb = installing ; then
11633                 echo \$verb \$cf_target
11634                 \$INSTALL_DATA \$TMP \$cf_target
11635                 test -d \$cf_subdir\${section} &&
11636                 test -n "\$aliases" && (
11637                         cd \$cf_subdir\${section} && (
11638                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11639                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11640                                 cf_target=\`basename \$cf_target\`
11641                                 for cf_alias in \$aliases
11642                                 do
11643                                         if test \$section = 1 ; then
11644                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11645                                         fi
11646
11647                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11648                                                 if test -f \$cf_alias\${suffix} ; then
11649                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11650                                                         then
11651                                                                 continue
11652                                                         fi
11653                                                 fi
11654                                                 echo .. \$verb alias \$cf_alias\${suffix}
11655 CF_EOF
11656 case "x$LN_S" in
11657 (*-f)
11658 cat >>$cf_edit_man <<CF_EOF
11659                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11660 CF_EOF
11661         ;;
11662 (*)
11663 cat >>$cf_edit_man <<CF_EOF
11664                                                 rm -f \$cf_alias\${suffix}
11665                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11666 CF_EOF
11667         ;;
11668 esac
11669 cat >>$cf_edit_man <<CF_EOF
11670                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11671                                                 echo ".so \$cf_source" >\$TMP
11672 CF_EOF
11673 if test -n "$cf_compress" ; then
11674 cat >>$cf_edit_man <<CF_EOF
11675                                                 if test -n "$cf_so_strip" ; then
11676                                                         $cf_compress -f \$TMP
11677                                                         mv \$TMP.$cf_so_strip \$TMP
11678                                                 fi
11679 CF_EOF
11680 fi
11681 cat >>$cf_edit_man <<CF_EOF
11682                                                 echo .. \$verb alias \$cf_alias\${suffix}
11683                                                 rm -f \$cf_alias\${suffix}
11684                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11685                                         fi
11686                                 done
11687                         )
11688                 )
11689         elif test \$verb = removing ; then
11690                 test -f \$cf_target && (
11691                         echo \$verb \$cf_target
11692                         rm -f \$cf_target
11693                 )
11694                 test -d \$cf_subdir\${section} &&
11695                 test -n "\$aliases" && (
11696                         cd \$cf_subdir\${section} && (
11697                                 for cf_alias in \$aliases
11698                                 do
11699                                         if test \$section = 1 ; then
11700                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11701                                         fi
11702
11703                                         echo .. \$verb alias \$cf_alias\${suffix}
11704                                         rm -f \$cf_alias\${suffix}
11705                                 done
11706                         )
11707                 )
11708         else
11709 #               echo ".hy 0"
11710                 cat \$TMP
11711         fi
11712         ;;
11713 esac
11714 done
11715
11716 if test $cf_inboth = yes ; then
11717 if test \$form != format ; then
11718         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11719 fi
11720 fi
11721
11722 exit 0
11723 CF_EOF
11724 chmod 755 $cf_edit_man
11725
11726 ###############################################################################
11727
11728 ### Note that some functions (such as const) are normally disabled anyway.
11729 echo "$as_me:11729: checking if you want to build with function extensions" >&5
11730 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11731
11732 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11733 if test "${enable_ext_funcs+set}" = set; then
11734   enableval="$enable_ext_funcs"
11735   with_ext_funcs=$enableval
11736 else
11737   with_ext_funcs=yes
11738 fi;
11739 echo "$as_me:11739: result: $with_ext_funcs" >&5
11740 echo "${ECHO_T}$with_ext_funcs" >&6
11741 if test "x$with_ext_funcs" = xyes ; then
11742         NCURSES_EXT_FUNCS=1
11743
11744 cat >>confdefs.h <<\EOF
11745 #define HAVE_ASSUME_DEFAULT_COLORS 1
11746 EOF
11747
11748 cat >>confdefs.h <<\EOF
11749 #define HAVE_CURSES_VERSION 1
11750 EOF
11751
11752 cat >>confdefs.h <<\EOF
11753 #define HAVE_HAS_KEY 1
11754 EOF
11755
11756 cat >>confdefs.h <<\EOF
11757 #define HAVE_RESIZETERM 1
11758 EOF
11759
11760 cat >>confdefs.h <<\EOF
11761 #define HAVE_RESIZE_TERM 1
11762 EOF
11763
11764 cat >>confdefs.h <<\EOF
11765 #define HAVE_TERM_ENTRY_H 1
11766 EOF
11767
11768 cat >>confdefs.h <<\EOF
11769 #define HAVE_USE_DEFAULT_COLORS 1
11770 EOF
11771
11772 cat >>confdefs.h <<\EOF
11773 #define HAVE_USE_SCREEN 1
11774 EOF
11775
11776 cat >>confdefs.h <<\EOF
11777 #define HAVE_USE_WINDOW 1
11778 EOF
11779
11780 cat >>confdefs.h <<\EOF
11781 #define HAVE_WRESIZE 1
11782 EOF
11783
11784 cat >>confdefs.h <<\EOF
11785 #define NCURSES_EXT_FUNCS 1
11786 EOF
11787
11788         GENERATED_EXT_FUNCS=generated
11789 else
11790         NCURSES_EXT_FUNCS=0
11791         GENERATED_EXT_FUNCS=
11792 fi
11793
11794 echo "$as_me:11794: checking if you want to build with SCREEN extensions" >&5
11795 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
11796
11797 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11798 if test "${enable_sp_funcs+set}" = set; then
11799   enableval="$enable_sp_funcs"
11800   with_sp_funcs=$enableval
11801 else
11802   with_sp_funcs=$cf_dft_ext_spfuncs
11803 fi;
11804 echo "$as_me:11804: result: $with_sp_funcs" >&5
11805 echo "${ECHO_T}$with_sp_funcs" >&6
11806 if test "x$with_sp_funcs" = xyes ; then
11807         NCURSES_SP_FUNCS=1
11808
11809 cat >>confdefs.h <<\EOF
11810 #define NCURSES_SP_FUNCS 1
11811 EOF
11812
11813         GENERATED_SP_FUNCS=generated
11814 else
11815         NCURSES_SP_FUNCS=0
11816         GENERATED_SP_FUNCS=
11817 fi
11818
11819 echo "$as_me:11819: checking if you want to build with terminal-driver" >&5
11820 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
11821
11822 # Check whether --enable-term-driver or --disable-term-driver was given.
11823 if test "${enable_term_driver+set}" = set; then
11824   enableval="$enable_term_driver"
11825   with_term_driver=$enableval
11826 else
11827   with_term_driver=no
11828 fi;
11829 echo "$as_me:11829: result: $with_term_driver" >&5
11830 echo "${ECHO_T}$with_term_driver" >&6
11831 if test "x$with_term_driver" = xyes ; then
11832
11833 cat >>confdefs.h <<\EOF
11834 #define USE_TERM_DRIVER 1
11835 EOF
11836
11837         if test "x$with_termlib" != xno ; then
11838                 { { echo "$as_me:11838: error: The term-driver option conflicts with the termlib option" >&5
11839 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
11840    { (exit 1); exit 1; }; }
11841         fi
11842         if test "x$with_sp_funcs" != xyes ; then
11843                 { { echo "$as_me:11843: error: The term-driver option relies upon sp-funcs" >&5
11844 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11845    { (exit 1); exit 1; }; }
11846         fi
11847 fi
11848
11849 ###   use option --enable-const to turn on use of const beyond that in XSI.
11850 echo "$as_me:11850: checking for extended use of const keyword" >&5
11851 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11852
11853 # Check whether --enable-const or --disable-const was given.
11854 if test "${enable_const+set}" = set; then
11855   enableval="$enable_const"
11856   with_ext_const=$enableval
11857 else
11858   with_ext_const=$cf_dft_ext_const
11859 fi;
11860 echo "$as_me:11860: result: $with_ext_const" >&5
11861 echo "${ECHO_T}$with_ext_const" >&6
11862 NCURSES_CONST='/*nothing*/'
11863 if test "x$with_ext_const" = xyes ; then
11864         NCURSES_CONST=const
11865 fi
11866
11867 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11868 echo "$as_me:11868: checking if you want to use extended colors" >&5
11869 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11870
11871 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11872 if test "${enable_ext_colors+set}" = set; then
11873   enableval="$enable_ext_colors"
11874   with_ext_colors=$enableval
11875 else
11876   with_ext_colors=$cf_dft_ext_colors
11877 fi;
11878 echo "$as_me:11878: result: $with_ext_colors" >&5
11879 echo "${ECHO_T}$with_ext_colors" >&6
11880 NCURSES_EXT_COLORS=0
11881 if test "x$with_ext_colors" = xyes ; then
11882         if test "x$with_widec" != xyes ; then
11883                 { echo "$as_me:11883: WARNING: This option applies only to wide-character library" >&5
11884 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
11885         else
11886                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11887
11888 if test "${with_abi_version+set}" != set; then
11889         case $cf_cv_rel_version in
11890         (5.*)
11891                 cf_cv_rel_version=6.0
11892                 cf_cv_abi_version=6
11893                 { echo "$as_me:11893: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11894 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11895                 ;;
11896         esac
11897 fi
11898
11899                 NCURSES_EXT_COLORS=1
11900
11901 cat >>confdefs.h <<\EOF
11902 #define NCURSES_EXT_COLORS 1
11903 EOF
11904
11905         fi
11906 fi
11907
11908 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11909 echo "$as_me:11909: checking if you want to use extended mouse encoding" >&5
11910 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11911
11912 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11913 if test "${enable_ext_mouse+set}" = set; then
11914   enableval="$enable_ext_mouse"
11915   with_ext_mouse=$enableval
11916 else
11917   with_ext_mouse=$cf_dft_ext_mouse
11918 fi;
11919 echo "$as_me:11919: result: $with_ext_mouse" >&5
11920 echo "${ECHO_T}$with_ext_mouse" >&6
11921 NCURSES_MOUSE_VERSION=1
11922 if test "x$with_ext_mouse" = xyes ; then
11923         NCURSES_MOUSE_VERSION=2
11924
11925 if test "${with_abi_version+set}" != set; then
11926         case $cf_cv_rel_version in
11927         (5.*)
11928                 cf_cv_rel_version=6.0
11929                 cf_cv_abi_version=6
11930                 { echo "$as_me:11930: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11931 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11932                 ;;
11933         esac
11934 fi
11935
11936 fi
11937
11938 ###   use option --enable-ext-putwin to turn on extended screendumps
11939 echo "$as_me:11939: checking if you want to use extended putwin/screendump" >&5
11940 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
11941
11942 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
11943 if test "${enable_ext_putwin+set}" = set; then
11944   enableval="$enable_ext_putwin"
11945   with_ext_putwin=$enableval
11946 else
11947   with_ext_putwin=$cf_dft_ext_putwin
11948 fi;
11949 echo "$as_me:11949: result: $with_ext_putwin" >&5
11950 echo "${ECHO_T}$with_ext_putwin" >&6
11951 if test "x$with_ext_putwin" = xyes ; then
11952
11953 cat >>confdefs.h <<\EOF
11954 #define NCURSES_EXT_PUTWIN 1
11955 EOF
11956
11957 fi
11958
11959 echo "$as_me:11959: checking if you want \$NCURSES_NO_PADDING code" >&5
11960 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11961
11962 # Check whether --enable-no-padding or --disable-no-padding was given.
11963 if test "${enable_no_padding+set}" = set; then
11964   enableval="$enable_no_padding"
11965   with_no_padding=$enableval
11966 else
11967   with_no_padding=$with_ext_funcs
11968 fi;
11969 echo "$as_me:11969: result: $with_no_padding" >&5
11970 echo "${ECHO_T}$with_no_padding" >&6
11971 test "x$with_no_padding" = xyes &&
11972 cat >>confdefs.h <<\EOF
11973 #define NCURSES_NO_PADDING 1
11974 EOF
11975
11976 echo "$as_me:11976: checking for ANSI C header files" >&5
11977 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11978 if test "${ac_cv_header_stdc+set}" = set; then
11979   echo $ECHO_N "(cached) $ECHO_C" >&6
11980 else
11981   cat >conftest.$ac_ext <<_ACEOF
11982 #line 11982 "configure"
11983 #include "confdefs.h"
11984 #include <stdlib.h>
11985 #include <stdarg.h>
11986 #include <string.h>
11987 #include <float.h>
11988
11989 _ACEOF
11990 if { (eval echo "$as_me:11990: \"$ac_cpp conftest.$ac_ext\"") >&5
11991   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11992   ac_status=$?
11993   egrep -v '^ *\+' conftest.er1 >conftest.err
11994   rm -f conftest.er1
11995   cat conftest.err >&5
11996   echo "$as_me:11996: \$? = $ac_status" >&5
11997   (exit $ac_status); } >/dev/null; then
11998   if test -s conftest.err; then
11999     ac_cpp_err=$ac_c_preproc_warn_flag
12000   else
12001     ac_cpp_err=
12002   fi
12003 else
12004   ac_cpp_err=yes
12005 fi
12006 if test -z "$ac_cpp_err"; then
12007   ac_cv_header_stdc=yes
12008 else
12009   echo "$as_me: failed program was:" >&5
12010   cat conftest.$ac_ext >&5
12011   ac_cv_header_stdc=no
12012 fi
12013 rm -f conftest.err conftest.$ac_ext
12014
12015 if test $ac_cv_header_stdc = yes; then
12016   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12017   cat >conftest.$ac_ext <<_ACEOF
12018 #line 12018 "configure"
12019 #include "confdefs.h"
12020 #include <string.h>
12021
12022 _ACEOF
12023 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12024   egrep "memchr" >/dev/null 2>&1; then
12025   :
12026 else
12027   ac_cv_header_stdc=no
12028 fi
12029 rm -rf conftest*
12030
12031 fi
12032
12033 if test $ac_cv_header_stdc = yes; then
12034   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12035   cat >conftest.$ac_ext <<_ACEOF
12036 #line 12036 "configure"
12037 #include "confdefs.h"
12038 #include <stdlib.h>
12039
12040 _ACEOF
12041 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12042   egrep "free" >/dev/null 2>&1; then
12043   :
12044 else
12045   ac_cv_header_stdc=no
12046 fi
12047 rm -rf conftest*
12048
12049 fi
12050
12051 if test $ac_cv_header_stdc = yes; then
12052   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12053   if test "$cross_compiling" = yes; then
12054   :
12055 else
12056   cat >conftest.$ac_ext <<_ACEOF
12057 #line 12057 "configure"
12058 #include "confdefs.h"
12059 #include <ctype.h>
12060 #if ((' ' & 0x0FF) == 0x020)
12061 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12062 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12063 #else
12064 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12065                      || ('j' <= (c) && (c) <= 'r') \
12066                      || ('s' <= (c) && (c) <= 'z'))
12067 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12068 #endif
12069
12070 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12071 int
12072 main ()
12073 {
12074   int i;
12075   for (i = 0; i < 256; i++)
12076     if (XOR (islower (i), ISLOWER (i))
12077         || toupper (i) != TOUPPER (i))
12078       $ac_main_return(2);
12079   $ac_main_return (0);
12080 }
12081 _ACEOF
12082 rm -f conftest$ac_exeext
12083 if { (eval echo "$as_me:12083: \"$ac_link\"") >&5
12084   (eval $ac_link) 2>&5
12085   ac_status=$?
12086   echo "$as_me:12086: \$? = $ac_status" >&5
12087   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12088   { (eval echo "$as_me:12088: \"$ac_try\"") >&5
12089   (eval $ac_try) 2>&5
12090   ac_status=$?
12091   echo "$as_me:12091: \$? = $ac_status" >&5
12092   (exit $ac_status); }; }; then
12093   :
12094 else
12095   echo "$as_me: program exited with status $ac_status" >&5
12096 echo "$as_me: failed program was:" >&5
12097 cat conftest.$ac_ext >&5
12098 ac_cv_header_stdc=no
12099 fi
12100 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12101 fi
12102 fi
12103 fi
12104 echo "$as_me:12104: result: $ac_cv_header_stdc" >&5
12105 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12106 if test $ac_cv_header_stdc = yes; then
12107
12108 cat >>confdefs.h <<\EOF
12109 #define STDC_HEADERS 1
12110 EOF
12111
12112 fi
12113
12114 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12115
12116 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12117                   inttypes.h stdint.h unistd.h
12118 do
12119 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12120 echo "$as_me:12120: checking for $ac_header" >&5
12121 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12122 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12123   echo $ECHO_N "(cached) $ECHO_C" >&6
12124 else
12125   cat >conftest.$ac_ext <<_ACEOF
12126 #line 12126 "configure"
12127 #include "confdefs.h"
12128 $ac_includes_default
12129 #include <$ac_header>
12130 _ACEOF
12131 rm -f conftest.$ac_objext
12132 if { (eval echo "$as_me:12132: \"$ac_compile\"") >&5
12133   (eval $ac_compile) 2>&5
12134   ac_status=$?
12135   echo "$as_me:12135: \$? = $ac_status" >&5
12136   (exit $ac_status); } &&
12137          { ac_try='test -s conftest.$ac_objext'
12138   { (eval echo "$as_me:12138: \"$ac_try\"") >&5
12139   (eval $ac_try) 2>&5
12140   ac_status=$?
12141   echo "$as_me:12141: \$? = $ac_status" >&5
12142   (exit $ac_status); }; }; then
12143   eval "$as_ac_Header=yes"
12144 else
12145   echo "$as_me: failed program was:" >&5
12146 cat conftest.$ac_ext >&5
12147 eval "$as_ac_Header=no"
12148 fi
12149 rm -f conftest.$ac_objext conftest.$ac_ext
12150 fi
12151 echo "$as_me:12151: result: `eval echo '${'$as_ac_Header'}'`" >&5
12152 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12153 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12154   cat >>confdefs.h <<EOF
12155 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12156 EOF
12157
12158 fi
12159 done
12160
12161 echo "$as_me:12161: checking for signed char" >&5
12162 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12163 if test "${ac_cv_type_signed_char+set}" = set; then
12164   echo $ECHO_N "(cached) $ECHO_C" >&6
12165 else
12166   cat >conftest.$ac_ext <<_ACEOF
12167 #line 12167 "configure"
12168 #include "confdefs.h"
12169 $ac_includes_default
12170 int
12171 main ()
12172 {
12173 if ((signed char *) 0)
12174   return 0;
12175 if (sizeof (signed char))
12176   return 0;
12177   ;
12178   return 0;
12179 }
12180 _ACEOF
12181 rm -f conftest.$ac_objext
12182 if { (eval echo "$as_me:12182: \"$ac_compile\"") >&5
12183   (eval $ac_compile) 2>&5
12184   ac_status=$?
12185   echo "$as_me:12185: \$? = $ac_status" >&5
12186   (exit $ac_status); } &&
12187          { ac_try='test -s conftest.$ac_objext'
12188   { (eval echo "$as_me:12188: \"$ac_try\"") >&5
12189   (eval $ac_try) 2>&5
12190   ac_status=$?
12191   echo "$as_me:12191: \$? = $ac_status" >&5
12192   (exit $ac_status); }; }; then
12193   ac_cv_type_signed_char=yes
12194 else
12195   echo "$as_me: failed program was:" >&5
12196 cat conftest.$ac_ext >&5
12197 ac_cv_type_signed_char=no
12198 fi
12199 rm -f conftest.$ac_objext conftest.$ac_ext
12200 fi
12201 echo "$as_me:12201: result: $ac_cv_type_signed_char" >&5
12202 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12203
12204 echo "$as_me:12204: checking size of signed char" >&5
12205 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12206 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12207   echo $ECHO_N "(cached) $ECHO_C" >&6
12208 else
12209   if test "$ac_cv_type_signed_char" = yes; then
12210   if test "$cross_compiling" = yes; then
12211   # Depending upon the size, compute the lo and hi bounds.
12212 cat >conftest.$ac_ext <<_ACEOF
12213 #line 12213 "configure"
12214 #include "confdefs.h"
12215 $ac_includes_default
12216 int
12217 main ()
12218 {
12219 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12220   ;
12221   return 0;
12222 }
12223 _ACEOF
12224 rm -f conftest.$ac_objext
12225 if { (eval echo "$as_me:12225: \"$ac_compile\"") >&5
12226   (eval $ac_compile) 2>&5
12227   ac_status=$?
12228   echo "$as_me:12228: \$? = $ac_status" >&5
12229   (exit $ac_status); } &&
12230          { ac_try='test -s conftest.$ac_objext'
12231   { (eval echo "$as_me:12231: \"$ac_try\"") >&5
12232   (eval $ac_try) 2>&5
12233   ac_status=$?
12234   echo "$as_me:12234: \$? = $ac_status" >&5
12235   (exit $ac_status); }; }; then
12236   ac_lo=0 ac_mid=0
12237   while :; do
12238     cat >conftest.$ac_ext <<_ACEOF
12239 #line 12239 "configure"
12240 #include "confdefs.h"
12241 $ac_includes_default
12242 int
12243 main ()
12244 {
12245 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12246   ;
12247   return 0;
12248 }
12249 _ACEOF
12250 rm -f conftest.$ac_objext
12251 if { (eval echo "$as_me:12251: \"$ac_compile\"") >&5
12252   (eval $ac_compile) 2>&5
12253   ac_status=$?
12254   echo "$as_me:12254: \$? = $ac_status" >&5
12255   (exit $ac_status); } &&
12256          { ac_try='test -s conftest.$ac_objext'
12257   { (eval echo "$as_me:12257: \"$ac_try\"") >&5
12258   (eval $ac_try) 2>&5
12259   ac_status=$?
12260   echo "$as_me:12260: \$? = $ac_status" >&5
12261   (exit $ac_status); }; }; then
12262   ac_hi=$ac_mid; break
12263 else
12264   echo "$as_me: failed program was:" >&5
12265 cat conftest.$ac_ext >&5
12266 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12267 fi
12268 rm -f conftest.$ac_objext conftest.$ac_ext
12269   done
12270 else
12271   echo "$as_me: failed program was:" >&5
12272 cat conftest.$ac_ext >&5
12273 ac_hi=-1 ac_mid=-1
12274   while :; do
12275     cat >conftest.$ac_ext <<_ACEOF
12276 #line 12276 "configure"
12277 #include "confdefs.h"
12278 $ac_includes_default
12279 int
12280 main ()
12281 {
12282 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12283   ;
12284   return 0;
12285 }
12286 _ACEOF
12287 rm -f conftest.$ac_objext
12288 if { (eval echo "$as_me:12288: \"$ac_compile\"") >&5
12289   (eval $ac_compile) 2>&5
12290   ac_status=$?
12291   echo "$as_me:12291: \$? = $ac_status" >&5
12292   (exit $ac_status); } &&
12293          { ac_try='test -s conftest.$ac_objext'
12294   { (eval echo "$as_me:12294: \"$ac_try\"") >&5
12295   (eval $ac_try) 2>&5
12296   ac_status=$?
12297   echo "$as_me:12297: \$? = $ac_status" >&5
12298   (exit $ac_status); }; }; then
12299   ac_lo=$ac_mid; break
12300 else
12301   echo "$as_me: failed program was:" >&5
12302 cat conftest.$ac_ext >&5
12303 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12304 fi
12305 rm -f conftest.$ac_objext conftest.$ac_ext
12306   done
12307 fi
12308 rm -f conftest.$ac_objext conftest.$ac_ext
12309 # Binary search between lo and hi bounds.
12310 while test "x$ac_lo" != "x$ac_hi"; do
12311   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12312   cat >conftest.$ac_ext <<_ACEOF
12313 #line 12313 "configure"
12314 #include "confdefs.h"
12315 $ac_includes_default
12316 int
12317 main ()
12318 {
12319 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12320   ;
12321   return 0;
12322 }
12323 _ACEOF
12324 rm -f conftest.$ac_objext
12325 if { (eval echo "$as_me:12325: \"$ac_compile\"") >&5
12326   (eval $ac_compile) 2>&5
12327   ac_status=$?
12328   echo "$as_me:12328: \$? = $ac_status" >&5
12329   (exit $ac_status); } &&
12330          { ac_try='test -s conftest.$ac_objext'
12331   { (eval echo "$as_me:12331: \"$ac_try\"") >&5
12332   (eval $ac_try) 2>&5
12333   ac_status=$?
12334   echo "$as_me:12334: \$? = $ac_status" >&5
12335   (exit $ac_status); }; }; then
12336   ac_hi=$ac_mid
12337 else
12338   echo "$as_me: failed program was:" >&5
12339 cat conftest.$ac_ext >&5
12340 ac_lo=`expr $ac_mid + 1`
12341 fi
12342 rm -f conftest.$ac_objext conftest.$ac_ext
12343 done
12344 ac_cv_sizeof_signed_char=$ac_lo
12345 else
12346   if test "$cross_compiling" = yes; then
12347   { { echo "$as_me:12347: error: cannot run test program while cross compiling" >&5
12348 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12349    { (exit 1); exit 1; }; }
12350 else
12351   cat >conftest.$ac_ext <<_ACEOF
12352 #line 12352 "configure"
12353 #include "confdefs.h"
12354 $ac_includes_default
12355 int
12356 main ()
12357 {
12358 FILE *f = fopen ("conftest.val", "w");
12359 if (!f)
12360   $ac_main_return (1);
12361 fprintf (f, "%d", (sizeof (signed char)));
12362 fclose (f);
12363   ;
12364   return 0;
12365 }
12366 _ACEOF
12367 rm -f conftest$ac_exeext
12368 if { (eval echo "$as_me:12368: \"$ac_link\"") >&5
12369   (eval $ac_link) 2>&5
12370   ac_status=$?
12371   echo "$as_me:12371: \$? = $ac_status" >&5
12372   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12373   { (eval echo "$as_me:12373: \"$ac_try\"") >&5
12374   (eval $ac_try) 2>&5
12375   ac_status=$?
12376   echo "$as_me:12376: \$? = $ac_status" >&5
12377   (exit $ac_status); }; }; then
12378   ac_cv_sizeof_signed_char=`cat conftest.val`
12379 else
12380   echo "$as_me: program exited with status $ac_status" >&5
12381 echo "$as_me: failed program was:" >&5
12382 cat conftest.$ac_ext >&5
12383 fi
12384 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12385 fi
12386 fi
12387 rm -f conftest.val
12388 else
12389   ac_cv_sizeof_signed_char=0
12390 fi
12391 fi
12392 echo "$as_me:12392: result: $ac_cv_sizeof_signed_char" >&5
12393 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12394 cat >>confdefs.h <<EOF
12395 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12396 EOF
12397
12398 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12399         NCURSES_SBOOL="signed char"
12400 else
12401         NCURSES_SBOOL="char"
12402 fi
12403 echo "$as_me:12403: checking if you want to use signed Boolean array in term.h" >&5
12404 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12405
12406 # Check whether --enable-signed-char or --disable-signed-char was given.
12407 if test "${enable_signed_char+set}" = set; then
12408   enableval="$enable_signed_char"
12409   with_signed_char=$enableval
12410 else
12411   with_signed_char=no
12412 fi;
12413 echo "$as_me:12413: result: $with_signed_char" >&5
12414 echo "${ECHO_T}$with_signed_char" >&6
12415 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12416
12417 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12418 echo "$as_me:12418: checking if you want SIGWINCH handler" >&5
12419 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12420
12421 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12422 if test "${enable_sigwinch+set}" = set; then
12423   enableval="$enable_sigwinch"
12424   with_sigwinch=$enableval
12425 else
12426   with_sigwinch=$with_ext_funcs
12427 fi;
12428 echo "$as_me:12428: result: $with_sigwinch" >&5
12429 echo "${ECHO_T}$with_sigwinch" >&6
12430 test "x$with_sigwinch" = xyes &&
12431 cat >>confdefs.h <<\EOF
12432 #define USE_SIGWINCH 1
12433 EOF
12434
12435 ###   use option --enable-tcap-names to allow user to define new capabilities
12436 echo "$as_me:12436: checking if you want user-definable terminal capabilities like termcap" >&5
12437 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12438
12439 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12440 if test "${enable_tcap_names+set}" = set; then
12441   enableval="$enable_tcap_names"
12442   with_tcap_names=$enableval
12443 else
12444   with_tcap_names=$with_ext_funcs
12445 fi;
12446 echo "$as_me:12446: result: $with_tcap_names" >&5
12447 echo "${ECHO_T}$with_tcap_names" >&6
12448 NCURSES_XNAMES=0
12449 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12450
12451 ###############################################################################
12452 # These options are relatively safe to experiment with.
12453
12454 echo "$as_me:12454: checking if you want all development code" >&5
12455 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12456
12457 # Check whether --with-develop or --without-develop was given.
12458 if test "${with_develop+set}" = set; then
12459   withval="$with_develop"
12460   with_develop=$withval
12461 else
12462   with_develop=no
12463 fi;
12464 echo "$as_me:12464: result: $with_develop" >&5
12465 echo "${ECHO_T}$with_develop" >&6
12466
12467 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12468 echo "$as_me:12468: checking if you want hard-tabs code" >&5
12469 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12470
12471 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12472 if test "${enable_hard_tabs+set}" = set; then
12473   enableval="$enable_hard_tabs"
12474
12475 else
12476   enable_hard_tabs=$with_develop
12477 fi;
12478 echo "$as_me:12478: result: $enable_hard_tabs" >&5
12479 echo "${ECHO_T}$enable_hard_tabs" >&6
12480 test "x$enable_hard_tabs" = xyes &&
12481 cat >>confdefs.h <<\EOF
12482 #define USE_HARD_TABS 1
12483 EOF
12484
12485 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12486 echo "$as_me:12486: checking if you want limited support for xmc" >&5
12487 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12488
12489 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12490 if test "${enable_xmc_glitch+set}" = set; then
12491   enableval="$enable_xmc_glitch"
12492
12493 else
12494   enable_xmc_glitch=$with_develop
12495 fi;
12496 echo "$as_me:12496: result: $enable_xmc_glitch" >&5
12497 echo "${ECHO_T}$enable_xmc_glitch" >&6
12498 test "x$enable_xmc_glitch" = xyes &&
12499 cat >>confdefs.h <<\EOF
12500 #define USE_XMC_SUPPORT 1
12501 EOF
12502
12503 ###############################################################################
12504 # These are just experimental, probably should not be in a package:
12505
12506 echo "$as_me:12506: checking if you do not want to assume colors are white-on-black" >&5
12507 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12508
12509 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12510 if test "${enable_assumed_color+set}" = set; then
12511   enableval="$enable_assumed_color"
12512   with_assumed_color=$enableval
12513 else
12514   with_assumed_color=yes
12515 fi;
12516 echo "$as_me:12516: result: $with_assumed_color" >&5
12517 echo "${ECHO_T}$with_assumed_color" >&6
12518 test "x$with_assumed_color" = xyes &&
12519 cat >>confdefs.h <<\EOF
12520 #define USE_ASSUMED_COLOR 1
12521 EOF
12522
12523 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12524 echo "$as_me:12524: checking if you want hashmap scrolling-optimization code" >&5
12525 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12526
12527 # Check whether --enable-hashmap or --disable-hashmap was given.
12528 if test "${enable_hashmap+set}" = set; then
12529   enableval="$enable_hashmap"
12530   with_hashmap=$enableval
12531 else
12532   with_hashmap=yes
12533 fi;
12534 echo "$as_me:12534: result: $with_hashmap" >&5
12535 echo "${ECHO_T}$with_hashmap" >&6
12536 test "x$with_hashmap" = xyes &&
12537 cat >>confdefs.h <<\EOF
12538 #define USE_HASHMAP 1
12539 EOF
12540
12541 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12542 echo "$as_me:12542: checking if you want colorfgbg code" >&5
12543 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12544
12545 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12546 if test "${enable_colorfgbg+set}" = set; then
12547   enableval="$enable_colorfgbg"
12548   with_colorfgbg=$enableval
12549 else
12550   with_colorfgbg=no
12551 fi;
12552 echo "$as_me:12552: result: $with_colorfgbg" >&5
12553 echo "${ECHO_T}$with_colorfgbg" >&6
12554 test "x$with_colorfgbg" = xyes &&
12555 cat >>confdefs.h <<\EOF
12556 #define USE_COLORFGBG 1
12557 EOF
12558
12559 ###   use option --enable-interop to turn on use of bindings used for interop
12560 echo "$as_me:12560: checking if you want interop bindings" >&5
12561 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12562
12563 # Check whether --enable-interop or --disable-interop was given.
12564 if test "${enable_interop+set}" = set; then
12565   enableval="$enable_interop"
12566   with_exp_interop=$enableval
12567 else
12568   with_exp_interop=$cf_dft_interop
12569 fi;
12570 echo "$as_me:12570: result: $with_exp_interop" >&5
12571 echo "${ECHO_T}$with_exp_interop" >&6
12572
12573 NCURSES_INTEROP_FUNCS=0
12574 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12575
12576 # This is still experimental (20080329), but should ultimately be moved to
12577 # the script-block --with-normal, etc.
12578
12579 echo "$as_me:12579: checking if you want to link with the pthread library" >&5
12580 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12581
12582 # Check whether --with-pthread or --without-pthread was given.
12583 if test "${with_pthread+set}" = set; then
12584   withval="$with_pthread"
12585   with_pthread=$withval
12586 else
12587   with_pthread=no
12588 fi;
12589 echo "$as_me:12589: result: $with_pthread" >&5
12590 echo "${ECHO_T}$with_pthread" >&6
12591
12592 if test "$with_pthread" != no ; then
12593         echo "$as_me:12593: checking for pthread.h" >&5
12594 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12595 if test "${ac_cv_header_pthread_h+set}" = set; then
12596   echo $ECHO_N "(cached) $ECHO_C" >&6
12597 else
12598   cat >conftest.$ac_ext <<_ACEOF
12599 #line 12599 "configure"
12600 #include "confdefs.h"
12601 #include <pthread.h>
12602 _ACEOF
12603 if { (eval echo "$as_me:12603: \"$ac_cpp conftest.$ac_ext\"") >&5
12604   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12605   ac_status=$?
12606   egrep -v '^ *\+' conftest.er1 >conftest.err
12607   rm -f conftest.er1
12608   cat conftest.err >&5
12609   echo "$as_me:12609: \$? = $ac_status" >&5
12610   (exit $ac_status); } >/dev/null; then
12611   if test -s conftest.err; then
12612     ac_cpp_err=$ac_c_preproc_warn_flag
12613   else
12614     ac_cpp_err=
12615   fi
12616 else
12617   ac_cpp_err=yes
12618 fi
12619 if test -z "$ac_cpp_err"; then
12620   ac_cv_header_pthread_h=yes
12621 else
12622   echo "$as_me: failed program was:" >&5
12623   cat conftest.$ac_ext >&5
12624   ac_cv_header_pthread_h=no
12625 fi
12626 rm -f conftest.err conftest.$ac_ext
12627 fi
12628 echo "$as_me:12628: result: $ac_cv_header_pthread_h" >&5
12629 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12630 if test $ac_cv_header_pthread_h = yes; then
12631
12632 cat >>confdefs.h <<\EOF
12633 #define HAVE_PTHREADS_H 1
12634 EOF
12635
12636         for cf_lib_pthread in pthread c_r
12637         do
12638             echo "$as_me:12638: checking if we can link with the $cf_lib_pthread library" >&5
12639 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12640             cf_save_LIBS="$LIBS"
12641
12642 cf_add_libs="-l$cf_lib_pthread"
12643 # Filter out duplicates - this happens with badly-designed ".pc" files...
12644 for cf_add_1lib in $LIBS
12645 do
12646         for cf_add_2lib in $cf_add_libs
12647         do
12648                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12649                 then
12650                         cf_add_1lib=
12651                         break
12652                 fi
12653         done
12654         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12655 done
12656 LIBS="$cf_add_libs"
12657
12658             cat >conftest.$ac_ext <<_ACEOF
12659 #line 12659 "configure"
12660 #include "confdefs.h"
12661
12662 #include <pthread.h>
12663
12664 int
12665 main ()
12666 {
12667
12668                 int rc = pthread_create(0,0,0,0);
12669                 int r2 = pthread_mutexattr_settype(0, 0);
12670
12671   ;
12672   return 0;
12673 }
12674 _ACEOF
12675 rm -f conftest.$ac_objext conftest$ac_exeext
12676 if { (eval echo "$as_me:12676: \"$ac_link\"") >&5
12677   (eval $ac_link) 2>&5
12678   ac_status=$?
12679   echo "$as_me:12679: \$? = $ac_status" >&5
12680   (exit $ac_status); } &&
12681          { ac_try='test -s conftest$ac_exeext'
12682   { (eval echo "$as_me:12682: \"$ac_try\"") >&5
12683   (eval $ac_try) 2>&5
12684   ac_status=$?
12685   echo "$as_me:12685: \$? = $ac_status" >&5
12686   (exit $ac_status); }; }; then
12687   with_pthread=yes
12688 else
12689   echo "$as_me: failed program was:" >&5
12690 cat conftest.$ac_ext >&5
12691 with_pthread=no
12692 fi
12693 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12694             LIBS="$cf_save_LIBS"
12695             echo "$as_me:12695: result: $with_pthread" >&5
12696 echo "${ECHO_T}$with_pthread" >&6
12697             test "$with_pthread" = yes && break
12698         done
12699
12700         if test "$with_pthread" = yes ; then
12701
12702 cf_add_libs="-l$cf_lib_pthread"
12703 # Filter out duplicates - this happens with badly-designed ".pc" files...
12704 for cf_add_1lib in $LIBS
12705 do
12706         for cf_add_2lib in $cf_add_libs
12707         do
12708                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12709                 then
12710                         cf_add_1lib=
12711                         break
12712                 fi
12713         done
12714         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12715 done
12716 LIBS="$cf_add_libs"
12717
12718 cat >>confdefs.h <<\EOF
12719 #define HAVE_LIBPTHREADS 1
12720 EOF
12721
12722         else
12723             { { echo "$as_me:12723: error: Cannot link with pthread library" >&5
12724 echo "$as_me: error: Cannot link with pthread library" >&2;}
12725    { (exit 1); exit 1; }; }
12726         fi
12727
12728 fi
12729
12730 fi
12731
12732 if test "x$with_pthread" != xno; then
12733         echo "$as_me:12733: checking for pthread_kill" >&5
12734 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12735 if test "${ac_cv_func_pthread_kill+set}" = set; then
12736   echo $ECHO_N "(cached) $ECHO_C" >&6
12737 else
12738   cat >conftest.$ac_ext <<_ACEOF
12739 #line 12739 "configure"
12740 #include "confdefs.h"
12741 /* System header to define __stub macros and hopefully few prototypes,
12742     which can conflict with char pthread_kill (); below.  */
12743 #include <assert.h>
12744 /* Override any gcc2 internal prototype to avoid an error.  */
12745 #ifdef __cplusplus
12746 extern "C"
12747 #endif
12748 /* We use char because int might match the return type of a gcc2
12749    builtin and then its argument prototype would still apply.  */
12750 char pthread_kill ();
12751 char (*f) ();
12752
12753 int
12754 main ()
12755 {
12756 /* The GNU C library defines this for functions which it implements
12757     to always fail with ENOSYS.  Some functions are actually named
12758     something starting with __ and the normal name is an alias.  */
12759 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12760 choke me
12761 #else
12762 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12763 #endif
12764
12765   ;
12766   return 0;
12767 }
12768 _ACEOF
12769 rm -f conftest.$ac_objext conftest$ac_exeext
12770 if { (eval echo "$as_me:12770: \"$ac_link\"") >&5
12771   (eval $ac_link) 2>&5
12772   ac_status=$?
12773   echo "$as_me:12773: \$? = $ac_status" >&5
12774   (exit $ac_status); } &&
12775          { ac_try='test -s conftest$ac_exeext'
12776   { (eval echo "$as_me:12776: \"$ac_try\"") >&5
12777   (eval $ac_try) 2>&5
12778   ac_status=$?
12779   echo "$as_me:12779: \$? = $ac_status" >&5
12780   (exit $ac_status); }; }; then
12781   ac_cv_func_pthread_kill=yes
12782 else
12783   echo "$as_me: failed program was:" >&5
12784 cat conftest.$ac_ext >&5
12785 ac_cv_func_pthread_kill=no
12786 fi
12787 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12788 fi
12789 echo "$as_me:12789: result: $ac_cv_func_pthread_kill" >&5
12790 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12791 if test $ac_cv_func_pthread_kill = yes; then
12792
12793                 echo "$as_me:12793: checking if you want to allow EINTR in wgetch with pthreads" >&5
12794 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12795
12796 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12797 if test "${enable_pthreads_eintr+set}" = set; then
12798   enableval="$enable_pthreads_eintr"
12799   use_pthreads_eintr=$enableval
12800 else
12801   use_pthreads_eintr=no
12802 fi;
12803                 echo "$as_me:12803: result: $use_pthreads_eintr" >&5
12804 echo "${ECHO_T}$use_pthreads_eintr" >&6
12805                 if test "x$use_pthreads_eintr" = xyes ; then
12806
12807 cat >>confdefs.h <<\EOF
12808 #define USE_PTHREADS_EINTR 1
12809 EOF
12810
12811                 fi
12812 fi
12813
12814         echo "$as_me:12814: checking if you want to use weak-symbols for pthreads" >&5
12815 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12816
12817 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12818 if test "${enable_weak_symbols+set}" = set; then
12819   enableval="$enable_weak_symbols"
12820   use_weak_symbols=$enableval
12821 else
12822   use_weak_symbols=no
12823 fi;
12824         echo "$as_me:12824: result: $use_weak_symbols" >&5
12825 echo "${ECHO_T}$use_weak_symbols" >&6
12826         if test "x$use_weak_symbols" = xyes ; then
12827
12828 echo "$as_me:12828: checking if $CC supports weak symbols" >&5
12829 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12830 if test "${cf_cv_weak_symbols+set}" = set; then
12831   echo $ECHO_N "(cached) $ECHO_C" >&6
12832 else
12833
12834 cat >conftest.$ac_ext <<_ACEOF
12835 #line 12835 "configure"
12836 #include "confdefs.h"
12837
12838 #include <stdio.h>
12839 int
12840 main ()
12841 {
12842
12843 #if defined(__GNUC__)
12844 #  if defined __USE_ISOC99
12845 #    define _cat_pragma(exp)    _Pragma(#exp)
12846 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12847 #  else
12848 #    define _weak_pragma(exp)
12849 #  endif
12850 #  define _declare(name)        __extension__ extern __typeof__(name) name
12851 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12852 #endif
12853
12854 weak_symbol(fopen);
12855
12856   ;
12857   return 0;
12858 }
12859 _ACEOF
12860 rm -f conftest.$ac_objext
12861 if { (eval echo "$as_me:12861: \"$ac_compile\"") >&5
12862   (eval $ac_compile) 2>&5
12863   ac_status=$?
12864   echo "$as_me:12864: \$? = $ac_status" >&5
12865   (exit $ac_status); } &&
12866          { ac_try='test -s conftest.$ac_objext'
12867   { (eval echo "$as_me:12867: \"$ac_try\"") >&5
12868   (eval $ac_try) 2>&5
12869   ac_status=$?
12870   echo "$as_me:12870: \$? = $ac_status" >&5
12871   (exit $ac_status); }; }; then
12872   cf_cv_weak_symbols=yes
12873 else
12874   echo "$as_me: failed program was:" >&5
12875 cat conftest.$ac_ext >&5
12876 cf_cv_weak_symbols=no
12877 fi
12878 rm -f conftest.$ac_objext conftest.$ac_ext
12879
12880 fi
12881 echo "$as_me:12881: result: $cf_cv_weak_symbols" >&5
12882 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12883
12884         else
12885                 cf_cv_weak_symbols=no
12886         fi
12887
12888         if test "x$cf_cv_weak_symbols" = xyes ; then
12889
12890 cat >>confdefs.h <<\EOF
12891 #define USE_WEAK_SYMBOLS 1
12892 EOF
12893
12894         fi
12895 fi
12896
12897 PTHREAD=
12898 if test "x$with_pthread" = "xyes" ; then
12899
12900 cat >>confdefs.h <<\EOF
12901 #define USE_PTHREADS 1
12902 EOF
12903
12904         enable_reentrant=yes
12905         if test "x$cf_cv_weak_symbols" = xyes ; then
12906                 PTHREAD=-lpthread
12907         fi
12908 fi
12909
12910 # Reentrant code has to be opaque; there's little advantage to making ncurses
12911 # opaque outside of that, so there is no --enable-opaque option.  We can use
12912 # this option without --with-pthreads, but this will be always set for
12913 # pthreads.
12914 echo "$as_me:12914: checking if you want reentrant code" >&5
12915 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
12916
12917 # Check whether --enable-reentrant or --disable-reentrant was given.
12918 if test "${enable_reentrant+set}" = set; then
12919   enableval="$enable_reentrant"
12920   with_reentrant=$enableval
12921 else
12922   with_reentrant=no
12923 fi;
12924 echo "$as_me:12924: result: $with_reentrant" >&5
12925 echo "${ECHO_T}$with_reentrant" >&6
12926 if test "x$with_reentrant" = xyes ; then
12927         cf_cv_enable_reentrant=1
12928         cf_cv_enable_opaque="NCURSES_INTERNALS"
12929         NCURSES_OPAQUE=1
12930         NCURSES_SIZE_T=int
12931         if test "x$cf_cv_weak_symbols" = xyes ; then
12932
12933 # remove pthread library from $LIBS
12934 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12935
12936 cf_add_libs="-lpthread"
12937 # Filter out duplicates - this happens with badly-designed ".pc" files...
12938 for cf_add_1lib in $TEST_LIBS
12939 do
12940         for cf_add_2lib in $cf_add_libs
12941         do
12942                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12943                 then
12944                         cf_add_1lib=
12945                         break
12946                 fi
12947         done
12948         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12949 done
12950 TEST_LIBS="$cf_add_libs"
12951
12952 cf_add_libs="-lpthread"
12953 # Filter out duplicates - this happens with badly-designed ".pc" files...
12954 for cf_add_1lib in $TEST_LIBS2
12955 do
12956         for cf_add_2lib in $cf_add_libs
12957         do
12958                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12959                 then
12960                         cf_add_1lib=
12961                         break
12962                 fi
12963         done
12964         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12965 done
12966 TEST_LIBS2="$cf_add_libs"
12967
12968         else
12969                 # when not using weak symbols but with_reentrant,
12970                 # add 't' to the library suffix on all platforms
12971                 # except cygwin, where we only do that if ALSO
12972                 # compiling with full thread support.
12973                 case "$host" in
12974                 (*cygwin* | *msys*)
12975                         if test "$with_pthread" = "yes" ; then
12976                                 if test "x$disable_lib_suffixes" = "xno" ; then
12977                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12978                                 fi
12979                         fi ;;
12980                 (*)
12981                         if test "x$disable_lib_suffixes" = "xno" ; then
12982                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12983                         fi
12984                         ;;
12985                 esac
12986         fi
12987
12988 cat >>confdefs.h <<\EOF
12989 #define USE_REENTRANT 1
12990 EOF
12991
12992 if test "${with_abi_version+set}" != set; then
12993         case $cf_cv_rel_version in
12994         (5.*)
12995                 cf_cv_rel_version=6.0
12996                 cf_cv_abi_version=6
12997                 { echo "$as_me:12997: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12998 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12999                 ;;
13000         esac
13001 fi
13002
13003 else
13004         cf_cv_enable_reentrant=0
13005         cf_cv_enable_opaque="NCURSES_OPAQUE"
13006         NCURSES_OPAQUE=0
13007         NCURSES_SIZE_T=short
13008 fi
13009
13010 ### Allow using a different wrap-prefix
13011 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13012         echo "$as_me:13012: checking for prefix used to wrap public variables" >&5
13013 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13014
13015 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13016 if test "${with_wrap_prefix+set}" = set; then
13017   withval="$with_wrap_prefix"
13018   NCURSES_WRAP_PREFIX=$withval
13019 else
13020   NCURSES_WRAP_PREFIX=_nc_
13021 fi;
13022         echo "$as_me:13022: result: $NCURSES_WRAP_PREFIX" >&5
13023 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13024 else
13025         NCURSES_WRAP_PREFIX=_nc_
13026 fi
13027
13028 cat >>confdefs.h <<EOF
13029 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13030 EOF
13031
13032 echo "$as_me:13032: checking if you want experimental safe-sprintf code" >&5
13033 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
13034
13035 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
13036 if test "${enable_safe_sprintf+set}" = set; then
13037   enableval="$enable_safe_sprintf"
13038   with_safe_sprintf=$enableval
13039 else
13040   with_safe_sprintf=no
13041 fi;
13042 echo "$as_me:13042: result: $with_safe_sprintf" >&5
13043 echo "${ECHO_T}$with_safe_sprintf" >&6
13044 test "x$with_safe_sprintf" = xyes &&
13045 cat >>confdefs.h <<\EOF
13046 #define USE_SAFE_SPRINTF 1
13047 EOF
13048
13049 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
13050 # when hashmap is used scroll hints are useless
13051 if test "$with_hashmap" = no ; then
13052 echo "$as_me:13052: checking if you want to experiment without scrolling-hints code" >&5
13053 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
13054
13055 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
13056 if test "${enable_scroll_hints+set}" = set; then
13057   enableval="$enable_scroll_hints"
13058   with_scroll_hints=$enableval
13059 else
13060   with_scroll_hints=yes
13061 fi;
13062 echo "$as_me:13062: result: $with_scroll_hints" >&5
13063 echo "${ECHO_T}$with_scroll_hints" >&6
13064 test "x$with_scroll_hints" = xyes &&
13065 cat >>confdefs.h <<\EOF
13066 #define USE_SCROLL_HINTS 1
13067 EOF
13068
13069 fi
13070
13071 echo "$as_me:13071: checking if you want wgetch-events code" >&5
13072 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
13073
13074 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
13075 if test "${enable_wgetch_events+set}" = set; then
13076   enableval="$enable_wgetch_events"
13077   with_wgetch_events=$enableval
13078 else
13079   with_wgetch_events=no
13080 fi;
13081 echo "$as_me:13081: result: $with_wgetch_events" >&5
13082 echo "${ECHO_T}$with_wgetch_events" >&6
13083 test "x$with_wgetch_events" = xyes &&
13084 cat >>confdefs.h <<\EOF
13085 #define NCURSES_WGETCH_EVENTS 1
13086 EOF
13087
13088 ###############################################################################
13089
13090 ###     use option --disable-echo to suppress full display compiling commands
13091
13092 echo "$as_me:13092: checking if you want to see long compiling messages" >&5
13093 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13094
13095 # Check whether --enable-echo or --disable-echo was given.
13096 if test "${enable_echo+set}" = set; then
13097   enableval="$enable_echo"
13098   test "$enableval" != no && enableval=yes
13099         if test "$enableval" != "yes" ; then
13100
13101         ECHO_LT='--silent'
13102         ECHO_LD='@echo linking $@;'
13103         RULE_CC='@echo compiling $<'
13104         SHOW_CC='@echo compiling $@'
13105         ECHO_CC='@'
13106
13107         else
13108
13109         ECHO_LT=''
13110         ECHO_LD=''
13111         RULE_CC=''
13112         SHOW_CC=''
13113         ECHO_CC=''
13114
13115         fi
13116 else
13117   enableval=yes
13118
13119         ECHO_LT=''
13120         ECHO_LD=''
13121         RULE_CC=''
13122         SHOW_CC=''
13123         ECHO_CC=''
13124
13125 fi;
13126 echo "$as_me:13126: result: $enableval" >&5
13127 echo "${ECHO_T}$enableval" >&6
13128
13129 if test "x$enable_echo" = xyes; then
13130         ECHO_LINK=
13131 else
13132         ECHO_LINK='@ echo linking $@ ... ;'
13133         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
13134         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
13135 fi
13136
13137 ###     use option --enable-warnings to turn on all gcc warnings
13138 echo "$as_me:13138: checking if you want to see compiler warnings" >&5
13139 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13140
13141 # Check whether --enable-warnings or --disable-warnings was given.
13142 if test "${enable_warnings+set}" = set; then
13143   enableval="$enable_warnings"
13144   with_warnings=$enableval
13145 fi;
13146 echo "$as_me:13146: result: $with_warnings" >&5
13147 echo "${ECHO_T}$with_warnings" >&6
13148
13149 if test "x$with_warnings" = "xyes"; then
13150
13151         ADAFLAGS="$ADAFLAGS -gnatg"
13152
13153 INTEL_COMPILER=no
13154
13155 if test "$GCC" = yes ; then
13156         case $host_os in
13157         (linux*|gnu*)
13158                 echo "$as_me:13158: checking if this is really Intel C compiler" >&5
13159 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13160                 cf_save_CFLAGS="$CFLAGS"
13161                 CFLAGS="$CFLAGS -no-gcc"
13162                 cat >conftest.$ac_ext <<_ACEOF
13163 #line 13163 "configure"
13164 #include "confdefs.h"
13165
13166 int
13167 main ()
13168 {
13169
13170 #ifdef __INTEL_COMPILER
13171 #else
13172 make an error
13173 #endif
13174
13175   ;
13176   return 0;
13177 }
13178 _ACEOF
13179 rm -f conftest.$ac_objext
13180 if { (eval echo "$as_me:13180: \"$ac_compile\"") >&5
13181   (eval $ac_compile) 2>&5
13182   ac_status=$?
13183   echo "$as_me:13183: \$? = $ac_status" >&5
13184   (exit $ac_status); } &&
13185          { ac_try='test -s conftest.$ac_objext'
13186   { (eval echo "$as_me:13186: \"$ac_try\"") >&5
13187   (eval $ac_try) 2>&5
13188   ac_status=$?
13189   echo "$as_me:13189: \$? = $ac_status" >&5
13190   (exit $ac_status); }; }; then
13191   INTEL_COMPILER=yes
13192 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13193
13194 else
13195   echo "$as_me: failed program was:" >&5
13196 cat conftest.$ac_ext >&5
13197 fi
13198 rm -f conftest.$ac_objext conftest.$ac_ext
13199                 CFLAGS="$cf_save_CFLAGS"
13200                 echo "$as_me:13200: result: $INTEL_COMPILER" >&5
13201 echo "${ECHO_T}$INTEL_COMPILER" >&6
13202                 ;;
13203         esac
13204 fi
13205
13206 CLANG_COMPILER=no
13207
13208 if test "$GCC" = yes ; then
13209         echo "$as_me:13209: checking if this is really Clang C compiler" >&5
13210 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13211         cf_save_CFLAGS="$CFLAGS"
13212         CFLAGS="$CFLAGS -Qunused-arguments"
13213         cat >conftest.$ac_ext <<_ACEOF
13214 #line 13214 "configure"
13215 #include "confdefs.h"
13216
13217 int
13218 main ()
13219 {
13220
13221 #ifdef __clang__
13222 #else
13223 make an error
13224 #endif
13225
13226   ;
13227   return 0;
13228 }
13229 _ACEOF
13230 rm -f conftest.$ac_objext
13231 if { (eval echo "$as_me:13231: \"$ac_compile\"") >&5
13232   (eval $ac_compile) 2>&5
13233   ac_status=$?
13234   echo "$as_me:13234: \$? = $ac_status" >&5
13235   (exit $ac_status); } &&
13236          { ac_try='test -s conftest.$ac_objext'
13237   { (eval echo "$as_me:13237: \"$ac_try\"") >&5
13238   (eval $ac_try) 2>&5
13239   ac_status=$?
13240   echo "$as_me:13240: \$? = $ac_status" >&5
13241   (exit $ac_status); }; }; then
13242   CLANG_COMPILER=yes
13243 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13244
13245 else
13246   echo "$as_me: failed program was:" >&5
13247 cat conftest.$ac_ext >&5
13248 fi
13249 rm -f conftest.$ac_objext conftest.$ac_ext
13250         CFLAGS="$cf_save_CFLAGS"
13251         echo "$as_me:13251: result: $CLANG_COMPILER" >&5
13252 echo "${ECHO_T}$CLANG_COMPILER" >&6
13253 fi
13254
13255 cat > conftest.$ac_ext <<EOF
13256 #line 13256 "${as_me:-configure}"
13257 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13258 EOF
13259
13260 if test "$INTEL_COMPILER" = yes
13261 then
13262 # The "-wdXXX" options suppress warnings:
13263 # remark #1419: external declaration in primary source file
13264 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13265 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13266 # remark #193: zero used for undefined preprocessing identifier
13267 # remark #593: variable "curs_sb_left_arrow" was set but never used
13268 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13269 # remark #869: parameter "tw" was never referenced
13270 # remark #981: operands are evaluated in unspecified order
13271 # warning #279: controlling expression is constant
13272
13273         { echo "$as_me:13273: checking for $CC warning options..." >&5
13274 echo "$as_me: checking for $CC warning options..." >&6;}
13275         cf_save_CFLAGS="$CFLAGS"
13276         EXTRA_CFLAGS="-Wall"
13277         for cf_opt in \
13278                 wd1419 \
13279                 wd1683 \
13280                 wd1684 \
13281                 wd193 \
13282                 wd593 \
13283                 wd279 \
13284                 wd810 \
13285                 wd869 \
13286                 wd981
13287         do
13288                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13289                 if { (eval echo "$as_me:13289: \"$ac_compile\"") >&5
13290   (eval $ac_compile) 2>&5
13291   ac_status=$?
13292   echo "$as_me:13292: \$? = $ac_status" >&5
13293   (exit $ac_status); }; then
13294                         test -n "$verbose" && echo "$as_me:13294: result: ... -$cf_opt" >&5
13295 echo "${ECHO_T}... -$cf_opt" >&6
13296                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13297                 fi
13298         done
13299         CFLAGS="$cf_save_CFLAGS"
13300
13301 elif test "$GCC" = yes
13302 then
13303         { echo "$as_me:13303: checking for $CC warning options..." >&5
13304 echo "$as_me: checking for $CC warning options..." >&6;}
13305         cf_save_CFLAGS="$CFLAGS"
13306         EXTRA_CFLAGS=
13307         cf_warn_CONST=""
13308         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13309         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13310         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13311         for cf_opt in W Wall \
13312                 Wbad-function-cast \
13313                 Wcast-align \
13314                 Wcast-qual \
13315                 Wdeclaration-after-statement \
13316                 Wextra \
13317                 Winline \
13318                 Wmissing-declarations \
13319                 Wmissing-prototypes \
13320                 Wnested-externs \
13321                 Wpointer-arith \
13322                 Wshadow \
13323                 Wstrict-prototypes \
13324                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13325         do
13326                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13327                 if { (eval echo "$as_me:13327: \"$ac_compile\"") >&5
13328   (eval $ac_compile) 2>&5
13329   ac_status=$?
13330   echo "$as_me:13330: \$? = $ac_status" >&5
13331   (exit $ac_status); }; then
13332                         test -n "$verbose" && echo "$as_me:13332: result: ... -$cf_opt" >&5
13333 echo "${ECHO_T}... -$cf_opt" >&6
13334                         case $cf_opt in
13335                         (Wcast-qual)
13336                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13337                                 ;;
13338                         (Winline)
13339                                 case $GCC_VERSION in
13340                                 ([34].*)
13341                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13342
13343 echo "${as_me:-configure}:13343: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13344
13345                                         continue;;
13346                                 esac
13347                                 ;;
13348                         (Wpointer-arith)
13349                                 case $GCC_VERSION in
13350                                 ([12].*)
13351                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13352
13353 echo "${as_me:-configure}:13353: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13354
13355                                         continue;;
13356                                 esac
13357                                 ;;
13358                         esac
13359                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13360                 fi
13361         done
13362         CFLAGS="$cf_save_CFLAGS"
13363 fi
13364 rm -rf conftest*
13365
13366         if test "x$cf_with_cxx" = xyes ; then
13367
13368 INTEL_CPLUSPLUS=no
13369
13370 if test "$GCC" = yes ; then
13371         case $host_os in
13372         (linux*|gnu*)
13373                 echo "$as_me:13373: checking if this is really Intel C++ compiler" >&5
13374 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13375                 cf_save_CFLAGS="$CXXFLAGS"
13376                 CXXFLAGS="$CXXFLAGS -no-gcc"
13377                 cat >conftest.$ac_ext <<_ACEOF
13378 #line 13378 "configure"
13379 #include "confdefs.h"
13380
13381 int
13382 main ()
13383 {
13384
13385 #ifdef __INTEL_COMPILER
13386 #else
13387 make an error
13388 #endif
13389
13390   ;
13391   return 0;
13392 }
13393 _ACEOF
13394 rm -f conftest.$ac_objext
13395 if { (eval echo "$as_me:13395: \"$ac_compile\"") >&5
13396   (eval $ac_compile) 2>&5
13397   ac_status=$?
13398   echo "$as_me:13398: \$? = $ac_status" >&5
13399   (exit $ac_status); } &&
13400          { ac_try='test -s conftest.$ac_objext'
13401   { (eval echo "$as_me:13401: \"$ac_try\"") >&5
13402   (eval $ac_try) 2>&5
13403   ac_status=$?
13404   echo "$as_me:13404: \$? = $ac_status" >&5
13405   (exit $ac_status); }; }; then
13406   INTEL_CPLUSPLUS=yes
13407 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13408
13409 else
13410   echo "$as_me: failed program was:" >&5
13411 cat conftest.$ac_ext >&5
13412 fi
13413 rm -f conftest.$ac_objext conftest.$ac_ext
13414                 CXXFLAGS="$cf_save_CFLAGS"
13415                 echo "$as_me:13415: result: $INTEL_CPLUSPLUS" >&5
13416 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13417                 ;;
13418         esac
13419 fi
13420
13421 CLANG_CPLUSPLUS=no
13422
13423 if test "$GCC" = yes ; then
13424         echo "$as_me:13424: checking if this is really Clang C++ compiler" >&5
13425 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13426         cf_save_CFLAGS="$CXXFLAGS"
13427         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13428         cat >conftest.$ac_ext <<_ACEOF
13429 #line 13429 "configure"
13430 #include "confdefs.h"
13431
13432 int
13433 main ()
13434 {
13435
13436 #ifdef __clang__
13437 #else
13438 make an error
13439 #endif
13440
13441   ;
13442   return 0;
13443 }
13444 _ACEOF
13445 rm -f conftest.$ac_objext
13446 if { (eval echo "$as_me:13446: \"$ac_compile\"") >&5
13447   (eval $ac_compile) 2>&5
13448   ac_status=$?
13449   echo "$as_me:13449: \$? = $ac_status" >&5
13450   (exit $ac_status); } &&
13451          { ac_try='test -s conftest.$ac_objext'
13452   { (eval echo "$as_me:13452: \"$ac_try\"") >&5
13453   (eval $ac_try) 2>&5
13454   ac_status=$?
13455   echo "$as_me:13455: \$? = $ac_status" >&5
13456   (exit $ac_status); }; }; then
13457   CLANG_CPLUSPLUS=yes
13458 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13459
13460 else
13461   echo "$as_me: failed program was:" >&5
13462 cat conftest.$ac_ext >&5
13463 fi
13464 rm -f conftest.$ac_objext conftest.$ac_ext
13465         CXXFLAGS="$cf_save_CFLAGS"
13466         echo "$as_me:13466: result: $CLANG_CPLUSPLUS" >&5
13467 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13468 fi
13469
13470 ac_ext=cc
13471 ac_cpp='$CXXCPP $CPPFLAGS'
13472 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13473 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13474 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13475 ac_main_return=return
13476
13477 cat > conftest.$ac_ext <<EOF
13478 #line 13478 "configure"
13479 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13480 EOF
13481
13482 if test "$INTEL_CPLUSPLUS" = yes
13483 then
13484 # The "-wdXXX" options suppress warnings:
13485 # remark #1419: external declaration in primary source file
13486 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13487 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13488 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13489 # remark #193: zero used for undefined preprocessing identifier
13490 # remark #593: variable "curs_sb_left_arrow" was set but never used
13491 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13492 # remark #869: parameter "tw" was never referenced
13493 # remark #981: operands are evaluated in unspecified order
13494 # warning #269: invalid format string conversion
13495
13496         { echo "$as_me:13496: checking for $CC warning options..." >&5
13497 echo "$as_me: checking for $CC warning options..." >&6;}
13498         cf_save_CXXFLAGS="$CXXFLAGS"
13499         EXTRA_CXXFLAGS="-Wall"
13500         for cf_opt in \
13501                 wd1419 \
13502                 wd1682 \
13503                 wd1683 \
13504                 wd1684 \
13505                 wd193 \
13506                 wd279 \
13507                 wd593 \
13508                 wd810 \
13509                 wd869 \
13510                 wd981
13511         do
13512                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13513                 if { (eval echo "$as_me:13513: \"$ac_compile\"") >&5
13514   (eval $ac_compile) 2>&5
13515   ac_status=$?
13516   echo "$as_me:13516: \$? = $ac_status" >&5
13517   (exit $ac_status); }; then
13518                         test -n "$verbose" && echo "$as_me:13518: result: ... -$cf_opt" >&5
13519 echo "${ECHO_T}... -$cf_opt" >&6
13520                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13521                 fi
13522         done
13523         CXXFLAGS="$cf_save_CXXFLAGS"
13524
13525 elif test "$GXX" = yes
13526 then
13527         { echo "$as_me:13527: checking for $CXX warning options..." >&5
13528 echo "$as_me: checking for $CXX warning options..." >&6;}
13529         cf_save_CXXFLAGS="$CXXFLAGS"
13530         EXTRA_CXXFLAGS="-W -Wall"
13531         cf_gxx_extra_warnings=""
13532         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13533         case "$GCC_VERSION" in
13534         ([1-2].*)
13535                 ;;
13536         (*)
13537                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13538                 ;;
13539         esac
13540         for cf_opt in \
13541                 Wabi \
13542                 fabi-version=0 \
13543                 Wextra \
13544                 Wignored-qualifiers \
13545                 Wlogical-op \
13546                 Woverloaded-virtual \
13547                 Wsign-promo \
13548                 Wsynth \
13549                 Wold-style-cast \
13550                 Wcast-align \
13551                 Wcast-qual \
13552                 Wpointer-arith \
13553                 Wshadow \
13554                 Wundef $cf_gxx_extra_warnings Wno-unused
13555         do
13556                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13557                 if { (eval echo "$as_me:13557: \"$ac_compile\"") >&5
13558   (eval $ac_compile) 2>&5
13559   ac_status=$?
13560   echo "$as_me:13560: \$? = $ac_status" >&5
13561   (exit $ac_status); }; then
13562                         test -n "$verbose" && echo "$as_me:13562: result: ... -$cf_opt" >&5
13563 echo "${ECHO_T}... -$cf_opt" >&6
13564                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13565                 else
13566                         test -n "$verbose" && echo "$as_me:13566: result: ... no -$cf_opt" >&5
13567 echo "${ECHO_T}... no -$cf_opt" >&6
13568                 fi
13569         done
13570         CXXFLAGS="$cf_save_CXXFLAGS"
13571 fi
13572
13573 rm -rf conftest*
13574 ac_ext=c
13575 ac_cpp='$CPP $CPPFLAGS'
13576 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13577 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13578 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13579 ac_main_return=return
13580
13581         fi
13582 fi
13583
13584 if test "$GCC" = yes
13585 then
13586 cat > conftest.i <<EOF
13587 #ifndef GCC_PRINTF
13588 #define GCC_PRINTF 0
13589 #endif
13590 #ifndef GCC_SCANF
13591 #define GCC_SCANF 0
13592 #endif
13593 #ifndef GCC_NORETURN
13594 #define GCC_NORETURN /* nothing */
13595 #endif
13596 #ifndef GCC_UNUSED
13597 #define GCC_UNUSED /* nothing */
13598 #endif
13599 EOF
13600 if test "$GCC" = yes
13601 then
13602         { echo "$as_me:13602: checking for $CC __attribute__ directives..." >&5
13603 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13604 cat > conftest.$ac_ext <<EOF
13605 #line 13605 "${as_me:-configure}"
13606 #include "confdefs.h"
13607 #include "conftest.h"
13608 #include "conftest.i"
13609 #if     GCC_PRINTF
13610 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13611 #else
13612 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13613 #endif
13614 #if     GCC_SCANF
13615 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13616 #else
13617 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13618 #endif
13619 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13620 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13621 extern void foo(void) GCC_NORETURN;
13622 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13623 EOF
13624         cf_printf_attribute=no
13625         cf_scanf_attribute=no
13626         for cf_attribute in scanf printf unused noreturn
13627         do
13628
13629 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13630
13631                 cf_directive="__attribute__(($cf_attribute))"
13632                 echo "checking for $CC $cf_directive" 1>&5
13633
13634                 case $cf_attribute in
13635                 (printf)
13636                         cf_printf_attribute=yes
13637                         cat >conftest.h <<EOF
13638 #define GCC_$cf_ATTRIBUTE 1
13639 EOF
13640                         ;;
13641                 (scanf)
13642                         cf_scanf_attribute=yes
13643                         cat >conftest.h <<EOF
13644 #define GCC_$cf_ATTRIBUTE 1
13645 EOF
13646                         ;;
13647                 (*)
13648                         cat >conftest.h <<EOF
13649 #define GCC_$cf_ATTRIBUTE $cf_directive
13650 EOF
13651                         ;;
13652                 esac
13653
13654                 if { (eval echo "$as_me:13654: \"$ac_compile\"") >&5
13655   (eval $ac_compile) 2>&5
13656   ac_status=$?
13657   echo "$as_me:13657: \$? = $ac_status" >&5
13658   (exit $ac_status); }; then
13659                         test -n "$verbose" && echo "$as_me:13659: result: ... $cf_attribute" >&5
13660 echo "${ECHO_T}... $cf_attribute" >&6
13661                         cat conftest.h >>confdefs.h
13662                         case $cf_attribute in
13663                         (noreturn)
13664
13665 cat >>confdefs.h <<EOF
13666 #define GCC_NORETURN $cf_directive
13667 EOF
13668
13669                                 ;;
13670                         (printf)
13671                                 cf_value='/* nothing */'
13672                                 if test "$cf_printf_attribute" != no ; then
13673                                         cf_value='__attribute__((format(printf,fmt,var)))'
13674
13675 cat >>confdefs.h <<\EOF
13676 #define GCC_PRINTF 1
13677 EOF
13678
13679                                 fi
13680
13681 cat >>confdefs.h <<EOF
13682 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13683 EOF
13684
13685                                 ;;
13686                         (scanf)
13687                                 cf_value='/* nothing */'
13688                                 if test "$cf_scanf_attribute" != no ; then
13689                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13690
13691 cat >>confdefs.h <<\EOF
13692 #define GCC_SCANF 1
13693 EOF
13694
13695                                 fi
13696
13697 cat >>confdefs.h <<EOF
13698 #define GCC_SCANFLIKE(fmt,var) $cf_value
13699 EOF
13700
13701                                 ;;
13702                         (unused)
13703
13704 cat >>confdefs.h <<EOF
13705 #define GCC_UNUSED $cf_directive
13706 EOF
13707
13708                                 ;;
13709                         esac
13710                 fi
13711         done
13712 else
13713         fgrep define conftest.i >>confdefs.h
13714 fi
13715 rm -rf conftest*
13716 fi
13717
13718 echo "$as_me:13718: checking if you want to work around bogus compiler/loader warnings" >&5
13719 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13720
13721 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13722 if test "${enable_string_hacks+set}" = set; then
13723   enableval="$enable_string_hacks"
13724   with_string_hacks=$enableval
13725 else
13726   with_string_hacks=no
13727 fi;
13728 echo "$as_me:13728: result: $with_string_hacks" >&5
13729 echo "${ECHO_T}$with_string_hacks" >&6
13730
13731 if test "x$with_string_hacks" = "xyes"; then
13732
13733 cat >>confdefs.h <<\EOF
13734 #define USE_STRING_HACKS 1
13735 EOF
13736
13737         { echo "$as_me:13737: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13738 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13739
13740 for ac_func in strlcat strlcpy snprintf
13741 do
13742 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13743 echo "$as_me:13743: checking for $ac_func" >&5
13744 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13745 if eval "test \"\${$as_ac_var+set}\" = set"; then
13746   echo $ECHO_N "(cached) $ECHO_C" >&6
13747 else
13748   cat >conftest.$ac_ext <<_ACEOF
13749 #line 13749 "configure"
13750 #include "confdefs.h"
13751 /* System header to define __stub macros and hopefully few prototypes,
13752     which can conflict with char $ac_func (); below.  */
13753 #include <assert.h>
13754 /* Override any gcc2 internal prototype to avoid an error.  */
13755 #ifdef __cplusplus
13756 extern "C"
13757 #endif
13758 /* We use char because int might match the return type of a gcc2
13759    builtin and then its argument prototype would still apply.  */
13760 char $ac_func ();
13761 char (*f) ();
13762
13763 int
13764 main ()
13765 {
13766 /* The GNU C library defines this for functions which it implements
13767     to always fail with ENOSYS.  Some functions are actually named
13768     something starting with __ and the normal name is an alias.  */
13769 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13770 choke me
13771 #else
13772 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13773 #endif
13774
13775   ;
13776   return 0;
13777 }
13778 _ACEOF
13779 rm -f conftest.$ac_objext conftest$ac_exeext
13780 if { (eval echo "$as_me:13780: \"$ac_link\"") >&5
13781   (eval $ac_link) 2>&5
13782   ac_status=$?
13783   echo "$as_me:13783: \$? = $ac_status" >&5
13784   (exit $ac_status); } &&
13785          { ac_try='test -s conftest$ac_exeext'
13786   { (eval echo "$as_me:13786: \"$ac_try\"") >&5
13787   (eval $ac_try) 2>&5
13788   ac_status=$?
13789   echo "$as_me:13789: \$? = $ac_status" >&5
13790   (exit $ac_status); }; }; then
13791   eval "$as_ac_var=yes"
13792 else
13793   echo "$as_me: failed program was:" >&5
13794 cat conftest.$ac_ext >&5
13795 eval "$as_ac_var=no"
13796 fi
13797 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13798 fi
13799 echo "$as_me:13799: result: `eval echo '${'$as_ac_var'}'`" >&5
13800 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13801 if test `eval echo '${'$as_ac_var'}'` = yes; then
13802   cat >>confdefs.h <<EOF
13803 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13804 EOF
13805
13806 fi
13807 done
13808
13809 fi
13810
13811 ###     use option --enable-assertions to turn on generation of assertion code
13812 echo "$as_me:13812: checking if you want to enable runtime assertions" >&5
13813 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13814
13815 # Check whether --enable-assertions or --disable-assertions was given.
13816 if test "${enable_assertions+set}" = set; then
13817   enableval="$enable_assertions"
13818   with_assertions=$enableval
13819 else
13820   with_assertions=no
13821 fi;
13822 echo "$as_me:13822: result: $with_assertions" >&5
13823 echo "${ECHO_T}$with_assertions" >&6
13824 if test -n "$GCC"
13825 then
13826         if test "$with_assertions" = no
13827         then
13828                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13829         else
13830
13831         ADAFLAGS="$ADAFLAGS -gnata"
13832
13833         fi
13834 fi
13835
13836 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13837
13838 echo "$as_me:13838: checking if you want to use dmalloc for testing" >&5
13839 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13840
13841 # Check whether --with-dmalloc or --without-dmalloc was given.
13842 if test "${with_dmalloc+set}" = set; then
13843   withval="$with_dmalloc"
13844
13845 cat >>confdefs.h <<EOF
13846 #define USE_DMALLOC 1
13847 EOF
13848
13849         : ${with_cflags:=-g}
13850         : ${with_no_leaks:=yes}
13851          with_dmalloc=yes
13852 else
13853   with_dmalloc=
13854 fi;
13855 echo "$as_me:13855: result: ${with_dmalloc:-no}" >&5
13856 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13857
13858 case .$with_cflags in
13859 (.*-g*)
13860         case .$CFLAGS in
13861         (.*-g*)
13862                 ;;
13863         (*)
13864
13865 cf_fix_cppflags=no
13866 cf_new_cflags=
13867 cf_new_cppflags=
13868 cf_new_extra_cppflags=
13869
13870 for cf_add_cflags in -g
13871 do
13872 case $cf_fix_cppflags in
13873 (no)
13874         case $cf_add_cflags in
13875         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13876                 case $cf_add_cflags in
13877                 (-D*)
13878                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13879
13880                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13881                                 && test -z "${cf_tst_cflags}" \
13882                                 && cf_fix_cppflags=yes
13883
13884                         if test $cf_fix_cppflags = yes ; then
13885                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13886                                 continue
13887                         elif test "${cf_tst_cflags}" = "\"'" ; then
13888                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13889                                 continue
13890                         fi
13891                         ;;
13892                 esac
13893                 case "$CPPFLAGS" in
13894                 (*$cf_add_cflags)
13895                         ;;
13896                 (*)
13897                         case $cf_add_cflags in
13898                         (-D*)
13899                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13900
13901 CPPFLAGS=`echo "$CPPFLAGS" | \
13902         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13903                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13904
13905                                 ;;
13906                         esac
13907                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13908                         ;;
13909                 esac
13910                 ;;
13911         (*)
13912                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13913                 ;;
13914         esac
13915         ;;
13916 (yes)
13917         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13918
13919         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13920
13921         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13922                 && test -z "${cf_tst_cflags}" \
13923                 && cf_fix_cppflags=no
13924         ;;
13925 esac
13926 done
13927
13928 if test -n "$cf_new_cflags" ; then
13929
13930         CFLAGS="$CFLAGS $cf_new_cflags"
13931 fi
13932
13933 if test -n "$cf_new_cppflags" ; then
13934
13935         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13936 fi
13937
13938 if test -n "$cf_new_extra_cppflags" ; then
13939
13940         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13941 fi
13942
13943                 ;;
13944         esac
13945         ;;
13946 esac
13947
13948 if test "$with_dmalloc" = yes ; then
13949         echo "$as_me:13949: checking for dmalloc.h" >&5
13950 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13951 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13952   echo $ECHO_N "(cached) $ECHO_C" >&6
13953 else
13954   cat >conftest.$ac_ext <<_ACEOF
13955 #line 13955 "configure"
13956 #include "confdefs.h"
13957 #include <dmalloc.h>
13958 _ACEOF
13959 if { (eval echo "$as_me:13959: \"$ac_cpp conftest.$ac_ext\"") >&5
13960   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13961   ac_status=$?
13962   egrep -v '^ *\+' conftest.er1 >conftest.err
13963   rm -f conftest.er1
13964   cat conftest.err >&5
13965   echo "$as_me:13965: \$? = $ac_status" >&5
13966   (exit $ac_status); } >/dev/null; then
13967   if test -s conftest.err; then
13968     ac_cpp_err=$ac_c_preproc_warn_flag
13969   else
13970     ac_cpp_err=
13971   fi
13972 else
13973   ac_cpp_err=yes
13974 fi
13975 if test -z "$ac_cpp_err"; then
13976   ac_cv_header_dmalloc_h=yes
13977 else
13978   echo "$as_me: failed program was:" >&5
13979   cat conftest.$ac_ext >&5
13980   ac_cv_header_dmalloc_h=no
13981 fi
13982 rm -f conftest.err conftest.$ac_ext
13983 fi
13984 echo "$as_me:13984: result: $ac_cv_header_dmalloc_h" >&5
13985 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13986 if test $ac_cv_header_dmalloc_h = yes; then
13987
13988 echo "$as_me:13988: checking for dmalloc_debug in -ldmalloc" >&5
13989 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13990 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13991   echo $ECHO_N "(cached) $ECHO_C" >&6
13992 else
13993   ac_check_lib_save_LIBS=$LIBS
13994 LIBS="-ldmalloc  $LIBS"
13995 cat >conftest.$ac_ext <<_ACEOF
13996 #line 13996 "configure"
13997 #include "confdefs.h"
13998
13999 /* Override any gcc2 internal prototype to avoid an error.  */
14000 #ifdef __cplusplus
14001 extern "C"
14002 #endif
14003 /* We use char because int might match the return type of a gcc2
14004    builtin and then its argument prototype would still apply.  */
14005 char dmalloc_debug ();
14006 int
14007 main ()
14008 {
14009 dmalloc_debug ();
14010   ;
14011   return 0;
14012 }
14013 _ACEOF
14014 rm -f conftest.$ac_objext conftest$ac_exeext
14015 if { (eval echo "$as_me:14015: \"$ac_link\"") >&5
14016   (eval $ac_link) 2>&5
14017   ac_status=$?
14018   echo "$as_me:14018: \$? = $ac_status" >&5
14019   (exit $ac_status); } &&
14020          { ac_try='test -s conftest$ac_exeext'
14021   { (eval echo "$as_me:14021: \"$ac_try\"") >&5
14022   (eval $ac_try) 2>&5
14023   ac_status=$?
14024   echo "$as_me:14024: \$? = $ac_status" >&5
14025   (exit $ac_status); }; }; then
14026   ac_cv_lib_dmalloc_dmalloc_debug=yes
14027 else
14028   echo "$as_me: failed program was:" >&5
14029 cat conftest.$ac_ext >&5
14030 ac_cv_lib_dmalloc_dmalloc_debug=no
14031 fi
14032 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14033 LIBS=$ac_check_lib_save_LIBS
14034 fi
14035 echo "$as_me:14035: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
14036 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
14037 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
14038   cat >>confdefs.h <<EOF
14039 #define HAVE_LIBDMALLOC 1
14040 EOF
14041
14042   LIBS="-ldmalloc $LIBS"
14043
14044 fi
14045
14046 fi
14047
14048 fi
14049
14050 echo "$as_me:14050: checking if you want to use dbmalloc for testing" >&5
14051 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
14052
14053 # Check whether --with-dbmalloc or --without-dbmalloc was given.
14054 if test "${with_dbmalloc+set}" = set; then
14055   withval="$with_dbmalloc"
14056
14057 cat >>confdefs.h <<EOF
14058 #define USE_DBMALLOC 1
14059 EOF
14060
14061         : ${with_cflags:=-g}
14062         : ${with_no_leaks:=yes}
14063          with_dbmalloc=yes
14064 else
14065   with_dbmalloc=
14066 fi;
14067 echo "$as_me:14067: result: ${with_dbmalloc:-no}" >&5
14068 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
14069
14070 case .$with_cflags in
14071 (.*-g*)
14072         case .$CFLAGS in
14073         (.*-g*)
14074                 ;;
14075         (*)
14076
14077 cf_fix_cppflags=no
14078 cf_new_cflags=
14079 cf_new_cppflags=
14080 cf_new_extra_cppflags=
14081
14082 for cf_add_cflags in -g
14083 do
14084 case $cf_fix_cppflags in
14085 (no)
14086         case $cf_add_cflags in
14087         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14088                 case $cf_add_cflags in
14089                 (-D*)
14090                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14091
14092                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14093                                 && test -z "${cf_tst_cflags}" \
14094                                 && cf_fix_cppflags=yes
14095
14096                         if test $cf_fix_cppflags = yes ; then
14097                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14098                                 continue
14099                         elif test "${cf_tst_cflags}" = "\"'" ; then
14100                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14101                                 continue
14102                         fi
14103                         ;;
14104                 esac
14105                 case "$CPPFLAGS" in
14106                 (*$cf_add_cflags)
14107                         ;;
14108                 (*)
14109                         case $cf_add_cflags in
14110                         (-D*)
14111                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14112
14113 CPPFLAGS=`echo "$CPPFLAGS" | \
14114         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14115                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14116
14117                                 ;;
14118                         esac
14119                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14120                         ;;
14121                 esac
14122                 ;;
14123         (*)
14124                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14125                 ;;
14126         esac
14127         ;;
14128 (yes)
14129         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14130
14131         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14132
14133         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14134                 && test -z "${cf_tst_cflags}" \
14135                 && cf_fix_cppflags=no
14136         ;;
14137 esac
14138 done
14139
14140 if test -n "$cf_new_cflags" ; then
14141
14142         CFLAGS="$CFLAGS $cf_new_cflags"
14143 fi
14144
14145 if test -n "$cf_new_cppflags" ; then
14146
14147         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14148 fi
14149
14150 if test -n "$cf_new_extra_cppflags" ; then
14151
14152         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14153 fi
14154
14155                 ;;
14156         esac
14157         ;;
14158 esac
14159
14160 if test "$with_dbmalloc" = yes ; then
14161         echo "$as_me:14161: checking for dbmalloc.h" >&5
14162 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
14163 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
14164   echo $ECHO_N "(cached) $ECHO_C" >&6
14165 else
14166   cat >conftest.$ac_ext <<_ACEOF
14167 #line 14167 "configure"
14168 #include "confdefs.h"
14169 #include <dbmalloc.h>
14170 _ACEOF
14171 if { (eval echo "$as_me:14171: \"$ac_cpp conftest.$ac_ext\"") >&5
14172   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14173   ac_status=$?
14174   egrep -v '^ *\+' conftest.er1 >conftest.err
14175   rm -f conftest.er1
14176   cat conftest.err >&5
14177   echo "$as_me:14177: \$? = $ac_status" >&5
14178   (exit $ac_status); } >/dev/null; then
14179   if test -s conftest.err; then
14180     ac_cpp_err=$ac_c_preproc_warn_flag
14181   else
14182     ac_cpp_err=
14183   fi
14184 else
14185   ac_cpp_err=yes
14186 fi
14187 if test -z "$ac_cpp_err"; then
14188   ac_cv_header_dbmalloc_h=yes
14189 else
14190   echo "$as_me: failed program was:" >&5
14191   cat conftest.$ac_ext >&5
14192   ac_cv_header_dbmalloc_h=no
14193 fi
14194 rm -f conftest.err conftest.$ac_ext
14195 fi
14196 echo "$as_me:14196: result: $ac_cv_header_dbmalloc_h" >&5
14197 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
14198 if test $ac_cv_header_dbmalloc_h = yes; then
14199
14200 echo "$as_me:14200: checking for debug_malloc in -ldbmalloc" >&5
14201 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
14202 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
14203   echo $ECHO_N "(cached) $ECHO_C" >&6
14204 else
14205   ac_check_lib_save_LIBS=$LIBS
14206 LIBS="-ldbmalloc  $LIBS"
14207 cat >conftest.$ac_ext <<_ACEOF
14208 #line 14208 "configure"
14209 #include "confdefs.h"
14210
14211 /* Override any gcc2 internal prototype to avoid an error.  */
14212 #ifdef __cplusplus
14213 extern "C"
14214 #endif
14215 /* We use char because int might match the return type of a gcc2
14216    builtin and then its argument prototype would still apply.  */
14217 char debug_malloc ();
14218 int
14219 main ()
14220 {
14221 debug_malloc ();
14222   ;
14223   return 0;
14224 }
14225 _ACEOF
14226 rm -f conftest.$ac_objext conftest$ac_exeext
14227 if { (eval echo "$as_me:14227: \"$ac_link\"") >&5
14228   (eval $ac_link) 2>&5
14229   ac_status=$?
14230   echo "$as_me:14230: \$? = $ac_status" >&5
14231   (exit $ac_status); } &&
14232          { ac_try='test -s conftest$ac_exeext'
14233   { (eval echo "$as_me:14233: \"$ac_try\"") >&5
14234   (eval $ac_try) 2>&5
14235   ac_status=$?
14236   echo "$as_me:14236: \$? = $ac_status" >&5
14237   (exit $ac_status); }; }; then
14238   ac_cv_lib_dbmalloc_debug_malloc=yes
14239 else
14240   echo "$as_me: failed program was:" >&5
14241 cat conftest.$ac_ext >&5
14242 ac_cv_lib_dbmalloc_debug_malloc=no
14243 fi
14244 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14245 LIBS=$ac_check_lib_save_LIBS
14246 fi
14247 echo "$as_me:14247: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14248 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14249 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14250   cat >>confdefs.h <<EOF
14251 #define HAVE_LIBDBMALLOC 1
14252 EOF
14253
14254   LIBS="-ldbmalloc $LIBS"
14255
14256 fi
14257
14258 fi
14259
14260 fi
14261
14262 echo "$as_me:14262: checking if you want to use valgrind for testing" >&5
14263 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14264
14265 # Check whether --with-valgrind or --without-valgrind was given.
14266 if test "${with_valgrind+set}" = set; then
14267   withval="$with_valgrind"
14268
14269 cat >>confdefs.h <<EOF
14270 #define USE_VALGRIND 1
14271 EOF
14272
14273         : ${with_cflags:=-g}
14274         : ${with_no_leaks:=yes}
14275          with_valgrind=yes
14276 else
14277   with_valgrind=
14278 fi;
14279 echo "$as_me:14279: result: ${with_valgrind:-no}" >&5
14280 echo "${ECHO_T}${with_valgrind:-no}" >&6
14281
14282 case .$with_cflags in
14283 (.*-g*)
14284         case .$CFLAGS in
14285         (.*-g*)
14286                 ;;
14287         (*)
14288
14289 cf_fix_cppflags=no
14290 cf_new_cflags=
14291 cf_new_cppflags=
14292 cf_new_extra_cppflags=
14293
14294 for cf_add_cflags in -g
14295 do
14296 case $cf_fix_cppflags in
14297 (no)
14298         case $cf_add_cflags in
14299         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14300                 case $cf_add_cflags in
14301                 (-D*)
14302                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14303
14304                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14305                                 && test -z "${cf_tst_cflags}" \
14306                                 && cf_fix_cppflags=yes
14307
14308                         if test $cf_fix_cppflags = yes ; then
14309                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14310                                 continue
14311                         elif test "${cf_tst_cflags}" = "\"'" ; then
14312                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14313                                 continue
14314                         fi
14315                         ;;
14316                 esac
14317                 case "$CPPFLAGS" in
14318                 (*$cf_add_cflags)
14319                         ;;
14320                 (*)
14321                         case $cf_add_cflags in
14322                         (-D*)
14323                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14324
14325 CPPFLAGS=`echo "$CPPFLAGS" | \
14326         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14327                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14328
14329                                 ;;
14330                         esac
14331                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14332                         ;;
14333                 esac
14334                 ;;
14335         (*)
14336                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14337                 ;;
14338         esac
14339         ;;
14340 (yes)
14341         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14342
14343         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14344
14345         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14346                 && test -z "${cf_tst_cflags}" \
14347                 && cf_fix_cppflags=no
14348         ;;
14349 esac
14350 done
14351
14352 if test -n "$cf_new_cflags" ; then
14353
14354         CFLAGS="$CFLAGS $cf_new_cflags"
14355 fi
14356
14357 if test -n "$cf_new_cppflags" ; then
14358
14359         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14360 fi
14361
14362 if test -n "$cf_new_extra_cppflags" ; then
14363
14364         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14365 fi
14366
14367                 ;;
14368         esac
14369         ;;
14370 esac
14371
14372 echo "$as_me:14372: checking if you want to perform memory-leak testing" >&5
14373 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14374
14375 # Check whether --enable-leaks or --disable-leaks was given.
14376 if test "${enable_leaks+set}" = set; then
14377   enableval="$enable_leaks"
14378   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14379 else
14380   : ${with_no_leaks:=no}
14381 fi;
14382 echo "$as_me:14382: result: $with_no_leaks" >&5
14383 echo "${ECHO_T}$with_no_leaks" >&6
14384
14385 if test "$with_no_leaks" = yes ; then
14386
14387 cat >>confdefs.h <<\EOF
14388 #define NO_LEAKS 1
14389 EOF
14390
14391 cat >>confdefs.h <<\EOF
14392 #define YY_NO_LEAKS 1
14393 EOF
14394
14395 fi
14396
14397 cat >>confdefs.h <<\EOF
14398 #define HAVE_NC_ALLOC_H 1
14399 EOF
14400
14401 ###     use option --enable-expanded to generate certain macros as functions
14402
14403 # Check whether --enable-expanded or --disable-expanded was given.
14404 if test "${enable_expanded+set}" = set; then
14405   enableval="$enable_expanded"
14406   test "x$enableval" = xyes &&
14407 cat >>confdefs.h <<\EOF
14408 #define NCURSES_EXPANDED 1
14409 EOF
14410
14411 fi;
14412
14413 ###     use option --disable-macros to suppress macros in favor of functions
14414
14415 # Check whether --enable-macros or --disable-macros was given.
14416 if test "${enable_macros+set}" = set; then
14417   enableval="$enable_macros"
14418   test "$enableval" = no &&
14419 cat >>confdefs.h <<\EOF
14420 #define NCURSES_NOMACROS 1
14421 EOF
14422
14423 fi;
14424
14425 # Normally we only add trace() to the debug-library.  Allow this to be
14426 # extended to all models of the ncurses library:
14427 cf_all_traces=no
14428 case "$CFLAGS $CPPFLAGS" in
14429 (*-DTRACE*)
14430         cf_all_traces=yes
14431         ;;
14432 esac
14433
14434 echo "$as_me:14434: checking whether to add trace feature to all models" >&5
14435 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14436
14437 # Check whether --with-trace or --without-trace was given.
14438 if test "${with_trace+set}" = set; then
14439   withval="$with_trace"
14440   cf_with_trace=$withval
14441 else
14442   cf_with_trace=$cf_all_traces
14443 fi;
14444 echo "$as_me:14444: result: $cf_with_trace" >&5
14445 echo "${ECHO_T}$cf_with_trace" >&6
14446
14447 if test "x$cf_with_trace" = xyes ; then
14448         LIB_TRACING=all
14449         ADA_TRACE=TRUE
14450
14451 cf_fix_cppflags=no
14452 cf_new_cflags=
14453 cf_new_cppflags=
14454 cf_new_extra_cppflags=
14455
14456 for cf_add_cflags in -DTRACE
14457 do
14458 case $cf_fix_cppflags in
14459 (no)
14460         case $cf_add_cflags in
14461         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14462                 case $cf_add_cflags in
14463                 (-D*)
14464                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14465
14466                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14467                                 && test -z "${cf_tst_cflags}" \
14468                                 && cf_fix_cppflags=yes
14469
14470                         if test $cf_fix_cppflags = yes ; then
14471                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14472                                 continue
14473                         elif test "${cf_tst_cflags}" = "\"'" ; then
14474                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14475                                 continue
14476                         fi
14477                         ;;
14478                 esac
14479                 case "$CPPFLAGS" in
14480                 (*$cf_add_cflags)
14481                         ;;
14482                 (*)
14483                         case $cf_add_cflags in
14484                         (-D*)
14485                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14486
14487 CPPFLAGS=`echo "$CPPFLAGS" | \
14488         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14489                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14490
14491                                 ;;
14492                         esac
14493                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14494                         ;;
14495                 esac
14496                 ;;
14497         (*)
14498                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14499                 ;;
14500         esac
14501         ;;
14502 (yes)
14503         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14504
14505         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14506
14507         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14508                 && test -z "${cf_tst_cflags}" \
14509                 && cf_fix_cppflags=no
14510         ;;
14511 esac
14512 done
14513
14514 if test -n "$cf_new_cflags" ; then
14515
14516         CFLAGS="$CFLAGS $cf_new_cflags"
14517 fi
14518
14519 if test -n "$cf_new_cppflags" ; then
14520
14521         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14522 fi
14523
14524 if test -n "$cf_new_extra_cppflags" ; then
14525
14526         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14527 fi
14528
14529 else
14530         LIB_TRACING=DEBUG
14531         ADA_TRACE=FALSE
14532 fi
14533
14534 echo "$as_me:14534: checking if we want to use GNAT projects" >&5
14535 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14536
14537 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14538 if test "${enable_gnat_projects+set}" = set; then
14539   enableval="$enable_gnat_projects"
14540   test "$enableval" != no && enableval=yes
14541         if test "$enableval" != "yes" ; then
14542     enable_gnat_projects=no
14543         else
14544                 enable_gnat_projects=yes
14545         fi
14546 else
14547   enableval=yes
14548         enable_gnat_projects=yes
14549
14550 fi;
14551 echo "$as_me:14551: result: $enable_gnat_projects" >&5
14552 echo "${ECHO_T}$enable_gnat_projects" >&6
14553
14554 ###     Checks for libraries.
14555 case $cf_cv_system_name in
14556 (*mingw32*|*mingw64*)
14557         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
14558         LIBS=" -lpsapi $LIBS"
14559         ;;
14560 (*)
14561 echo "$as_me:14561: checking for gettimeofday" >&5
14562 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14563 if test "${ac_cv_func_gettimeofday+set}" = set; then
14564   echo $ECHO_N "(cached) $ECHO_C" >&6
14565 else
14566   cat >conftest.$ac_ext <<_ACEOF
14567 #line 14567 "configure"
14568 #include "confdefs.h"
14569 /* System header to define __stub macros and hopefully few prototypes,
14570     which can conflict with char gettimeofday (); below.  */
14571 #include <assert.h>
14572 /* Override any gcc2 internal prototype to avoid an error.  */
14573 #ifdef __cplusplus
14574 extern "C"
14575 #endif
14576 /* We use char because int might match the return type of a gcc2
14577    builtin and then its argument prototype would still apply.  */
14578 char gettimeofday ();
14579 char (*f) ();
14580
14581 int
14582 main ()
14583 {
14584 /* The GNU C library defines this for functions which it implements
14585     to always fail with ENOSYS.  Some functions are actually named
14586     something starting with __ and the normal name is an alias.  */
14587 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14588 choke me
14589 #else
14590 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14591 #endif
14592
14593   ;
14594   return 0;
14595 }
14596 _ACEOF
14597 rm -f conftest.$ac_objext conftest$ac_exeext
14598 if { (eval echo "$as_me:14598: \"$ac_link\"") >&5
14599   (eval $ac_link) 2>&5
14600   ac_status=$?
14601   echo "$as_me:14601: \$? = $ac_status" >&5
14602   (exit $ac_status); } &&
14603          { ac_try='test -s conftest$ac_exeext'
14604   { (eval echo "$as_me:14604: \"$ac_try\"") >&5
14605   (eval $ac_try) 2>&5
14606   ac_status=$?
14607   echo "$as_me:14607: \$? = $ac_status" >&5
14608   (exit $ac_status); }; }; then
14609   ac_cv_func_gettimeofday=yes
14610 else
14611   echo "$as_me: failed program was:" >&5
14612 cat conftest.$ac_ext >&5
14613 ac_cv_func_gettimeofday=no
14614 fi
14615 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14616 fi
14617 echo "$as_me:14617: result: $ac_cv_func_gettimeofday" >&5
14618 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14619 if test $ac_cv_func_gettimeofday = yes; then
14620
14621 cat >>confdefs.h <<\EOF
14622 #define HAVE_GETTIMEOFDAY 1
14623 EOF
14624
14625 else
14626
14627 echo "$as_me:14627: checking for gettimeofday in -lbsd" >&5
14628 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14629 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14630   echo $ECHO_N "(cached) $ECHO_C" >&6
14631 else
14632   ac_check_lib_save_LIBS=$LIBS
14633 LIBS="-lbsd  $LIBS"
14634 cat >conftest.$ac_ext <<_ACEOF
14635 #line 14635 "configure"
14636 #include "confdefs.h"
14637
14638 /* Override any gcc2 internal prototype to avoid an error.  */
14639 #ifdef __cplusplus
14640 extern "C"
14641 #endif
14642 /* We use char because int might match the return type of a gcc2
14643    builtin and then its argument prototype would still apply.  */
14644 char gettimeofday ();
14645 int
14646 main ()
14647 {
14648 gettimeofday ();
14649   ;
14650   return 0;
14651 }
14652 _ACEOF
14653 rm -f conftest.$ac_objext conftest$ac_exeext
14654 if { (eval echo "$as_me:14654: \"$ac_link\"") >&5
14655   (eval $ac_link) 2>&5
14656   ac_status=$?
14657   echo "$as_me:14657: \$? = $ac_status" >&5
14658   (exit $ac_status); } &&
14659          { ac_try='test -s conftest$ac_exeext'
14660   { (eval echo "$as_me:14660: \"$ac_try\"") >&5
14661   (eval $ac_try) 2>&5
14662   ac_status=$?
14663   echo "$as_me:14663: \$? = $ac_status" >&5
14664   (exit $ac_status); }; }; then
14665   ac_cv_lib_bsd_gettimeofday=yes
14666 else
14667   echo "$as_me: failed program was:" >&5
14668 cat conftest.$ac_ext >&5
14669 ac_cv_lib_bsd_gettimeofday=no
14670 fi
14671 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14672 LIBS=$ac_check_lib_save_LIBS
14673 fi
14674 echo "$as_me:14674: result: $ac_cv_lib_bsd_gettimeofday" >&5
14675 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14676 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14677
14678 cat >>confdefs.h <<\EOF
14679 #define HAVE_GETTIMEOFDAY 1
14680 EOF
14681
14682 cf_add_libs="-lbsd"
14683 # Filter out duplicates - this happens with badly-designed ".pc" files...
14684 for cf_add_1lib in $LIBS
14685 do
14686         for cf_add_2lib in $cf_add_libs
14687         do
14688                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14689                 then
14690                         cf_add_1lib=
14691                         break
14692                 fi
14693         done
14694         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14695 done
14696 LIBS="$cf_add_libs"
14697
14698 fi
14699
14700 fi
14701         ;;
14702 esac
14703
14704 echo "$as_me:14704: checking if -lm needed for math functions" >&5
14705 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14706 if test "${cf_cv_need_libm+set}" = set; then
14707   echo $ECHO_N "(cached) $ECHO_C" >&6
14708 else
14709
14710         cat >conftest.$ac_ext <<_ACEOF
14711 #line 14711 "configure"
14712 #include "confdefs.h"
14713
14714         #include <stdio.h>
14715         #include <math.h>
14716
14717 int
14718 main ()
14719 {
14720 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14721   ;
14722   return 0;
14723 }
14724 _ACEOF
14725 rm -f conftest.$ac_objext conftest$ac_exeext
14726 if { (eval echo "$as_me:14726: \"$ac_link\"") >&5
14727   (eval $ac_link) 2>&5
14728   ac_status=$?
14729   echo "$as_me:14729: \$? = $ac_status" >&5
14730   (exit $ac_status); } &&
14731          { ac_try='test -s conftest$ac_exeext'
14732   { (eval echo "$as_me:14732: \"$ac_try\"") >&5
14733   (eval $ac_try) 2>&5
14734   ac_status=$?
14735   echo "$as_me:14735: \$? = $ac_status" >&5
14736   (exit $ac_status); }; }; then
14737   cf_cv_need_libm=no
14738 else
14739   echo "$as_me: failed program was:" >&5
14740 cat conftest.$ac_ext >&5
14741 cf_cv_need_libm=yes
14742 fi
14743 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14744 fi
14745 echo "$as_me:14745: result: $cf_cv_need_libm" >&5
14746 echo "${ECHO_T}$cf_cv_need_libm" >&6
14747 if test "$cf_cv_need_libm" = yes
14748 then
14749 MATH_LIB=-lm
14750 fi
14751
14752 ###     Checks for header files.
14753 echo "$as_me:14753: checking for ANSI C header files" >&5
14754 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14755 if test "${ac_cv_header_stdc+set}" = set; then
14756   echo $ECHO_N "(cached) $ECHO_C" >&6
14757 else
14758   cat >conftest.$ac_ext <<_ACEOF
14759 #line 14759 "configure"
14760 #include "confdefs.h"
14761 #include <stdlib.h>
14762 #include <stdarg.h>
14763 #include <string.h>
14764 #include <float.h>
14765
14766 _ACEOF
14767 if { (eval echo "$as_me:14767: \"$ac_cpp conftest.$ac_ext\"") >&5
14768   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14769   ac_status=$?
14770   egrep -v '^ *\+' conftest.er1 >conftest.err
14771   rm -f conftest.er1
14772   cat conftest.err >&5
14773   echo "$as_me:14773: \$? = $ac_status" >&5
14774   (exit $ac_status); } >/dev/null; then
14775   if test -s conftest.err; then
14776     ac_cpp_err=$ac_c_preproc_warn_flag
14777   else
14778     ac_cpp_err=
14779   fi
14780 else
14781   ac_cpp_err=yes
14782 fi
14783 if test -z "$ac_cpp_err"; then
14784   ac_cv_header_stdc=yes
14785 else
14786   echo "$as_me: failed program was:" >&5
14787   cat conftest.$ac_ext >&5
14788   ac_cv_header_stdc=no
14789 fi
14790 rm -f conftest.err conftest.$ac_ext
14791
14792 if test $ac_cv_header_stdc = yes; then
14793   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14794   cat >conftest.$ac_ext <<_ACEOF
14795 #line 14795 "configure"
14796 #include "confdefs.h"
14797 #include <string.h>
14798
14799 _ACEOF
14800 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14801   egrep "memchr" >/dev/null 2>&1; then
14802   :
14803 else
14804   ac_cv_header_stdc=no
14805 fi
14806 rm -rf conftest*
14807
14808 fi
14809
14810 if test $ac_cv_header_stdc = yes; then
14811   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14812   cat >conftest.$ac_ext <<_ACEOF
14813 #line 14813 "configure"
14814 #include "confdefs.h"
14815 #include <stdlib.h>
14816
14817 _ACEOF
14818 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14819   egrep "free" >/dev/null 2>&1; then
14820   :
14821 else
14822   ac_cv_header_stdc=no
14823 fi
14824 rm -rf conftest*
14825
14826 fi
14827
14828 if test $ac_cv_header_stdc = yes; then
14829   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14830   if test "$cross_compiling" = yes; then
14831   :
14832 else
14833   cat >conftest.$ac_ext <<_ACEOF
14834 #line 14834 "configure"
14835 #include "confdefs.h"
14836 #include <ctype.h>
14837 #if ((' ' & 0x0FF) == 0x020)
14838 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14839 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14840 #else
14841 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14842                      || ('j' <= (c) && (c) <= 'r') \
14843                      || ('s' <= (c) && (c) <= 'z'))
14844 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14845 #endif
14846
14847 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14848 int
14849 main ()
14850 {
14851   int i;
14852   for (i = 0; i < 256; i++)
14853     if (XOR (islower (i), ISLOWER (i))
14854         || toupper (i) != TOUPPER (i))
14855       $ac_main_return(2);
14856   $ac_main_return (0);
14857 }
14858 _ACEOF
14859 rm -f conftest$ac_exeext
14860 if { (eval echo "$as_me:14860: \"$ac_link\"") >&5
14861   (eval $ac_link) 2>&5
14862   ac_status=$?
14863   echo "$as_me:14863: \$? = $ac_status" >&5
14864   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14865   { (eval echo "$as_me:14865: \"$ac_try\"") >&5
14866   (eval $ac_try) 2>&5
14867   ac_status=$?
14868   echo "$as_me:14868: \$? = $ac_status" >&5
14869   (exit $ac_status); }; }; then
14870   :
14871 else
14872   echo "$as_me: program exited with status $ac_status" >&5
14873 echo "$as_me: failed program was:" >&5
14874 cat conftest.$ac_ext >&5
14875 ac_cv_header_stdc=no
14876 fi
14877 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14878 fi
14879 fi
14880 fi
14881 echo "$as_me:14881: result: $ac_cv_header_stdc" >&5
14882 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14883 if test $ac_cv_header_stdc = yes; then
14884
14885 cat >>confdefs.h <<\EOF
14886 #define STDC_HEADERS 1
14887 EOF
14888
14889 fi
14890
14891 ac_header_dirent=no
14892 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14893   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14894 echo "$as_me:14894: checking for $ac_hdr that defines DIR" >&5
14895 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14896 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14897   echo $ECHO_N "(cached) $ECHO_C" >&6
14898 else
14899   cat >conftest.$ac_ext <<_ACEOF
14900 #line 14900 "configure"
14901 #include "confdefs.h"
14902 #include <sys/types.h>
14903 #include <$ac_hdr>
14904
14905 int
14906 main ()
14907 {
14908 if ((DIR *) 0)
14909 return 0;
14910   ;
14911   return 0;
14912 }
14913 _ACEOF
14914 rm -f conftest.$ac_objext
14915 if { (eval echo "$as_me:14915: \"$ac_compile\"") >&5
14916   (eval $ac_compile) 2>&5
14917   ac_status=$?
14918   echo "$as_me:14918: \$? = $ac_status" >&5
14919   (exit $ac_status); } &&
14920          { ac_try='test -s conftest.$ac_objext'
14921   { (eval echo "$as_me:14921: \"$ac_try\"") >&5
14922   (eval $ac_try) 2>&5
14923   ac_status=$?
14924   echo "$as_me:14924: \$? = $ac_status" >&5
14925   (exit $ac_status); }; }; then
14926   eval "$as_ac_Header=yes"
14927 else
14928   echo "$as_me: failed program was:" >&5
14929 cat conftest.$ac_ext >&5
14930 eval "$as_ac_Header=no"
14931 fi
14932 rm -f conftest.$ac_objext conftest.$ac_ext
14933 fi
14934 echo "$as_me:14934: result: `eval echo '${'$as_ac_Header'}'`" >&5
14935 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14936 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14937   cat >>confdefs.h <<EOF
14938 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14939 EOF
14940
14941 ac_header_dirent=$ac_hdr; break
14942 fi
14943
14944 done
14945 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14946 if test $ac_header_dirent = dirent.h; then
14947   echo "$as_me:14947: checking for opendir in -ldir" >&5
14948 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14949 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14950   echo $ECHO_N "(cached) $ECHO_C" >&6
14951 else
14952   ac_check_lib_save_LIBS=$LIBS
14953 LIBS="-ldir  $LIBS"
14954 cat >conftest.$ac_ext <<_ACEOF
14955 #line 14955 "configure"
14956 #include "confdefs.h"
14957
14958 /* Override any gcc2 internal prototype to avoid an error.  */
14959 #ifdef __cplusplus
14960 extern "C"
14961 #endif
14962 /* We use char because int might match the return type of a gcc2
14963    builtin and then its argument prototype would still apply.  */
14964 char opendir ();
14965 int
14966 main ()
14967 {
14968 opendir ();
14969   ;
14970   return 0;
14971 }
14972 _ACEOF
14973 rm -f conftest.$ac_objext conftest$ac_exeext
14974 if { (eval echo "$as_me:14974: \"$ac_link\"") >&5
14975   (eval $ac_link) 2>&5
14976   ac_status=$?
14977   echo "$as_me:14977: \$? = $ac_status" >&5
14978   (exit $ac_status); } &&
14979          { ac_try='test -s conftest$ac_exeext'
14980   { (eval echo "$as_me:14980: \"$ac_try\"") >&5
14981   (eval $ac_try) 2>&5
14982   ac_status=$?
14983   echo "$as_me:14983: \$? = $ac_status" >&5
14984   (exit $ac_status); }; }; then
14985   ac_cv_lib_dir_opendir=yes
14986 else
14987   echo "$as_me: failed program was:" >&5
14988 cat conftest.$ac_ext >&5
14989 ac_cv_lib_dir_opendir=no
14990 fi
14991 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14992 LIBS=$ac_check_lib_save_LIBS
14993 fi
14994 echo "$as_me:14994: result: $ac_cv_lib_dir_opendir" >&5
14995 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14996 if test $ac_cv_lib_dir_opendir = yes; then
14997   LIBS="$LIBS -ldir"
14998 fi
14999
15000 else
15001   echo "$as_me:15001: checking for opendir in -lx" >&5
15002 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
15003 if test "${ac_cv_lib_x_opendir+set}" = set; then
15004   echo $ECHO_N "(cached) $ECHO_C" >&6
15005 else
15006   ac_check_lib_save_LIBS=$LIBS
15007 LIBS="-lx  $LIBS"
15008 cat >conftest.$ac_ext <<_ACEOF
15009 #line 15009 "configure"
15010 #include "confdefs.h"
15011
15012 /* Override any gcc2 internal prototype to avoid an error.  */
15013 #ifdef __cplusplus
15014 extern "C"
15015 #endif
15016 /* We use char because int might match the return type of a gcc2
15017    builtin and then its argument prototype would still apply.  */
15018 char opendir ();
15019 int
15020 main ()
15021 {
15022 opendir ();
15023   ;
15024   return 0;
15025 }
15026 _ACEOF
15027 rm -f conftest.$ac_objext conftest$ac_exeext
15028 if { (eval echo "$as_me:15028: \"$ac_link\"") >&5
15029   (eval $ac_link) 2>&5
15030   ac_status=$?
15031   echo "$as_me:15031: \$? = $ac_status" >&5
15032   (exit $ac_status); } &&
15033          { ac_try='test -s conftest$ac_exeext'
15034   { (eval echo "$as_me:15034: \"$ac_try\"") >&5
15035   (eval $ac_try) 2>&5
15036   ac_status=$?
15037   echo "$as_me:15037: \$? = $ac_status" >&5
15038   (exit $ac_status); }; }; then
15039   ac_cv_lib_x_opendir=yes
15040 else
15041   echo "$as_me: failed program was:" >&5
15042 cat conftest.$ac_ext >&5
15043 ac_cv_lib_x_opendir=no
15044 fi
15045 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15046 LIBS=$ac_check_lib_save_LIBS
15047 fi
15048 echo "$as_me:15048: result: $ac_cv_lib_x_opendir" >&5
15049 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
15050 if test $ac_cv_lib_x_opendir = yes; then
15051   LIBS="$LIBS -lx"
15052 fi
15053
15054 fi
15055
15056 echo "$as_me:15056: checking whether time.h and sys/time.h may both be included" >&5
15057 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15058 if test "${ac_cv_header_time+set}" = set; then
15059   echo $ECHO_N "(cached) $ECHO_C" >&6
15060 else
15061   cat >conftest.$ac_ext <<_ACEOF
15062 #line 15062 "configure"
15063 #include "confdefs.h"
15064 #include <sys/types.h>
15065 #include <sys/time.h>
15066 #include <time.h>
15067
15068 int
15069 main ()
15070 {
15071 if ((struct tm *) 0)
15072 return 0;
15073   ;
15074   return 0;
15075 }
15076 _ACEOF
15077 rm -f conftest.$ac_objext
15078 if { (eval echo "$as_me:15078: \"$ac_compile\"") >&5
15079   (eval $ac_compile) 2>&5
15080   ac_status=$?
15081   echo "$as_me:15081: \$? = $ac_status" >&5
15082   (exit $ac_status); } &&
15083          { ac_try='test -s conftest.$ac_objext'
15084   { (eval echo "$as_me:15084: \"$ac_try\"") >&5
15085   (eval $ac_try) 2>&5
15086   ac_status=$?
15087   echo "$as_me:15087: \$? = $ac_status" >&5
15088   (exit $ac_status); }; }; then
15089   ac_cv_header_time=yes
15090 else
15091   echo "$as_me: failed program was:" >&5
15092 cat conftest.$ac_ext >&5
15093 ac_cv_header_time=no
15094 fi
15095 rm -f conftest.$ac_objext conftest.$ac_ext
15096 fi
15097 echo "$as_me:15097: result: $ac_cv_header_time" >&5
15098 echo "${ECHO_T}$ac_cv_header_time" >&6
15099 if test $ac_cv_header_time = yes; then
15100
15101 cat >>confdefs.h <<\EOF
15102 #define TIME_WITH_SYS_TIME 1
15103 EOF
15104
15105 fi
15106
15107 cf_regex_func=no
15108
15109 cf_regex_libs="regex re"
15110 case $host_os in
15111 (mingw*)
15112         cf_regex_libs="gnurx $cf_regex_libs"
15113         ;;
15114 esac
15115
15116 echo "$as_me:15116: checking for regcomp" >&5
15117 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
15118 if test "${ac_cv_func_regcomp+set}" = set; then
15119   echo $ECHO_N "(cached) $ECHO_C" >&6
15120 else
15121   cat >conftest.$ac_ext <<_ACEOF
15122 #line 15122 "configure"
15123 #include "confdefs.h"
15124 /* System header to define __stub macros and hopefully few prototypes,
15125     which can conflict with char regcomp (); below.  */
15126 #include <assert.h>
15127 /* Override any gcc2 internal prototype to avoid an error.  */
15128 #ifdef __cplusplus
15129 extern "C"
15130 #endif
15131 /* We use char because int might match the return type of a gcc2
15132    builtin and then its argument prototype would still apply.  */
15133 char regcomp ();
15134 char (*f) ();
15135
15136 int
15137 main ()
15138 {
15139 /* The GNU C library defines this for functions which it implements
15140     to always fail with ENOSYS.  Some functions are actually named
15141     something starting with __ and the normal name is an alias.  */
15142 #if defined (__stub_regcomp) || defined (__stub___regcomp)
15143 choke me
15144 #else
15145 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15146 #endif
15147
15148   ;
15149   return 0;
15150 }
15151 _ACEOF
15152 rm -f conftest.$ac_objext conftest$ac_exeext
15153 if { (eval echo "$as_me:15153: \"$ac_link\"") >&5
15154   (eval $ac_link) 2>&5
15155   ac_status=$?
15156   echo "$as_me:15156: \$? = $ac_status" >&5
15157   (exit $ac_status); } &&
15158          { ac_try='test -s conftest$ac_exeext'
15159   { (eval echo "$as_me:15159: \"$ac_try\"") >&5
15160   (eval $ac_try) 2>&5
15161   ac_status=$?
15162   echo "$as_me:15162: \$? = $ac_status" >&5
15163   (exit $ac_status); }; }; then
15164   ac_cv_func_regcomp=yes
15165 else
15166   echo "$as_me: failed program was:" >&5
15167 cat conftest.$ac_ext >&5
15168 ac_cv_func_regcomp=no
15169 fi
15170 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15171 fi
15172 echo "$as_me:15172: result: $ac_cv_func_regcomp" >&5
15173 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
15174 if test $ac_cv_func_regcomp = yes; then
15175   cf_regex_func=regcomp
15176 else
15177
15178         for cf_regex_lib in $cf_regex_libs
15179         do
15180                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
15181 echo "$as_me:15181: checking for regcomp in -l$cf_regex_lib" >&5
15182 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
15183 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15184   echo $ECHO_N "(cached) $ECHO_C" >&6
15185 else
15186   ac_check_lib_save_LIBS=$LIBS
15187 LIBS="-l$cf_regex_lib  $LIBS"
15188 cat >conftest.$ac_ext <<_ACEOF
15189 #line 15189 "configure"
15190 #include "confdefs.h"
15191
15192 /* Override any gcc2 internal prototype to avoid an error.  */
15193 #ifdef __cplusplus
15194 extern "C"
15195 #endif
15196 /* We use char because int might match the return type of a gcc2
15197    builtin and then its argument prototype would still apply.  */
15198 char regcomp ();
15199 int
15200 main ()
15201 {
15202 regcomp ();
15203   ;
15204   return 0;
15205 }
15206 _ACEOF
15207 rm -f conftest.$ac_objext conftest$ac_exeext
15208 if { (eval echo "$as_me:15208: \"$ac_link\"") >&5
15209   (eval $ac_link) 2>&5
15210   ac_status=$?
15211   echo "$as_me:15211: \$? = $ac_status" >&5
15212   (exit $ac_status); } &&
15213          { ac_try='test -s conftest$ac_exeext'
15214   { (eval echo "$as_me:15214: \"$ac_try\"") >&5
15215   (eval $ac_try) 2>&5
15216   ac_status=$?
15217   echo "$as_me:15217: \$? = $ac_status" >&5
15218   (exit $ac_status); }; }; then
15219   eval "$as_ac_Lib=yes"
15220 else
15221   echo "$as_me: failed program was:" >&5
15222 cat conftest.$ac_ext >&5
15223 eval "$as_ac_Lib=no"
15224 fi
15225 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15226 LIBS=$ac_check_lib_save_LIBS
15227 fi
15228 echo "$as_me:15228: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15229 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15230 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15231
15232 cf_add_libs="-l$cf_regex_lib"
15233 # Filter out duplicates - this happens with badly-designed ".pc" files...
15234 for cf_add_1lib in $LIBS
15235 do
15236         for cf_add_2lib in $cf_add_libs
15237         do
15238                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15239                 then
15240                         cf_add_1lib=
15241                         break
15242                 fi
15243         done
15244         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15245 done
15246 LIBS="$cf_add_libs"
15247
15248                                 cf_regex_func=regcomp
15249                                 break
15250 fi
15251
15252         done
15253
15254 fi
15255
15256 if test "$cf_regex_func" = no ; then
15257         echo "$as_me:15257: checking for compile" >&5
15258 echo $ECHO_N "checking for compile... $ECHO_C" >&6
15259 if test "${ac_cv_func_compile+set}" = set; then
15260   echo $ECHO_N "(cached) $ECHO_C" >&6
15261 else
15262   cat >conftest.$ac_ext <<_ACEOF
15263 #line 15263 "configure"
15264 #include "confdefs.h"
15265 /* System header to define __stub macros and hopefully few prototypes,
15266     which can conflict with char compile (); below.  */
15267 #include <assert.h>
15268 /* Override any gcc2 internal prototype to avoid an error.  */
15269 #ifdef __cplusplus
15270 extern "C"
15271 #endif
15272 /* We use char because int might match the return type of a gcc2
15273    builtin and then its argument prototype would still apply.  */
15274 char compile ();
15275 char (*f) ();
15276
15277 int
15278 main ()
15279 {
15280 /* The GNU C library defines this for functions which it implements
15281     to always fail with ENOSYS.  Some functions are actually named
15282     something starting with __ and the normal name is an alias.  */
15283 #if defined (__stub_compile) || defined (__stub___compile)
15284 choke me
15285 #else
15286 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15287 #endif
15288
15289   ;
15290   return 0;
15291 }
15292 _ACEOF
15293 rm -f conftest.$ac_objext conftest$ac_exeext
15294 if { (eval echo "$as_me:15294: \"$ac_link\"") >&5
15295   (eval $ac_link) 2>&5
15296   ac_status=$?
15297   echo "$as_me:15297: \$? = $ac_status" >&5
15298   (exit $ac_status); } &&
15299          { ac_try='test -s conftest$ac_exeext'
15300   { (eval echo "$as_me:15300: \"$ac_try\"") >&5
15301   (eval $ac_try) 2>&5
15302   ac_status=$?
15303   echo "$as_me:15303: \$? = $ac_status" >&5
15304   (exit $ac_status); }; }; then
15305   ac_cv_func_compile=yes
15306 else
15307   echo "$as_me: failed program was:" >&5
15308 cat conftest.$ac_ext >&5
15309 ac_cv_func_compile=no
15310 fi
15311 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15312 fi
15313 echo "$as_me:15313: result: $ac_cv_func_compile" >&5
15314 echo "${ECHO_T}$ac_cv_func_compile" >&6
15315 if test $ac_cv_func_compile = yes; then
15316   cf_regex_func=compile
15317 else
15318
15319                 echo "$as_me:15319: checking for compile in -lgen" >&5
15320 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15321 if test "${ac_cv_lib_gen_compile+set}" = set; then
15322   echo $ECHO_N "(cached) $ECHO_C" >&6
15323 else
15324   ac_check_lib_save_LIBS=$LIBS
15325 LIBS="-lgen  $LIBS"
15326 cat >conftest.$ac_ext <<_ACEOF
15327 #line 15327 "configure"
15328 #include "confdefs.h"
15329
15330 /* Override any gcc2 internal prototype to avoid an error.  */
15331 #ifdef __cplusplus
15332 extern "C"
15333 #endif
15334 /* We use char because int might match the return type of a gcc2
15335    builtin and then its argument prototype would still apply.  */
15336 char compile ();
15337 int
15338 main ()
15339 {
15340 compile ();
15341   ;
15342   return 0;
15343 }
15344 _ACEOF
15345 rm -f conftest.$ac_objext conftest$ac_exeext
15346 if { (eval echo "$as_me:15346: \"$ac_link\"") >&5
15347   (eval $ac_link) 2>&5
15348   ac_status=$?
15349   echo "$as_me:15349: \$? = $ac_status" >&5
15350   (exit $ac_status); } &&
15351          { ac_try='test -s conftest$ac_exeext'
15352   { (eval echo "$as_me:15352: \"$ac_try\"") >&5
15353   (eval $ac_try) 2>&5
15354   ac_status=$?
15355   echo "$as_me:15355: \$? = $ac_status" >&5
15356   (exit $ac_status); }; }; then
15357   ac_cv_lib_gen_compile=yes
15358 else
15359   echo "$as_me: failed program was:" >&5
15360 cat conftest.$ac_ext >&5
15361 ac_cv_lib_gen_compile=no
15362 fi
15363 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15364 LIBS=$ac_check_lib_save_LIBS
15365 fi
15366 echo "$as_me:15366: result: $ac_cv_lib_gen_compile" >&5
15367 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15368 if test $ac_cv_lib_gen_compile = yes; then
15369
15370 cf_add_libs="-lgen"
15371 # Filter out duplicates - this happens with badly-designed ".pc" files...
15372 for cf_add_1lib in $LIBS
15373 do
15374         for cf_add_2lib in $cf_add_libs
15375         do
15376                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15377                 then
15378                         cf_add_1lib=
15379                         break
15380                 fi
15381         done
15382         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15383 done
15384 LIBS="$cf_add_libs"
15385
15386                                 cf_regex_func=compile
15387 fi
15388
15389 fi
15390
15391 fi
15392
15393 if test "$cf_regex_func" = no ; then
15394         { echo "$as_me:15394: WARNING: cannot find regular expression library" >&5
15395 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15396 fi
15397
15398 echo "$as_me:15398: checking for regular-expression headers" >&5
15399 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15400 if test "${cf_cv_regex_hdrs+set}" = set; then
15401   echo $ECHO_N "(cached) $ECHO_C" >&6
15402 else
15403
15404 cf_cv_regex_hdrs=no
15405 case $cf_regex_func in
15406 (compile)
15407         for cf_regex_hdr in regexp.h regexpr.h
15408         do
15409                 cat >conftest.$ac_ext <<_ACEOF
15410 #line 15410 "configure"
15411 #include "confdefs.h"
15412 #include <$cf_regex_hdr>
15413 int
15414 main ()
15415 {
15416
15417                         char *p = compile("", "", "", 0);
15418                         int x = step("", "");
15419
15420   ;
15421   return 0;
15422 }
15423 _ACEOF
15424 rm -f conftest.$ac_objext conftest$ac_exeext
15425 if { (eval echo "$as_me:15425: \"$ac_link\"") >&5
15426   (eval $ac_link) 2>&5
15427   ac_status=$?
15428   echo "$as_me:15428: \$? = $ac_status" >&5
15429   (exit $ac_status); } &&
15430          { ac_try='test -s conftest$ac_exeext'
15431   { (eval echo "$as_me:15431: \"$ac_try\"") >&5
15432   (eval $ac_try) 2>&5
15433   ac_status=$?
15434   echo "$as_me:15434: \$? = $ac_status" >&5
15435   (exit $ac_status); }; }; then
15436
15437                         cf_cv_regex_hdrs=$cf_regex_hdr
15438                         break
15439
15440 else
15441   echo "$as_me: failed program was:" >&5
15442 cat conftest.$ac_ext >&5
15443 fi
15444 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15445         done
15446         ;;
15447 (*)
15448         for cf_regex_hdr in regex.h
15449         do
15450                 cat >conftest.$ac_ext <<_ACEOF
15451 #line 15451 "configure"
15452 #include "confdefs.h"
15453 #include <sys/types.h>
15454 #include <$cf_regex_hdr>
15455 int
15456 main ()
15457 {
15458
15459                         regex_t *p;
15460                         int x = regcomp(p, "", 0);
15461                         int y = regexec(p, "", 0, 0, 0);
15462                         regfree(p);
15463
15464   ;
15465   return 0;
15466 }
15467 _ACEOF
15468 rm -f conftest.$ac_objext conftest$ac_exeext
15469 if { (eval echo "$as_me:15469: \"$ac_link\"") >&5
15470   (eval $ac_link) 2>&5
15471   ac_status=$?
15472   echo "$as_me:15472: \$? = $ac_status" >&5
15473   (exit $ac_status); } &&
15474          { ac_try='test -s conftest$ac_exeext'
15475   { (eval echo "$as_me:15475: \"$ac_try\"") >&5
15476   (eval $ac_try) 2>&5
15477   ac_status=$?
15478   echo "$as_me:15478: \$? = $ac_status" >&5
15479   (exit $ac_status); }; }; then
15480
15481                         cf_cv_regex_hdrs=$cf_regex_hdr
15482                         break
15483
15484 else
15485   echo "$as_me: failed program was:" >&5
15486 cat conftest.$ac_ext >&5
15487 fi
15488 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15489         done
15490         ;;
15491 esac
15492
15493 fi
15494 echo "$as_me:15494: result: $cf_cv_regex_hdrs" >&5
15495 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15496
15497 case $cf_cv_regex_hdrs in
15498         (no)            { echo "$as_me:15498: WARNING: no regular expression header found" >&5
15499 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
15500         (regex.h)
15501 cat >>confdefs.h <<\EOF
15502 #define HAVE_REGEX_H_FUNCS 1
15503 EOF
15504  ;;
15505         (regexp.h)
15506 cat >>confdefs.h <<\EOF
15507 #define HAVE_REGEXP_H_FUNCS 1
15508 EOF
15509  ;;
15510         (regexpr.h)
15511 cat >>confdefs.h <<\EOF
15512 #define HAVE_REGEXPR_H_FUNCS 1
15513 EOF
15514  ;;
15515 esac
15516
15517 for ac_header in \
15518 fcntl.h \
15519 getopt.h \
15520 limits.h \
15521 locale.h \
15522 math.h \
15523 poll.h \
15524 sys/bsdtypes.h \
15525 sys/ioctl.h \
15526 sys/param.h \
15527 sys/poll.h \
15528 sys/select.h \
15529 sys/time.h \
15530 sys/times.h \
15531 ttyent.h \
15532 unistd.h \
15533 wctype.h \
15534
15535 do
15536 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15537 echo "$as_me:15537: checking for $ac_header" >&5
15538 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15539 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15540   echo $ECHO_N "(cached) $ECHO_C" >&6
15541 else
15542   cat >conftest.$ac_ext <<_ACEOF
15543 #line 15543 "configure"
15544 #include "confdefs.h"
15545 #include <$ac_header>
15546 _ACEOF
15547 if { (eval echo "$as_me:15547: \"$ac_cpp conftest.$ac_ext\"") >&5
15548   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15549   ac_status=$?
15550   egrep -v '^ *\+' conftest.er1 >conftest.err
15551   rm -f conftest.er1
15552   cat conftest.err >&5
15553   echo "$as_me:15553: \$? = $ac_status" >&5
15554   (exit $ac_status); } >/dev/null; then
15555   if test -s conftest.err; then
15556     ac_cpp_err=$ac_c_preproc_warn_flag
15557   else
15558     ac_cpp_err=
15559   fi
15560 else
15561   ac_cpp_err=yes
15562 fi
15563 if test -z "$ac_cpp_err"; then
15564   eval "$as_ac_Header=yes"
15565 else
15566   echo "$as_me: failed program was:" >&5
15567   cat conftest.$ac_ext >&5
15568   eval "$as_ac_Header=no"
15569 fi
15570 rm -f conftest.err conftest.$ac_ext
15571 fi
15572 echo "$as_me:15572: result: `eval echo '${'$as_ac_Header'}'`" >&5
15573 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15574 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15575   cat >>confdefs.h <<EOF
15576 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15577 EOF
15578
15579 fi
15580 done
15581
15582 for ac_header in unistd.h getopt.h
15583 do
15584 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15585 echo "$as_me:15585: checking for $ac_header" >&5
15586 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15587 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15588   echo $ECHO_N "(cached) $ECHO_C" >&6
15589 else
15590   cat >conftest.$ac_ext <<_ACEOF
15591 #line 15591 "configure"
15592 #include "confdefs.h"
15593 #include <$ac_header>
15594 _ACEOF
15595 if { (eval echo "$as_me:15595: \"$ac_cpp conftest.$ac_ext\"") >&5
15596   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15597   ac_status=$?
15598   egrep -v '^ *\+' conftest.er1 >conftest.err
15599   rm -f conftest.er1
15600   cat conftest.err >&5
15601   echo "$as_me:15601: \$? = $ac_status" >&5
15602   (exit $ac_status); } >/dev/null; then
15603   if test -s conftest.err; then
15604     ac_cpp_err=$ac_c_preproc_warn_flag
15605   else
15606     ac_cpp_err=
15607   fi
15608 else
15609   ac_cpp_err=yes
15610 fi
15611 if test -z "$ac_cpp_err"; then
15612   eval "$as_ac_Header=yes"
15613 else
15614   echo "$as_me: failed program was:" >&5
15615   cat conftest.$ac_ext >&5
15616   eval "$as_ac_Header=no"
15617 fi
15618 rm -f conftest.err conftest.$ac_ext
15619 fi
15620 echo "$as_me:15620: result: `eval echo '${'$as_ac_Header'}'`" >&5
15621 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15622 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15623   cat >>confdefs.h <<EOF
15624 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15625 EOF
15626
15627 fi
15628 done
15629
15630 echo "$as_me:15630: checking for header declaring getopt variables" >&5
15631 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15632 if test "${cf_cv_getopt_header+set}" = set; then
15633   echo $ECHO_N "(cached) $ECHO_C" >&6
15634 else
15635
15636 cf_cv_getopt_header=none
15637 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15638 do
15639 cat >conftest.$ac_ext <<_ACEOF
15640 #line 15640 "configure"
15641 #include "confdefs.h"
15642
15643 #include <$cf_header>
15644 int
15645 main ()
15646 {
15647 int x = optind; char *y = optarg
15648   ;
15649   return 0;
15650 }
15651 _ACEOF
15652 rm -f conftest.$ac_objext
15653 if { (eval echo "$as_me:15653: \"$ac_compile\"") >&5
15654   (eval $ac_compile) 2>&5
15655   ac_status=$?
15656   echo "$as_me:15656: \$? = $ac_status" >&5
15657   (exit $ac_status); } &&
15658          { ac_try='test -s conftest.$ac_objext'
15659   { (eval echo "$as_me:15659: \"$ac_try\"") >&5
15660   (eval $ac_try) 2>&5
15661   ac_status=$?
15662   echo "$as_me:15662: \$? = $ac_status" >&5
15663   (exit $ac_status); }; }; then
15664   cf_cv_getopt_header=$cf_header
15665  break
15666 else
15667   echo "$as_me: failed program was:" >&5
15668 cat conftest.$ac_ext >&5
15669 fi
15670 rm -f conftest.$ac_objext conftest.$ac_ext
15671 done
15672
15673 fi
15674 echo "$as_me:15674: result: $cf_cv_getopt_header" >&5
15675 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15676 if test $cf_cv_getopt_header != none ; then
15677
15678 cat >>confdefs.h <<\EOF
15679 #define HAVE_GETOPT_HEADER 1
15680 EOF
15681
15682 fi
15683 if test $cf_cv_getopt_header = getopt.h ; then
15684
15685 cat >>confdefs.h <<\EOF
15686 #define NEED_GETOPT_H 1
15687 EOF
15688
15689 fi
15690
15691 # check for ISC (this may also define _POSIX_SOURCE)
15692 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15693 if test "x$ISC" = xyes ; then
15694
15695 echo "$as_me:15695: checking for main in -lcposix" >&5
15696 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15697 if test "${ac_cv_lib_cposix_main+set}" = set; then
15698   echo $ECHO_N "(cached) $ECHO_C" >&6
15699 else
15700   ac_check_lib_save_LIBS=$LIBS
15701 LIBS="-lcposix  $LIBS"
15702 cat >conftest.$ac_ext <<_ACEOF
15703 #line 15703 "configure"
15704 #include "confdefs.h"
15705
15706 int
15707 main ()
15708 {
15709 main ();
15710   ;
15711   return 0;
15712 }
15713 _ACEOF
15714 rm -f conftest.$ac_objext conftest$ac_exeext
15715 if { (eval echo "$as_me:15715: \"$ac_link\"") >&5
15716   (eval $ac_link) 2>&5
15717   ac_status=$?
15718   echo "$as_me:15718: \$? = $ac_status" >&5
15719   (exit $ac_status); } &&
15720          { ac_try='test -s conftest$ac_exeext'
15721   { (eval echo "$as_me:15721: \"$ac_try\"") >&5
15722   (eval $ac_try) 2>&5
15723   ac_status=$?
15724   echo "$as_me:15724: \$? = $ac_status" >&5
15725   (exit $ac_status); }; }; then
15726   ac_cv_lib_cposix_main=yes
15727 else
15728   echo "$as_me: failed program was:" >&5
15729 cat conftest.$ac_ext >&5
15730 ac_cv_lib_cposix_main=no
15731 fi
15732 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15733 LIBS=$ac_check_lib_save_LIBS
15734 fi
15735 echo "$as_me:15735: result: $ac_cv_lib_cposix_main" >&5
15736 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15737 if test $ac_cv_lib_cposix_main = yes; then
15738   cat >>confdefs.h <<EOF
15739 #define HAVE_LIBCPOSIX 1
15740 EOF
15741
15742   LIBS="-lcposix $LIBS"
15743
15744 fi
15745
15746         echo "$as_me:15746: checking for bzero in -linet" >&5
15747 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15748 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15749   echo $ECHO_N "(cached) $ECHO_C" >&6
15750 else
15751   ac_check_lib_save_LIBS=$LIBS
15752 LIBS="-linet  $LIBS"
15753 cat >conftest.$ac_ext <<_ACEOF
15754 #line 15754 "configure"
15755 #include "confdefs.h"
15756
15757 /* Override any gcc2 internal prototype to avoid an error.  */
15758 #ifdef __cplusplus
15759 extern "C"
15760 #endif
15761 /* We use char because int might match the return type of a gcc2
15762    builtin and then its argument prototype would still apply.  */
15763 char bzero ();
15764 int
15765 main ()
15766 {
15767 bzero ();
15768   ;
15769   return 0;
15770 }
15771 _ACEOF
15772 rm -f conftest.$ac_objext conftest$ac_exeext
15773 if { (eval echo "$as_me:15773: \"$ac_link\"") >&5
15774   (eval $ac_link) 2>&5
15775   ac_status=$?
15776   echo "$as_me:15776: \$? = $ac_status" >&5
15777   (exit $ac_status); } &&
15778          { ac_try='test -s conftest$ac_exeext'
15779   { (eval echo "$as_me:15779: \"$ac_try\"") >&5
15780   (eval $ac_try) 2>&5
15781   ac_status=$?
15782   echo "$as_me:15782: \$? = $ac_status" >&5
15783   (exit $ac_status); }; }; then
15784   ac_cv_lib_inet_bzero=yes
15785 else
15786   echo "$as_me: failed program was:" >&5
15787 cat conftest.$ac_ext >&5
15788 ac_cv_lib_inet_bzero=no
15789 fi
15790 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15791 LIBS=$ac_check_lib_save_LIBS
15792 fi
15793 echo "$as_me:15793: result: $ac_cv_lib_inet_bzero" >&5
15794 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15795 if test $ac_cv_lib_inet_bzero = yes; then
15796
15797 cf_add_libs="-linet"
15798 # Filter out duplicates - this happens with badly-designed ".pc" files...
15799 for cf_add_1lib in $LIBS
15800 do
15801         for cf_add_2lib in $cf_add_libs
15802         do
15803                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15804                 then
15805                         cf_add_1lib=
15806                         break
15807                 fi
15808         done
15809         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15810 done
15811 LIBS="$cf_add_libs"
15812
15813 fi
15814 fi
15815
15816 echo "$as_me:15816: checking if sys/time.h works with sys/select.h" >&5
15817 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15818 if test "${cf_cv_sys_time_select+set}" = set; then
15819   echo $ECHO_N "(cached) $ECHO_C" >&6
15820 else
15821
15822 cat >conftest.$ac_ext <<_ACEOF
15823 #line 15823 "configure"
15824 #include "confdefs.h"
15825
15826 #include <sys/types.h>
15827 #ifdef HAVE_SYS_TIME_H
15828 #include <sys/time.h>
15829 #endif
15830 #ifdef HAVE_SYS_SELECT_H
15831 #include <sys/select.h>
15832 #endif
15833
15834 int
15835 main ()
15836 {
15837
15838   ;
15839   return 0;
15840 }
15841 _ACEOF
15842 rm -f conftest.$ac_objext
15843 if { (eval echo "$as_me:15843: \"$ac_compile\"") >&5
15844   (eval $ac_compile) 2>&5
15845   ac_status=$?
15846   echo "$as_me:15846: \$? = $ac_status" >&5
15847   (exit $ac_status); } &&
15848          { ac_try='test -s conftest.$ac_objext'
15849   { (eval echo "$as_me:15849: \"$ac_try\"") >&5
15850   (eval $ac_try) 2>&5
15851   ac_status=$?
15852   echo "$as_me:15852: \$? = $ac_status" >&5
15853   (exit $ac_status); }; }; then
15854   cf_cv_sys_time_select=yes
15855 else
15856   echo "$as_me: failed program was:" >&5
15857 cat conftest.$ac_ext >&5
15858 cf_cv_sys_time_select=no
15859 fi
15860 rm -f conftest.$ac_objext conftest.$ac_ext
15861
15862 fi
15863
15864 echo "$as_me:15864: result: $cf_cv_sys_time_select" >&5
15865 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15866 test "$cf_cv_sys_time_select" = yes &&
15867 cat >>confdefs.h <<\EOF
15868 #define HAVE_SYS_TIME_SELECT 1
15869 EOF
15870
15871 ###     checks for compiler characteristics
15872 ac_ext=c
15873 ac_cpp='$CPP $CPPFLAGS'
15874 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15875 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15876 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15877 ac_main_return=return
15878
15879 echo "$as_me:15879: checking for an ANSI C-conforming const" >&5
15880 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15881 if test "${ac_cv_c_const+set}" = set; then
15882   echo $ECHO_N "(cached) $ECHO_C" >&6
15883 else
15884   cat >conftest.$ac_ext <<_ACEOF
15885 #line 15885 "configure"
15886 #include "confdefs.h"
15887
15888 int
15889 main ()
15890 {
15891 /* FIXME: Include the comments suggested by Paul. */
15892 #ifndef __cplusplus
15893   /* Ultrix mips cc rejects this.  */
15894   typedef int charset[2];
15895   const charset x;
15896   /* SunOS 4.1.1 cc rejects this.  */
15897   char const *const *ccp;
15898   char **p;
15899   /* NEC SVR4.0.2 mips cc rejects this.  */
15900   struct point {int x, y;};
15901   static struct point const zero = {0,0};
15902   /* AIX XL C 1.02.0.0 rejects this.
15903      It does not let you subtract one const X* pointer from another in
15904      an arm of an if-expression whose if-part is not a constant
15905      expression */
15906   const char *g = "string";
15907   ccp = &g + (g ? g-g : 0);
15908   /* HPUX 7.0 cc rejects these. */
15909   ++ccp;
15910   p = (char**) ccp;
15911   ccp = (char const *const *) p;
15912   { /* SCO 3.2v4 cc rejects this.  */
15913     char *t;
15914     char const *s = 0 ? (char *) 0 : (char const *) 0;
15915
15916     *t++ = 0;
15917   }
15918   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15919     int x[] = {25, 17};
15920     const int *foo = &x[0];
15921     ++foo;
15922   }
15923   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15924     typedef const int *iptr;
15925     iptr p = 0;
15926     ++p;
15927   }
15928   { /* AIX XL C 1.02.0.0 rejects this saying
15929        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15930     struct s { int j; const int *ap[3]; };
15931     struct s *b; b->j = 5;
15932   }
15933   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15934     const int foo = 10;
15935   }
15936 #endif
15937
15938   ;
15939   return 0;
15940 }
15941 _ACEOF
15942 rm -f conftest.$ac_objext
15943 if { (eval echo "$as_me:15943: \"$ac_compile\"") >&5
15944   (eval $ac_compile) 2>&5
15945   ac_status=$?
15946   echo "$as_me:15946: \$? = $ac_status" >&5
15947   (exit $ac_status); } &&
15948          { ac_try='test -s conftest.$ac_objext'
15949   { (eval echo "$as_me:15949: \"$ac_try\"") >&5
15950   (eval $ac_try) 2>&5
15951   ac_status=$?
15952   echo "$as_me:15952: \$? = $ac_status" >&5
15953   (exit $ac_status); }; }; then
15954   ac_cv_c_const=yes
15955 else
15956   echo "$as_me: failed program was:" >&5
15957 cat conftest.$ac_ext >&5
15958 ac_cv_c_const=no
15959 fi
15960 rm -f conftest.$ac_objext conftest.$ac_ext
15961 fi
15962 echo "$as_me:15962: result: $ac_cv_c_const" >&5
15963 echo "${ECHO_T}$ac_cv_c_const" >&6
15964 if test $ac_cv_c_const = no; then
15965
15966 cat >>confdefs.h <<\EOF
15967 #define const
15968 EOF
15969
15970 fi
15971
15972 echo "$as_me:15972: checking for inline" >&5
15973 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15974 if test "${ac_cv_c_inline+set}" = set; then
15975   echo $ECHO_N "(cached) $ECHO_C" >&6
15976 else
15977   ac_cv_c_inline=no
15978 for ac_kw in inline __inline__ __inline; do
15979   cat >conftest.$ac_ext <<_ACEOF
15980 #line 15980 "configure"
15981 #include "confdefs.h"
15982 #ifndef __cplusplus
15983 static $ac_kw int static_foo () {return 0; }
15984 $ac_kw int foo () {return 0; }
15985 #endif
15986
15987 _ACEOF
15988 rm -f conftest.$ac_objext
15989 if { (eval echo "$as_me:15989: \"$ac_compile\"") >&5
15990   (eval $ac_compile) 2>&5
15991   ac_status=$?
15992   echo "$as_me:15992: \$? = $ac_status" >&5
15993   (exit $ac_status); } &&
15994          { ac_try='test -s conftest.$ac_objext'
15995   { (eval echo "$as_me:15995: \"$ac_try\"") >&5
15996   (eval $ac_try) 2>&5
15997   ac_status=$?
15998   echo "$as_me:15998: \$? = $ac_status" >&5
15999   (exit $ac_status); }; }; then
16000   ac_cv_c_inline=$ac_kw; break
16001 else
16002   echo "$as_me: failed program was:" >&5
16003 cat conftest.$ac_ext >&5
16004 fi
16005 rm -f conftest.$ac_objext conftest.$ac_ext
16006 done
16007
16008 fi
16009 echo "$as_me:16009: result: $ac_cv_c_inline" >&5
16010 echo "${ECHO_T}$ac_cv_c_inline" >&6
16011 case $ac_cv_c_inline in
16012   inline | yes) ;;
16013   no)
16014 cat >>confdefs.h <<\EOF
16015 #define inline
16016 EOF
16017  ;;
16018   *)  cat >>confdefs.h <<EOF
16019 #define inline $ac_cv_c_inline
16020 EOF
16021  ;;
16022 esac
16023
16024 NCURSES_INLINE=
16025 if test "$ac_cv_c_inline" != no ; then
16026         NCURSES_INLINE=inline
16027         if test "$INTEL_COMPILER" = yes
16028         then
16029                 :
16030         elif test "$CLANG_COMPILER" = yes
16031         then
16032                 :
16033         elif test "$GCC" = yes
16034         then
16035                 echo "$as_me:16035: checking if $CC supports options to tune inlining" >&5
16036 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
16037 if test "${cf_cv_gcc_inline+set}" = set; then
16038   echo $ECHO_N "(cached) $ECHO_C" >&6
16039 else
16040
16041                 cf_save_CFLAGS=$CFLAGS
16042                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
16043                 cat >conftest.$ac_ext <<_ACEOF
16044 #line 16044 "configure"
16045 #include "confdefs.h"
16046 inline int foo(void) { return 1; }
16047 int
16048 main ()
16049 {
16050 ${cf_cv_main_return:-return} foo()
16051   ;
16052   return 0;
16053 }
16054 _ACEOF
16055 rm -f conftest.$ac_objext
16056 if { (eval echo "$as_me:16056: \"$ac_compile\"") >&5
16057   (eval $ac_compile) 2>&5
16058   ac_status=$?
16059   echo "$as_me:16059: \$? = $ac_status" >&5
16060   (exit $ac_status); } &&
16061          { ac_try='test -s conftest.$ac_objext'
16062   { (eval echo "$as_me:16062: \"$ac_try\"") >&5
16063   (eval $ac_try) 2>&5
16064   ac_status=$?
16065   echo "$as_me:16065: \$? = $ac_status" >&5
16066   (exit $ac_status); }; }; then
16067   cf_cv_gcc_inline=yes
16068 else
16069   echo "$as_me: failed program was:" >&5
16070 cat conftest.$ac_ext >&5
16071 cf_cv_gcc_inline=no
16072 fi
16073 rm -f conftest.$ac_objext conftest.$ac_ext
16074                 CFLAGS=$cf_save_CFLAGS
16075
16076 fi
16077 echo "$as_me:16077: result: $cf_cv_gcc_inline" >&5
16078 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
16079                 if test "$cf_cv_gcc_inline" = yes ; then
16080
16081 cf_fix_cppflags=no
16082 cf_new_cflags=
16083 cf_new_cppflags=
16084 cf_new_extra_cppflags=
16085
16086 for cf_add_cflags in --param max-inline-insns-single=1200
16087 do
16088 case $cf_fix_cppflags in
16089 (no)
16090         case $cf_add_cflags in
16091         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16092                 case $cf_add_cflags in
16093                 (-D*)
16094                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16095
16096                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16097                                 && test -z "${cf_tst_cflags}" \
16098                                 && cf_fix_cppflags=yes
16099
16100                         if test $cf_fix_cppflags = yes ; then
16101                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16102                                 continue
16103                         elif test "${cf_tst_cflags}" = "\"'" ; then
16104                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16105                                 continue
16106                         fi
16107                         ;;
16108                 esac
16109                 case "$CPPFLAGS" in
16110                 (*$cf_add_cflags)
16111                         ;;
16112                 (*)
16113                         case $cf_add_cflags in
16114                         (-D*)
16115                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16116
16117 CPPFLAGS=`echo "$CPPFLAGS" | \
16118         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16119                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16120
16121                                 ;;
16122                         esac
16123                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16124                         ;;
16125                 esac
16126                 ;;
16127         (*)
16128                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16129                 ;;
16130         esac
16131         ;;
16132 (yes)
16133         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16134
16135         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16136
16137         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16138                 && test -z "${cf_tst_cflags}" \
16139                 && cf_fix_cppflags=no
16140         ;;
16141 esac
16142 done
16143
16144 if test -n "$cf_new_cflags" ; then
16145
16146         CFLAGS="$CFLAGS $cf_new_cflags"
16147 fi
16148
16149 if test -n "$cf_new_cppflags" ; then
16150
16151         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16152 fi
16153
16154 if test -n "$cf_new_extra_cppflags" ; then
16155
16156         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16157 fi
16158
16159                 fi
16160         fi
16161 fi
16162
16163 echo "$as_me:16163: checking for signal global datatype" >&5
16164 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
16165 if test "${cf_cv_sig_atomic_t+set}" = set; then
16166   echo $ECHO_N "(cached) $ECHO_C" >&6
16167 else
16168
16169         for cf_type in \
16170                 "volatile sig_atomic_t" \
16171                 "sig_atomic_t" \
16172                 "int"
16173         do
16174         cat >conftest.$ac_ext <<_ACEOF
16175 #line 16175 "configure"
16176 #include "confdefs.h"
16177
16178 #include <sys/types.h>
16179 #include <signal.h>
16180 #include <stdio.h>
16181
16182 extern $cf_type x;
16183 $cf_type x;
16184 static void handler(int sig)
16185 {
16186         x = 5;
16187 }
16188 int
16189 main ()
16190 {
16191 signal(SIGINT, handler);
16192                  x = 1
16193   ;
16194   return 0;
16195 }
16196 _ACEOF
16197 rm -f conftest.$ac_objext
16198 if { (eval echo "$as_me:16198: \"$ac_compile\"") >&5
16199   (eval $ac_compile) 2>&5
16200   ac_status=$?
16201   echo "$as_me:16201: \$? = $ac_status" >&5
16202   (exit $ac_status); } &&
16203          { ac_try='test -s conftest.$ac_objext'
16204   { (eval echo "$as_me:16204: \"$ac_try\"") >&5
16205   (eval $ac_try) 2>&5
16206   ac_status=$?
16207   echo "$as_me:16207: \$? = $ac_status" >&5
16208   (exit $ac_status); }; }; then
16209   cf_cv_sig_atomic_t=$cf_type
16210 else
16211   echo "$as_me: failed program was:" >&5
16212 cat conftest.$ac_ext >&5
16213 cf_cv_sig_atomic_t=no
16214 fi
16215 rm -f conftest.$ac_objext conftest.$ac_ext
16216                 test "$cf_cv_sig_atomic_t" != no && break
16217         done
16218
16219 fi
16220
16221 echo "$as_me:16221: result: $cf_cv_sig_atomic_t" >&5
16222 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
16223 test "$cf_cv_sig_atomic_t" != no &&
16224 cat >>confdefs.h <<EOF
16225 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
16226 EOF
16227
16228 if test $NCURSES_CHTYPE = auto ; then
16229
16230 echo "$as_me:16230: checking for type of chtype" >&5
16231 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
16232 if test "${cf_cv_typeof_chtype+set}" = set; then
16233   echo $ECHO_N "(cached) $ECHO_C" >&6
16234 else
16235
16236                 if test "$cross_compiling" = yes; then
16237   cf_cv_typeof_chtype=long
16238 else
16239   cat >conftest.$ac_ext <<_ACEOF
16240 #line 16240 "configure"
16241 #include "confdefs.h"
16242
16243 #define WANT_BITS 31
16244 #include <stdio.h>
16245 int main()
16246 {
16247         FILE *fp = fopen("cf_test.out", "w");
16248         if (fp != 0) {
16249                 char *result = "long";
16250                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
16251                         int n;
16252                         unsigned int x, y;
16253                         for (n = 0; n < WANT_BITS; n++) {
16254                                 x = (1 << n);
16255                                 y = (x >> n);
16256                                 if (y != 1 || x == 0) {
16257                                         x = 0;
16258                                         break;
16259                                 }
16260                         }
16261                         /*
16262                          * If x is nonzero, an int is big enough for the bits
16263                          * that we want.
16264                          */
16265                         result = (x != 0) ? "int" : "long";
16266                 }
16267                 fputs(result, fp);
16268                 fclose(fp);
16269         }
16270         ${cf_cv_main_return:-return}(0);
16271 }
16272
16273 _ACEOF
16274 rm -f conftest$ac_exeext
16275 if { (eval echo "$as_me:16275: \"$ac_link\"") >&5
16276   (eval $ac_link) 2>&5
16277   ac_status=$?
16278   echo "$as_me:16278: \$? = $ac_status" >&5
16279   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16280   { (eval echo "$as_me:16280: \"$ac_try\"") >&5
16281   (eval $ac_try) 2>&5
16282   ac_status=$?
16283   echo "$as_me:16283: \$? = $ac_status" >&5
16284   (exit $ac_status); }; }; then
16285   cf_cv_typeof_chtype=`cat cf_test.out`
16286 else
16287   echo "$as_me: program exited with status $ac_status" >&5
16288 echo "$as_me: failed program was:" >&5
16289 cat conftest.$ac_ext >&5
16290 cf_cv_typeof_chtype=long
16291 fi
16292 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16293 fi
16294                 rm -f cf_test.out
16295
16296 fi
16297
16298 echo "$as_me:16298: result: $cf_cv_typeof_chtype" >&5
16299 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
16300
16301 cat >>confdefs.h <<EOF
16302 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
16303 EOF
16304
16305 else
16306         cf_cv_typeof_chtype=$NCURSES_CHTYPE
16307 fi
16308 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
16309
16310 echo "$as_me:16310: checking if unsigned literals are legal" >&5
16311 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
16312 if test "${cf_cv_unsigned_literals+set}" = set; then
16313   echo $ECHO_N "(cached) $ECHO_C" >&6
16314 else
16315
16316         cat >conftest.$ac_ext <<_ACEOF
16317 #line 16317 "configure"
16318 #include "confdefs.h"
16319
16320 int
16321 main ()
16322 {
16323 long x = 1L + 1UL + 1U + 1
16324   ;
16325   return 0;
16326 }
16327 _ACEOF
16328 rm -f conftest.$ac_objext
16329 if { (eval echo "$as_me:16329: \"$ac_compile\"") >&5
16330   (eval $ac_compile) 2>&5
16331   ac_status=$?
16332   echo "$as_me:16332: \$? = $ac_status" >&5
16333   (exit $ac_status); } &&
16334          { ac_try='test -s conftest.$ac_objext'
16335   { (eval echo "$as_me:16335: \"$ac_try\"") >&5
16336   (eval $ac_try) 2>&5
16337   ac_status=$?
16338   echo "$as_me:16338: \$? = $ac_status" >&5
16339   (exit $ac_status); }; }; then
16340   cf_cv_unsigned_literals=yes
16341 else
16342   echo "$as_me: failed program was:" >&5
16343 cat conftest.$ac_ext >&5
16344 cf_cv_unsigned_literals=no
16345 fi
16346 rm -f conftest.$ac_objext conftest.$ac_ext
16347
16348 fi
16349
16350 echo "$as_me:16350: result: $cf_cv_unsigned_literals" >&5
16351 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16352
16353 cf_cv_1UL="1"
16354 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16355 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
16356
16357 if test $NCURSES_MMASK_T = auto ; then
16358         cf_cv_typeof_mmask_t=long
16359 else
16360         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16361 fi
16362 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16363
16364 ###     Checks for external-data
16365
16366 echo "$as_me:16366: checking if external errno is declared" >&5
16367 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16368 if test "${cf_cv_dcl_errno+set}" = set; then
16369   echo $ECHO_N "(cached) $ECHO_C" >&6
16370 else
16371
16372         cat >conftest.$ac_ext <<_ACEOF
16373 #line 16373 "configure"
16374 #include "confdefs.h"
16375
16376 #ifdef HAVE_STDLIB_H
16377 #include <stdlib.h>
16378 #endif
16379 #include <stdio.h>
16380 #include <sys/types.h>
16381 #include <errno.h>
16382 int
16383 main ()
16384 {
16385 int x = (int) errno
16386   ;
16387   return 0;
16388 }
16389 _ACEOF
16390 rm -f conftest.$ac_objext
16391 if { (eval echo "$as_me:16391: \"$ac_compile\"") >&5
16392   (eval $ac_compile) 2>&5
16393   ac_status=$?
16394   echo "$as_me:16394: \$? = $ac_status" >&5
16395   (exit $ac_status); } &&
16396          { ac_try='test -s conftest.$ac_objext'
16397   { (eval echo "$as_me:16397: \"$ac_try\"") >&5
16398   (eval $ac_try) 2>&5
16399   ac_status=$?
16400   echo "$as_me:16400: \$? = $ac_status" >&5
16401   (exit $ac_status); }; }; then
16402   cf_cv_dcl_errno=yes
16403 else
16404   echo "$as_me: failed program was:" >&5
16405 cat conftest.$ac_ext >&5
16406 cf_cv_dcl_errno=no
16407 fi
16408 rm -f conftest.$ac_objext conftest.$ac_ext
16409
16410 fi
16411 echo "$as_me:16411: result: $cf_cv_dcl_errno" >&5
16412 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16413
16414 if test "$cf_cv_dcl_errno" = no ; then
16415
16416 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16417
16418         cat >>confdefs.h <<EOF
16419 #define $cf_result 1
16420 EOF
16421
16422 fi
16423
16424 # It's possible (for near-UNIX clones) that the data doesn't exist
16425
16426 echo "$as_me:16426: checking if external errno exists" >&5
16427 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16428 if test "${cf_cv_have_errno+set}" = set; then
16429   echo $ECHO_N "(cached) $ECHO_C" >&6
16430 else
16431
16432         cat >conftest.$ac_ext <<_ACEOF
16433 #line 16433 "configure"
16434 #include "confdefs.h"
16435
16436 #undef errno
16437 extern int errno;
16438
16439 int
16440 main ()
16441 {
16442 errno = 2
16443   ;
16444   return 0;
16445 }
16446 _ACEOF
16447 rm -f conftest.$ac_objext conftest$ac_exeext
16448 if { (eval echo "$as_me:16448: \"$ac_link\"") >&5
16449   (eval $ac_link) 2>&5
16450   ac_status=$?
16451   echo "$as_me:16451: \$? = $ac_status" >&5
16452   (exit $ac_status); } &&
16453          { ac_try='test -s conftest$ac_exeext'
16454   { (eval echo "$as_me:16454: \"$ac_try\"") >&5
16455   (eval $ac_try) 2>&5
16456   ac_status=$?
16457   echo "$as_me:16457: \$? = $ac_status" >&5
16458   (exit $ac_status); }; }; then
16459   cf_cv_have_errno=yes
16460 else
16461   echo "$as_me: failed program was:" >&5
16462 cat conftest.$ac_ext >&5
16463 cf_cv_have_errno=no
16464 fi
16465 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16466
16467 fi
16468 echo "$as_me:16468: result: $cf_cv_have_errno" >&5
16469 echo "${ECHO_T}$cf_cv_have_errno" >&6
16470
16471 if test "$cf_cv_have_errno" = yes ; then
16472
16473 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16474
16475         cat >>confdefs.h <<EOF
16476 #define $cf_result 1
16477 EOF
16478
16479 fi
16480
16481 echo "$as_me:16481: checking if data-only library module links" >&5
16482 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16483 if test "${cf_cv_link_dataonly+set}" = set; then
16484   echo $ECHO_N "(cached) $ECHO_C" >&6
16485 else
16486
16487         rm -f conftest.a
16488         cat >conftest.$ac_ext <<EOF
16489 #line 16489 "configure"
16490 int     testdata[3] = { 123, 456, 789 };
16491 EOF
16492         if { (eval echo "$as_me:16492: \"$ac_compile\"") >&5
16493   (eval $ac_compile) 2>&5
16494   ac_status=$?
16495   echo "$as_me:16495: \$? = $ac_status" >&5
16496   (exit $ac_status); } ; then
16497                 mv conftest.o data.o && \
16498                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16499         fi
16500         rm -f conftest.$ac_ext data.o
16501         cat >conftest.$ac_ext <<EOF
16502 #line 16502 "configure"
16503 int     testfunc()
16504 {
16505 #if defined(NeXT)
16506         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16507 #else
16508         extern int testdata[3];
16509         return testdata[0] == 123
16510            &&  testdata[1] == 456
16511            &&  testdata[2] == 789;
16512 #endif
16513 }
16514 EOF
16515         if { (eval echo "$as_me:16515: \"$ac_compile\"") >&5
16516   (eval $ac_compile) 2>&5
16517   ac_status=$?
16518   echo "$as_me:16518: \$? = $ac_status" >&5
16519   (exit $ac_status); }; then
16520                 mv conftest.o func.o && \
16521                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16522         fi
16523         rm -f conftest.$ac_ext func.o
16524         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16525         cf_saveLIBS="$LIBS"
16526         LIBS="conftest.a $LIBS"
16527         if test "$cross_compiling" = yes; then
16528   cf_cv_link_dataonly=unknown
16529 else
16530   cat >conftest.$ac_ext <<_ACEOF
16531 #line 16531 "configure"
16532 #include "confdefs.h"
16533
16534         int main()
16535         {
16536                 extern int testfunc();
16537                 ${cf_cv_main_return:-return} (!testfunc());
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_link_dataonly=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_link_dataonly=no
16558 fi
16559 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16560 fi
16561         LIBS="$cf_saveLIBS"
16562
16563 fi
16564
16565 echo "$as_me:16565: result: $cf_cv_link_dataonly" >&5
16566 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16567
16568 if test "$cf_cv_link_dataonly" = no ; then
16569
16570 cat >>confdefs.h <<\EOF
16571 #define BROKEN_LINKER 1
16572 EOF
16573
16574         BROKEN_LINKER=1
16575 fi
16576
16577 ###     Checks for library functions.
16578
16579 for ac_func in \
16580 getcwd \
16581 getegid \
16582 geteuid \
16583 getopt \
16584 getttynam \
16585 issetugid \
16586 poll \
16587 putenv \
16588 remove \
16589 select \
16590 setbuf \
16591 setbuffer \
16592 setenv \
16593 setvbuf \
16594 sigaction \
16595 sigvec \
16596 strdup \
16597 strstr \
16598 tcgetpgrp \
16599 times \
16600 vsnprintf \
16601
16602 do
16603 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16604 echo "$as_me:16604: checking for $ac_func" >&5
16605 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16606 if eval "test \"\${$as_ac_var+set}\" = set"; then
16607   echo $ECHO_N "(cached) $ECHO_C" >&6
16608 else
16609   cat >conftest.$ac_ext <<_ACEOF
16610 #line 16610 "configure"
16611 #include "confdefs.h"
16612 /* System header to define __stub macros and hopefully few prototypes,
16613     which can conflict with char $ac_func (); below.  */
16614 #include <assert.h>
16615 /* Override any gcc2 internal prototype to avoid an error.  */
16616 #ifdef __cplusplus
16617 extern "C"
16618 #endif
16619 /* We use char because int might match the return type of a gcc2
16620    builtin and then its argument prototype would still apply.  */
16621 char $ac_func ();
16622 char (*f) ();
16623
16624 int
16625 main ()
16626 {
16627 /* The GNU C library defines this for functions which it implements
16628     to always fail with ENOSYS.  Some functions are actually named
16629     something starting with __ and the normal name is an alias.  */
16630 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16631 choke me
16632 #else
16633 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16634 #endif
16635
16636   ;
16637   return 0;
16638 }
16639 _ACEOF
16640 rm -f conftest.$ac_objext conftest$ac_exeext
16641 if { (eval echo "$as_me:16641: \"$ac_link\"") >&5
16642   (eval $ac_link) 2>&5
16643   ac_status=$?
16644   echo "$as_me:16644: \$? = $ac_status" >&5
16645   (exit $ac_status); } &&
16646          { ac_try='test -s conftest$ac_exeext'
16647   { (eval echo "$as_me:16647: \"$ac_try\"") >&5
16648   (eval $ac_try) 2>&5
16649   ac_status=$?
16650   echo "$as_me:16650: \$? = $ac_status" >&5
16651   (exit $ac_status); }; }; then
16652   eval "$as_ac_var=yes"
16653 else
16654   echo "$as_me: failed program was:" >&5
16655 cat conftest.$ac_ext >&5
16656 eval "$as_ac_var=no"
16657 fi
16658 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16659 fi
16660 echo "$as_me:16660: result: `eval echo '${'$as_ac_var'}'`" >&5
16661 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16662 if test `eval echo '${'$as_ac_var'}'` = yes; then
16663   cat >>confdefs.h <<EOF
16664 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16665 EOF
16666
16667 fi
16668 done
16669
16670 if test "x$ac_cv_func_getopt" = xno &&
16671    test "x$cf_with_progs$cf_with_tests" != xnono; then
16672         { { echo "$as_me:16672: error: getopt is required for building programs" >&5
16673 echo "$as_me: error: getopt is required for building programs" >&2;}
16674    { (exit 1); exit 1; }; }
16675 fi
16676
16677 if test "x$with_getcap" = "xyes" ; then
16678
16679 echo "$as_me:16679: checking for terminal-capability database functions" >&5
16680 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16681 if test "${cf_cv_cgetent+set}" = set; then
16682   echo $ECHO_N "(cached) $ECHO_C" >&6
16683 else
16684
16685 cat >conftest.$ac_ext <<_ACEOF
16686 #line 16686 "configure"
16687 #include "confdefs.h"
16688
16689 #include <stdlib.h>
16690 int
16691 main ()
16692 {
16693
16694         char temp[128];
16695         char *buf = temp;
16696         char *db_array = temp;
16697         cgetent(&buf, &db_array, "vt100");
16698         cgetcap(buf, "tc", '=');
16699         cgetmatch(buf, "tc");
16700
16701   ;
16702   return 0;
16703 }
16704 _ACEOF
16705 rm -f conftest.$ac_objext conftest$ac_exeext
16706 if { (eval echo "$as_me:16706: \"$ac_link\"") >&5
16707   (eval $ac_link) 2>&5
16708   ac_status=$?
16709   echo "$as_me:16709: \$? = $ac_status" >&5
16710   (exit $ac_status); } &&
16711          { ac_try='test -s conftest$ac_exeext'
16712   { (eval echo "$as_me:16712: \"$ac_try\"") >&5
16713   (eval $ac_try) 2>&5
16714   ac_status=$?
16715   echo "$as_me:16715: \$? = $ac_status" >&5
16716   (exit $ac_status); }; }; then
16717   cf_cv_cgetent=yes
16718 else
16719   echo "$as_me: failed program was:" >&5
16720 cat conftest.$ac_ext >&5
16721 cf_cv_cgetent=no
16722 fi
16723 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16724
16725 fi
16726 echo "$as_me:16726: result: $cf_cv_cgetent" >&5
16727 echo "${ECHO_T}$cf_cv_cgetent" >&6
16728
16729 if test "$cf_cv_cgetent" = yes
16730 then
16731
16732 cat >>confdefs.h <<\EOF
16733 #define HAVE_BSD_CGETENT 1
16734 EOF
16735
16736 echo "$as_me:16736: checking if cgetent uses const parameter" >&5
16737 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16738 if test "${cf_cv_cgetent_const+set}" = set; then
16739   echo $ECHO_N "(cached) $ECHO_C" >&6
16740 else
16741
16742 cat >conftest.$ac_ext <<_ACEOF
16743 #line 16743 "configure"
16744 #include "confdefs.h"
16745
16746 #include <stdlib.h>
16747 int
16748 main ()
16749 {
16750
16751         char temp[128];
16752         char *buf = temp;
16753 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16754         const char *db_array = temp;
16755         cgetent(&buf, &db_array, "vt100");
16756 #endif
16757         cgetcap(buf, "tc", '=');
16758         cgetmatch(buf, "tc");
16759
16760   ;
16761   return 0;
16762 }
16763 _ACEOF
16764 rm -f conftest.$ac_objext conftest$ac_exeext
16765 if { (eval echo "$as_me:16765: \"$ac_link\"") >&5
16766   (eval $ac_link) 2>&5
16767   ac_status=$?
16768   echo "$as_me:16768: \$? = $ac_status" >&5
16769   (exit $ac_status); } &&
16770          { ac_try='test -s conftest$ac_exeext'
16771   { (eval echo "$as_me:16771: \"$ac_try\"") >&5
16772   (eval $ac_try) 2>&5
16773   ac_status=$?
16774   echo "$as_me:16774: \$? = $ac_status" >&5
16775   (exit $ac_status); }; }; then
16776   cf_cv_cgetent_const=yes
16777 else
16778   echo "$as_me: failed program was:" >&5
16779 cat conftest.$ac_ext >&5
16780 cf_cv_cgetent_const=no
16781 fi
16782 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16783
16784 fi
16785 echo "$as_me:16785: result: $cf_cv_cgetent_const" >&5
16786 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16787         if test "$cf_cv_cgetent_const" = yes
16788         then
16789
16790 cat >>confdefs.h <<EOF
16791 #define CGETENT_CONST const
16792 EOF
16793
16794         fi
16795 fi
16796
16797 fi
16798
16799 echo "$as_me:16799: checking for isascii" >&5
16800 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16801 if test "${cf_cv_have_isascii+set}" = set; then
16802   echo $ECHO_N "(cached) $ECHO_C" >&6
16803 else
16804
16805         cat >conftest.$ac_ext <<_ACEOF
16806 #line 16806 "configure"
16807 #include "confdefs.h"
16808 #include <ctype.h>
16809 int
16810 main ()
16811 {
16812 int x = isascii(' ')
16813   ;
16814   return 0;
16815 }
16816 _ACEOF
16817 rm -f conftest.$ac_objext conftest$ac_exeext
16818 if { (eval echo "$as_me:16818: \"$ac_link\"") >&5
16819   (eval $ac_link) 2>&5
16820   ac_status=$?
16821   echo "$as_me:16821: \$? = $ac_status" >&5
16822   (exit $ac_status); } &&
16823          { ac_try='test -s conftest$ac_exeext'
16824   { (eval echo "$as_me:16824: \"$ac_try\"") >&5
16825   (eval $ac_try) 2>&5
16826   ac_status=$?
16827   echo "$as_me:16827: \$? = $ac_status" >&5
16828   (exit $ac_status); }; }; then
16829   cf_cv_have_isascii=yes
16830 else
16831   echo "$as_me: failed program was:" >&5
16832 cat conftest.$ac_ext >&5
16833 cf_cv_have_isascii=no
16834 fi
16835 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16836
16837 fi
16838 echo "$as_me:16838: result: $cf_cv_have_isascii" >&5
16839 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16840 test "$cf_cv_have_isascii" = yes &&
16841 cat >>confdefs.h <<\EOF
16842 #define HAVE_ISASCII 1
16843 EOF
16844
16845 if test "$ac_cv_func_sigaction" = yes; then
16846 echo "$as_me:16846: checking whether sigaction needs _POSIX_SOURCE" >&5
16847 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16848 cat >conftest.$ac_ext <<_ACEOF
16849 #line 16849 "configure"
16850 #include "confdefs.h"
16851
16852 #include <sys/types.h>
16853 #include <signal.h>
16854 int
16855 main ()
16856 {
16857 struct sigaction act
16858   ;
16859   return 0;
16860 }
16861 _ACEOF
16862 rm -f conftest.$ac_objext
16863 if { (eval echo "$as_me:16863: \"$ac_compile\"") >&5
16864   (eval $ac_compile) 2>&5
16865   ac_status=$?
16866   echo "$as_me:16866: \$? = $ac_status" >&5
16867   (exit $ac_status); } &&
16868          { ac_try='test -s conftest.$ac_objext'
16869   { (eval echo "$as_me:16869: \"$ac_try\"") >&5
16870   (eval $ac_try) 2>&5
16871   ac_status=$?
16872   echo "$as_me:16872: \$? = $ac_status" >&5
16873   (exit $ac_status); }; }; then
16874   sigact_bad=no
16875 else
16876   echo "$as_me: failed program was:" >&5
16877 cat conftest.$ac_ext >&5
16878
16879 cat >conftest.$ac_ext <<_ACEOF
16880 #line 16880 "configure"
16881 #include "confdefs.h"
16882
16883 #define _POSIX_SOURCE
16884 #include <sys/types.h>
16885 #include <signal.h>
16886 int
16887 main ()
16888 {
16889 struct sigaction act
16890   ;
16891   return 0;
16892 }
16893 _ACEOF
16894 rm -f conftest.$ac_objext
16895 if { (eval echo "$as_me:16895: \"$ac_compile\"") >&5
16896   (eval $ac_compile) 2>&5
16897   ac_status=$?
16898   echo "$as_me:16898: \$? = $ac_status" >&5
16899   (exit $ac_status); } &&
16900          { ac_try='test -s conftest.$ac_objext'
16901   { (eval echo "$as_me:16901: \"$ac_try\"") >&5
16902   (eval $ac_try) 2>&5
16903   ac_status=$?
16904   echo "$as_me:16904: \$? = $ac_status" >&5
16905   (exit $ac_status); }; }; then
16906   sigact_bad=yes
16907
16908 cat >>confdefs.h <<\EOF
16909 #define _POSIX_SOURCE 1
16910 EOF
16911
16912 else
16913   echo "$as_me: failed program was:" >&5
16914 cat conftest.$ac_ext >&5
16915 sigact_bad=unknown
16916 fi
16917 rm -f conftest.$ac_objext conftest.$ac_ext
16918 fi
16919 rm -f conftest.$ac_objext conftest.$ac_ext
16920 echo "$as_me:16920: result: $sigact_bad" >&5
16921 echo "${ECHO_T}$sigact_bad" >&6
16922 fi
16923
16924 echo "$as_me:16924: checking if nanosleep really works" >&5
16925 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16926 if test "${cf_cv_func_nanosleep+set}" = set; then
16927   echo $ECHO_N "(cached) $ECHO_C" >&6
16928 else
16929
16930 if test "$cross_compiling" = yes; then
16931   cf_cv_func_nanosleep=unknown
16932 else
16933   cat >conftest.$ac_ext <<_ACEOF
16934 #line 16934 "configure"
16935 #include "confdefs.h"
16936
16937 #include <stdio.h>
16938 #include <errno.h>
16939 #include <time.h>
16940
16941 #ifdef HAVE_SYS_TIME_H
16942 #include <sys/time.h>
16943 #endif
16944
16945 int main() {
16946         struct timespec ts1, ts2;
16947         int code;
16948         ts1.tv_sec  = 0;
16949         ts1.tv_nsec = 750000000;
16950         ts2.tv_sec  = 0;
16951         ts2.tv_nsec = 0;
16952         errno = 0;
16953         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16954         ${cf_cv_main_return:-return}(code != 0);
16955 }
16956
16957 _ACEOF
16958 rm -f conftest$ac_exeext
16959 if { (eval echo "$as_me:16959: \"$ac_link\"") >&5
16960   (eval $ac_link) 2>&5
16961   ac_status=$?
16962   echo "$as_me:16962: \$? = $ac_status" >&5
16963   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16964   { (eval echo "$as_me:16964: \"$ac_try\"") >&5
16965   (eval $ac_try) 2>&5
16966   ac_status=$?
16967   echo "$as_me:16967: \$? = $ac_status" >&5
16968   (exit $ac_status); }; }; then
16969   cf_cv_func_nanosleep=yes
16970 else
16971   echo "$as_me: program exited with status $ac_status" >&5
16972 echo "$as_me: failed program was:" >&5
16973 cat conftest.$ac_ext >&5
16974 cf_cv_func_nanosleep=no
16975 fi
16976 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16977 fi
16978 fi
16979 echo "$as_me:16979: result: $cf_cv_func_nanosleep" >&5
16980 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16981
16982 test "$cf_cv_func_nanosleep" = "yes" &&
16983 cat >>confdefs.h <<\EOF
16984 #define HAVE_NANOSLEEP 1
16985 EOF
16986
16987 for ac_header in \
16988 termio.h \
16989 termios.h \
16990 unistd.h \
16991
16992 do
16993 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16994 echo "$as_me:16994: checking for $ac_header" >&5
16995 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16996 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16997   echo $ECHO_N "(cached) $ECHO_C" >&6
16998 else
16999   cat >conftest.$ac_ext <<_ACEOF
17000 #line 17000 "configure"
17001 #include "confdefs.h"
17002 #include <$ac_header>
17003 _ACEOF
17004 if { (eval echo "$as_me:17004: \"$ac_cpp conftest.$ac_ext\"") >&5
17005   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17006   ac_status=$?
17007   egrep -v '^ *\+' conftest.er1 >conftest.err
17008   rm -f conftest.er1
17009   cat conftest.err >&5
17010   echo "$as_me:17010: \$? = $ac_status" >&5
17011   (exit $ac_status); } >/dev/null; then
17012   if test -s conftest.err; then
17013     ac_cpp_err=$ac_c_preproc_warn_flag
17014   else
17015     ac_cpp_err=
17016   fi
17017 else
17018   ac_cpp_err=yes
17019 fi
17020 if test -z "$ac_cpp_err"; then
17021   eval "$as_ac_Header=yes"
17022 else
17023   echo "$as_me: failed program was:" >&5
17024   cat conftest.$ac_ext >&5
17025   eval "$as_ac_Header=no"
17026 fi
17027 rm -f conftest.err conftest.$ac_ext
17028 fi
17029 echo "$as_me:17029: result: `eval echo '${'$as_ac_Header'}'`" >&5
17030 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17031 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17032   cat >>confdefs.h <<EOF
17033 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17034 EOF
17035
17036 fi
17037 done
17038
17039 if test "$ISC" = yes ; then
17040
17041 for ac_header in sys/termio.h
17042 do
17043 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17044 echo "$as_me:17044: checking for $ac_header" >&5
17045 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17046 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17047   echo $ECHO_N "(cached) $ECHO_C" >&6
17048 else
17049   cat >conftest.$ac_ext <<_ACEOF
17050 #line 17050 "configure"
17051 #include "confdefs.h"
17052 #include <$ac_header>
17053 _ACEOF
17054 if { (eval echo "$as_me:17054: \"$ac_cpp conftest.$ac_ext\"") >&5
17055   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17056   ac_status=$?
17057   egrep -v '^ *\+' conftest.er1 >conftest.err
17058   rm -f conftest.er1
17059   cat conftest.err >&5
17060   echo "$as_me:17060: \$? = $ac_status" >&5
17061   (exit $ac_status); } >/dev/null; then
17062   if test -s conftest.err; then
17063     ac_cpp_err=$ac_c_preproc_warn_flag
17064   else
17065     ac_cpp_err=
17066   fi
17067 else
17068   ac_cpp_err=yes
17069 fi
17070 if test -z "$ac_cpp_err"; then
17071   eval "$as_ac_Header=yes"
17072 else
17073   echo "$as_me: failed program was:" >&5
17074   cat conftest.$ac_ext >&5
17075   eval "$as_ac_Header=no"
17076 fi
17077 rm -f conftest.err conftest.$ac_ext
17078 fi
17079 echo "$as_me:17079: result: `eval echo '${'$as_ac_Header'}'`" >&5
17080 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17081 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17082   cat >>confdefs.h <<EOF
17083 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17084 EOF
17085
17086 fi
17087 done
17088
17089 fi
17090 if test "$ac_cv_header_termios_h" = yes ; then
17091         case "$CFLAGS $CPPFLAGS" in
17092         (*-D_POSIX_SOURCE*)
17093                 termios_bad=dunno ;;
17094         (*)     termios_bad=maybe ;;
17095         esac
17096         if test "$termios_bad" = maybe ; then
17097         echo "$as_me:17097: checking whether termios.h needs _POSIX_SOURCE" >&5
17098 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
17099         cat >conftest.$ac_ext <<_ACEOF
17100 #line 17100 "configure"
17101 #include "confdefs.h"
17102 #include <termios.h>
17103 int
17104 main ()
17105 {
17106 struct termios foo; int x = foo.c_iflag
17107   ;
17108   return 0;
17109 }
17110 _ACEOF
17111 rm -f conftest.$ac_objext
17112 if { (eval echo "$as_me:17112: \"$ac_compile\"") >&5
17113   (eval $ac_compile) 2>&5
17114   ac_status=$?
17115   echo "$as_me:17115: \$? = $ac_status" >&5
17116   (exit $ac_status); } &&
17117          { ac_try='test -s conftest.$ac_objext'
17118   { (eval echo "$as_me:17118: \"$ac_try\"") >&5
17119   (eval $ac_try) 2>&5
17120   ac_status=$?
17121   echo "$as_me:17121: \$? = $ac_status" >&5
17122   (exit $ac_status); }; }; then
17123   termios_bad=no
17124 else
17125   echo "$as_me: failed program was:" >&5
17126 cat conftest.$ac_ext >&5
17127
17128                 cat >conftest.$ac_ext <<_ACEOF
17129 #line 17129 "configure"
17130 #include "confdefs.h"
17131
17132 #define _POSIX_SOURCE
17133 #include <termios.h>
17134 int
17135 main ()
17136 {
17137 struct termios foo; int x = foo.c_iflag
17138   ;
17139   return 0;
17140 }
17141 _ACEOF
17142 rm -f conftest.$ac_objext
17143 if { (eval echo "$as_me:17143: \"$ac_compile\"") >&5
17144   (eval $ac_compile) 2>&5
17145   ac_status=$?
17146   echo "$as_me:17146: \$? = $ac_status" >&5
17147   (exit $ac_status); } &&
17148          { ac_try='test -s conftest.$ac_objext'
17149   { (eval echo "$as_me:17149: \"$ac_try\"") >&5
17150   (eval $ac_try) 2>&5
17151   ac_status=$?
17152   echo "$as_me:17152: \$? = $ac_status" >&5
17153   (exit $ac_status); }; }; then
17154   termios_bad=unknown
17155 else
17156   echo "$as_me: failed program was:" >&5
17157 cat conftest.$ac_ext >&5
17158 termios_bad=yes
17159 cat >>confdefs.h <<\EOF
17160 #define _POSIX_SOURCE 1
17161 EOF
17162
17163 fi
17164 rm -f conftest.$ac_objext conftest.$ac_ext
17165
17166 fi
17167 rm -f conftest.$ac_objext conftest.$ac_ext
17168         echo "$as_me:17168: result: $termios_bad" >&5
17169 echo "${ECHO_T}$termios_bad" >&6
17170         fi
17171 fi
17172
17173 echo "$as_me:17173: checking for tcgetattr" >&5
17174 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
17175 if test "${cf_cv_have_tcgetattr+set}" = set; then
17176   echo $ECHO_N "(cached) $ECHO_C" >&6
17177 else
17178
17179 cat >conftest.$ac_ext <<_ACEOF
17180 #line 17180 "configure"
17181 #include "confdefs.h"
17182
17183 #include <sys/types.h>
17184 #ifdef HAVE_UNISTD_H
17185 #include <unistd.h>
17186 #endif
17187 #ifdef HAVE_TERMIOS_H
17188 #include <termios.h>
17189 #define TTY struct termios
17190 #else
17191 #ifdef HAVE_TERMIO_H
17192 #include <termio.h>
17193 #define TTY struct termio
17194 #endif
17195 #endif
17196
17197 int
17198 main ()
17199 {
17200
17201 TTY foo;
17202 tcgetattr(1, &foo);
17203   ;
17204   return 0;
17205 }
17206 _ACEOF
17207 rm -f conftest.$ac_objext conftest$ac_exeext
17208 if { (eval echo "$as_me:17208: \"$ac_link\"") >&5
17209   (eval $ac_link) 2>&5
17210   ac_status=$?
17211   echo "$as_me:17211: \$? = $ac_status" >&5
17212   (exit $ac_status); } &&
17213          { ac_try='test -s conftest$ac_exeext'
17214   { (eval echo "$as_me:17214: \"$ac_try\"") >&5
17215   (eval $ac_try) 2>&5
17216   ac_status=$?
17217   echo "$as_me:17217: \$? = $ac_status" >&5
17218   (exit $ac_status); }; }; then
17219   cf_cv_have_tcgetattr=yes
17220 else
17221   echo "$as_me: failed program was:" >&5
17222 cat conftest.$ac_ext >&5
17223 cf_cv_have_tcgetattr=no
17224 fi
17225 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17226 fi
17227 echo "$as_me:17227: result: $cf_cv_have_tcgetattr" >&5
17228 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
17229 test "$cf_cv_have_tcgetattr" = yes &&
17230 cat >>confdefs.h <<\EOF
17231 #define HAVE_TCGETATTR 1
17232 EOF
17233
17234 echo "$as_me:17234: checking for vsscanf function or workaround" >&5
17235 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
17236 if test "${cf_cv_func_vsscanf+set}" = set; then
17237   echo $ECHO_N "(cached) $ECHO_C" >&6
17238 else
17239
17240 cat >conftest.$ac_ext <<_ACEOF
17241 #line 17241 "configure"
17242 #include "confdefs.h"
17243
17244 #include <stdarg.h>
17245 #include <stdio.h>
17246 int
17247 main ()
17248 {
17249
17250         va_list ap;
17251         vsscanf("from", "%d", ap)
17252   ;
17253   return 0;
17254 }
17255 _ACEOF
17256 rm -f conftest.$ac_objext conftest$ac_exeext
17257 if { (eval echo "$as_me:17257: \"$ac_link\"") >&5
17258   (eval $ac_link) 2>&5
17259   ac_status=$?
17260   echo "$as_me:17260: \$? = $ac_status" >&5
17261   (exit $ac_status); } &&
17262          { ac_try='test -s conftest$ac_exeext'
17263   { (eval echo "$as_me:17263: \"$ac_try\"") >&5
17264   (eval $ac_try) 2>&5
17265   ac_status=$?
17266   echo "$as_me:17266: \$? = $ac_status" >&5
17267   (exit $ac_status); }; }; then
17268   cf_cv_func_vsscanf=vsscanf
17269 else
17270   echo "$as_me: failed program was:" >&5
17271 cat conftest.$ac_ext >&5
17272
17273 cat >conftest.$ac_ext <<_ACEOF
17274 #line 17274 "configure"
17275 #include "confdefs.h"
17276
17277 #include <stdarg.h>
17278 #include <stdio.h>
17279 int
17280 main ()
17281 {
17282
17283         FILE strbuf;
17284         char *str = "from";
17285
17286         strbuf._flag = _IOREAD;
17287         strbuf._ptr = strbuf._base = (unsigned char *) str;
17288         strbuf._cnt = strlen(str);
17289         strbuf._file = _NFILE;
17290         return (vfscanf(&strbuf, "%d", ap))
17291   ;
17292   return 0;
17293 }
17294 _ACEOF
17295 rm -f conftest.$ac_objext conftest$ac_exeext
17296 if { (eval echo "$as_me:17296: \"$ac_link\"") >&5
17297   (eval $ac_link) 2>&5
17298   ac_status=$?
17299   echo "$as_me:17299: \$? = $ac_status" >&5
17300   (exit $ac_status); } &&
17301          { ac_try='test -s conftest$ac_exeext'
17302   { (eval echo "$as_me:17302: \"$ac_try\"") >&5
17303   (eval $ac_try) 2>&5
17304   ac_status=$?
17305   echo "$as_me:17305: \$? = $ac_status" >&5
17306   (exit $ac_status); }; }; then
17307   cf_cv_func_vsscanf=vfscanf
17308 else
17309   echo "$as_me: failed program was:" >&5
17310 cat conftest.$ac_ext >&5
17311
17312 cat >conftest.$ac_ext <<_ACEOF
17313 #line 17313 "configure"
17314 #include "confdefs.h"
17315
17316 #include <stdarg.h>
17317 #include <stdio.h>
17318 int
17319 main ()
17320 {
17321
17322         FILE strbuf;
17323         char *str = "from";
17324
17325         strbuf._flag = _IOREAD;
17326         strbuf._ptr = strbuf._base = (unsigned char *) str;
17327         strbuf._cnt = strlen(str);
17328         strbuf._file = _NFILE;
17329         return (_doscan(&strbuf, "%d", ap))
17330   ;
17331   return 0;
17332 }
17333 _ACEOF
17334 rm -f conftest.$ac_objext conftest$ac_exeext
17335 if { (eval echo "$as_me:17335: \"$ac_link\"") >&5
17336   (eval $ac_link) 2>&5
17337   ac_status=$?
17338   echo "$as_me:17338: \$? = $ac_status" >&5
17339   (exit $ac_status); } &&
17340          { ac_try='test -s conftest$ac_exeext'
17341   { (eval echo "$as_me:17341: \"$ac_try\"") >&5
17342   (eval $ac_try) 2>&5
17343   ac_status=$?
17344   echo "$as_me:17344: \$? = $ac_status" >&5
17345   (exit $ac_status); }; }; then
17346   cf_cv_func_vsscanf=_doscan
17347 else
17348   echo "$as_me: failed program was:" >&5
17349 cat conftest.$ac_ext >&5
17350
17351 cf_cv_func_vsscanf=no
17352 fi
17353 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17354 fi
17355 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17356 fi
17357 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17358 fi
17359 echo "$as_me:17359: result: $cf_cv_func_vsscanf" >&5
17360 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17361
17362 case $cf_cv_func_vsscanf in
17363 (vsscanf)
17364 cat >>confdefs.h <<\EOF
17365 #define HAVE_VSSCANF 1
17366 EOF
17367 ;;
17368 (vfscanf)
17369 cat >>confdefs.h <<\EOF
17370 #define HAVE_VFSCANF 1
17371 EOF
17372 ;;
17373 (_doscan)
17374 cat >>confdefs.h <<\EOF
17375 #define HAVE__DOSCAN 1
17376 EOF
17377 ;;
17378 esac
17379
17380 echo "$as_me:17380: checking for working mkstemp" >&5
17381 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17382 if test "${cf_cv_func_mkstemp+set}" = set; then
17383   echo $ECHO_N "(cached) $ECHO_C" >&6
17384 else
17385
17386 rm -rf conftest*
17387 if test "$cross_compiling" = yes; then
17388   cf_cv_func_mkstemp=maybe
17389 else
17390   cat >conftest.$ac_ext <<_ACEOF
17391 #line 17391 "configure"
17392 #include "confdefs.h"
17393
17394 #include <sys/types.h>
17395 #include <stdlib.h>
17396 #include <stdio.h>
17397 #include <string.h>
17398 #include <sys/stat.h>
17399 int main()
17400 {
17401         char *tmpl = "conftestXXXXXX";
17402         char name[2][80];
17403         int n;
17404         int result = 0;
17405         int fd;
17406         struct stat sb;
17407
17408         umask(077);
17409         for (n = 0; n < 2; ++n) {
17410                 strcpy(name[n], tmpl);
17411                 if ((fd = mkstemp(name[n])) >= 0) {
17412                         if (!strcmp(name[n], tmpl)
17413                          || stat(name[n], &sb) != 0
17414                          || (sb.st_mode & S_IFMT) != S_IFREG
17415                          || (sb.st_mode & 077) != 0) {
17416                                 result = 1;
17417                         }
17418                         close(fd);
17419                 }
17420         }
17421         if (result == 0
17422          && !strcmp(name[0], name[1]))
17423                 result = 1;
17424         ${cf_cv_main_return:-return}(result);
17425 }
17426
17427 _ACEOF
17428 rm -f conftest$ac_exeext
17429 if { (eval echo "$as_me:17429: \"$ac_link\"") >&5
17430   (eval $ac_link) 2>&5
17431   ac_status=$?
17432   echo "$as_me:17432: \$? = $ac_status" >&5
17433   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17434   { (eval echo "$as_me:17434: \"$ac_try\"") >&5
17435   (eval $ac_try) 2>&5
17436   ac_status=$?
17437   echo "$as_me:17437: \$? = $ac_status" >&5
17438   (exit $ac_status); }; }; then
17439   cf_cv_func_mkstemp=yes
17440
17441 else
17442   echo "$as_me: program exited with status $ac_status" >&5
17443 echo "$as_me: failed program was:" >&5
17444 cat conftest.$ac_ext >&5
17445 cf_cv_func_mkstemp=no
17446
17447 fi
17448 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17449 fi
17450
17451 fi
17452 echo "$as_me:17452: result: $cf_cv_func_mkstemp" >&5
17453 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17454 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17455         echo "$as_me:17455: checking for mkstemp" >&5
17456 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17457 if test "${ac_cv_func_mkstemp+set}" = set; then
17458   echo $ECHO_N "(cached) $ECHO_C" >&6
17459 else
17460   cat >conftest.$ac_ext <<_ACEOF
17461 #line 17461 "configure"
17462 #include "confdefs.h"
17463 /* System header to define __stub macros and hopefully few prototypes,
17464     which can conflict with char mkstemp (); below.  */
17465 #include <assert.h>
17466 /* Override any gcc2 internal prototype to avoid an error.  */
17467 #ifdef __cplusplus
17468 extern "C"
17469 #endif
17470 /* We use char because int might match the return type of a gcc2
17471    builtin and then its argument prototype would still apply.  */
17472 char mkstemp ();
17473 char (*f) ();
17474
17475 int
17476 main ()
17477 {
17478 /* The GNU C library defines this for functions which it implements
17479     to always fail with ENOSYS.  Some functions are actually named
17480     something starting with __ and the normal name is an alias.  */
17481 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17482 choke me
17483 #else
17484 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17485 #endif
17486
17487   ;
17488   return 0;
17489 }
17490 _ACEOF
17491 rm -f conftest.$ac_objext conftest$ac_exeext
17492 if { (eval echo "$as_me:17492: \"$ac_link\"") >&5
17493   (eval $ac_link) 2>&5
17494   ac_status=$?
17495   echo "$as_me:17495: \$? = $ac_status" >&5
17496   (exit $ac_status); } &&
17497          { ac_try='test -s conftest$ac_exeext'
17498   { (eval echo "$as_me:17498: \"$ac_try\"") >&5
17499   (eval $ac_try) 2>&5
17500   ac_status=$?
17501   echo "$as_me:17501: \$? = $ac_status" >&5
17502   (exit $ac_status); }; }; then
17503   ac_cv_func_mkstemp=yes
17504 else
17505   echo "$as_me: failed program was:" >&5
17506 cat conftest.$ac_ext >&5
17507 ac_cv_func_mkstemp=no
17508 fi
17509 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17510 fi
17511 echo "$as_me:17511: result: $ac_cv_func_mkstemp" >&5
17512 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17513
17514 fi
17515 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17516
17517 cat >>confdefs.h <<\EOF
17518 #define HAVE_MKSTEMP 1
17519 EOF
17520
17521 fi
17522
17523 # setup for prototype of fallback for vsscanf()
17524
17525 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17526         HAVE_VSSCANF=1
17527 else
17528         HAVE_VSSCANF=0
17529 fi
17530
17531 if test "x$cross_compiling" = xyes ; then
17532         { echo "$as_me:17532: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17533 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17534 else
17535         echo "$as_me:17535: checking whether setvbuf arguments are reversed" >&5
17536 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17537 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17538   echo $ECHO_N "(cached) $ECHO_C" >&6
17539 else
17540   if test "$cross_compiling" = yes; then
17541   { { echo "$as_me:17541: error: cannot run test program while cross compiling" >&5
17542 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17543    { (exit 1); exit 1; }; }
17544 else
17545   cat >conftest.$ac_ext <<_ACEOF
17546 #line 17546 "configure"
17547 #include "confdefs.h"
17548 #include <stdio.h>
17549 /* If setvbuf has the reversed format, exit 0. */
17550 int
17551 main ()
17552 {
17553   /* This call has the arguments reversed.
17554      A reversed system may check and see that the address of main
17555      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17556   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17557     $ac_main_return(1);
17558   putc('\r', stdout);
17559   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17560 }
17561 _ACEOF
17562 rm -f conftest$ac_exeext
17563 if { (eval echo "$as_me:17563: \"$ac_link\"") >&5
17564   (eval $ac_link) 2>&5
17565   ac_status=$?
17566   echo "$as_me:17566: \$? = $ac_status" >&5
17567   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17568   { (eval echo "$as_me:17568: \"$ac_try\"") >&5
17569   (eval $ac_try) 2>&5
17570   ac_status=$?
17571   echo "$as_me:17571: \$? = $ac_status" >&5
17572   (exit $ac_status); }; }; then
17573   ac_cv_func_setvbuf_reversed=yes
17574 else
17575   echo "$as_me: program exited with status $ac_status" >&5
17576 echo "$as_me: failed program was:" >&5
17577 cat conftest.$ac_ext >&5
17578 ac_cv_func_setvbuf_reversed=no
17579 fi
17580 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17581 fi
17582 rm -f core core.* *.core
17583 fi
17584 echo "$as_me:17584: result: $ac_cv_func_setvbuf_reversed" >&5
17585 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17586 if test $ac_cv_func_setvbuf_reversed = yes; then
17587
17588 cat >>confdefs.h <<\EOF
17589 #define SETVBUF_REVERSED 1
17590 EOF
17591
17592 fi
17593
17594 fi
17595 echo "$as_me:17595: checking for intptr_t" >&5
17596 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17597 if test "${ac_cv_type_intptr_t+set}" = set; then
17598   echo $ECHO_N "(cached) $ECHO_C" >&6
17599 else
17600   cat >conftest.$ac_ext <<_ACEOF
17601 #line 17601 "configure"
17602 #include "confdefs.h"
17603 $ac_includes_default
17604 int
17605 main ()
17606 {
17607 if ((intptr_t *) 0)
17608   return 0;
17609 if (sizeof (intptr_t))
17610   return 0;
17611   ;
17612   return 0;
17613 }
17614 _ACEOF
17615 rm -f conftest.$ac_objext
17616 if { (eval echo "$as_me:17616: \"$ac_compile\"") >&5
17617   (eval $ac_compile) 2>&5
17618   ac_status=$?
17619   echo "$as_me:17619: \$? = $ac_status" >&5
17620   (exit $ac_status); } &&
17621          { ac_try='test -s conftest.$ac_objext'
17622   { (eval echo "$as_me:17622: \"$ac_try\"") >&5
17623   (eval $ac_try) 2>&5
17624   ac_status=$?
17625   echo "$as_me:17625: \$? = $ac_status" >&5
17626   (exit $ac_status); }; }; then
17627   ac_cv_type_intptr_t=yes
17628 else
17629   echo "$as_me: failed program was:" >&5
17630 cat conftest.$ac_ext >&5
17631 ac_cv_type_intptr_t=no
17632 fi
17633 rm -f conftest.$ac_objext conftest.$ac_ext
17634 fi
17635 echo "$as_me:17635: result: $ac_cv_type_intptr_t" >&5
17636 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17637 if test $ac_cv_type_intptr_t = yes; then
17638   :
17639 else
17640
17641 cat >>confdefs.h <<EOF
17642 #define intptr_t long
17643 EOF
17644
17645 fi
17646
17647 echo "$as_me:17647: checking for ssize_t" >&5
17648 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17649 if test "${ac_cv_type_ssize_t+set}" = set; then
17650   echo $ECHO_N "(cached) $ECHO_C" >&6
17651 else
17652   cat >conftest.$ac_ext <<_ACEOF
17653 #line 17653 "configure"
17654 #include "confdefs.h"
17655 $ac_includes_default
17656 int
17657 main ()
17658 {
17659 if ((ssize_t *) 0)
17660   return 0;
17661 if (sizeof (ssize_t))
17662   return 0;
17663   ;
17664   return 0;
17665 }
17666 _ACEOF
17667 rm -f conftest.$ac_objext
17668 if { (eval echo "$as_me:17668: \"$ac_compile\"") >&5
17669   (eval $ac_compile) 2>&5
17670   ac_status=$?
17671   echo "$as_me:17671: \$? = $ac_status" >&5
17672   (exit $ac_status); } &&
17673          { ac_try='test -s conftest.$ac_objext'
17674   { (eval echo "$as_me:17674: \"$ac_try\"") >&5
17675   (eval $ac_try) 2>&5
17676   ac_status=$?
17677   echo "$as_me:17677: \$? = $ac_status" >&5
17678   (exit $ac_status); }; }; then
17679   ac_cv_type_ssize_t=yes
17680 else
17681   echo "$as_me: failed program was:" >&5
17682 cat conftest.$ac_ext >&5
17683 ac_cv_type_ssize_t=no
17684 fi
17685 rm -f conftest.$ac_objext conftest.$ac_ext
17686 fi
17687 echo "$as_me:17687: result: $ac_cv_type_ssize_t" >&5
17688 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17689 if test $ac_cv_type_ssize_t = yes; then
17690   :
17691 else
17692
17693 cat >>confdefs.h <<EOF
17694 #define ssize_t int
17695 EOF
17696
17697 fi
17698
17699 echo "$as_me:17699: checking for type sigaction_t" >&5
17700 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17701 if test "${cf_cv_type_sigaction+set}" = set; then
17702   echo $ECHO_N "(cached) $ECHO_C" >&6
17703 else
17704
17705         cat >conftest.$ac_ext <<_ACEOF
17706 #line 17706 "configure"
17707 #include "confdefs.h"
17708
17709 #include <signal.h>
17710 int
17711 main ()
17712 {
17713 sigaction_t x
17714   ;
17715   return 0;
17716 }
17717 _ACEOF
17718 rm -f conftest.$ac_objext
17719 if { (eval echo "$as_me:17719: \"$ac_compile\"") >&5
17720   (eval $ac_compile) 2>&5
17721   ac_status=$?
17722   echo "$as_me:17722: \$? = $ac_status" >&5
17723   (exit $ac_status); } &&
17724          { ac_try='test -s conftest.$ac_objext'
17725   { (eval echo "$as_me:17725: \"$ac_try\"") >&5
17726   (eval $ac_try) 2>&5
17727   ac_status=$?
17728   echo "$as_me:17728: \$? = $ac_status" >&5
17729   (exit $ac_status); }; }; then
17730   cf_cv_type_sigaction=yes
17731 else
17732   echo "$as_me: failed program was:" >&5
17733 cat conftest.$ac_ext >&5
17734 cf_cv_type_sigaction=no
17735 fi
17736 rm -f conftest.$ac_objext conftest.$ac_ext
17737 fi
17738
17739 echo "$as_me:17739: result: $cf_cv_type_sigaction" >&5
17740 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17741 test "$cf_cv_type_sigaction" = yes &&
17742 cat >>confdefs.h <<\EOF
17743 #define HAVE_TYPE_SIGACTION 1
17744 EOF
17745
17746 echo "$as_me:17746: checking declaration of size-change" >&5
17747 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17748 if test "${cf_cv_sizechange+set}" = set; then
17749   echo $ECHO_N "(cached) $ECHO_C" >&6
17750 else
17751
17752         cf_cv_sizechange=unknown
17753         cf_save_CPPFLAGS="$CPPFLAGS"
17754
17755 for cf_opts in "" "NEED_PTEM_H"
17756 do
17757
17758         CPPFLAGS="$cf_save_CPPFLAGS"
17759         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17760         cat >conftest.$ac_ext <<_ACEOF
17761 #line 17761 "configure"
17762 #include "confdefs.h"
17763 #include <sys/types.h>
17764 #ifdef HAVE_TERMIOS_H
17765 #include <termios.h>
17766 #else
17767 #ifdef HAVE_TERMIO_H
17768 #include <termio.h>
17769 #endif
17770 #endif
17771 #ifdef NEED_PTEM_H
17772 /* This is a workaround for SCO:  they neglected to define struct winsize in
17773  * termios.h -- it's only in termio.h and ptem.h
17774  */
17775 #include        <sys/stream.h>
17776 #include        <sys/ptem.h>
17777 #endif
17778 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17779 #include <sys/ioctl.h>
17780 #endif
17781
17782 int
17783 main ()
17784 {
17785
17786 #ifdef TIOCGSIZE
17787         struct ttysize win;     /* FIXME: what system is this? */
17788         int y = win.ts_lines;
17789         int x = win.ts_cols;
17790 #else
17791 #ifdef TIOCGWINSZ
17792         struct winsize win;
17793         int y = win.ws_row;
17794         int x = win.ws_col;
17795 #else
17796         no TIOCGSIZE or TIOCGWINSZ
17797 #endif /* TIOCGWINSZ */
17798 #endif /* TIOCGSIZE */
17799
17800   ;
17801   return 0;
17802 }
17803 _ACEOF
17804 rm -f conftest.$ac_objext
17805 if { (eval echo "$as_me:17805: \"$ac_compile\"") >&5
17806   (eval $ac_compile) 2>&5
17807   ac_status=$?
17808   echo "$as_me:17808: \$? = $ac_status" >&5
17809   (exit $ac_status); } &&
17810          { ac_try='test -s conftest.$ac_objext'
17811   { (eval echo "$as_me:17811: \"$ac_try\"") >&5
17812   (eval $ac_try) 2>&5
17813   ac_status=$?
17814   echo "$as_me:17814: \$? = $ac_status" >&5
17815   (exit $ac_status); }; }; then
17816   cf_cv_sizechange=yes
17817 else
17818   echo "$as_me: failed program was:" >&5
17819 cat conftest.$ac_ext >&5
17820 cf_cv_sizechange=no
17821 fi
17822 rm -f conftest.$ac_objext conftest.$ac_ext
17823
17824         CPPFLAGS="$cf_save_CPPFLAGS"
17825         if test "$cf_cv_sizechange" = yes ; then
17826                 echo "size-change succeeded ($cf_opts)" >&5
17827                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17828                 break
17829         fi
17830 done
17831
17832 fi
17833 echo "$as_me:17833: result: $cf_cv_sizechange" >&5
17834 echo "${ECHO_T}$cf_cv_sizechange" >&6
17835 if test "$cf_cv_sizechange" != no ; then
17836
17837 cat >>confdefs.h <<\EOF
17838 #define HAVE_SIZECHANGE 1
17839 EOF
17840
17841         case $cf_cv_sizechange in
17842         (NEED*)
17843                 cat >>confdefs.h <<EOF
17844 #define $cf_cv_sizechange  1
17845 EOF
17846
17847                 ;;
17848         esac
17849 fi
17850
17851 echo "$as_me:17851: checking for memmove" >&5
17852 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17853 if test "${ac_cv_func_memmove+set}" = set; then
17854   echo $ECHO_N "(cached) $ECHO_C" >&6
17855 else
17856   cat >conftest.$ac_ext <<_ACEOF
17857 #line 17857 "configure"
17858 #include "confdefs.h"
17859 /* System header to define __stub macros and hopefully few prototypes,
17860     which can conflict with char memmove (); below.  */
17861 #include <assert.h>
17862 /* Override any gcc2 internal prototype to avoid an error.  */
17863 #ifdef __cplusplus
17864 extern "C"
17865 #endif
17866 /* We use char because int might match the return type of a gcc2
17867    builtin and then its argument prototype would still apply.  */
17868 char memmove ();
17869 char (*f) ();
17870
17871 int
17872 main ()
17873 {
17874 /* The GNU C library defines this for functions which it implements
17875     to always fail with ENOSYS.  Some functions are actually named
17876     something starting with __ and the normal name is an alias.  */
17877 #if defined (__stub_memmove) || defined (__stub___memmove)
17878 choke me
17879 #else
17880 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17881 #endif
17882
17883   ;
17884   return 0;
17885 }
17886 _ACEOF
17887 rm -f conftest.$ac_objext conftest$ac_exeext
17888 if { (eval echo "$as_me:17888: \"$ac_link\"") >&5
17889   (eval $ac_link) 2>&5
17890   ac_status=$?
17891   echo "$as_me:17891: \$? = $ac_status" >&5
17892   (exit $ac_status); } &&
17893          { ac_try='test -s conftest$ac_exeext'
17894   { (eval echo "$as_me:17894: \"$ac_try\"") >&5
17895   (eval $ac_try) 2>&5
17896   ac_status=$?
17897   echo "$as_me:17897: \$? = $ac_status" >&5
17898   (exit $ac_status); }; }; then
17899   ac_cv_func_memmove=yes
17900 else
17901   echo "$as_me: failed program was:" >&5
17902 cat conftest.$ac_ext >&5
17903 ac_cv_func_memmove=no
17904 fi
17905 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17906 fi
17907 echo "$as_me:17907: result: $ac_cv_func_memmove" >&5
17908 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17909 if test $ac_cv_func_memmove = yes; then
17910   :
17911 else
17912
17913 echo "$as_me:17913: checking for bcopy" >&5
17914 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17915 if test "${ac_cv_func_bcopy+set}" = set; then
17916   echo $ECHO_N "(cached) $ECHO_C" >&6
17917 else
17918   cat >conftest.$ac_ext <<_ACEOF
17919 #line 17919 "configure"
17920 #include "confdefs.h"
17921 /* System header to define __stub macros and hopefully few prototypes,
17922     which can conflict with char bcopy (); below.  */
17923 #include <assert.h>
17924 /* Override any gcc2 internal prototype to avoid an error.  */
17925 #ifdef __cplusplus
17926 extern "C"
17927 #endif
17928 /* We use char because int might match the return type of a gcc2
17929    builtin and then its argument prototype would still apply.  */
17930 char bcopy ();
17931 char (*f) ();
17932
17933 int
17934 main ()
17935 {
17936 /* The GNU C library defines this for functions which it implements
17937     to always fail with ENOSYS.  Some functions are actually named
17938     something starting with __ and the normal name is an alias.  */
17939 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17940 choke me
17941 #else
17942 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17943 #endif
17944
17945   ;
17946   return 0;
17947 }
17948 _ACEOF
17949 rm -f conftest.$ac_objext conftest$ac_exeext
17950 if { (eval echo "$as_me:17950: \"$ac_link\"") >&5
17951   (eval $ac_link) 2>&5
17952   ac_status=$?
17953   echo "$as_me:17953: \$? = $ac_status" >&5
17954   (exit $ac_status); } &&
17955          { ac_try='test -s conftest$ac_exeext'
17956   { (eval echo "$as_me:17956: \"$ac_try\"") >&5
17957   (eval $ac_try) 2>&5
17958   ac_status=$?
17959   echo "$as_me:17959: \$? = $ac_status" >&5
17960   (exit $ac_status); }; }; then
17961   ac_cv_func_bcopy=yes
17962 else
17963   echo "$as_me: failed program was:" >&5
17964 cat conftest.$ac_ext >&5
17965 ac_cv_func_bcopy=no
17966 fi
17967 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17968 fi
17969 echo "$as_me:17969: result: $ac_cv_func_bcopy" >&5
17970 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17971 if test $ac_cv_func_bcopy = yes; then
17972
17973         echo "$as_me:17973: checking if bcopy does overlapping moves" >&5
17974 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17975 if test "${cf_cv_good_bcopy+set}" = set; then
17976   echo $ECHO_N "(cached) $ECHO_C" >&6
17977 else
17978
17979                 if test "$cross_compiling" = yes; then
17980   cf_cv_good_bcopy=unknown
17981 else
17982   cat >conftest.$ac_ext <<_ACEOF
17983 #line 17983 "configure"
17984 #include "confdefs.h"
17985
17986 int main() {
17987         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17988         char temp[40];
17989         bcopy(data, temp, sizeof(data));
17990         bcopy(temp+10, temp, 15);
17991         bcopy(temp+5, temp+15, 10);
17992         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17993 }
17994
17995 _ACEOF
17996 rm -f conftest$ac_exeext
17997 if { (eval echo "$as_me:17997: \"$ac_link\"") >&5
17998   (eval $ac_link) 2>&5
17999   ac_status=$?
18000   echo "$as_me:18000: \$? = $ac_status" >&5
18001   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18002   { (eval echo "$as_me:18002: \"$ac_try\"") >&5
18003   (eval $ac_try) 2>&5
18004   ac_status=$?
18005   echo "$as_me:18005: \$? = $ac_status" >&5
18006   (exit $ac_status); }; }; then
18007   cf_cv_good_bcopy=yes
18008 else
18009   echo "$as_me: program exited with status $ac_status" >&5
18010 echo "$as_me: failed program was:" >&5
18011 cat conftest.$ac_ext >&5
18012 cf_cv_good_bcopy=no
18013 fi
18014 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18015 fi
18016
18017 fi
18018 echo "$as_me:18018: result: $cf_cv_good_bcopy" >&5
18019 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
18020
18021 else
18022   cf_cv_good_bcopy=no
18023 fi
18024
18025         if test "$cf_cv_good_bcopy" = yes ; then
18026
18027 cat >>confdefs.h <<\EOF
18028 #define USE_OK_BCOPY 1
18029 EOF
18030
18031         else
18032
18033 cat >>confdefs.h <<\EOF
18034 #define USE_MY_MEMMOVE 1
18035 EOF
18036
18037         fi
18038
18039 fi
18040
18041 tty 2>&1 >/dev/null || {
18042 for ac_func in posix_openpt
18043 do
18044 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18045 echo "$as_me:18045: checking for $ac_func" >&5
18046 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18047 if eval "test \"\${$as_ac_var+set}\" = set"; then
18048   echo $ECHO_N "(cached) $ECHO_C" >&6
18049 else
18050   cat >conftest.$ac_ext <<_ACEOF
18051 #line 18051 "configure"
18052 #include "confdefs.h"
18053 /* System header to define __stub macros and hopefully few prototypes,
18054     which can conflict with char $ac_func (); below.  */
18055 #include <assert.h>
18056 /* Override any gcc2 internal prototype to avoid an error.  */
18057 #ifdef __cplusplus
18058 extern "C"
18059 #endif
18060 /* We use char because int might match the return type of a gcc2
18061    builtin and then its argument prototype would still apply.  */
18062 char $ac_func ();
18063 char (*f) ();
18064
18065 int
18066 main ()
18067 {
18068 /* The GNU C library defines this for functions which it implements
18069     to always fail with ENOSYS.  Some functions are actually named
18070     something starting with __ and the normal name is an alias.  */
18071 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18072 choke me
18073 #else
18074 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18075 #endif
18076
18077   ;
18078   return 0;
18079 }
18080 _ACEOF
18081 rm -f conftest.$ac_objext conftest$ac_exeext
18082 if { (eval echo "$as_me:18082: \"$ac_link\"") >&5
18083   (eval $ac_link) 2>&5
18084   ac_status=$?
18085   echo "$as_me:18085: \$? = $ac_status" >&5
18086   (exit $ac_status); } &&
18087          { ac_try='test -s conftest$ac_exeext'
18088   { (eval echo "$as_me:18088: \"$ac_try\"") >&5
18089   (eval $ac_try) 2>&5
18090   ac_status=$?
18091   echo "$as_me:18091: \$? = $ac_status" >&5
18092   (exit $ac_status); }; }; then
18093   eval "$as_ac_var=yes"
18094 else
18095   echo "$as_me: failed program was:" >&5
18096 cat conftest.$ac_ext >&5
18097 eval "$as_ac_var=no"
18098 fi
18099 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18100 fi
18101 echo "$as_me:18101: result: `eval echo '${'$as_ac_var'}'`" >&5
18102 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18103 if test `eval echo '${'$as_ac_var'}'` = yes; then
18104   cat >>confdefs.h <<EOF
18105 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18106 EOF
18107
18108 fi
18109 done
18110  }
18111 echo "$as_me:18111: checking if poll really works" >&5
18112 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
18113 if test "${cf_cv_working_poll+set}" = set; then
18114   echo $ECHO_N "(cached) $ECHO_C" >&6
18115 else
18116
18117 if test "$cross_compiling" = yes; then
18118   cf_cv_working_poll=unknown
18119 else
18120   cat >conftest.$ac_ext <<_ACEOF
18121 #line 18121 "configure"
18122 #include "confdefs.h"
18123
18124 #include <stdlib.h>
18125 #include <stdio.h>
18126 #include <unistd.h>
18127 #include <fcntl.h>
18128 #ifdef HAVE_POLL_H
18129 #include <poll.h>
18130 #else
18131 #include <sys/poll.h>
18132 #endif
18133 int main(void) {
18134         struct pollfd myfds;
18135         int ret;
18136
18137         /* check for Darwin bug with respect to "devices" */
18138         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
18139         if (myfds.fd < 0)
18140                 myfds.fd = 0;
18141         myfds.events = POLLIN;
18142         myfds.revents = 0;
18143
18144         ret = poll(&myfds, 1, 100);
18145
18146         if (ret < 0 || (myfds.revents & POLLNVAL)) {
18147                 ret = -1;
18148         } else {
18149                 int fd = 0;
18150                 if (!isatty(fd)) {
18151                         fd = open("/dev/tty", 2);       /* O_RDWR */
18152                 }
18153 #ifdef HAVE_POSIX_OPENPT
18154                 if (fd < 0) {
18155                         fd = posix_openpt(O_RDWR);
18156                 }
18157 #endif
18158
18159                 if (fd >= 0) {
18160                         /* also check with standard input */
18161                         myfds.fd = fd;
18162                         myfds.events = POLLIN;
18163                         myfds.revents = 0;
18164                         ret = poll(&myfds, 1, 100);
18165                 } else {
18166                         ret = -1;
18167                 }
18168         }
18169         ${cf_cv_main_return:-return}(ret < 0);
18170 }
18171 _ACEOF
18172 rm -f conftest$ac_exeext
18173 if { (eval echo "$as_me:18173: \"$ac_link\"") >&5
18174   (eval $ac_link) 2>&5
18175   ac_status=$?
18176   echo "$as_me:18176: \$? = $ac_status" >&5
18177   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18178   { (eval echo "$as_me:18178: \"$ac_try\"") >&5
18179   (eval $ac_try) 2>&5
18180   ac_status=$?
18181   echo "$as_me:18181: \$? = $ac_status" >&5
18182   (exit $ac_status); }; }; then
18183   cf_cv_working_poll=yes
18184 else
18185   echo "$as_me: program exited with status $ac_status" >&5
18186 echo "$as_me: failed program was:" >&5
18187 cat conftest.$ac_ext >&5
18188 cf_cv_working_poll=no
18189 fi
18190 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18191 fi
18192 fi
18193 echo "$as_me:18193: result: $cf_cv_working_poll" >&5
18194 echo "${ECHO_T}$cf_cv_working_poll" >&6
18195 test "$cf_cv_working_poll" = "yes" &&
18196 cat >>confdefs.h <<\EOF
18197 #define HAVE_WORKING_POLL 1
18198 EOF
18199
18200 echo "$as_me:18200: checking for va_copy" >&5
18201 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
18202 if test "${cf_cv_have_va_copy+set}" = set; then
18203   echo $ECHO_N "(cached) $ECHO_C" >&6
18204 else
18205
18206 cat >conftest.$ac_ext <<_ACEOF
18207 #line 18207 "configure"
18208 #include "confdefs.h"
18209
18210 #include <stdarg.h>
18211
18212 int
18213 main ()
18214 {
18215
18216         static va_list dst;
18217         static va_list src;
18218         va_copy(dst, src)
18219   ;
18220   return 0;
18221 }
18222 _ACEOF
18223 rm -f conftest.$ac_objext conftest$ac_exeext
18224 if { (eval echo "$as_me:18224: \"$ac_link\"") >&5
18225   (eval $ac_link) 2>&5
18226   ac_status=$?
18227   echo "$as_me:18227: \$? = $ac_status" >&5
18228   (exit $ac_status); } &&
18229          { ac_try='test -s conftest$ac_exeext'
18230   { (eval echo "$as_me:18230: \"$ac_try\"") >&5
18231   (eval $ac_try) 2>&5
18232   ac_status=$?
18233   echo "$as_me:18233: \$? = $ac_status" >&5
18234   (exit $ac_status); }; }; then
18235   cf_cv_have_va_copy=yes
18236 else
18237   echo "$as_me: failed program was:" >&5
18238 cat conftest.$ac_ext >&5
18239 cf_cv_have_va_copy=no
18240 fi
18241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18242 fi
18243 echo "$as_me:18243: result: $cf_cv_have_va_copy" >&5
18244 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
18245
18246 test "$cf_cv_have_va_copy" = yes &&
18247 cat >>confdefs.h <<\EOF
18248 #define HAVE_VA_COPY 1
18249 EOF
18250
18251 echo "$as_me:18251: checking for __va_copy" >&5
18252 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
18253 if test "${cf_cv_have___va_copy+set}" = set; then
18254   echo $ECHO_N "(cached) $ECHO_C" >&6
18255 else
18256
18257 cat >conftest.$ac_ext <<_ACEOF
18258 #line 18258 "configure"
18259 #include "confdefs.h"
18260
18261 #include <stdarg.h>
18262
18263 int
18264 main ()
18265 {
18266
18267         static va_list dst;
18268         static va_list src;
18269         __va_copy(dst, src)
18270   ;
18271   return 0;
18272 }
18273 _ACEOF
18274 rm -f conftest.$ac_objext conftest$ac_exeext
18275 if { (eval echo "$as_me:18275: \"$ac_link\"") >&5
18276   (eval $ac_link) 2>&5
18277   ac_status=$?
18278   echo "$as_me:18278: \$? = $ac_status" >&5
18279   (exit $ac_status); } &&
18280          { ac_try='test -s conftest$ac_exeext'
18281   { (eval echo "$as_me:18281: \"$ac_try\"") >&5
18282   (eval $ac_try) 2>&5
18283   ac_status=$?
18284   echo "$as_me:18284: \$? = $ac_status" >&5
18285   (exit $ac_status); }; }; then
18286   cf_cv_have___va_copy=yes
18287 else
18288   echo "$as_me: failed program was:" >&5
18289 cat conftest.$ac_ext >&5
18290 cf_cv_have___va_copy=no
18291 fi
18292 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18293 fi
18294 echo "$as_me:18294: result: $cf_cv_have___va_copy" >&5
18295 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
18296
18297 test "$cf_cv_have___va_copy" = yes &&
18298 cat >>confdefs.h <<\EOF
18299 #define HAVE___VA_COPY 1
18300 EOF
18301
18302 echo "$as_me:18302: checking for pid_t" >&5
18303 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
18304 if test "${ac_cv_type_pid_t+set}" = set; then
18305   echo $ECHO_N "(cached) $ECHO_C" >&6
18306 else
18307   cat >conftest.$ac_ext <<_ACEOF
18308 #line 18308 "configure"
18309 #include "confdefs.h"
18310 $ac_includes_default
18311 int
18312 main ()
18313 {
18314 if ((pid_t *) 0)
18315   return 0;
18316 if (sizeof (pid_t))
18317   return 0;
18318   ;
18319   return 0;
18320 }
18321 _ACEOF
18322 rm -f conftest.$ac_objext
18323 if { (eval echo "$as_me:18323: \"$ac_compile\"") >&5
18324   (eval $ac_compile) 2>&5
18325   ac_status=$?
18326   echo "$as_me:18326: \$? = $ac_status" >&5
18327   (exit $ac_status); } &&
18328          { ac_try='test -s conftest.$ac_objext'
18329   { (eval echo "$as_me:18329: \"$ac_try\"") >&5
18330   (eval $ac_try) 2>&5
18331   ac_status=$?
18332   echo "$as_me:18332: \$? = $ac_status" >&5
18333   (exit $ac_status); }; }; then
18334   ac_cv_type_pid_t=yes
18335 else
18336   echo "$as_me: failed program was:" >&5
18337 cat conftest.$ac_ext >&5
18338 ac_cv_type_pid_t=no
18339 fi
18340 rm -f conftest.$ac_objext conftest.$ac_ext
18341 fi
18342 echo "$as_me:18342: result: $ac_cv_type_pid_t" >&5
18343 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
18344 if test $ac_cv_type_pid_t = yes; then
18345   :
18346 else
18347
18348 cat >>confdefs.h <<EOF
18349 #define pid_t int
18350 EOF
18351
18352 fi
18353
18354 for ac_header in unistd.h vfork.h
18355 do
18356 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18357 echo "$as_me:18357: checking for $ac_header" >&5
18358 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18359 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18360   echo $ECHO_N "(cached) $ECHO_C" >&6
18361 else
18362   cat >conftest.$ac_ext <<_ACEOF
18363 #line 18363 "configure"
18364 #include "confdefs.h"
18365 #include <$ac_header>
18366 _ACEOF
18367 if { (eval echo "$as_me:18367: \"$ac_cpp conftest.$ac_ext\"") >&5
18368   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18369   ac_status=$?
18370   egrep -v '^ *\+' conftest.er1 >conftest.err
18371   rm -f conftest.er1
18372   cat conftest.err >&5
18373   echo "$as_me:18373: \$? = $ac_status" >&5
18374   (exit $ac_status); } >/dev/null; then
18375   if test -s conftest.err; then
18376     ac_cpp_err=$ac_c_preproc_warn_flag
18377   else
18378     ac_cpp_err=
18379   fi
18380 else
18381   ac_cpp_err=yes
18382 fi
18383 if test -z "$ac_cpp_err"; then
18384   eval "$as_ac_Header=yes"
18385 else
18386   echo "$as_me: failed program was:" >&5
18387   cat conftest.$ac_ext >&5
18388   eval "$as_ac_Header=no"
18389 fi
18390 rm -f conftest.err conftest.$ac_ext
18391 fi
18392 echo "$as_me:18392: result: `eval echo '${'$as_ac_Header'}'`" >&5
18393 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18394 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18395   cat >>confdefs.h <<EOF
18396 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18397 EOF
18398
18399 fi
18400 done
18401
18402 for ac_func in fork vfork
18403 do
18404 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18405 echo "$as_me:18405: checking for $ac_func" >&5
18406 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18407 if eval "test \"\${$as_ac_var+set}\" = set"; then
18408   echo $ECHO_N "(cached) $ECHO_C" >&6
18409 else
18410   cat >conftest.$ac_ext <<_ACEOF
18411 #line 18411 "configure"
18412 #include "confdefs.h"
18413 /* System header to define __stub macros and hopefully few prototypes,
18414     which can conflict with char $ac_func (); below.  */
18415 #include <assert.h>
18416 /* Override any gcc2 internal prototype to avoid an error.  */
18417 #ifdef __cplusplus
18418 extern "C"
18419 #endif
18420 /* We use char because int might match the return type of a gcc2
18421    builtin and then its argument prototype would still apply.  */
18422 char $ac_func ();
18423 char (*f) ();
18424
18425 int
18426 main ()
18427 {
18428 /* The GNU C library defines this for functions which it implements
18429     to always fail with ENOSYS.  Some functions are actually named
18430     something starting with __ and the normal name is an alias.  */
18431 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18432 choke me
18433 #else
18434 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18435 #endif
18436
18437   ;
18438   return 0;
18439 }
18440 _ACEOF
18441 rm -f conftest.$ac_objext conftest$ac_exeext
18442 if { (eval echo "$as_me:18442: \"$ac_link\"") >&5
18443   (eval $ac_link) 2>&5
18444   ac_status=$?
18445   echo "$as_me:18445: \$? = $ac_status" >&5
18446   (exit $ac_status); } &&
18447          { ac_try='test -s conftest$ac_exeext'
18448   { (eval echo "$as_me:18448: \"$ac_try\"") >&5
18449   (eval $ac_try) 2>&5
18450   ac_status=$?
18451   echo "$as_me:18451: \$? = $ac_status" >&5
18452   (exit $ac_status); }; }; then
18453   eval "$as_ac_var=yes"
18454 else
18455   echo "$as_me: failed program was:" >&5
18456 cat conftest.$ac_ext >&5
18457 eval "$as_ac_var=no"
18458 fi
18459 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18460 fi
18461 echo "$as_me:18461: result: `eval echo '${'$as_ac_var'}'`" >&5
18462 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18463 if test `eval echo '${'$as_ac_var'}'` = yes; then
18464   cat >>confdefs.h <<EOF
18465 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18466 EOF
18467
18468 fi
18469 done
18470
18471 ac_cv_func_fork_works=$ac_cv_func_fork
18472 if test "x$ac_cv_func_fork" = xyes; then
18473   echo "$as_me:18473: checking for working fork" >&5
18474 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18475 if test "${ac_cv_func_fork_works+set}" = set; then
18476   echo $ECHO_N "(cached) $ECHO_C" >&6
18477 else
18478   if test "$cross_compiling" = yes; then
18479   ac_cv_func_fork_works=cross
18480 else
18481   cat >conftest.$ac_ext <<_ACEOF
18482 /* By Rüdiger Kuhlmann. */
18483       #include <sys/types.h>
18484       #if HAVE_UNISTD_H
18485       # include <unistd.h>
18486       #endif
18487       /* Some systems only have a dummy stub for fork() */
18488       int main ()
18489       {
18490         if (fork() < 0)
18491           $ac_main_return (1);
18492         $ac_main_return (0);
18493       }
18494 _ACEOF
18495 rm -f conftest$ac_exeext
18496 if { (eval echo "$as_me:18496: \"$ac_link\"") >&5
18497   (eval $ac_link) 2>&5
18498   ac_status=$?
18499   echo "$as_me:18499: \$? = $ac_status" >&5
18500   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18501   { (eval echo "$as_me:18501: \"$ac_try\"") >&5
18502   (eval $ac_try) 2>&5
18503   ac_status=$?
18504   echo "$as_me:18504: \$? = $ac_status" >&5
18505   (exit $ac_status); }; }; then
18506   ac_cv_func_fork_works=yes
18507 else
18508   echo "$as_me: program exited with status $ac_status" >&5
18509 echo "$as_me: failed program was:" >&5
18510 cat conftest.$ac_ext >&5
18511 ac_cv_func_fork_works=no
18512 fi
18513 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18514 fi
18515 fi
18516 echo "$as_me:18516: result: $ac_cv_func_fork_works" >&5
18517 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18518
18519 fi
18520 if test "x$ac_cv_func_fork_works" = xcross; then
18521   case $host in
18522     *-*-amigaos* | *-*-msdosdjgpp*)
18523       # Override, as these systems have only a dummy fork() stub
18524       ac_cv_func_fork_works=no
18525       ;;
18526     *)
18527       ac_cv_func_fork_works=yes
18528       ;;
18529   esac
18530   { echo "$as_me:18530: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18531 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18532 fi
18533 ac_cv_func_vfork_works=$ac_cv_func_vfork
18534 if test "x$ac_cv_func_vfork" = xyes; then
18535   echo "$as_me:18535: checking for working vfork" >&5
18536 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18537 if test "${ac_cv_func_vfork_works+set}" = set; then
18538   echo $ECHO_N "(cached) $ECHO_C" >&6
18539 else
18540   if test "$cross_compiling" = yes; then
18541   ac_cv_func_vfork_works=cross
18542 else
18543   cat >conftest.$ac_ext <<_ACEOF
18544 #line 18544 "configure"
18545 #include "confdefs.h"
18546 /* Thanks to Paul Eggert for this test.  */
18547 #include <stdio.h>
18548 #include <sys/types.h>
18549 #include <sys/stat.h>
18550 #if HAVE_UNISTD_H
18551 # include <unistd.h>
18552 #endif
18553 #if HAVE_VFORK_H
18554 # include <vfork.h>
18555 #endif
18556 /* On some sparc systems, changes by the child to local and incoming
18557    argument registers are propagated back to the parent.  The compiler
18558    is told about this with #include <vfork.h>, but some compilers
18559    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18560    static variable whose address is put into a register that is
18561    clobbered by the vfork.  */
18562 static
18563 #ifdef __cplusplus
18564 sparc_address_test (int arg)
18565 # else
18566 sparc_address_test (arg) int arg;
18567 #endif
18568 {
18569   static pid_t child;
18570   if (!child) {
18571     child = vfork ();
18572     if (child < 0) {
18573       perror ("vfork");
18574       _exit(2);
18575     }
18576     if (!child) {
18577       arg = getpid();
18578       write(-1, "", 0);
18579       _exit (arg);
18580     }
18581   }
18582 }
18583
18584 int
18585 main ()
18586 {
18587   pid_t parent = getpid ();
18588   pid_t child;
18589
18590   sparc_address_test ();
18591
18592   child = vfork ();
18593
18594   if (child == 0) {
18595     /* Here is another test for sparc vfork register problems.  This
18596        test uses lots of local variables, at least as many local
18597        variables as main has allocated so far including compiler
18598        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18599        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18600        reuse the register of parent for one of the local variables,
18601        since it will think that parent can't possibly be used any more
18602        in this routine.  Assigning to the local variable will thus
18603        munge parent in the parent process.  */
18604     pid_t
18605       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18606       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18607     /* Convince the compiler that p..p7 are live; otherwise, it might
18608        use the same hardware register for all 8 local variables.  */
18609     if (p != p1 || p != p2 || p != p3 || p != p4
18610         || p != p5 || p != p6 || p != p7)
18611       _exit(1);
18612
18613     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18614        from child file descriptors.  If the child closes a descriptor
18615        before it execs or exits, this munges the parent's descriptor
18616        as well.  Test for this by closing stdout in the child.  */
18617     _exit(close(fileno(stdout)) != 0);
18618   } else {
18619     int status;
18620     struct stat st;
18621
18622     while (wait(&status) != child)
18623       ;
18624     $ac_main_return(
18625          /* Was there some problem with vforking?  */
18626          child < 0
18627
18628          /* Did the child fail?  (This shouldn't happen.)  */
18629          || status
18630
18631          /* Did the vfork/compiler bug occur?  */
18632          || parent != getpid()
18633
18634          /* Did the file descriptor bug occur?  */
18635          || fstat(fileno(stdout), &st) != 0
18636          );
18637   }
18638 }
18639 _ACEOF
18640 rm -f conftest$ac_exeext
18641 if { (eval echo "$as_me:18641: \"$ac_link\"") >&5
18642   (eval $ac_link) 2>&5
18643   ac_status=$?
18644   echo "$as_me:18644: \$? = $ac_status" >&5
18645   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18646   { (eval echo "$as_me:18646: \"$ac_try\"") >&5
18647   (eval $ac_try) 2>&5
18648   ac_status=$?
18649   echo "$as_me:18649: \$? = $ac_status" >&5
18650   (exit $ac_status); }; }; then
18651   ac_cv_func_vfork_works=yes
18652 else
18653   echo "$as_me: program exited with status $ac_status" >&5
18654 echo "$as_me: failed program was:" >&5
18655 cat conftest.$ac_ext >&5
18656 ac_cv_func_vfork_works=no
18657 fi
18658 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18659 fi
18660 fi
18661 echo "$as_me:18661: result: $ac_cv_func_vfork_works" >&5
18662 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18663
18664 fi;
18665 if test "x$ac_cv_func_fork_works" = xcross; then
18666   ac_cv_func_vfork_works=ac_cv_func_vfork
18667   { echo "$as_me:18667: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18668 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18669 fi
18670
18671 if test "x$ac_cv_func_vfork_works" = xyes; then
18672
18673 cat >>confdefs.h <<\EOF
18674 #define HAVE_WORKING_VFORK 1
18675 EOF
18676
18677 else
18678
18679 cat >>confdefs.h <<\EOF
18680 #define vfork fork
18681 EOF
18682
18683 fi
18684 if test "x$ac_cv_func_fork_works" = xyes; then
18685
18686 cat >>confdefs.h <<\EOF
18687 #define HAVE_WORKING_FORK 1
18688 EOF
18689
18690 fi
18691
18692 # special check for test/ditto.c
18693
18694 echo "$as_me:18694: checking for openpty in -lutil" >&5
18695 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18696 if test "${ac_cv_lib_util_openpty+set}" = set; then
18697   echo $ECHO_N "(cached) $ECHO_C" >&6
18698 else
18699   ac_check_lib_save_LIBS=$LIBS
18700 LIBS="-lutil  $LIBS"
18701 cat >conftest.$ac_ext <<_ACEOF
18702 #line 18702 "configure"
18703 #include "confdefs.h"
18704
18705 /* Override any gcc2 internal prototype to avoid an error.  */
18706 #ifdef __cplusplus
18707 extern "C"
18708 #endif
18709 /* We use char because int might match the return type of a gcc2
18710    builtin and then its argument prototype would still apply.  */
18711 char openpty ();
18712 int
18713 main ()
18714 {
18715 openpty ();
18716   ;
18717   return 0;
18718 }
18719 _ACEOF
18720 rm -f conftest.$ac_objext conftest$ac_exeext
18721 if { (eval echo "$as_me:18721: \"$ac_link\"") >&5
18722   (eval $ac_link) 2>&5
18723   ac_status=$?
18724   echo "$as_me:18724: \$? = $ac_status" >&5
18725   (exit $ac_status); } &&
18726          { ac_try='test -s conftest$ac_exeext'
18727   { (eval echo "$as_me:18727: \"$ac_try\"") >&5
18728   (eval $ac_try) 2>&5
18729   ac_status=$?
18730   echo "$as_me:18730: \$? = $ac_status" >&5
18731   (exit $ac_status); }; }; then
18732   ac_cv_lib_util_openpty=yes
18733 else
18734   echo "$as_me: failed program was:" >&5
18735 cat conftest.$ac_ext >&5
18736 ac_cv_lib_util_openpty=no
18737 fi
18738 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18739 LIBS=$ac_check_lib_save_LIBS
18740 fi
18741 echo "$as_me:18741: result: $ac_cv_lib_util_openpty" >&5
18742 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18743 if test $ac_cv_lib_util_openpty = yes; then
18744   cf_cv_lib_util=yes
18745 else
18746   cf_cv_lib_util=no
18747 fi
18748
18749 echo "$as_me:18749: checking for openpty header" >&5
18750 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18751 if test "${cf_cv_func_openpty+set}" = set; then
18752   echo $ECHO_N "(cached) $ECHO_C" >&6
18753 else
18754
18755         cf_save_LIBS="$LIBS"
18756         test $cf_cv_lib_util = yes && {
18757 cf_add_libs="-lutil"
18758 # Filter out duplicates - this happens with badly-designed ".pc" files...
18759 for cf_add_1lib in $LIBS
18760 do
18761         for cf_add_2lib in $cf_add_libs
18762         do
18763                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18764                 then
18765                         cf_add_1lib=
18766                         break
18767                 fi
18768         done
18769         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18770 done
18771 LIBS="$cf_add_libs"
18772  }
18773         for cf_header in pty.h libutil.h util.h
18774         do
18775         cat >conftest.$ac_ext <<_ACEOF
18776 #line 18776 "configure"
18777 #include "confdefs.h"
18778
18779 #include <$cf_header>
18780
18781 int
18782 main ()
18783 {
18784
18785         int x = openpty((int *)0, (int *)0, (char *)0,
18786                                    (struct termios *)0, (struct winsize *)0);
18787
18788   ;
18789   return 0;
18790 }
18791 _ACEOF
18792 rm -f conftest.$ac_objext conftest$ac_exeext
18793 if { (eval echo "$as_me:18793: \"$ac_link\"") >&5
18794   (eval $ac_link) 2>&5
18795   ac_status=$?
18796   echo "$as_me:18796: \$? = $ac_status" >&5
18797   (exit $ac_status); } &&
18798          { ac_try='test -s conftest$ac_exeext'
18799   { (eval echo "$as_me:18799: \"$ac_try\"") >&5
18800   (eval $ac_try) 2>&5
18801   ac_status=$?
18802   echo "$as_me:18802: \$? = $ac_status" >&5
18803   (exit $ac_status); }; }; then
18804
18805                 cf_cv_func_openpty=$cf_header
18806                 break
18807
18808 else
18809   echo "$as_me: failed program was:" >&5
18810 cat conftest.$ac_ext >&5
18811
18812                 cf_cv_func_openpty=no
18813
18814 fi
18815 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18816         done
18817         LIBS="$cf_save_LIBS"
18818
18819 fi
18820 echo "$as_me:18820: result: $cf_cv_func_openpty" >&5
18821 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18822
18823 if test "$cf_cv_func_openpty" != no ; then
18824
18825 cat >>confdefs.h <<EOF
18826 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18827 EOF
18828
18829 cat >>confdefs.h <<\EOF
18830 #define USE_XTERM_PTY 1
18831 EOF
18832
18833         if test "x$cf_cv_lib_util" = xyes ; then
18834
18835 cf_add_libs="-lutil"
18836 # Filter out duplicates - this happens with badly-designed ".pc" files...
18837 for cf_add_1lib in $TEST_LIBS
18838 do
18839         for cf_add_2lib in $cf_add_libs
18840         do
18841                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18842                 then
18843                         cf_add_1lib=
18844                         break
18845                 fi
18846         done
18847         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18848 done
18849 TEST_LIBS="$cf_add_libs"
18850
18851         fi
18852 fi
18853
18854 if test "$with_hashed_db" != no ; then
18855
18856 cat >>confdefs.h <<\EOF
18857 #define USE_HASHED_DB 1
18858 EOF
18859
18860 case $with_hashed_db in
18861 (yes|*able*)
18862         ;;
18863 (*)
18864         if test -d "$with_hashed_db" ; then
18865
18866 if test -n "$with_hashed_db/include" ; then
18867   for cf_add_incdir in $with_hashed_db/include
18868   do
18869         while test $cf_add_incdir != /usr/include
18870         do
18871           if test -d $cf_add_incdir
18872           then
18873                 cf_have_incdir=no
18874                 if test -n "$CFLAGS$CPPFLAGS" ; then
18875                   # a loop is needed to ensure we can add subdirs of existing dirs
18876                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18877                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18878                           cf_have_incdir=yes; break
18879                         fi
18880                   done
18881                 fi
18882
18883                 if test "$cf_have_incdir" = no ; then
18884                   if test "$cf_add_incdir" = /usr/local/include ; then
18885                         if test "$GCC" = yes
18886                         then
18887                           cf_save_CPPFLAGS=$CPPFLAGS
18888                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18889                           cat >conftest.$ac_ext <<_ACEOF
18890 #line 18890 "configure"
18891 #include "confdefs.h"
18892 #include <stdio.h>
18893 int
18894 main ()
18895 {
18896 printf("Hello")
18897   ;
18898   return 0;
18899 }
18900 _ACEOF
18901 rm -f conftest.$ac_objext
18902 if { (eval echo "$as_me:18902: \"$ac_compile\"") >&5
18903   (eval $ac_compile) 2>&5
18904   ac_status=$?
18905   echo "$as_me:18905: \$? = $ac_status" >&5
18906   (exit $ac_status); } &&
18907          { ac_try='test -s conftest.$ac_objext'
18908   { (eval echo "$as_me:18908: \"$ac_try\"") >&5
18909   (eval $ac_try) 2>&5
18910   ac_status=$?
18911   echo "$as_me:18911: \$? = $ac_status" >&5
18912   (exit $ac_status); }; }; then
18913   :
18914 else
18915   echo "$as_me: failed program was:" >&5
18916 cat conftest.$ac_ext >&5
18917 cf_have_incdir=yes
18918 fi
18919 rm -f conftest.$ac_objext conftest.$ac_ext
18920                           CPPFLAGS=$cf_save_CPPFLAGS
18921                         fi
18922                   fi
18923                 fi
18924
18925                 if test "$cf_have_incdir" = no ; then
18926                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18927
18928 echo "${as_me:-configure}:18928: testing adding $cf_add_incdir to include-path ..." 1>&5
18929
18930                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18931
18932                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18933                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18934                   cf_add_incdir="$cf_top_incdir"
18935                 else
18936                   break
18937                 fi
18938           else
18939                 break
18940           fi
18941         done
18942   done
18943 fi
18944
18945 if test -n "$with_hashed_db/lib" ; then
18946         for cf_add_libdir in $with_hashed_db/lib
18947         do
18948                 if test $cf_add_libdir = /usr/lib ; then
18949                         :
18950                 elif test -d $cf_add_libdir
18951                 then
18952                         cf_have_libdir=no
18953                         if test -n "$LDFLAGS$LIBS" ; then
18954                                 # a loop is needed to ensure we can add subdirs of existing dirs
18955                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
18956                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18957                                                 cf_have_libdir=yes; break
18958                                         fi
18959                                 done
18960                         fi
18961                         if test "$cf_have_libdir" = no ; then
18962                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18963
18964 echo "${as_me:-configure}:18964: testing adding $cf_add_libdir to library-path ..." 1>&5
18965
18966                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18967                         fi
18968                 fi
18969         done
18970 fi
18971
18972         else
18973                 case "$with_hashed_db" in
18974                 (./*|../*|/*)
18975                         { echo "$as_me:18975: WARNING: no such directory $with_hashed_db" >&5
18976 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18977                         ;;
18978                 (*)
18979
18980 cf_search=
18981
18982 test "x$prefix" != "xNONE" && \
18983 test -d "$prefix" && \
18984  {
18985         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18986         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18987         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18988         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18989         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18990         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18991 }
18992
18993 for cf_subdir_prefix in \
18994         /usr \
18995         /usr/local \
18996         /usr/pkg \
18997         /opt \
18998         /opt/local \
18999         $HOME
19000 do
19001
19002 test "x$cf_subdir_prefix" != "x$prefix" && \
19003 test -d "$cf_subdir_prefix" && \
19004 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19005         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
19006         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
19007         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
19008         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
19009         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
19010         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"
19011 }
19012
19013 done
19014
19015         for cf_item in $cf_search
19016         do
19017                 case $cf_item in
19018                 (*/$with_hashed_db)
19019
19020 if test -n "$cf_item" ; then
19021   for cf_add_incdir in $cf_item
19022   do
19023         while test $cf_add_incdir != /usr/include
19024         do
19025           if test -d $cf_add_incdir
19026           then
19027                 cf_have_incdir=no
19028                 if test -n "$CFLAGS$CPPFLAGS" ; then
19029                   # a loop is needed to ensure we can add subdirs of existing dirs
19030                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19031                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19032                           cf_have_incdir=yes; break
19033                         fi
19034                   done
19035                 fi
19036
19037                 if test "$cf_have_incdir" = no ; then
19038                   if test "$cf_add_incdir" = /usr/local/include ; then
19039                         if test "$GCC" = yes
19040                         then
19041                           cf_save_CPPFLAGS=$CPPFLAGS
19042                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19043                           cat >conftest.$ac_ext <<_ACEOF
19044 #line 19044 "configure"
19045 #include "confdefs.h"
19046 #include <stdio.h>
19047 int
19048 main ()
19049 {
19050 printf("Hello")
19051   ;
19052   return 0;
19053 }
19054 _ACEOF
19055 rm -f conftest.$ac_objext
19056 if { (eval echo "$as_me:19056: \"$ac_compile\"") >&5
19057   (eval $ac_compile) 2>&5
19058   ac_status=$?
19059   echo "$as_me:19059: \$? = $ac_status" >&5
19060   (exit $ac_status); } &&
19061          { ac_try='test -s conftest.$ac_objext'
19062   { (eval echo "$as_me:19062: \"$ac_try\"") >&5
19063   (eval $ac_try) 2>&5
19064   ac_status=$?
19065   echo "$as_me:19065: \$? = $ac_status" >&5
19066   (exit $ac_status); }; }; then
19067   :
19068 else
19069   echo "$as_me: failed program was:" >&5
19070 cat conftest.$ac_ext >&5
19071 cf_have_incdir=yes
19072 fi
19073 rm -f conftest.$ac_objext conftest.$ac_ext
19074                           CPPFLAGS=$cf_save_CPPFLAGS
19075                         fi
19076                   fi
19077                 fi
19078
19079                 if test "$cf_have_incdir" = no ; then
19080                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19081
19082 echo "${as_me:-configure}:19082: testing adding $cf_add_incdir to include-path ..." 1>&5
19083
19084                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19085
19086                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19087                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19088                   cf_add_incdir="$cf_top_incdir"
19089                 else
19090                   break
19091                 fi
19092           else
19093                 break
19094           fi
19095         done
19096   done
19097 fi
19098
19099                         ;;
19100                 esac
19101         done
19102
19103 cf_search=
19104
19105 test "x$prefix" != "xNONE" && \
19106 test -d "$prefix" && \
19107  {
19108         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
19109         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
19110         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
19111         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
19112         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
19113         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
19114 }
19115
19116 for cf_subdir_prefix in \
19117         /usr \
19118         /usr/local \
19119         /usr/pkg \
19120         /opt \
19121         /opt/local \
19122         $HOME
19123 do
19124
19125 test "x$cf_subdir_prefix" != "x$prefix" && \
19126 test -d "$cf_subdir_prefix" && \
19127 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19128         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
19129         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
19130         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
19131         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
19132         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
19133         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"
19134 }
19135
19136 done
19137
19138         for cf_item in $cf_search
19139         do
19140                 case $cf_item in
19141                 (*/$with_hashed_db)
19142
19143 if test -n "$cf_item" ; then
19144         for cf_add_libdir in $cf_item
19145         do
19146                 if test $cf_add_libdir = /usr/lib ; then
19147                         :
19148                 elif test -d $cf_add_libdir
19149                 then
19150                         cf_have_libdir=no
19151                         if test -n "$LDFLAGS$LIBS" ; then
19152                                 # a loop is needed to ensure we can add subdirs of existing dirs
19153                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19154                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19155                                                 cf_have_libdir=yes; break
19156                                         fi
19157                                 done
19158                         fi
19159                         if test "$cf_have_libdir" = no ; then
19160                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19161
19162 echo "${as_me:-configure}:19162: testing adding $cf_add_libdir to library-path ..." 1>&5
19163
19164                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19165                         fi
19166                 fi
19167         done
19168 fi
19169
19170                         ;;
19171                 esac
19172         done
19173
19174                         ;;
19175                 esac
19176         fi
19177 esac
19178
19179 echo "$as_me:19179: checking for db.h" >&5
19180 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
19181 if test "${ac_cv_header_db_h+set}" = set; then
19182   echo $ECHO_N "(cached) $ECHO_C" >&6
19183 else
19184   cat >conftest.$ac_ext <<_ACEOF
19185 #line 19185 "configure"
19186 #include "confdefs.h"
19187 #include <db.h>
19188 _ACEOF
19189 if { (eval echo "$as_me:19189: \"$ac_cpp conftest.$ac_ext\"") >&5
19190   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19191   ac_status=$?
19192   egrep -v '^ *\+' conftest.er1 >conftest.err
19193   rm -f conftest.er1
19194   cat conftest.err >&5
19195   echo "$as_me:19195: \$? = $ac_status" >&5
19196   (exit $ac_status); } >/dev/null; then
19197   if test -s conftest.err; then
19198     ac_cpp_err=$ac_c_preproc_warn_flag
19199   else
19200     ac_cpp_err=
19201   fi
19202 else
19203   ac_cpp_err=yes
19204 fi
19205 if test -z "$ac_cpp_err"; then
19206   ac_cv_header_db_h=yes
19207 else
19208   echo "$as_me: failed program was:" >&5
19209   cat conftest.$ac_ext >&5
19210   ac_cv_header_db_h=no
19211 fi
19212 rm -f conftest.err conftest.$ac_ext
19213 fi
19214 echo "$as_me:19214: result: $ac_cv_header_db_h" >&5
19215 echo "${ECHO_T}$ac_cv_header_db_h" >&6
19216 if test $ac_cv_header_db_h = yes; then
19217
19218 echo "$as_me:19218: checking for version of db" >&5
19219 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
19220 if test "${cf_cv_hashed_db_version+set}" = set; then
19221   echo $ECHO_N "(cached) $ECHO_C" >&6
19222 else
19223
19224 cf_cv_hashed_db_version=unknown
19225
19226 for cf_db_version in 1 2 3 4 5 6
19227 do
19228
19229 echo "${as_me:-configure}:19229: testing checking for db version $cf_db_version ..." 1>&5
19230
19231         cat >conftest.$ac_ext <<_ACEOF
19232 #line 19232 "configure"
19233 #include "confdefs.h"
19234
19235 $ac_includes_default
19236 #include <db.h>
19237
19238 #ifdef DB_VERSION_MAJOR
19239         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
19240 #if $cf_db_version == DB_VERSION_MAJOR
19241         /* ok */
19242 #else
19243         make an error
19244 #endif
19245 #else
19246 #if $cf_db_version == 1
19247         /* ok: assuming this is DB 1.8.5 */
19248 #else
19249         make an error
19250 #endif
19251 #endif
19252
19253 int
19254 main ()
19255 {
19256 DBT *foo = 0
19257   ;
19258   return 0;
19259 }
19260 _ACEOF
19261 rm -f conftest.$ac_objext
19262 if { (eval echo "$as_me:19262: \"$ac_compile\"") >&5
19263   (eval $ac_compile) 2>&5
19264   ac_status=$?
19265   echo "$as_me:19265: \$? = $ac_status" >&5
19266   (exit $ac_status); } &&
19267          { ac_try='test -s conftest.$ac_objext'
19268   { (eval echo "$as_me:19268: \"$ac_try\"") >&5
19269   (eval $ac_try) 2>&5
19270   ac_status=$?
19271   echo "$as_me:19271: \$? = $ac_status" >&5
19272   (exit $ac_status); }; }; then
19273
19274         cf_cv_hashed_db_version=$cf_db_version
19275         break
19276
19277 else
19278   echo "$as_me: failed program was:" >&5
19279 cat conftest.$ac_ext >&5
19280 fi
19281 rm -f conftest.$ac_objext conftest.$ac_ext
19282 done
19283
19284 fi
19285 echo "$as_me:19285: result: $cf_cv_hashed_db_version" >&5
19286 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
19287
19288 if test "$cf_cv_hashed_db_version" = unknown ; then
19289         { { echo "$as_me:19289: error: Cannot determine version of db" >&5
19290 echo "$as_me: error: Cannot determine version of db" >&2;}
19291    { (exit 1); exit 1; }; }
19292 else
19293
19294 echo "$as_me:19294: checking for db libraries" >&5
19295 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
19296 if test "${cf_cv_hashed_db_libs+set}" = set; then
19297   echo $ECHO_N "(cached) $ECHO_C" >&6
19298 else
19299
19300 cf_cv_hashed_db_libs=unknown
19301 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
19302 do
19303         cf_save_libs="$LIBS"
19304         if test -n "$cf_db_libs"; then
19305
19306 cf_add_libs="-l$cf_db_libs"
19307 # Filter out duplicates - this happens with badly-designed ".pc" files...
19308 for cf_add_1lib in $LIBS
19309 do
19310         for cf_add_2lib in $cf_add_libs
19311         do
19312                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19313                 then
19314                         cf_add_1lib=
19315                         break
19316                 fi
19317         done
19318         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19319 done
19320 LIBS="$cf_add_libs"
19321
19322         fi
19323
19324 echo "${as_me:-configure}:19324: testing checking for library "$cf_db_libs" ..." 1>&5
19325
19326         cat >conftest.$ac_ext <<_ACEOF
19327 #line 19327 "configure"
19328 #include "confdefs.h"
19329
19330 $ac_includes_default
19331 #include <db.h>
19332
19333 int
19334 main ()
19335 {
19336
19337         char *path = "/tmp/foo";
19338 #ifdef DB_VERSION_MAJOR
19339 #if DB_VERSION_MAJOR >= 4
19340         DB *result = 0;
19341         db_create(&result, NULL, 0);
19342         result->open(result,
19343                 NULL,
19344                 path,
19345                 path,
19346                 DB_HASH,
19347                 DB_CREATE,
19348                 0644);
19349 #elif DB_VERSION_MAJOR >= 3
19350         DB *result = 0;
19351         db_create(&result, NULL, 0);
19352         result->open(result,
19353                 path,
19354                 path,
19355                 DB_HASH,
19356                 DB_CREATE,
19357                 0644);
19358 #elif DB_VERSION_MAJOR >= 2
19359         DB *result = 0;
19360         db_open(path,
19361                 DB_HASH,
19362                 DB_CREATE,
19363                 0644,
19364                 (DB_ENV *) 0,
19365                 (DB_INFO *) 0,
19366                 &result);
19367 #endif /* DB_VERSION_MAJOR */
19368 #else
19369         DB *result = dbopen(path,
19370                      2,
19371                      0644,
19372                      DB_HASH,
19373                      0);
19374 #endif
19375         ${cf_cv_main_return:-return}(result != 0)
19376
19377   ;
19378   return 0;
19379 }
19380 _ACEOF
19381 rm -f conftest.$ac_objext conftest$ac_exeext
19382 if { (eval echo "$as_me:19382: \"$ac_link\"") >&5
19383   (eval $ac_link) 2>&5
19384   ac_status=$?
19385   echo "$as_me:19385: \$? = $ac_status" >&5
19386   (exit $ac_status); } &&
19387          { ac_try='test -s conftest$ac_exeext'
19388   { (eval echo "$as_me:19388: \"$ac_try\"") >&5
19389   (eval $ac_try) 2>&5
19390   ac_status=$?
19391   echo "$as_me:19391: \$? = $ac_status" >&5
19392   (exit $ac_status); }; }; then
19393
19394         if test -n "$cf_db_libs" ; then
19395                 cf_cv_hashed_db_libs=$cf_db_libs
19396         else
19397                 cf_cv_hashed_db_libs=default
19398         fi
19399         LIBS="$cf_save_libs"
19400         break
19401
19402 else
19403   echo "$as_me: failed program was:" >&5
19404 cat conftest.$ac_ext >&5
19405 fi
19406 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19407         LIBS="$cf_save_libs"
19408 done
19409
19410 fi
19411 echo "$as_me:19411: result: $cf_cv_hashed_db_libs" >&5
19412 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19413
19414         if test "$cf_cv_hashed_db_libs" = unknown ; then
19415                 { { echo "$as_me:19415: error: Cannot determine library for db" >&5
19416 echo "$as_me: error: Cannot determine library for db" >&2;}
19417    { (exit 1); exit 1; }; }
19418         elif test "$cf_cv_hashed_db_libs" != default ; then
19419
19420 cf_add_libs="-l$cf_cv_hashed_db_libs"
19421 # Filter out duplicates - this happens with badly-designed ".pc" files...
19422 for cf_add_1lib in $LIBS
19423 do
19424         for cf_add_2lib in $cf_add_libs
19425         do
19426                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19427                 then
19428                         cf_add_1lib=
19429                         break
19430                 fi
19431         done
19432         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19433 done
19434 LIBS="$cf_add_libs"
19435
19436         fi
19437 fi
19438
19439 else
19440
19441         { { echo "$as_me:19441: error: Cannot find db.h" >&5
19442 echo "$as_me: error: Cannot find db.h" >&2;}
19443    { (exit 1); exit 1; }; }
19444
19445 fi
19446
19447 fi
19448
19449 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19450         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19451         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19452 fi
19453
19454 # Just in case, check if the C compiler has a bool type.
19455
19456 echo "$as_me:19456: checking if we should include stdbool.h" >&5
19457 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19458
19459 if test "${cf_cv_header_stdbool_h+set}" = set; then
19460   echo $ECHO_N "(cached) $ECHO_C" >&6
19461 else
19462
19463         cat >conftest.$ac_ext <<_ACEOF
19464 #line 19464 "configure"
19465 #include "confdefs.h"
19466
19467 int
19468 main ()
19469 {
19470 bool foo = false
19471   ;
19472   return 0;
19473 }
19474 _ACEOF
19475 rm -f conftest.$ac_objext
19476 if { (eval echo "$as_me:19476: \"$ac_compile\"") >&5
19477   (eval $ac_compile) 2>&5
19478   ac_status=$?
19479   echo "$as_me:19479: \$? = $ac_status" >&5
19480   (exit $ac_status); } &&
19481          { ac_try='test -s conftest.$ac_objext'
19482   { (eval echo "$as_me:19482: \"$ac_try\"") >&5
19483   (eval $ac_try) 2>&5
19484   ac_status=$?
19485   echo "$as_me:19485: \$? = $ac_status" >&5
19486   (exit $ac_status); }; }; then
19487   cf_cv_header_stdbool_h=0
19488 else
19489   echo "$as_me: failed program was:" >&5
19490 cat conftest.$ac_ext >&5
19491 cat >conftest.$ac_ext <<_ACEOF
19492 #line 19492 "configure"
19493 #include "confdefs.h"
19494
19495 #ifndef __BEOS__
19496 #include <stdbool.h>
19497 #endif
19498
19499 int
19500 main ()
19501 {
19502 bool foo = false
19503   ;
19504   return 0;
19505 }
19506 _ACEOF
19507 rm -f conftest.$ac_objext
19508 if { (eval echo "$as_me:19508: \"$ac_compile\"") >&5
19509   (eval $ac_compile) 2>&5
19510   ac_status=$?
19511   echo "$as_me:19511: \$? = $ac_status" >&5
19512   (exit $ac_status); } &&
19513          { ac_try='test -s conftest.$ac_objext'
19514   { (eval echo "$as_me:19514: \"$ac_try\"") >&5
19515   (eval $ac_try) 2>&5
19516   ac_status=$?
19517   echo "$as_me:19517: \$? = $ac_status" >&5
19518   (exit $ac_status); }; }; then
19519   cf_cv_header_stdbool_h=1
19520 else
19521   echo "$as_me: failed program was:" >&5
19522 cat conftest.$ac_ext >&5
19523 cf_cv_header_stdbool_h=0
19524 fi
19525 rm -f conftest.$ac_objext conftest.$ac_ext
19526 fi
19527 rm -f conftest.$ac_objext conftest.$ac_ext
19528 fi
19529
19530 if test "$cf_cv_header_stdbool_h" = 1
19531 then    echo "$as_me:19531: result: yes" >&5
19532 echo "${ECHO_T}yes" >&6
19533 else    echo "$as_me:19533: result: no" >&5
19534 echo "${ECHO_T}no" >&6
19535 fi
19536
19537 echo "$as_me:19537: checking for builtin bool type" >&5
19538 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19539
19540 if test "${cf_cv_cc_bool_type+set}" = set; then
19541   echo $ECHO_N "(cached) $ECHO_C" >&6
19542 else
19543
19544         cat >conftest.$ac_ext <<_ACEOF
19545 #line 19545 "configure"
19546 #include "confdefs.h"
19547
19548 #include <stdio.h>
19549 #include <sys/types.h>
19550
19551 int
19552 main ()
19553 {
19554 bool x = false
19555   ;
19556   return 0;
19557 }
19558 _ACEOF
19559 rm -f conftest.$ac_objext
19560 if { (eval echo "$as_me:19560: \"$ac_compile\"") >&5
19561   (eval $ac_compile) 2>&5
19562   ac_status=$?
19563   echo "$as_me:19563: \$? = $ac_status" >&5
19564   (exit $ac_status); } &&
19565          { ac_try='test -s conftest.$ac_objext'
19566   { (eval echo "$as_me:19566: \"$ac_try\"") >&5
19567   (eval $ac_try) 2>&5
19568   ac_status=$?
19569   echo "$as_me:19569: \$? = $ac_status" >&5
19570   (exit $ac_status); }; }; then
19571   cf_cv_cc_bool_type=1
19572 else
19573   echo "$as_me: failed program was:" >&5
19574 cat conftest.$ac_ext >&5
19575 cf_cv_cc_bool_type=0
19576 fi
19577 rm -f conftest.$ac_objext conftest.$ac_ext
19578
19579 fi
19580
19581 if test "$cf_cv_cc_bool_type" = 1
19582 then    echo "$as_me:19582: result: yes" >&5
19583 echo "${ECHO_T}yes" >&6
19584 else    echo "$as_me:19584: result: no" >&5
19585 echo "${ECHO_T}no" >&6
19586 fi
19587
19588 # Check for C++ compiler characteristics (and ensure that it's there!)
19589 if test -n "$CXX" ; then
19590         ac_ext=cc
19591 ac_cpp='$CXXCPP $CPPFLAGS'
19592 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19593 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19594 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19595 ac_main_return=return
19596
19597 if test -n "$GXX" ; then
19598
19599         cf_save="$LIBS"
19600         LIBS="$LIBS $CXXLIBS"
19601         echo "$as_me:19601: checking if we already have C++ library" >&5
19602 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
19603         cat >conftest.$ac_ext <<_ACEOF
19604 #line 19604 "configure"
19605 #include "confdefs.h"
19606
19607                         #include <iostream>
19608 int
19609 main ()
19610 {
19611
19612                         std::cout << "Hello World!" << std::endl;
19613   ;
19614   return 0;
19615 }
19616 _ACEOF
19617 rm -f conftest.$ac_objext conftest$ac_exeext
19618 if { (eval echo "$as_me:19618: \"$ac_link\"") >&5
19619   (eval $ac_link) 2>&5
19620   ac_status=$?
19621   echo "$as_me:19621: \$? = $ac_status" >&5
19622   (exit $ac_status); } &&
19623          { ac_try='test -s conftest$ac_exeext'
19624   { (eval echo "$as_me:19624: \"$ac_try\"") >&5
19625   (eval $ac_try) 2>&5
19626   ac_status=$?
19627   echo "$as_me:19627: \$? = $ac_status" >&5
19628   (exit $ac_status); }; }; then
19629   cf_have_libstdcpp=yes
19630 else
19631   echo "$as_me: failed program was:" >&5
19632 cat conftest.$ac_ext >&5
19633 cf_have_libstdcpp=no
19634 fi
19635 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19636         echo "$as_me:19636: result: $cf_have_libstdcpp" >&5
19637 echo "${ECHO_T}$cf_have_libstdcpp" >&6
19638         LIBS="$cf_save"
19639
19640         if test $cf_have_libstdcpp != yes
19641         then
19642                 case $cf_cv_system_name in
19643                 (os2*)
19644                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
19645                                 cf_stdcpp_libname=stdcpp
19646                         else
19647                                 cf_stdcpp_libname=stdc++
19648                         fi
19649                         ;;
19650                 (*)
19651                         cf_stdcpp_libname=stdc++
19652                         ;;
19653                 esac
19654
19655                 echo "$as_me:19655: checking for library $cf_stdcpp_libname" >&5
19656 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19657 if test "${cf_cv_libstdcpp+set}" = set; then
19658   echo $ECHO_N "(cached) $ECHO_C" >&6
19659 else
19660
19661                         cf_save="$LIBS"
19662                         LIBS="$LIBS $CXXLIBS"
19663
19664 cf_add_libs="-l$cf_stdcpp_libname"
19665 # Filter out duplicates - this happens with badly-designed ".pc" files...
19666 for cf_add_1lib in $LIBS
19667 do
19668         for cf_add_2lib in $cf_add_libs
19669         do
19670                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19671                 then
19672                         cf_add_1lib=
19673                         break
19674                 fi
19675         done
19676         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19677 done
19678 LIBS="$cf_add_libs"
19679
19680                 cat >conftest.$ac_ext <<_ACEOF
19681 #line 19681 "configure"
19682 #include "confdefs.h"
19683
19684                                 #include <iostream>
19685 int
19686 main ()
19687 {
19688
19689                                 std::cout << "Hello World!" << std::endl;
19690   ;
19691   return 0;
19692 }
19693 _ACEOF
19694 rm -f conftest.$ac_objext conftest$ac_exeext
19695 if { (eval echo "$as_me:19695: \"$ac_link\"") >&5
19696   (eval $ac_link) 2>&5
19697   ac_status=$?
19698   echo "$as_me:19698: \$? = $ac_status" >&5
19699   (exit $ac_status); } &&
19700          { ac_try='test -s conftest$ac_exeext'
19701   { (eval echo "$as_me:19701: \"$ac_try\"") >&5
19702   (eval $ac_try) 2>&5
19703   ac_status=$?
19704   echo "$as_me:19704: \$? = $ac_status" >&5
19705   (exit $ac_status); }; }; then
19706   cf_cv_libstdcpp=yes
19707 else
19708   echo "$as_me: failed program was:" >&5
19709 cat conftest.$ac_ext >&5
19710 cf_cv_libstdcpp=no
19711 fi
19712 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19713                         LIBS="$cf_save"
19714
19715 fi
19716 echo "$as_me:19716: result: $cf_cv_libstdcpp" >&5
19717 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19718                 test "$cf_cv_libstdcpp" = yes && {
19719 cf_add_libs="-l$cf_stdcpp_libname"
19720 # Filter out duplicates - this happens with badly-designed ".pc" files...
19721 for cf_add_1lib in $CXXLIBS
19722 do
19723         for cf_add_2lib in $cf_add_libs
19724         do
19725                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19726                 then
19727                         cf_add_1lib=
19728                         break
19729                 fi
19730         done
19731         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19732 done
19733 CXXLIBS="$cf_add_libs"
19734  }
19735         fi
19736 fi
19737
19738         echo "$as_me:19738: checking whether $CXX understands -c and -o together" >&5
19739 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19740 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19741   echo $ECHO_N "(cached) $ECHO_C" >&6
19742 else
19743
19744 cat > conftest.$ac_ext <<CF_EOF
19745 int main()
19746 {
19747         ${cf_cv_main_return:-return}(0);
19748 }
19749 CF_EOF
19750 # We do the test twice because some compilers refuse to overwrite an
19751 # existing .o file with -o, though they will create one.
19752 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19753 if { (eval echo "$as_me:19753: \"$ac_try\"") >&5
19754   (eval $ac_try) 2>&5
19755   ac_status=$?
19756   echo "$as_me:19756: \$? = $ac_status" >&5
19757   (exit $ac_status); } &&
19758   test -f conftest2.$ac_objext && { (eval echo "$as_me:19758: \"$ac_try\"") >&5
19759   (eval $ac_try) 2>&5
19760   ac_status=$?
19761   echo "$as_me:19761: \$? = $ac_status" >&5
19762   (exit $ac_status); };
19763 then
19764   eval cf_cv_prog_CXX_c_o=yes
19765 else
19766   eval cf_cv_prog_CXX_c_o=no
19767 fi
19768 rm -rf conftest*
19769
19770 fi
19771 if test $cf_cv_prog_CXX_c_o = yes; then
19772   echo "$as_me:19772: result: yes" >&5
19773 echo "${ECHO_T}yes" >&6
19774 else
19775   echo "$as_me:19775: result: no" >&5
19776 echo "${ECHO_T}no" >&6
19777 fi
19778
19779         case $GXX_VERSION in
19780         (1*|2.0-6*)
19781                 cf_cxx_library=yes
19782                 ;;
19783         (*-2.7*|2.7*)
19784
19785 cf_cxx_library=unknown
19786 case $cf_cv_system_name in
19787 (os2*)
19788         cf_gpp_libname=gpp
19789         ;;
19790 (*)
19791         cf_gpp_libname=g++
19792         ;;
19793 esac
19794 if test "$GXX" = yes; then
19795         echo "$as_me:19795: checking for lib$cf_gpp_libname" >&5
19796 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19797         cf_save="$LIBS"
19798
19799 cf_add_libs="-l$cf_gpp_libname"
19800 # Filter out duplicates - this happens with badly-designed ".pc" files...
19801 for cf_add_1lib in $LIBS
19802 do
19803         for cf_add_2lib in $cf_add_libs
19804         do
19805                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19806                 then
19807                         cf_add_1lib=
19808                         break
19809                 fi
19810         done
19811         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19812 done
19813 LIBS="$cf_add_libs"
19814
19815         cat >conftest.$ac_ext <<_ACEOF
19816 #line 19816 "configure"
19817 #include "confdefs.h"
19818
19819 #include <$cf_gpp_libname/builtin.h>
19820
19821 int
19822 main ()
19823 {
19824 two_arg_error_handler_t foo2 = lib_error_handler
19825   ;
19826   return 0;
19827 }
19828 _ACEOF
19829 rm -f conftest.$ac_objext conftest$ac_exeext
19830 if { (eval echo "$as_me:19830: \"$ac_link\"") >&5
19831   (eval $ac_link) 2>&5
19832   ac_status=$?
19833   echo "$as_me:19833: \$? = $ac_status" >&5
19834   (exit $ac_status); } &&
19835          { ac_try='test -s conftest$ac_exeext'
19836   { (eval echo "$as_me:19836: \"$ac_try\"") >&5
19837   (eval $ac_try) 2>&5
19838   ac_status=$?
19839   echo "$as_me:19839: \$? = $ac_status" >&5
19840   (exit $ac_status); }; }; then
19841   cf_cxx_library=yes
19842
19843 cf_add_libs="-l$cf_gpp_libname"
19844 # Filter out duplicates - this happens with badly-designed ".pc" files...
19845 for cf_add_1lib in $CXXLIBS
19846 do
19847         for cf_add_2lib in $cf_add_libs
19848         do
19849                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19850                 then
19851                         cf_add_1lib=
19852                         break
19853                 fi
19854         done
19855         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19856 done
19857 CXXLIBS="$cf_add_libs"
19858
19859          if test "$cf_gpp_libname" = cpp ; then
19860
19861 cat >>confdefs.h <<\EOF
19862 #define HAVE_GPP_BUILTIN_H 1
19863 EOF
19864
19865          else
19866
19867 cat >>confdefs.h <<\EOF
19868 #define HAVE_GXX_BUILTIN_H 1
19869 EOF
19870
19871          fi
19872 else
19873   echo "$as_me: failed program was:" >&5
19874 cat conftest.$ac_ext >&5
19875 cat >conftest.$ac_ext <<_ACEOF
19876 #line 19876 "configure"
19877 #include "confdefs.h"
19878
19879 #include <builtin.h>
19880
19881 int
19882 main ()
19883 {
19884 two_arg_error_handler_t foo2 = lib_error_handler
19885   ;
19886   return 0;
19887 }
19888 _ACEOF
19889 rm -f conftest.$ac_objext conftest$ac_exeext
19890 if { (eval echo "$as_me:19890: \"$ac_link\"") >&5
19891   (eval $ac_link) 2>&5
19892   ac_status=$?
19893   echo "$as_me:19893: \$? = $ac_status" >&5
19894   (exit $ac_status); } &&
19895          { ac_try='test -s conftest$ac_exeext'
19896   { (eval echo "$as_me:19896: \"$ac_try\"") >&5
19897   (eval $ac_try) 2>&5
19898   ac_status=$?
19899   echo "$as_me:19899: \$? = $ac_status" >&5
19900   (exit $ac_status); }; }; then
19901   cf_cxx_library=yes
19902
19903 cf_add_libs="-l$cf_gpp_libname"
19904 # Filter out duplicates - this happens with badly-designed ".pc" files...
19905 for cf_add_1lib in $CXXLIBS
19906 do
19907         for cf_add_2lib in $cf_add_libs
19908         do
19909                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19910                 then
19911                         cf_add_1lib=
19912                         break
19913                 fi
19914         done
19915         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19916 done
19917 CXXLIBS="$cf_add_libs"
19918
19919 cat >>confdefs.h <<\EOF
19920 #define HAVE_BUILTIN_H 1
19921 EOF
19922
19923 else
19924   echo "$as_me: failed program was:" >&5
19925 cat conftest.$ac_ext >&5
19926 cf_cxx_library=no
19927 fi
19928 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19929 fi
19930 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19931         LIBS="$cf_save"
19932         echo "$as_me:19932: result: $cf_cxx_library" >&5
19933 echo "${ECHO_T}$cf_cxx_library" >&6
19934 fi
19935
19936                 ;;
19937         (*)
19938                 cf_cxx_library=no
19939                 ;;
19940         esac
19941
19942         ac_ext=cc
19943 ac_cpp='$CXXCPP $CPPFLAGS'
19944 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19945 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19946 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19947 ac_main_return=return
19948 echo "$as_me:19948: checking how to run the C++ preprocessor" >&5
19949 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19950 if test -z "$CXXCPP"; then
19951   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19952   echo $ECHO_N "(cached) $ECHO_C" >&6
19953 else
19954       # Double quotes because CXXCPP needs to be expanded
19955     for CXXCPP in "$CXX -E" "/lib/cpp"
19956     do
19957       ac_preproc_ok=false
19958 for ac_cxx_preproc_warn_flag in '' yes
19959 do
19960   # Use a header file that comes with gcc, so configuring glibc
19961   # with a fresh cross-compiler works.
19962   # On the NeXT, cc -E runs the code through the compiler's parser,
19963   # not just through cpp. "Syntax error" is here to catch this case.
19964   cat >conftest.$ac_ext <<_ACEOF
19965 #line 19965 "configure"
19966 #include "confdefs.h"
19967 #include <assert.h>
19968                      Syntax error
19969 _ACEOF
19970 if { (eval echo "$as_me:19970: \"$ac_cpp conftest.$ac_ext\"") >&5
19971   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19972   ac_status=$?
19973   egrep -v '^ *\+' conftest.er1 >conftest.err
19974   rm -f conftest.er1
19975   cat conftest.err >&5
19976   echo "$as_me:19976: \$? = $ac_status" >&5
19977   (exit $ac_status); } >/dev/null; then
19978   if test -s conftest.err; then
19979     ac_cpp_err=$ac_cxx_preproc_warn_flag
19980   else
19981     ac_cpp_err=
19982   fi
19983 else
19984   ac_cpp_err=yes
19985 fi
19986 if test -z "$ac_cpp_err"; then
19987   :
19988 else
19989   echo "$as_me: failed program was:" >&5
19990   cat conftest.$ac_ext >&5
19991   # Broken: fails on valid input.
19992 continue
19993 fi
19994 rm -f conftest.err conftest.$ac_ext
19995
19996   # OK, works on sane cases.  Now check whether non-existent headers
19997   # can be detected and how.
19998   cat >conftest.$ac_ext <<_ACEOF
19999 #line 19999 "configure"
20000 #include "confdefs.h"
20001 #include <ac_nonexistent.h>
20002 _ACEOF
20003 if { (eval echo "$as_me:20003: \"$ac_cpp conftest.$ac_ext\"") >&5
20004   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20005   ac_status=$?
20006   egrep -v '^ *\+' conftest.er1 >conftest.err
20007   rm -f conftest.er1
20008   cat conftest.err >&5
20009   echo "$as_me:20009: \$? = $ac_status" >&5
20010   (exit $ac_status); } >/dev/null; then
20011   if test -s conftest.err; then
20012     ac_cpp_err=$ac_cxx_preproc_warn_flag
20013   else
20014     ac_cpp_err=
20015   fi
20016 else
20017   ac_cpp_err=yes
20018 fi
20019 if test -z "$ac_cpp_err"; then
20020   # Broken: success on invalid input.
20021 continue
20022 else
20023   echo "$as_me: failed program was:" >&5
20024   cat conftest.$ac_ext >&5
20025   # Passes both tests.
20026 ac_preproc_ok=:
20027 break
20028 fi
20029 rm -f conftest.err conftest.$ac_ext
20030
20031 done
20032 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20033 rm -f conftest.err conftest.$ac_ext
20034 if $ac_preproc_ok; then
20035   break
20036 fi
20037
20038     done
20039     ac_cv_prog_CXXCPP=$CXXCPP
20040
20041 fi
20042   CXXCPP=$ac_cv_prog_CXXCPP
20043 else
20044   ac_cv_prog_CXXCPP=$CXXCPP
20045 fi
20046 echo "$as_me:20046: result: $CXXCPP" >&5
20047 echo "${ECHO_T}$CXXCPP" >&6
20048 ac_preproc_ok=false
20049 for ac_cxx_preproc_warn_flag in '' yes
20050 do
20051   # Use a header file that comes with gcc, so configuring glibc
20052   # with a fresh cross-compiler works.
20053   # On the NeXT, cc -E runs the code through the compiler's parser,
20054   # not just through cpp. "Syntax error" is here to catch this case.
20055   cat >conftest.$ac_ext <<_ACEOF
20056 #line 20056 "configure"
20057 #include "confdefs.h"
20058 #include <assert.h>
20059                      Syntax error
20060 _ACEOF
20061 if { (eval echo "$as_me:20061: \"$ac_cpp conftest.$ac_ext\"") >&5
20062   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20063   ac_status=$?
20064   egrep -v '^ *\+' conftest.er1 >conftest.err
20065   rm -f conftest.er1
20066   cat conftest.err >&5
20067   echo "$as_me:20067: \$? = $ac_status" >&5
20068   (exit $ac_status); } >/dev/null; then
20069   if test -s conftest.err; then
20070     ac_cpp_err=$ac_cxx_preproc_warn_flag
20071   else
20072     ac_cpp_err=
20073   fi
20074 else
20075   ac_cpp_err=yes
20076 fi
20077 if test -z "$ac_cpp_err"; then
20078   :
20079 else
20080   echo "$as_me: failed program was:" >&5
20081   cat conftest.$ac_ext >&5
20082   # Broken: fails on valid input.
20083 continue
20084 fi
20085 rm -f conftest.err conftest.$ac_ext
20086
20087   # OK, works on sane cases.  Now check whether non-existent headers
20088   # can be detected and how.
20089   cat >conftest.$ac_ext <<_ACEOF
20090 #line 20090 "configure"
20091 #include "confdefs.h"
20092 #include <ac_nonexistent.h>
20093 _ACEOF
20094 if { (eval echo "$as_me:20094: \"$ac_cpp conftest.$ac_ext\"") >&5
20095   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20096   ac_status=$?
20097   egrep -v '^ *\+' conftest.er1 >conftest.err
20098   rm -f conftest.er1
20099   cat conftest.err >&5
20100   echo "$as_me:20100: \$? = $ac_status" >&5
20101   (exit $ac_status); } >/dev/null; then
20102   if test -s conftest.err; then
20103     ac_cpp_err=$ac_cxx_preproc_warn_flag
20104   else
20105     ac_cpp_err=
20106   fi
20107 else
20108   ac_cpp_err=yes
20109 fi
20110 if test -z "$ac_cpp_err"; then
20111   # Broken: success on invalid input.
20112 continue
20113 else
20114   echo "$as_me: failed program was:" >&5
20115   cat conftest.$ac_ext >&5
20116   # Passes both tests.
20117 ac_preproc_ok=:
20118 break
20119 fi
20120 rm -f conftest.err conftest.$ac_ext
20121
20122 done
20123 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20124 rm -f conftest.err conftest.$ac_ext
20125 if $ac_preproc_ok; then
20126   :
20127 else
20128   { { echo "$as_me:20128: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
20129 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
20130    { (exit 1); exit 1; }; }
20131 fi
20132
20133 ac_ext=cc
20134 ac_cpp='$CXXCPP $CPPFLAGS'
20135 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20136 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20137 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20138 ac_main_return=return
20139
20140 for ac_header in typeinfo
20141 do
20142 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20143 echo "$as_me:20143: checking for $ac_header" >&5
20144 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20145 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20146   echo $ECHO_N "(cached) $ECHO_C" >&6
20147 else
20148   cat >conftest.$ac_ext <<_ACEOF
20149 #line 20149 "configure"
20150 #include "confdefs.h"
20151 #include <$ac_header>
20152 _ACEOF
20153 if { (eval echo "$as_me:20153: \"$ac_cpp conftest.$ac_ext\"") >&5
20154   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20155   ac_status=$?
20156   egrep -v '^ *\+' conftest.er1 >conftest.err
20157   rm -f conftest.er1
20158   cat conftest.err >&5
20159   echo "$as_me:20159: \$? = $ac_status" >&5
20160   (exit $ac_status); } >/dev/null; then
20161   if test -s conftest.err; then
20162     ac_cpp_err=$ac_cxx_preproc_warn_flag
20163   else
20164     ac_cpp_err=
20165   fi
20166 else
20167   ac_cpp_err=yes
20168 fi
20169 if test -z "$ac_cpp_err"; then
20170   eval "$as_ac_Header=yes"
20171 else
20172   echo "$as_me: failed program was:" >&5
20173   cat conftest.$ac_ext >&5
20174   eval "$as_ac_Header=no"
20175 fi
20176 rm -f conftest.err conftest.$ac_ext
20177 fi
20178 echo "$as_me:20178: result: `eval echo '${'$as_ac_Header'}'`" >&5
20179 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20180 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20181   cat >>confdefs.h <<EOF
20182 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20183 EOF
20184
20185 fi
20186 done
20187
20188 for ac_header in iostream
20189 do
20190 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20191 echo "$as_me:20191: checking for $ac_header" >&5
20192 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20193 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20194   echo $ECHO_N "(cached) $ECHO_C" >&6
20195 else
20196   cat >conftest.$ac_ext <<_ACEOF
20197 #line 20197 "configure"
20198 #include "confdefs.h"
20199 #include <$ac_header>
20200 _ACEOF
20201 if { (eval echo "$as_me:20201: \"$ac_cpp conftest.$ac_ext\"") >&5
20202   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20203   ac_status=$?
20204   egrep -v '^ *\+' conftest.er1 >conftest.err
20205   rm -f conftest.er1
20206   cat conftest.err >&5
20207   echo "$as_me:20207: \$? = $ac_status" >&5
20208   (exit $ac_status); } >/dev/null; then
20209   if test -s conftest.err; then
20210     ac_cpp_err=$ac_cxx_preproc_warn_flag
20211   else
20212     ac_cpp_err=
20213   fi
20214 else
20215   ac_cpp_err=yes
20216 fi
20217 if test -z "$ac_cpp_err"; then
20218   eval "$as_ac_Header=yes"
20219 else
20220   echo "$as_me: failed program was:" >&5
20221   cat conftest.$ac_ext >&5
20222   eval "$as_ac_Header=no"
20223 fi
20224 rm -f conftest.err conftest.$ac_ext
20225 fi
20226 echo "$as_me:20226: result: `eval echo '${'$as_ac_Header'}'`" >&5
20227 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20228 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20229   cat >>confdefs.h <<EOF
20230 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20231 EOF
20232
20233 fi
20234 done
20235
20236 if test x"$ac_cv_header_iostream" = xyes ; then
20237         echo "$as_me:20237: checking if iostream uses std-namespace" >&5
20238 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
20239         cat >conftest.$ac_ext <<_ACEOF
20240 #line 20240 "configure"
20241 #include "confdefs.h"
20242
20243 #include <iostream>
20244 using std::endl;
20245 using std::cerr;
20246 int
20247 main ()
20248 {
20249
20250 cerr << "testing" << endl;
20251
20252   ;
20253   return 0;
20254 }
20255 _ACEOF
20256 rm -f conftest.$ac_objext
20257 if { (eval echo "$as_me:20257: \"$ac_compile\"") >&5
20258   (eval $ac_compile) 2>&5
20259   ac_status=$?
20260   echo "$as_me:20260: \$? = $ac_status" >&5
20261   (exit $ac_status); } &&
20262          { ac_try='test -s conftest.$ac_objext'
20263   { (eval echo "$as_me:20263: \"$ac_try\"") >&5
20264   (eval $ac_try) 2>&5
20265   ac_status=$?
20266   echo "$as_me:20266: \$? = $ac_status" >&5
20267   (exit $ac_status); }; }; then
20268   cf_iostream_namespace=yes
20269 else
20270   echo "$as_me: failed program was:" >&5
20271 cat conftest.$ac_ext >&5
20272 cf_iostream_namespace=no
20273 fi
20274 rm -f conftest.$ac_objext conftest.$ac_ext
20275         echo "$as_me:20275: result: $cf_iostream_namespace" >&5
20276 echo "${ECHO_T}$cf_iostream_namespace" >&6
20277         if test "$cf_iostream_namespace" = yes ; then
20278
20279 cat >>confdefs.h <<\EOF
20280 #define IOSTREAM_NAMESPACE 1
20281 EOF
20282
20283         fi
20284 fi
20285
20286 echo "$as_me:20286: checking if we should include stdbool.h" >&5
20287 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20288
20289 if test "${cf_cv_header_stdbool_h+set}" = set; then
20290   echo $ECHO_N "(cached) $ECHO_C" >&6
20291 else
20292
20293         cat >conftest.$ac_ext <<_ACEOF
20294 #line 20294 "configure"
20295 #include "confdefs.h"
20296
20297 int
20298 main ()
20299 {
20300 bool foo = false
20301   ;
20302   return 0;
20303 }
20304 _ACEOF
20305 rm -f conftest.$ac_objext
20306 if { (eval echo "$as_me:20306: \"$ac_compile\"") >&5
20307   (eval $ac_compile) 2>&5
20308   ac_status=$?
20309   echo "$as_me:20309: \$? = $ac_status" >&5
20310   (exit $ac_status); } &&
20311          { ac_try='test -s conftest.$ac_objext'
20312   { (eval echo "$as_me:20312: \"$ac_try\"") >&5
20313   (eval $ac_try) 2>&5
20314   ac_status=$?
20315   echo "$as_me:20315: \$? = $ac_status" >&5
20316   (exit $ac_status); }; }; then
20317   cf_cv_header_stdbool_h=0
20318 else
20319   echo "$as_me: failed program was:" >&5
20320 cat conftest.$ac_ext >&5
20321 cat >conftest.$ac_ext <<_ACEOF
20322 #line 20322 "configure"
20323 #include "confdefs.h"
20324
20325 #ifndef __BEOS__
20326 #include <stdbool.h>
20327 #endif
20328
20329 int
20330 main ()
20331 {
20332 bool foo = false
20333   ;
20334   return 0;
20335 }
20336 _ACEOF
20337 rm -f conftest.$ac_objext
20338 if { (eval echo "$as_me:20338: \"$ac_compile\"") >&5
20339   (eval $ac_compile) 2>&5
20340   ac_status=$?
20341   echo "$as_me:20341: \$? = $ac_status" >&5
20342   (exit $ac_status); } &&
20343          { ac_try='test -s conftest.$ac_objext'
20344   { (eval echo "$as_me:20344: \"$ac_try\"") >&5
20345   (eval $ac_try) 2>&5
20346   ac_status=$?
20347   echo "$as_me:20347: \$? = $ac_status" >&5
20348   (exit $ac_status); }; }; then
20349   cf_cv_header_stdbool_h=1
20350 else
20351   echo "$as_me: failed program was:" >&5
20352 cat conftest.$ac_ext >&5
20353 cf_cv_header_stdbool_h=0
20354 fi
20355 rm -f conftest.$ac_objext conftest.$ac_ext
20356 fi
20357 rm -f conftest.$ac_objext conftest.$ac_ext
20358 fi
20359
20360 if test "$cf_cv_header_stdbool_h" = 1
20361 then    echo "$as_me:20361: result: yes" >&5
20362 echo "${ECHO_T}yes" >&6
20363 else    echo "$as_me:20363: result: no" >&5
20364 echo "${ECHO_T}no" >&6
20365 fi
20366
20367 echo "$as_me:20367: checking for builtin bool type" >&5
20368 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20369
20370 if test "${cf_cv_builtin_bool+set}" = set; then
20371   echo $ECHO_N "(cached) $ECHO_C" >&6
20372 else
20373
20374         cat >conftest.$ac_ext <<_ACEOF
20375 #line 20375 "configure"
20376 #include "confdefs.h"
20377
20378 #include <stdio.h>
20379 #include <sys/types.h>
20380
20381 int
20382 main ()
20383 {
20384 bool x = false
20385   ;
20386   return 0;
20387 }
20388 _ACEOF
20389 rm -f conftest.$ac_objext
20390 if { (eval echo "$as_me:20390: \"$ac_compile\"") >&5
20391   (eval $ac_compile) 2>&5
20392   ac_status=$?
20393   echo "$as_me:20393: \$? = $ac_status" >&5
20394   (exit $ac_status); } &&
20395          { ac_try='test -s conftest.$ac_objext'
20396   { (eval echo "$as_me:20396: \"$ac_try\"") >&5
20397   (eval $ac_try) 2>&5
20398   ac_status=$?
20399   echo "$as_me:20399: \$? = $ac_status" >&5
20400   (exit $ac_status); }; }; then
20401   cf_cv_builtin_bool=1
20402 else
20403   echo "$as_me: failed program was:" >&5
20404 cat conftest.$ac_ext >&5
20405 cf_cv_builtin_bool=0
20406 fi
20407 rm -f conftest.$ac_objext conftest.$ac_ext
20408
20409 fi
20410
20411 if test "$cf_cv_builtin_bool" = 1
20412 then    echo "$as_me:20412: result: yes" >&5
20413 echo "${ECHO_T}yes" >&6
20414 else    echo "$as_me:20414: result: no" >&5
20415 echo "${ECHO_T}no" >&6
20416 fi
20417
20418 echo "$as_me:20418: checking for size of bool" >&5
20419 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20420 if test "${cf_cv_type_of_bool+set}" = set; then
20421   echo $ECHO_N "(cached) $ECHO_C" >&6
20422 else
20423
20424         rm -f cf_test.out
20425         if test "$cross_compiling" = yes; then
20426   cf_cv_type_of_bool=unknown
20427 else
20428   cat >conftest.$ac_ext <<_ACEOF
20429 #line 20429 "configure"
20430 #include "confdefs.h"
20431
20432 #include <stdlib.h>
20433 #include <stdio.h>
20434
20435 #if defined(__cplusplus)
20436
20437 #ifdef HAVE_GXX_BUILTIN_H
20438 #include <g++/builtin.h>
20439 #elif HAVE_GPP_BUILTIN_H
20440 #include <gpp/builtin.h>
20441 #elif HAVE_BUILTIN_H
20442 #include <builtin.h>
20443 #endif
20444
20445 #else
20446
20447 #if $cf_cv_header_stdbool_h
20448 #include <stdbool.h>
20449 #endif
20450
20451 #endif
20452
20453 int main()
20454 {
20455         FILE *fp = fopen("cf_test.out", "w");
20456         if (fp != 0) {
20457                 bool x = true;
20458                 if ((bool)(-x) >= 0)
20459                         fputs("unsigned ", fp);
20460                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20461                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20462                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20463                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20464                 fclose(fp);
20465         }
20466         ${cf_cv_main_return:-return}(0);
20467 }
20468
20469 _ACEOF
20470 rm -f conftest$ac_exeext
20471 if { (eval echo "$as_me:20471: \"$ac_link\"") >&5
20472   (eval $ac_link) 2>&5
20473   ac_status=$?
20474   echo "$as_me:20474: \$? = $ac_status" >&5
20475   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20476   { (eval echo "$as_me:20476: \"$ac_try\"") >&5
20477   (eval $ac_try) 2>&5
20478   ac_status=$?
20479   echo "$as_me:20479: \$? = $ac_status" >&5
20480   (exit $ac_status); }; }; then
20481   cf_cv_type_of_bool=`cat cf_test.out`
20482                  if test -z "$cf_cv_type_of_bool"; then
20483                    cf_cv_type_of_bool=unknown
20484                  fi
20485 else
20486   echo "$as_me: program exited with status $ac_status" >&5
20487 echo "$as_me: failed program was:" >&5
20488 cat conftest.$ac_ext >&5
20489 cf_cv_type_of_bool=unknown
20490 fi
20491 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20492 fi
20493
20494 fi
20495
20496         rm -f cf_test.out
20497 echo "$as_me:20497: result: $cf_cv_type_of_bool" >&5
20498 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20499 if test "$cf_cv_type_of_bool" = unknown ; then
20500         case .$NCURSES_BOOL in
20501         (.auto|.) NCURSES_BOOL=unsigned;;
20502         esac
20503         { echo "$as_me:20503: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20504 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20505         cf_cv_type_of_bool=$NCURSES_BOOL
20506 fi
20507
20508 echo "$as_me:20508: checking for special defines needed for etip.h" >&5
20509 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20510 cf_save_CXXFLAGS="$CXXFLAGS"
20511 cf_result="none"
20512
20513 # etip.h includes ncurses.h which includes ncurses_dll.h
20514 # But ncurses_dll.h is generated - fix here.
20515 test -d include || mkdir include
20516 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
20517
20518 for cf_math in "" MATH_H
20519 do
20520 for cf_excp in "" MATH_EXCEPTION
20521 do
20522         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
20523         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20524         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20525 cat >conftest.$ac_ext <<_ACEOF
20526 #line 20526 "configure"
20527 #include "confdefs.h"
20528
20529 #include <etip.h.in>
20530
20531 int
20532 main ()
20533 {
20534
20535   ;
20536   return 0;
20537 }
20538 _ACEOF
20539 rm -f conftest.$ac_objext
20540 if { (eval echo "$as_me:20540: \"$ac_compile\"") >&5
20541   (eval $ac_compile) 2>&5
20542   ac_status=$?
20543   echo "$as_me:20543: \$? = $ac_status" >&5
20544   (exit $ac_status); } &&
20545          { ac_try='test -s conftest.$ac_objext'
20546   { (eval echo "$as_me:20546: \"$ac_try\"") >&5
20547   (eval $ac_try) 2>&5
20548   ac_status=$?
20549   echo "$as_me:20549: \$? = $ac_status" >&5
20550   (exit $ac_status); }; }; then
20551
20552         test -n "$cf_math" && cat >>confdefs.h <<EOF
20553 #define ETIP_NEEDS_${cf_math} 1
20554 EOF
20555
20556         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20557 #define ETIP_NEEDS_${cf_excp} 1
20558 EOF
20559
20560         cf_result="$cf_math $cf_excp"
20561         break 2
20562
20563 else
20564   echo "$as_me: failed program was:" >&5
20565 cat conftest.$ac_ext >&5
20566 fi
20567 rm -f conftest.$ac_objext conftest.$ac_ext
20568 done
20569 done
20570 echo "$as_me:20570: result: $cf_result" >&5
20571 echo "${ECHO_T}$cf_result" >&6
20572 CXXFLAGS="$cf_save_CXXFLAGS"
20573
20574 if test -n "$CXX"; then
20575 echo "$as_me:20575: checking if $CXX accepts parameter initialization" >&5
20576 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20577 if test "${cf_cv_cpp_param_init+set}" = set; then
20578   echo $ECHO_N "(cached) $ECHO_C" >&6
20579 else
20580
20581         ac_ext=cc
20582 ac_cpp='$CXXCPP $CPPFLAGS'
20583 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20584 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20585 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20586 ac_main_return=return
20587
20588         if test "$cross_compiling" = yes; then
20589   cf_cv_cpp_param_init=unknown
20590 else
20591   cat >conftest.$ac_ext <<_ACEOF
20592 #line 20592 "configure"
20593 #include "confdefs.h"
20594
20595 class TEST {
20596 private:
20597         int value;
20598 public:
20599         TEST(int x = 1);
20600         ~TEST();
20601 };
20602
20603 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20604 {
20605         value = x;
20606 }
20607 int main() { }
20608
20609 _ACEOF
20610 rm -f conftest$ac_exeext
20611 if { (eval echo "$as_me:20611: \"$ac_link\"") >&5
20612   (eval $ac_link) 2>&5
20613   ac_status=$?
20614   echo "$as_me:20614: \$? = $ac_status" >&5
20615   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20616   { (eval echo "$as_me:20616: \"$ac_try\"") >&5
20617   (eval $ac_try) 2>&5
20618   ac_status=$?
20619   echo "$as_me:20619: \$? = $ac_status" >&5
20620   (exit $ac_status); }; }; then
20621   cf_cv_cpp_param_init=yes
20622 else
20623   echo "$as_me: program exited with status $ac_status" >&5
20624 echo "$as_me: failed program was:" >&5
20625 cat conftest.$ac_ext >&5
20626 cf_cv_cpp_param_init=no
20627 fi
20628 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20629 fi
20630         ac_ext=cc
20631 ac_cpp='$CXXCPP $CPPFLAGS'
20632 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20633 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20634 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20635 ac_main_return=return
20636
20637 fi
20638 echo "$as_me:20638: result: $cf_cv_cpp_param_init" >&5
20639 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20640 fi
20641 test "$cf_cv_cpp_param_init" = yes &&
20642 cat >>confdefs.h <<\EOF
20643 #define CPP_HAS_PARAM_INIT 1
20644 EOF
20645
20646 if test -n "$CXX"; then
20647
20648 echo "$as_me:20648: checking if $CXX accepts static_cast" >&5
20649 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20650 if test "${cf_cv_cpp_static_cast+set}" = set; then
20651   echo $ECHO_N "(cached) $ECHO_C" >&6
20652 else
20653
20654         ac_ext=cc
20655 ac_cpp='$CXXCPP $CPPFLAGS'
20656 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20657 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20658 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20659 ac_main_return=return
20660
20661         cat >conftest.$ac_ext <<_ACEOF
20662 #line 20662 "configure"
20663 #include "confdefs.h"
20664
20665 class NCursesPanel
20666 {
20667 public:
20668   NCursesPanel(int nlines,
20669                int ncols,
20670                int begin_y = 0,
20671                int begin_x = 0)
20672   {
20673   }
20674   NCursesPanel();
20675   ~NCursesPanel();
20676 };
20677
20678 template<class T> class NCursesUserPanel : public NCursesPanel
20679 {
20680 public:
20681   NCursesUserPanel (int nlines,
20682                     int ncols,
20683                     int begin_y = 0,
20684                     int begin_x = 0,
20685                     const T* p_UserData = static_cast<T*>(0))
20686     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20687   {
20688   };
20689   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20690   {
20691   };
20692
20693   virtual ~NCursesUserPanel() {};
20694 };
20695
20696 int
20697 main ()
20698 {
20699
20700         const char* p_UserData = static_cast<char*>(0)
20701   ;
20702   return 0;
20703 }
20704 _ACEOF
20705 rm -f conftest.$ac_objext
20706 if { (eval echo "$as_me:20706: \"$ac_compile\"") >&5
20707   (eval $ac_compile) 2>&5
20708   ac_status=$?
20709   echo "$as_me:20709: \$? = $ac_status" >&5
20710   (exit $ac_status); } &&
20711          { ac_try='test -s conftest.$ac_objext'
20712   { (eval echo "$as_me:20712: \"$ac_try\"") >&5
20713   (eval $ac_try) 2>&5
20714   ac_status=$?
20715   echo "$as_me:20715: \$? = $ac_status" >&5
20716   (exit $ac_status); }; }; then
20717   cf_cv_cpp_static_cast=yes
20718 else
20719   echo "$as_me: failed program was:" >&5
20720 cat conftest.$ac_ext >&5
20721 cf_cv_cpp_static_cast=no
20722 fi
20723 rm -f conftest.$ac_objext conftest.$ac_ext
20724
20725         ac_ext=cc
20726 ac_cpp='$CXXCPP $CPPFLAGS'
20727 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20728 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20729 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20730 ac_main_return=return
20731
20732 fi
20733 echo "$as_me:20733: result: $cf_cv_cpp_static_cast" >&5
20734 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20735
20736 fi
20737
20738 test "$cf_cv_cpp_static_cast" = yes &&
20739 cat >>confdefs.h <<\EOF
20740 #define CPP_HAS_STATIC_CAST 1
20741 EOF
20742
20743         CXX_AR='$(AR)'
20744         CXX_ARFLAGS='$(ARFLAGS)'
20745         case $cf_cv_system_name in
20746         (irix*)
20747             if test "$GXX" != yes ; then
20748                 CXX_AR='$(CXX)'
20749                 CXX_ARFLAGS='-ar -o'
20750             fi
20751             ;;
20752         (sco3.2v5*)
20753             CXXLDFLAGS="-u main"
20754             ;;
20755         (solaris2*)
20756             if test "$GXX" != yes ; then
20757                 CXX_AR='$(CXX)'
20758                 CXX_ARFLAGS='-xar -o'
20759             fi
20760             ;;
20761         esac
20762
20763 else
20764         cf_cxx_library=no
20765         cf_cv_builtin_bool=1
20766
20767         # Just because we are not configuring against C++ right now does not
20768         # mean that a user will not want to use C++.  Some distributors disable
20769         # the C++ portion of this configuration as a shortcut (or just to avoid
20770         # compiling the demo in the c++ directory).  So we need a reasonable
20771         # default for the 'bool' type.
20772         #
20773         # Caveat: since the storage of the bool type is not standardized, it
20774         # may change.
20775
20776         if test "$NCURSES_BOOL" != auto ; then
20777                 cf_cv_type_of_bool=$NCURSES_BOOL
20778                 cf_cv_header_stdbool_h=0
20779         else
20780                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20781
20782 echo "$as_me:20782: checking for size of bool" >&5
20783 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20784 if test "${cf_cv_type_of_bool+set}" = set; then
20785   echo $ECHO_N "(cached) $ECHO_C" >&6
20786 else
20787
20788         rm -f cf_test.out
20789         if test "$cross_compiling" = yes; then
20790   cf_cv_type_of_bool=unknown
20791 else
20792   cat >conftest.$ac_ext <<_ACEOF
20793 #line 20793 "configure"
20794 #include "confdefs.h"
20795
20796 #include <stdlib.h>
20797 #include <stdio.h>
20798
20799 #if defined(__cplusplus)
20800
20801 #ifdef HAVE_GXX_BUILTIN_H
20802 #include <g++/builtin.h>
20803 #elif HAVE_GPP_BUILTIN_H
20804 #include <gpp/builtin.h>
20805 #elif HAVE_BUILTIN_H
20806 #include <builtin.h>
20807 #endif
20808
20809 #else
20810
20811 #if $cf_cv_header_stdbool_h
20812 #include <stdbool.h>
20813 #endif
20814
20815 #endif
20816
20817 int main()
20818 {
20819         FILE *fp = fopen("cf_test.out", "w");
20820         if (fp != 0) {
20821                 bool x = true;
20822                 if ((bool)(-x) >= 0)
20823                         fputs("unsigned ", fp);
20824                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20825                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20826                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20827                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20828                 fclose(fp);
20829         }
20830         ${cf_cv_main_return:-return}(0);
20831 }
20832
20833 _ACEOF
20834 rm -f conftest$ac_exeext
20835 if { (eval echo "$as_me:20835: \"$ac_link\"") >&5
20836   (eval $ac_link) 2>&5
20837   ac_status=$?
20838   echo "$as_me:20838: \$? = $ac_status" >&5
20839   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20840   { (eval echo "$as_me:20840: \"$ac_try\"") >&5
20841   (eval $ac_try) 2>&5
20842   ac_status=$?
20843   echo "$as_me:20843: \$? = $ac_status" >&5
20844   (exit $ac_status); }; }; then
20845   cf_cv_type_of_bool=`cat cf_test.out`
20846                  if test -z "$cf_cv_type_of_bool"; then
20847                    cf_cv_type_of_bool=unknown
20848                  fi
20849 else
20850   echo "$as_me: program exited with status $ac_status" >&5
20851 echo "$as_me: failed program was:" >&5
20852 cat conftest.$ac_ext >&5
20853 cf_cv_type_of_bool=unknown
20854 fi
20855 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20856 fi
20857
20858 fi
20859
20860         rm -f cf_test.out
20861 echo "$as_me:20861: result: $cf_cv_type_of_bool" >&5
20862 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20863 if test "$cf_cv_type_of_bool" = unknown ; then
20864         case .$NCURSES_BOOL in
20865         (.auto|.) NCURSES_BOOL=unsigned;;
20866         esac
20867         { echo "$as_me:20867: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20868 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20869         cf_cv_type_of_bool=$NCURSES_BOOL
20870 fi
20871
20872                 else
20873                         echo "$as_me:20873: checking for fallback type of bool" >&5
20874 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20875                         case "$host_cpu" in
20876                         (i?86)  cf_cv_type_of_bool=char ;;
20877                         (*)     cf_cv_type_of_bool=int  ;;
20878                         esac
20879                         echo "$as_me:20879: result: $cf_cv_type_of_bool" >&5
20880 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20881                 fi
20882         fi
20883 fi
20884
20885 # If the C compiler did not declare bool, and we did not determine that the C++
20886 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20887 # ncurses library use the same type as C++ bool.  Note that this allows one to
20888 # specify the type of bool in a configure-script option and postpone
20889 # integration with the C++ compiler provided that the types are compatible.
20890 USE_CXX_BOOL=1
20891 if test $cf_cv_cc_bool_type = 1
20892 then
20893         # oops: C has a bool.  Unlikely, but C++ could differ.
20894         USE_CXX_BOOL=0
20895 elif test $cf_cv_builtin_bool = 0
20896 then
20897         # C++ has no bool
20898         USE_CXX_BOOL=0
20899 else
20900         # this is the normal case
20901         USE_CXX_BOOL='defined(__cplusplus)'
20902 fi
20903
20904 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20905
20906         if test "$cf_with_ada" != "no" ; then
20907                 if test "$with_libtool" != "no"; then
20908                         { echo "$as_me:20908: WARNING: libtool does not support Ada - disabling feature" >&5
20909 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20910                         cf_with_ada=no
20911                 fi
20912         fi
20913
20914         if test "$cf_with_ada" != "no" ; then
20915
20916 cf_ada_make=gnatmake
20917 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20918 set dummy $cf_ada_make; ac_word=$2
20919 echo "$as_me:20919: checking for $ac_word" >&5
20920 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20921 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20922   echo $ECHO_N "(cached) $ECHO_C" >&6
20923 else
20924   if test -n "$gnat_exists"; then
20925   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20926 else
20927   ac_save_IFS=$IFS; IFS=$ac_path_separator
20928 ac_dummy="$PATH"
20929 for ac_dir in $ac_dummy; do
20930   IFS=$ac_save_IFS
20931   test -z "$ac_dir" && ac_dir=.
20932   $as_executable_p "$ac_dir/$ac_word" || continue
20933 ac_cv_prog_gnat_exists="yes"
20934 echo "$as_me:20934: found $ac_dir/$ac_word" >&5
20935 break
20936 done
20937
20938   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20939 fi
20940 fi
20941 gnat_exists=$ac_cv_prog_gnat_exists
20942 if test -n "$gnat_exists"; then
20943   echo "$as_me:20943: result: $gnat_exists" >&5
20944 echo "${ECHO_T}$gnat_exists" >&6
20945 else
20946   echo "$as_me:20946: result: no" >&5
20947 echo "${ECHO_T}no" >&6
20948 fi
20949
20950 if test "$ac_cv_prog_gnat_exists" = no; then
20951         cf_ada_make=
20952         cf_cv_prog_gnat_correct=no
20953 else
20954
20955 echo "$as_me:20955: checking for gnat version" >&5
20956 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20957 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20958         grep '[0-9].[0-9][0-9]*' |\
20959         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20960 echo "$as_me:20960: result: $cf_gnat_version" >&5
20961 echo "${ECHO_T}$cf_gnat_version" >&6
20962
20963 case $cf_gnat_version in
20964 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
20965         cf_cv_prog_gnat_correct=yes
20966         ;;
20967 (*)
20968         { echo "$as_me:20968: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20969 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20970         cf_cv_prog_gnat_correct=no
20971         ;;
20972 esac
20973
20974         # Extract the first word of "m4", so it can be a program name with args.
20975 set dummy m4; ac_word=$2
20976 echo "$as_me:20976: checking for $ac_word" >&5
20977 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20978 if test "${ac_cv_prog_M4_exists+set}" = set; then
20979   echo $ECHO_N "(cached) $ECHO_C" >&6
20980 else
20981   if test -n "$M4_exists"; then
20982   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20983 else
20984   ac_save_IFS=$IFS; IFS=$ac_path_separator
20985 ac_dummy="$PATH"
20986 for ac_dir in $ac_dummy; do
20987   IFS=$ac_save_IFS
20988   test -z "$ac_dir" && ac_dir=.
20989   $as_executable_p "$ac_dir/$ac_word" || continue
20990 ac_cv_prog_M4_exists="yes"
20991 echo "$as_me:20991: found $ac_dir/$ac_word" >&5
20992 break
20993 done
20994
20995   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20996 fi
20997 fi
20998 M4_exists=$ac_cv_prog_M4_exists
20999 if test -n "$M4_exists"; then
21000   echo "$as_me:21000: result: $M4_exists" >&5
21001 echo "${ECHO_T}$M4_exists" >&6
21002 else
21003   echo "$as_me:21003: result: no" >&5
21004 echo "${ECHO_T}no" >&6
21005 fi
21006
21007         if test "$ac_cv_prog_M4_exists" = no; then
21008                 cf_cv_prog_gnat_correct=no
21009                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
21010         fi
21011         if test "$cf_cv_prog_gnat_correct" = yes; then
21012                 echo "$as_me:21012: checking if GNAT works" >&5
21013 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
21014
21015 rm -rf conftest* *~conftest*
21016 cat >>conftest.ads <<CF_EOF
21017 procedure conftest;
21018 CF_EOF
21019 cat >>conftest.adb <<CF_EOF
21020 with Text_IO;
21021 with GNAT.OS_Lib;
21022 procedure conftest is
21023 begin
21024    Text_IO.Put ("Hello World");
21025    Text_IO.New_Line;
21026    GNAT.OS_Lib.OS_Exit (0);
21027 end conftest;
21028 CF_EOF
21029 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21030    if ( ./conftest 1>&5 2>&1 ) ; then
21031       cf_cv_prog_gnat_correct=yes
21032    else
21033       cf_cv_prog_gnat_correct=no
21034    fi
21035 else
21036    cf_cv_prog_gnat_correct=no
21037 fi
21038 rm -rf conftest* *~conftest*
21039
21040                 echo "$as_me:21040: result: $cf_cv_prog_gnat_correct" >&5
21041 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
21042         fi
21043 fi
21044
21045                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
21046
21047         ADAFLAGS="$ADAFLAGS -gnatpn"
21048
21049         echo "$as_me:21049: checking optimization options for ADAFLAGS" >&5
21050 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
21051         case "$CFLAGS" in
21052         (*-g*)
21053
21054         ADAFLAGS="$ADAFLAGS -g"
21055
21056                 ;;
21057         esac
21058         case "$CFLAGS" in
21059         (*-O*)
21060                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
21061
21062         ADAFLAGS="$ADAFLAGS $cf_O_flag"
21063
21064                 ;;
21065         esac
21066         echo "$as_me:21066: result: $ADAFLAGS" >&5
21067 echo "${ECHO_T}$ADAFLAGS" >&6
21068
21069 echo "$as_me:21069: checking if GNATPREP supports -T option" >&5
21070 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
21071 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
21072   echo $ECHO_N "(cached) $ECHO_C" >&6
21073 else
21074
21075 cf_cv_gnatprep_opt_t=no
21076 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
21077
21078 fi
21079 echo "$as_me:21079: result: $cf_cv_gnatprep_opt_t" >&5
21080 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
21081 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
21082
21083 echo "$as_me:21083: checking if GNAT supports generics" >&5
21084 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
21085 case $cf_gnat_version in
21086 (3.[1-9]*|[4-9].*)
21087         cf_gnat_generics=yes
21088         ;;
21089 (*)
21090         cf_gnat_generics=no
21091         ;;
21092 esac
21093 echo "$as_me:21093: result: $cf_gnat_generics" >&5
21094 echo "${ECHO_T}$cf_gnat_generics" >&6
21095
21096 if test "$cf_gnat_generics" = yes
21097 then
21098         cf_compile_generics=generics
21099         cf_generic_objects="\${GENOBJS}"
21100 else
21101         cf_compile_generics=
21102         cf_generic_objects=
21103 fi
21104
21105 echo "$as_me:21105: checking if GNAT supports SIGINT" >&5
21106 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
21107 if test "${cf_cv_gnat_sigint+set}" = set; then
21108   echo $ECHO_N "(cached) $ECHO_C" >&6
21109 else
21110
21111 rm -rf conftest* *~conftest*
21112 cat >>conftest.ads <<CF_EOF
21113 with Ada.Interrupts.Names;
21114
21115 package ConfTest is
21116
21117    pragma Warnings (Off);  --  the next pragma exists since 3.11p
21118    pragma Unreserve_All_Interrupts;
21119    pragma Warnings (On);
21120
21121    protected Process is
21122       procedure Stop;
21123       function Continue return Boolean;
21124       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
21125    private
21126       Done : Boolean := False;
21127    end Process;
21128
21129 end ConfTest;
21130 CF_EOF
21131 cat >>conftest.adb <<CF_EOF
21132 package body ConfTest is
21133    protected body Process is
21134       procedure Stop is
21135       begin
21136          Done := True;
21137       end Stop;
21138       function Continue return Boolean is
21139       begin
21140          return not Done;
21141       end Continue;
21142    end Process;
21143 end ConfTest;
21144 CF_EOF
21145 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21146       cf_cv_gnat_sigint=yes
21147 else
21148    cf_cv_gnat_sigint=no
21149 fi
21150 rm -rf conftest* *~conftest*
21151
21152 fi
21153 echo "$as_me:21153: result: $cf_cv_gnat_sigint" >&5
21154 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
21155
21156 if test $cf_cv_gnat_sigint = yes ; then
21157         USE_GNAT_SIGINT=""
21158 else
21159         USE_GNAT_SIGINT="#"
21160 fi
21161
21162 cf_gnat_libraries=no
21163 cf_gnat_projects=no
21164
21165 if test "$enable_gnat_projects" != no ; then
21166 echo "$as_me:21166: checking if GNAT supports project files" >&5
21167 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
21168 case $cf_gnat_version in
21169 (3.[0-9]*)
21170         ;;
21171 (*)
21172         case $cf_cv_system_name in
21173         (cygwin*|msys*)
21174                 ;;
21175         (*)
21176                 mkdir conftest.src conftest.bin conftest.lib
21177                 cd conftest.src
21178                 rm -rf conftest* *~conftest*
21179                 cat >>library.gpr <<CF_EOF
21180 project Library is
21181   Kind := External ("LIB_KIND");
21182   for Library_Name use "ConfTest";
21183   for Object_Dir use ".";
21184   for Library_ALI_Dir use External("LIBRARY_DIR");
21185   for Library_Version use External ("SONAME");
21186   for Library_Kind use Kind;
21187   for Library_Dir use External("BUILD_DIR");
21188   Source_Dir := External ("SOURCE_DIR");
21189   for Source_Dirs use (Source_Dir);
21190 end Library;
21191 CF_EOF
21192                 cat >>confpackage.ads <<CF_EOF
21193 package ConfPackage is
21194    procedure conftest;
21195 end ConfPackage;
21196 CF_EOF
21197                 cat >>confpackage.adb <<CF_EOF
21198 with Text_IO;
21199 package body ConfPackage is
21200    procedure conftest is
21201    begin
21202       Text_IO.Put ("Hello World");
21203       Text_IO.New_Line;
21204    end conftest;
21205 end ConfPackage;
21206 CF_EOF
21207                 if ( $cf_ada_make $ADAFLAGS \
21208                                 -Plibrary.gpr \
21209                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
21210                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
21211                                 -XSOURCE_DIR=`pwd` \
21212                                 -XSONAME=libConfTest.so.1 \
21213                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
21214                         cf_gnat_projects=yes
21215                 fi
21216                 cd ..
21217                 if test -f conftest.lib/confpackage.ali
21218                 then
21219                         cf_gnat_libraries=yes
21220                 fi
21221                 rm -rf conftest* *~conftest*
21222                 ;;
21223         esac
21224         ;;
21225 esac
21226 echo "$as_me:21226: result: $cf_gnat_projects" >&5
21227 echo "${ECHO_T}$cf_gnat_projects" >&6
21228 fi # enable_gnat_projects
21229
21230 if test $cf_gnat_projects = yes
21231 then
21232         echo "$as_me:21232: checking if GNAT supports libraries" >&5
21233 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
21234         echo "$as_me:21234: result: $cf_gnat_libraries" >&5
21235 echo "${ECHO_T}$cf_gnat_libraries" >&6
21236 fi
21237
21238 if test "$cf_gnat_projects" = yes
21239 then
21240         USE_OLD_MAKERULES="#"
21241         USE_GNAT_PROJECTS=""
21242 else
21243         USE_OLD_MAKERULES=""
21244         USE_GNAT_PROJECTS="#"
21245 fi
21246
21247 if test "$cf_gnat_libraries" = yes
21248 then
21249         USE_GNAT_LIBRARIES=""
21250 else
21251         USE_GNAT_LIBRARIES="#"
21252 fi
21253
21254 echo "$as_me:21254: checking for ada-compiler" >&5
21255 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
21256
21257 # Check whether --with-ada-compiler or --without-ada-compiler was given.
21258 if test "${with_ada_compiler+set}" = set; then
21259   withval="$with_ada_compiler"
21260   cf_ada_compiler=$withval
21261 else
21262   cf_ada_compiler=gnatmake
21263 fi;
21264
21265 echo "$as_me:21265: result: $cf_ada_compiler" >&5
21266 echo "${ECHO_T}$cf_ada_compiler" >&6
21267
21268                         cf_ada_package=terminal_interface
21269
21270 echo "$as_me:21270: checking for ada-include" >&5
21271 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
21272
21273 # Check whether --with-ada-include or --without-ada-include was given.
21274 if test "${with_ada_include+set}" = set; then
21275   withval="$with_ada_include"
21276
21277 else
21278   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
21279 fi; if test -n "$prefix/share/ada/adainclude" ; then
21280
21281 if test "x$prefix" != xNONE; then
21282         cf_path_syntax="$prefix"
21283 else
21284         cf_path_syntax="$ac_default_prefix"
21285 fi
21286
21287 case ".$withval" in
21288 (.\$\(*\)*|.\'*\'*)
21289         ;;
21290 (..|./*|.\\*)
21291         ;;
21292 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21293         ;;
21294 (.\${*prefix}*|.\${*dir}*)
21295         eval withval="$withval"
21296         case ".$withval" in
21297         (.NONE/*)
21298                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21299                 ;;
21300         esac
21301         ;;
21302 (.no|.NONE/*)
21303         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21304         ;;
21305 (*)
21306         { { echo "$as_me:21306: error: expected a pathname, not \"$withval\"" >&5
21307 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21308    { (exit 1); exit 1; }; }
21309         ;;
21310 esac
21311
21312 fi
21313 eval ADA_INCLUDE="$withval"
21314
21315 echo "$as_me:21315: result: $ADA_INCLUDE" >&5
21316 echo "${ECHO_T}$ADA_INCLUDE" >&6
21317
21318 echo "$as_me:21318: checking for ada-objects" >&5
21319 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
21320
21321 # Check whether --with-ada-objects or --without-ada-objects was given.
21322 if test "${with_ada_objects+set}" = set; then
21323   withval="$with_ada_objects"
21324
21325 else
21326   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
21327 fi; if test -n "$prefix/lib/ada/adalib" ; then
21328
21329 if test "x$prefix" != xNONE; then
21330         cf_path_syntax="$prefix"
21331 else
21332         cf_path_syntax="$ac_default_prefix"
21333 fi
21334
21335 case ".$withval" in
21336 (.\$\(*\)*|.\'*\'*)
21337         ;;
21338 (..|./*|.\\*)
21339         ;;
21340 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21341         ;;
21342 (.\${*prefix}*|.\${*dir}*)
21343         eval withval="$withval"
21344         case ".$withval" in
21345         (.NONE/*)
21346                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21347                 ;;
21348         esac
21349         ;;
21350 (.no|.NONE/*)
21351         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21352         ;;
21353 (*)
21354         { { echo "$as_me:21354: error: expected a pathname, not \"$withval\"" >&5
21355 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21356    { (exit 1); exit 1; }; }
21357         ;;
21358 esac
21359
21360 fi
21361 eval ADA_OBJECTS="$withval"
21362
21363 echo "$as_me:21363: result: $ADA_OBJECTS" >&5
21364 echo "${ECHO_T}$ADA_OBJECTS" >&6
21365
21366 echo "$as_me:21366: checking if an Ada95 shared-library should be built" >&5
21367 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
21368
21369 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
21370 if test "${with_ada_sharedlib+set}" = set; then
21371   withval="$with_ada_sharedlib"
21372   with_ada_sharedlib=$withval
21373 else
21374   with_ada_sharedlib=no
21375 fi;
21376 echo "$as_me:21376: result: $with_ada_sharedlib" >&5
21377 echo "${ECHO_T}$with_ada_sharedlib" >&6
21378
21379 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
21380 MAKE_ADA_SHAREDLIB="#"
21381
21382 if test "x$with_ada_sharedlib" != xno
21383 then
21384         MAKE_ADA_SHAREDLIB=
21385         if test "x$with_ada_sharedlib" != xyes
21386         then
21387                 ADA_SHAREDLIB="$with_ada_sharedlib"
21388         fi
21389 fi
21390
21391                 fi
21392         fi
21393 else
21394         cf_with_ada=no
21395 fi
21396
21397 # do this "late" to avoid conflict with header-checks
21398 if test "x$with_widec" = xyes ; then
21399         echo "$as_me:21399: checking for wchar_t" >&5
21400 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
21401 if test "${ac_cv_type_wchar_t+set}" = set; then
21402   echo $ECHO_N "(cached) $ECHO_C" >&6
21403 else
21404   cat >conftest.$ac_ext <<_ACEOF
21405 #line 21405 "configure"
21406 #include "confdefs.h"
21407 $ac_includes_default
21408 int
21409 main ()
21410 {
21411 if ((wchar_t *) 0)
21412   return 0;
21413 if (sizeof (wchar_t))
21414   return 0;
21415   ;
21416   return 0;
21417 }
21418 _ACEOF
21419 rm -f conftest.$ac_objext
21420 if { (eval echo "$as_me:21420: \"$ac_compile\"") >&5
21421   (eval $ac_compile) 2>&5
21422   ac_status=$?
21423   echo "$as_me:21423: \$? = $ac_status" >&5
21424   (exit $ac_status); } &&
21425          { ac_try='test -s conftest.$ac_objext'
21426   { (eval echo "$as_me:21426: \"$ac_try\"") >&5
21427   (eval $ac_try) 2>&5
21428   ac_status=$?
21429   echo "$as_me:21429: \$? = $ac_status" >&5
21430   (exit $ac_status); }; }; then
21431   ac_cv_type_wchar_t=yes
21432 else
21433   echo "$as_me: failed program was:" >&5
21434 cat conftest.$ac_ext >&5
21435 ac_cv_type_wchar_t=no
21436 fi
21437 rm -f conftest.$ac_objext conftest.$ac_ext
21438 fi
21439 echo "$as_me:21439: result: $ac_cv_type_wchar_t" >&5
21440 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
21441
21442 echo "$as_me:21442: checking size of wchar_t" >&5
21443 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21444 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21445   echo $ECHO_N "(cached) $ECHO_C" >&6
21446 else
21447   if test "$ac_cv_type_wchar_t" = yes; then
21448   if test "$cross_compiling" = yes; then
21449   # Depending upon the size, compute the lo and hi bounds.
21450 cat >conftest.$ac_ext <<_ACEOF
21451 #line 21451 "configure"
21452 #include "confdefs.h"
21453 $ac_includes_default
21454 int
21455 main ()
21456 {
21457 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21458   ;
21459   return 0;
21460 }
21461 _ACEOF
21462 rm -f conftest.$ac_objext
21463 if { (eval echo "$as_me:21463: \"$ac_compile\"") >&5
21464   (eval $ac_compile) 2>&5
21465   ac_status=$?
21466   echo "$as_me:21466: \$? = $ac_status" >&5
21467   (exit $ac_status); } &&
21468          { ac_try='test -s conftest.$ac_objext'
21469   { (eval echo "$as_me:21469: \"$ac_try\"") >&5
21470   (eval $ac_try) 2>&5
21471   ac_status=$?
21472   echo "$as_me:21472: \$? = $ac_status" >&5
21473   (exit $ac_status); }; }; then
21474   ac_lo=0 ac_mid=0
21475   while :; do
21476     cat >conftest.$ac_ext <<_ACEOF
21477 #line 21477 "configure"
21478 #include "confdefs.h"
21479 $ac_includes_default
21480 int
21481 main ()
21482 {
21483 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21484   ;
21485   return 0;
21486 }
21487 _ACEOF
21488 rm -f conftest.$ac_objext
21489 if { (eval echo "$as_me:21489: \"$ac_compile\"") >&5
21490   (eval $ac_compile) 2>&5
21491   ac_status=$?
21492   echo "$as_me:21492: \$? = $ac_status" >&5
21493   (exit $ac_status); } &&
21494          { ac_try='test -s conftest.$ac_objext'
21495   { (eval echo "$as_me:21495: \"$ac_try\"") >&5
21496   (eval $ac_try) 2>&5
21497   ac_status=$?
21498   echo "$as_me:21498: \$? = $ac_status" >&5
21499   (exit $ac_status); }; }; then
21500   ac_hi=$ac_mid; break
21501 else
21502   echo "$as_me: failed program was:" >&5
21503 cat conftest.$ac_ext >&5
21504 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21505 fi
21506 rm -f conftest.$ac_objext conftest.$ac_ext
21507   done
21508 else
21509   echo "$as_me: failed program was:" >&5
21510 cat conftest.$ac_ext >&5
21511 ac_hi=-1 ac_mid=-1
21512   while :; do
21513     cat >conftest.$ac_ext <<_ACEOF
21514 #line 21514 "configure"
21515 #include "confdefs.h"
21516 $ac_includes_default
21517 int
21518 main ()
21519 {
21520 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21521   ;
21522   return 0;
21523 }
21524 _ACEOF
21525 rm -f conftest.$ac_objext
21526 if { (eval echo "$as_me:21526: \"$ac_compile\"") >&5
21527   (eval $ac_compile) 2>&5
21528   ac_status=$?
21529   echo "$as_me:21529: \$? = $ac_status" >&5
21530   (exit $ac_status); } &&
21531          { ac_try='test -s conftest.$ac_objext'
21532   { (eval echo "$as_me:21532: \"$ac_try\"") >&5
21533   (eval $ac_try) 2>&5
21534   ac_status=$?
21535   echo "$as_me:21535: \$? = $ac_status" >&5
21536   (exit $ac_status); }; }; then
21537   ac_lo=$ac_mid; break
21538 else
21539   echo "$as_me: failed program was:" >&5
21540 cat conftest.$ac_ext >&5
21541 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21542 fi
21543 rm -f conftest.$ac_objext conftest.$ac_ext
21544   done
21545 fi
21546 rm -f conftest.$ac_objext conftest.$ac_ext
21547 # Binary search between lo and hi bounds.
21548 while test "x$ac_lo" != "x$ac_hi"; do
21549   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21550   cat >conftest.$ac_ext <<_ACEOF
21551 #line 21551 "configure"
21552 #include "confdefs.h"
21553 $ac_includes_default
21554 int
21555 main ()
21556 {
21557 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21558   ;
21559   return 0;
21560 }
21561 _ACEOF
21562 rm -f conftest.$ac_objext
21563 if { (eval echo "$as_me:21563: \"$ac_compile\"") >&5
21564   (eval $ac_compile) 2>&5
21565   ac_status=$?
21566   echo "$as_me:21566: \$? = $ac_status" >&5
21567   (exit $ac_status); } &&
21568          { ac_try='test -s conftest.$ac_objext'
21569   { (eval echo "$as_me:21569: \"$ac_try\"") >&5
21570   (eval $ac_try) 2>&5
21571   ac_status=$?
21572   echo "$as_me:21572: \$? = $ac_status" >&5
21573   (exit $ac_status); }; }; then
21574   ac_hi=$ac_mid
21575 else
21576   echo "$as_me: failed program was:" >&5
21577 cat conftest.$ac_ext >&5
21578 ac_lo=`expr $ac_mid + 1`
21579 fi
21580 rm -f conftest.$ac_objext conftest.$ac_ext
21581 done
21582 ac_cv_sizeof_wchar_t=$ac_lo
21583 else
21584   if test "$cross_compiling" = yes; then
21585   { { echo "$as_me:21585: error: cannot run test program while cross compiling" >&5
21586 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21587    { (exit 1); exit 1; }; }
21588 else
21589   cat >conftest.$ac_ext <<_ACEOF
21590 #line 21590 "configure"
21591 #include "confdefs.h"
21592 $ac_includes_default
21593 int
21594 main ()
21595 {
21596 FILE *f = fopen ("conftest.val", "w");
21597 if (!f)
21598   $ac_main_return (1);
21599 fprintf (f, "%d", (sizeof (wchar_t)));
21600 fclose (f);
21601   ;
21602   return 0;
21603 }
21604 _ACEOF
21605 rm -f conftest$ac_exeext
21606 if { (eval echo "$as_me:21606: \"$ac_link\"") >&5
21607   (eval $ac_link) 2>&5
21608   ac_status=$?
21609   echo "$as_me:21609: \$? = $ac_status" >&5
21610   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21611   { (eval echo "$as_me:21611: \"$ac_try\"") >&5
21612   (eval $ac_try) 2>&5
21613   ac_status=$?
21614   echo "$as_me:21614: \$? = $ac_status" >&5
21615   (exit $ac_status); }; }; then
21616   ac_cv_sizeof_wchar_t=`cat conftest.val`
21617 else
21618   echo "$as_me: program exited with status $ac_status" >&5
21619 echo "$as_me: failed program was:" >&5
21620 cat conftest.$ac_ext >&5
21621 fi
21622 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21623 fi
21624 fi
21625 rm -f conftest.val
21626 else
21627   ac_cv_sizeof_wchar_t=0
21628 fi
21629 fi
21630 echo "$as_me:21630: result: $ac_cv_sizeof_wchar_t" >&5
21631 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21632 cat >>confdefs.h <<EOF
21633 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21634 EOF
21635
21636 fi
21637
21638 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21639 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21640 ###
21641 ### ticlib modules may be a separate library, otherwise contained in termlib.
21642 ### termlib modules may be a separate library, otherwise contained in ncurses.
21643 ###
21644 ### The of "+" or " " between the tokens controls the way the script
21645 ### chooses to split module lists into libraries.
21646 ###
21647 ### (see CF_LIB_RULES).
21648 echo "$as_me:21648: checking for library subsets" >&5
21649 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21650 LIB_SUBSETS=
21651
21652 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21653         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21654         if test "$with_ticlib" != no ; then
21655                 LIB_SUBSETS="${LIB_SUBSETS} "
21656         else
21657                 LIB_SUBSETS="${LIB_SUBSETS}+"
21658         fi
21659 fi
21660
21661 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21662 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21663
21664 if test "$with_termlib" != no ; then
21665         LIB_SUBSETS="${LIB_SUBSETS} "
21666 else
21667         LIB_SUBSETS="${LIB_SUBSETS}+"
21668 fi
21669
21670 LIB_SUBSETS="${LIB_SUBSETS}base"
21671
21672 # Most term-driver calls are to tinfo, but some like init_pair are to the
21673 # base library (so it resides in base).
21674 if test "$with_term_driver" != no ; then
21675         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21676         case $cf_cv_system_name in
21677         (*mingw32*|*mingw64*)
21678                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21679                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21680                 ;;
21681         (*)
21682                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21683                 ;;
21684         esac
21685 fi
21686
21687 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21688 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21689
21690 echo "$as_me:21690: result: $LIB_SUBSETS" >&5
21691 echo "${ECHO_T}$LIB_SUBSETS" >&6
21692
21693 ### Construct the list of include-directories to be generated
21694
21695 if test "$srcdir" != "."; then
21696         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21697 fi
21698 CPPFLAGS="-I../include $CPPFLAGS"
21699 if test "$srcdir" != "."; then
21700         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21701 fi
21702 CPPFLAGS="-I. $CPPFLAGS"
21703
21704 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21705 if test "$srcdir" != "."; then
21706         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21707 fi
21708 if test "$GCC" != yes; then
21709         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21710 elif test "$includedir" != "/usr/include"; then
21711         if test "$includedir" = '${prefix}/include' ; then
21712                 if test x$prefix != x/usr ; then
21713                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21714                 fi
21715         else
21716                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21717         fi
21718 fi
21719
21720 ### Build up pieces for makefile rules
21721 echo "$as_me:21721: checking default library suffix" >&5
21722 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21723
21724         case $DFT_LWR_MODEL in
21725         (libtool) DFT_ARG_SUFFIX=''   ;;
21726         (normal)  DFT_ARG_SUFFIX=''   ;;
21727         (debug)   DFT_ARG_SUFFIX='_g' ;;
21728         (profile) DFT_ARG_SUFFIX='_p' ;;
21729         (shared)  DFT_ARG_SUFFIX=''   ;;
21730         esac
21731         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21732 echo "$as_me:21732: result: $DFT_ARG_SUFFIX" >&5
21733 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21734
21735 echo "$as_me:21735: checking default library-dependency suffix" >&5
21736 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21737
21738         case X$DFT_LWR_MODEL in
21739         (Xlibtool)
21740                 DFT_LIB_SUFFIX='.la'
21741                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21742                 ;;
21743         (Xdebug)
21744                 DFT_LIB_SUFFIX='_g.a'
21745                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21746                 ;;
21747         (Xprofile)
21748                 DFT_LIB_SUFFIX='_p.a'
21749                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21750                 ;;
21751         (Xshared)
21752                 case $cf_cv_system_name in
21753                 (aix[5-7]*)
21754                         DFT_LIB_SUFFIX='.so'
21755                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21756                         ;;
21757                 (cygwin*|msys*|mingw*)
21758                         DFT_LIB_SUFFIX='.dll'
21759                         DFT_DEP_SUFFIX='.dll.a'
21760                         ;;
21761                 (darwin*)
21762                         DFT_LIB_SUFFIX='.dylib'
21763                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21764                         ;;
21765                 (hpux*)
21766                         case $target in
21767                         (ia64*)
21768                                 DFT_LIB_SUFFIX='.so'
21769                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21770                                 ;;
21771                         (*)
21772                                 DFT_LIB_SUFFIX='.sl'
21773                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21774                                 ;;
21775                         esac
21776                         ;;
21777                 (*)
21778                         DFT_LIB_SUFFIX='.so'
21779                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21780                         ;;
21781                 esac
21782                 ;;
21783         (*)
21784                 DFT_LIB_SUFFIX='.a'
21785                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21786                 ;;
21787         esac
21788         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21789         then
21790                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
21791                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
21792         fi
21793 echo "$as_me:21793: result: $DFT_DEP_SUFFIX" >&5
21794 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21795
21796 echo "$as_me:21796: checking default object directory" >&5
21797 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21798
21799         case $DFT_LWR_MODEL in
21800         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21801         (normal)  DFT_OBJ_SUBDIR='objects' ;;
21802         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21803         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
21804         (shared)
21805                 case $cf_cv_system_name in
21806                 (cygwin|msys)
21807                         DFT_OBJ_SUBDIR='objects' ;;
21808                 (*)
21809                         DFT_OBJ_SUBDIR='obj_s' ;;
21810                 esac
21811         esac
21812 echo "$as_me:21812: result: $DFT_OBJ_SUBDIR" >&5
21813 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21814
21815 if test "x$cf_with_cxx" = xyes ; then
21816 echo "$as_me:21816: checking c++ library-dependency suffix" >&5
21817 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21818 if test "$with_libtool" != "no"; then
21819         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21820         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21821 elif test "$with_shared_cxx" != "no"; then
21822         # also for g++ users...
21823         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21824 else
21825         # we normally make a static library because C/C++ library rules differ
21826
21827         case Xnormal in
21828         (Xlibtool)
21829                 CXX_LIB_SUFFIX='.la'
21830                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21831                 ;;
21832         (Xdebug)
21833                 CXX_LIB_SUFFIX='_g.a'
21834                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21835                 ;;
21836         (Xprofile)
21837                 CXX_LIB_SUFFIX='_p.a'
21838                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21839                 ;;
21840         (Xshared)
21841                 case $cf_cv_system_name in
21842                 (aix[5-7]*)
21843                         CXX_LIB_SUFFIX='.so'
21844                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21845                         ;;
21846                 (cygwin*|msys*|mingw*)
21847                         CXX_LIB_SUFFIX='.dll'
21848                         CXX_DEP_SUFFIX='.dll.a'
21849                         ;;
21850                 (darwin*)
21851                         CXX_LIB_SUFFIX='.dylib'
21852                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21853                         ;;
21854                 (hpux*)
21855                         case $target in
21856                         (ia64*)
21857                                 CXX_LIB_SUFFIX='.so'
21858                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21859                                 ;;
21860                         (*)
21861                                 CXX_LIB_SUFFIX='.sl'
21862                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21863                                 ;;
21864                         esac
21865                         ;;
21866                 (*)
21867                         CXX_LIB_SUFFIX='.so'
21868                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21869                         ;;
21870                 esac
21871                 ;;
21872         (*)
21873                 CXX_LIB_SUFFIX='.a'
21874                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21875                 ;;
21876         esac
21877         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21878         then
21879                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
21880                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
21881         fi
21882
21883 fi
21884 echo "$as_me:21884: result: $CXX_LIB_SUFFIX" >&5
21885 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21886
21887 fi
21888
21889 # do not want -ldl in build except as needed for -lncurses dependency
21890 if test "x$with_dlsym" = xyes ; then
21891 if test $DFT_LWR_MODEL = shared || \
21892    test $DFT_LWR_MODEL = libtool ; then
21893
21894 # remove dl library from $LIBS
21895 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21896
21897 fi
21898 fi
21899 ### Set up low-level terminfo dependencies for makefiles.
21900
21901 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21902 # do not need libdl
21903 TICS_LIST=
21904 if test "x$with_dlsym" = xyes ; then
21905
21906 # remove dl library from $SHLIB_LIST
21907 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21908
21909 fi
21910
21911 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
21912 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
21913 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
21914 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
21915 then
21916         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
21917 fi
21918
21919 if test "$with_ticlib" != no ; then
21920
21921         if test "x$with_ticlib" != xyes ; then
21922                 TICS_NAME=$with_ticlib
21923                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
21924                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21925                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21926                 TICS_LIB_SUFFIX="${with_ticlib}"
21927         else
21928                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
21929                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
21930                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21931                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
21932         fi
21933         TICS_LDFLAGS="-L${LIB_DIR}"
21934         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
21935 else
21936         TICS_SUFFIX=${DFT_LIB_SUFFIX}
21937         TICS_LDFLAGS="-L${LIB_DIR}"
21938         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21939 fi
21940
21941 if test "$with_termlib" != no ; then
21942
21943         if test "x$with_termlib" != xyes ; then
21944                 TINFO_NAME=$with_termlib
21945                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
21946                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21947                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21948                 TINFO_LIB_SUFFIX="${with_termlib}"
21949         else
21950                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21951                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
21952                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21953                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
21954         fi
21955
21956         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21957         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21958         if test "$DFT_LWR_MODEL" = "libtool"; then
21959                 TEST_ARGS="${TEST_DEPS}"
21960                 TEST_ARG2="${TEST_DEP2}"
21961                 TINFO_LDFLAGS="-L${LIB_DIR}"
21962                 TINFO_LIBS="$TEST_ARGS"
21963                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21964                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21965         else
21966                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21967                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21968                 if test "x$with_term_driver" != xno ; then
21969                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21970                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
21971                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21972                 else
21973                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21974                         TINFO_LIBS="$TEST_ARGS"
21975                 fi
21976                 TINFO_LDFLAGS="-L${LIB_DIR}"
21977                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21978         fi
21979 else
21980         # the next lines are needed for linking libtic over libncurses
21981         TINFO_NAME=${LIB_NAME}
21982         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21983         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
21984         if test "x$with_tic_depends" = xyes ; then
21985                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21986         else
21987                 TICS_LIST="$SHLIB_LIST"
21988         fi
21989
21990         TINFO_LDFLAGS="-L${LIB_DIR}"
21991         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21992 fi
21993
21994 if test "$DFT_LWR_MODEL" = shared ; then
21995         case $cf_cv_system_name in
21996         (cygwin*|msys*)
21997                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21998                 TINFO_SUFFIX=.dll
21999                 ;;
22000         esac
22001 fi
22002
22003 if test "x$with_dlsym" = xyes ; then
22004
22005 # remove dl library from $TICS_LIST
22006 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
22007
22008 fi
22009
22010 if test "$DFT_LWR_MODEL" = "libtool"; then
22011         OBJEXT=lo
22012 fi
22013
22014 # needed for Ada95
22015 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
22016
22017 case $DFT_LWR_MODEL in
22018 (normal|debug|profile)
22019
22020 if test "$GCC" = yes ; then
22021         case $cf_cv_system_name in
22022         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
22023                 LDFLAGS_STATIC=
22024                 LDFLAGS_SHARED=
22025                 ;;
22026         (*)     # normally, except when broken
22027                 LDFLAGS_STATIC=-static
22028                 LDFLAGS_SHARED=-dynamic
22029                 ;;
22030         esac
22031 else
22032         case $cf_cv_system_name in
22033         (aix[4-7]*)     # from ld manpage
22034                 LDFLAGS_STATIC=-bstatic
22035                 LDFLAGS_SHARED=-bdynamic
22036                 ;;
22037         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
22038                 # We could also use just "archive" and "shared".
22039                 LDFLAGS_STATIC=-Wl,-a,archive_shared
22040                 LDFLAGS_SHARED=-Wl,-a,shared_archive
22041                 ;;
22042         (irix*)         # from ld manpage IRIX64
22043                 LDFLAGS_STATIC=-Bstatic
22044                 LDFLAGS_SHARED=-Bdynamic
22045                 ;;
22046         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
22047                 # alternative "-oldstyle_liblookup" (not in cc manpage)
22048                 LDFLAGS_STATIC=-noso
22049                 LDFLAGS_SHARED=-so_archive
22050                 ;;
22051         (solaris2*)
22052                 LDFLAGS_STATIC=-Bstatic
22053                 LDFLAGS_SHARED=-Bdynamic
22054                 ;;
22055         esac
22056 fi
22057
22058 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
22059 then
22060         echo "$as_me:22060: checking if linker supports switching between static/dynamic" >&5
22061 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
22062
22063         rm -f libconftest.a
22064         cat >conftest.$ac_ext <<EOF
22065 #line 22065 "configure"
22066 #include <stdio.h>
22067 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
22068 EOF
22069         if { (eval echo "$as_me:22069: \"$ac_compile\"") >&5
22070   (eval $ac_compile) 2>&5
22071   ac_status=$?
22072   echo "$as_me:22072: \$? = $ac_status" >&5
22073   (exit $ac_status); } ; then
22074                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
22075                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
22076         fi
22077         rm -f conftest.*
22078
22079         cf_save_LIBS="$LIBS"
22080
22081         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
22082         cat >conftest.$ac_ext <<_ACEOF
22083 #line 22083 "configure"
22084 #include "confdefs.h"
22085
22086 #line 22086 "configure"
22087 #include <stdio.h>
22088 int cf_ldflags_static(FILE *fp);
22089
22090 int
22091 main ()
22092 {
22093
22094         return cf_ldflags_static(stdin);
22095
22096   ;
22097   return 0;
22098 }
22099 _ACEOF
22100 rm -f conftest.$ac_objext conftest$ac_exeext
22101 if { (eval echo "$as_me:22101: \"$ac_link\"") >&5
22102   (eval $ac_link) 2>&5
22103   ac_status=$?
22104   echo "$as_me:22104: \$? = $ac_status" >&5
22105   (exit $ac_status); } &&
22106          { ac_try='test -s conftest$ac_exeext'
22107   { (eval echo "$as_me:22107: \"$ac_try\"") >&5
22108   (eval $ac_try) 2>&5
22109   ac_status=$?
22110   echo "$as_me:22110: \$? = $ac_status" >&5
22111   (exit $ac_status); }; }; then
22112
22113         # some linkers simply ignore the -dynamic
22114         case x`file conftest$ac_exeext 2>/dev/null` in
22115         (*static*)
22116                 cf_ldflags_static=no
22117                 ;;
22118         (*)
22119                 cf_ldflags_static=yes
22120                 ;;
22121         esac
22122
22123 else
22124   echo "$as_me: failed program was:" >&5
22125 cat conftest.$ac_ext >&5
22126 cf_ldflags_static=no
22127 fi
22128 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22129
22130         rm -f libconftest.*
22131         LIBS="$cf_save_LIBS"
22132
22133         echo "$as_me:22133: result: $cf_ldflags_static" >&5
22134 echo "${ECHO_T}$cf_ldflags_static" >&6
22135
22136         if test $cf_ldflags_static != yes
22137         then
22138                 LDFLAGS_STATIC=
22139                 LDFLAGS_SHARED=
22140         fi
22141 else
22142         LDFLAGS_STATIC=
22143         LDFLAGS_SHARED=
22144 fi
22145
22146         ;;
22147 esac
22148
22149 echo "$as_me:22149: checking where we will install curses.h" >&5
22150 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
22151
22152 includesubdir=
22153 if test "$with_overwrite" = no && \
22154  ( test "x$includedir" = 'x${prefix}/include' || \
22155    test "x$includedir" = "x${prefix}/include" )
22156 then
22157         includesubdir="/ncurses${USE_LIB_SUFFIX}"
22158 fi
22159 echo "$as_me:22159: result: ${includedir}${includesubdir}" >&5
22160 echo "${ECHO_T}${includedir}${includesubdir}" >&6
22161
22162 ### Resolve a conflict between normal and wide-curses by forcing applications
22163 ### that will need libutf8 to add it to their configure script.
22164 if test "$with_overwrite" != no ; then
22165 if test "$NCURSES_LIBUTF8" = 1 ; then
22166         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
22167         { echo "$as_me:22167: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
22168 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
22169 fi
22170 fi
22171 WITH_OVERWRITE=$with_overwrite
22172
22173 # used to separate tack out of the tree
22174 NCURSES_TREE=
22175
22176 ### predefined stuff for the test programs
22177
22178 cat >>confdefs.h <<\EOF
22179 #define HAVE_SLK_COLOR 1
22180 EOF
22181
22182 ### Construct the list of subdirectories for which we'll customize makefiles
22183 ### with the appropriate compile-rules.
22184
22185 echo "$as_me:22185: checking for src modules" >&5
22186 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
22187
22188 # dependencies and linker-arguments for test-programs
22189 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
22190 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
22191 if test "$DFT_LWR_MODEL" = "libtool"; then
22192         TEST_ARGS="${TEST_DEPS}"
22193         TEST_ARG2="${TEST_DEP2}"
22194 else
22195         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22196         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
22197 fi
22198
22199 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
22200 cf_cv_src_modules=
22201 for cf_dir in $modules_to_build
22202 do
22203         if test -f $srcdir/$cf_dir/modules; then
22204
22205                 # We may/may not have tack in the distribution, though the
22206                 # makefile is.
22207                 if test $cf_dir = tack ; then
22208                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
22209                                 continue
22210                         fi
22211                 fi
22212
22213                 if test -z "$cf_cv_src_modules"; then
22214                         cf_cv_src_modules=$cf_dir
22215                 else
22216                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
22217                 fi
22218
22219                 # Make the ncurses_cfg.h file record the library interface files as
22220                 # well.  These are header files that are the same name as their
22221                 # directory.  Ncurses is the only library that does not follow
22222                 # that pattern.
22223                 if test $cf_dir = tack ; then
22224                         continue
22225                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
22226
22227 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22228
22229                         cat >>confdefs.h <<EOF
22230 #define HAVE_${cf_have_include}_H 1
22231 EOF
22232
22233                         cat >>confdefs.h <<EOF
22234 #define HAVE_LIB${cf_have_include} 1
22235 EOF
22236
22237                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
22238                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
22239                         if test "$DFT_LWR_MODEL" = "libtool"; then
22240                                 TEST_ARGS="${TEST_DEPS}"
22241                                 TEST_ARG2="${TEST_DEP2}"
22242                         else
22243                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
22244                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
22245                         fi
22246                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
22247                 fi
22248         fi
22249 done
22250 echo "$as_me:22250: result: $cf_cv_src_modules" >&5
22251 echo "${ECHO_T}$cf_cv_src_modules" >&6
22252
22253 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
22254 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
22255
22256 SRC_SUBDIRS=
22257 if test "x$cf_with_manpages" != xno ; then
22258         SRC_SUBDIRS="$SRC_SUBDIRS man"
22259 fi
22260 SRC_SUBDIRS="$SRC_SUBDIRS include"
22261 for cf_dir in $cf_cv_src_modules
22262 do
22263         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
22264 done
22265 if test "x$cf_with_tests" != "xno" ; then
22266         SRC_SUBDIRS="$SRC_SUBDIRS test"
22267 fi
22268 # always make this, to install the ncurses-config script
22269 SRC_SUBDIRS="$SRC_SUBDIRS misc"
22270 if test "$cf_with_cxx_binding" != no; then
22271         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
22272         SRC_SUBDIRS="$SRC_SUBDIRS c++"
22273 fi
22274
22275 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
22276 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
22277
22278 ADA_SUBDIRS=
22279 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
22280         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
22281         ADA_SUBDIRS="gen src"
22282         if test "x$cf_with_tests" != "xno" ; then
22283                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
22284         fi
22285 fi
22286
22287 SUB_MAKEFILES=
22288 for cf_dir in $SRC_SUBDIRS
22289 do
22290         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
22291 done
22292
22293 if test -n "$ADA_SUBDIRS"; then
22294         for cf_dir in $ADA_SUBDIRS
22295         do
22296                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
22297         done
22298
22299 fi
22300
22301 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22302    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
22303    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
22304 fi
22305
22306 DIRS_TO_MAKE="lib"
22307 for cf_item in $cf_list_models
22308 do
22309
22310         case $cf_item in
22311         (libtool) cf_subdir='obj_lo'  ;;
22312         (normal)  cf_subdir='objects' ;;
22313         (debug)   cf_subdir='obj_g' ;;
22314         (profile) cf_subdir='obj_p' ;;
22315         (shared)
22316                 case $cf_cv_system_name in
22317                 (cygwin|msys)
22318                         cf_subdir='objects' ;;
22319                 (*)
22320                         cf_subdir='obj_s' ;;
22321                 esac
22322         esac
22323
22324         for cf_item2 in $DIRS_TO_MAKE
22325         do
22326                 test $cf_item2 = $cf_subdir && break
22327         done
22328         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
22329 done
22330 for cf_dir in $DIRS_TO_MAKE
22331 do
22332         test ! -d $cf_dir && mkdir $cf_dir
22333 done
22334
22335 # symbols that differ when compiling Ada95 by itself.
22336 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
22337
22338 # values to use as strings
22339
22340 cat >>confdefs.h <<EOF
22341 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
22342 EOF
22343
22344 cat >>confdefs.h <<EOF
22345 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
22346 EOF
22347
22348 ### Now that we're done running tests, add the compiler-warnings, if any
22349
22350 cf_fix_cppflags=no
22351 cf_new_cflags=
22352 cf_new_cppflags=
22353 cf_new_extra_cppflags=
22354
22355 for cf_add_cflags in $EXTRA_CFLAGS
22356 do
22357 case $cf_fix_cppflags in
22358 (no)
22359         case $cf_add_cflags in
22360         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22361                 case $cf_add_cflags in
22362                 (-D*)
22363                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22364
22365                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22366                                 && test -z "${cf_tst_cflags}" \
22367                                 && cf_fix_cppflags=yes
22368
22369                         if test $cf_fix_cppflags = yes ; then
22370                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22371                                 continue
22372                         elif test "${cf_tst_cflags}" = "\"'" ; then
22373                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22374                                 continue
22375                         fi
22376                         ;;
22377                 esac
22378                 case "$CPPFLAGS" in
22379                 (*$cf_add_cflags)
22380                         ;;
22381                 (*)
22382                         case $cf_add_cflags in
22383                         (-D*)
22384                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22385
22386 CPPFLAGS=`echo "$CPPFLAGS" | \
22387         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
22388                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
22389
22390                                 ;;
22391                         esac
22392                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
22393                         ;;
22394                 esac
22395                 ;;
22396         (*)
22397                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
22398                 ;;
22399         esac
22400         ;;
22401 (yes)
22402         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22403
22404         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22405
22406         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22407                 && test -z "${cf_tst_cflags}" \
22408                 && cf_fix_cppflags=no
22409         ;;
22410 esac
22411 done
22412
22413 if test -n "$cf_new_cflags" ; then
22414
22415         CFLAGS="$CFLAGS $cf_new_cflags"
22416 fi
22417
22418 if test -n "$cf_new_cppflags" ; then
22419
22420         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
22421 fi
22422
22423 if test -n "$cf_new_extra_cppflags" ; then
22424
22425         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
22426 fi
22427
22428 ### Define substitutions for header files to avoid name-pollution
22429
22430 if test "x$cf_cv_have_tcgetattr" = xyes ; then
22431         HAVE_TCGETATTR=1
22432 else
22433         HAVE_TCGETATTR=0
22434 fi
22435
22436 if test "x$ac_cv_header_stdint_h" = xyes ; then
22437         HAVE_STDINT_H=1
22438 else
22439         HAVE_STDINT_H=0
22440 fi
22441
22442 if test "x$ac_cv_header_termio_h" = xyes ; then
22443         HAVE_TERMIO_H=1
22444 else
22445         HAVE_TERMIO_H=0
22446 fi
22447
22448 if test "x$ac_cv_header_termios_h" = xyes ; then
22449         HAVE_TERMIOS_H=1
22450 else
22451         HAVE_TERMIOS_H=0
22452 fi
22453
22454 ################################################################################
22455 test "x$use_database" = xyes && \
22456 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
22457
22458 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
22459 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
22460
22461 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
22462 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22463 fi
22464
22465 # Extract the first word of "tic", so it can be a program name with args.
22466 set dummy tic; ac_word=$2
22467 echo "$as_me:22467: checking for $ac_word" >&5
22468 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22469 if test "${ac_cv_path_TIC_PATH+set}" = set; then
22470   echo $ECHO_N "(cached) $ECHO_C" >&6
22471 else
22472   case $TIC_PATH in
22473   [\\/]* | ?:[\\/]*)
22474   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22475   ;;
22476   *)
22477   ac_save_IFS=$IFS; IFS=$ac_path_separator
22478 ac_dummy="$PATH:/usr/local/ncurses/bin"
22479 for ac_dir in $ac_dummy; do
22480   IFS=$ac_save_IFS
22481   test -z "$ac_dir" && ac_dir=.
22482   if $as_executable_p "$ac_dir/$ac_word"; then
22483    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
22484    echo "$as_me:22484: found $ac_dir/$ac_word" >&5
22485    break
22486 fi
22487 done
22488
22489   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22490   ;;
22491 esac
22492 fi
22493 TIC_PATH=$ac_cv_path_TIC_PATH
22494
22495 if test -n "$TIC_PATH"; then
22496   echo "$as_me:22496: result: $TIC_PATH" >&5
22497 echo "${ECHO_T}$TIC_PATH" >&6
22498 else
22499   echo "$as_me:22499: result: no" >&5
22500 echo "${ECHO_T}no" >&6
22501 fi
22502
22503 if test -n "$FALLBACK_LIST"
22504 then
22505         if test "$TIC_PATH" = unknown
22506         then
22507                 { echo "$as_me:22507: WARNING: no tic program found for fallbacks" >&5
22508 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22509         fi
22510 fi
22511
22512 if test "x$cf_with_tests" != xno ; then
22513         MAKE_TESTS=
22514 else
22515         MAKE_TESTS="#"
22516 fi
22517
22518 ADAHTML_DIR=../../doc/html/ada
22519
22520 # these could be configurable, but are not currently
22521 PANEL_NAME=panel
22522 MENU_NAME=menu
22523 FORM_NAME=form
22524 CXX_NAME=ncurses++
22525
22526 # workaround for OS/2 (20151017)
22527 case $cf_cv_system_name in
22528 (os2*)
22529         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
22530         ;;
22531 (*)
22532         LIBTOOL_OPTS_CXX=
22533         ;;
22534 esac
22535
22536 # workaround for g++ versus Solaris (20131116)
22537 case $cf_cv_system_name in
22538 (solaris2*)
22539         case "x$CPPFLAGS" in
22540         (*-D_XOPEN_SOURCE_EXTENDED*)
22541                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
22542
22543 echo "${as_me:-configure}:22543: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22544
22545                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22546                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22547                 ;;
22548         esac
22549         ;;
22550 esac
22551
22552 # Help to automatically enable the extended curses features when using either
22553 # the *-config or the ".pc" files by adding defines.
22554 echo "$as_me:22554: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
22555 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
22556 PKG_CFLAGS=
22557 for cf_loop1 in $CPPFLAGS_after_XOPEN
22558 do
22559         cf_found=no
22560         for cf_loop2 in $CPPFLAGS_before_XOPEN
22561         do
22562                 if test "x$cf_loop1" = "x$cf_loop2"
22563                 then
22564                         cf_found=yes
22565                         break
22566                 fi
22567         done
22568         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
22569 done
22570 echo "$as_me:22570: result: $PKG_CFLAGS" >&5
22571 echo "${ECHO_T}$PKG_CFLAGS" >&6
22572
22573 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
22574 case "x$NCURSES_OSPEED" in
22575 (*short*)
22576         cf_compatible=1
22577         ;;
22578 (*)
22579         cf_compatible=0
22580         ;;
22581 esac
22582
22583 cat >>confdefs.h <<EOF
22584 #define NCURSES_OSPEED_COMPAT $cf_compatible
22585 EOF
22586
22587 case "x$cf_cv_typeof_chtype" in
22588 (xshort|xint|xlong)
22589         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22590         ;;
22591 esac
22592
22593 case "x$cf_cv_typeof_mmask_t" in
22594 (xshort|xint|xlong)
22595         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22596         ;;
22597 esac
22598
22599 # substitute into misc/Makefile to suppress
22600 # (un)install.data from the
22601 # (un)install rules.
22602 if test "x$cf_with_db_install" = "xno"; then
22603         MISC_INSTALL_DATA=
22604         MISC_UNINSTALL_DATA=
22605 else
22606         MISC_INSTALL_DATA=install.data
22607         MISC_UNINSTALL_DATA=uninstall.data
22608 fi
22609
22610 SUB_SCRIPTS=
22611
22612 if test -n "$PACKAGE"
22613 then
22614         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22615         export PACKAGE
22616         echo "package: $PACKAGE"
22617 fi
22618
22619 UNALTERED_SYMS=
22620 cf_filter_syms=no
22621
22622 if test -n "$RESULTING_SYMS"
22623 then
22624         cf_filter_syms=$cf_dft_filter_syms
22625         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
22626
22627 echo "${as_me:-configure}:22627: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22628
22629 fi
22630
22631 if test "x$WILDCARD_SYMS" = xno
22632 then
22633         cf_filter_syms=yes
22634 fi
22635
22636 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
22637
22638 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22639 if test $cf_filter_syms = yes
22640 then
22641         RESULTING_SYMS=resulting.map
22642 fi
22643
22644 if test "x$cross_compiling" = xyes ; then
22645         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
22646 else
22647         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
22648 fi
22649
22650 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"
22651 ac_config_commands="$ac_config_commands default"
22652 cat >confcache <<\_ACEOF
22653 # This file is a shell script that caches the results of configure
22654 # tests run on this system so they can be shared between configure
22655 # scripts and configure runs, see configure's option --config-cache.
22656 # It is not useful on other systems.  If it contains results you don't
22657 # want to keep, you may remove or edit it.
22658 #
22659 # config.status only pays attention to the cache file if you give it
22660 # the --recheck option to rerun configure.
22661 #
22662 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22663 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22664 # following values.
22665
22666 _ACEOF
22667
22668 # The following way of writing the cache mishandles newlines in values,
22669 # but we know of no workaround that is simple, portable, and efficient.
22670 # So, don't put newlines in cache variables' values.
22671 # Ultrix sh set writes to stderr and can't be redirected directly,
22672 # and sets the high bit in the cache file unless we assign to the vars.
22673 {
22674   (set) 2>&1 |
22675     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22676     *ac_space=\ *)
22677       # `set' does not quote correctly, so add quotes (double-quote
22678       # substitution turns \\\\ into \\, and sed turns \\ into \).
22679       sed -n \
22680         "s/'/'\\\\''/g;
22681           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22682       ;;
22683     *)
22684       # `set' quotes correctly as required by POSIX, so do not add quotes.
22685       sed -n \
22686         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22687       ;;
22688     esac;
22689 } |
22690   sed '
22691      t clear
22692      : clear
22693      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22694      t end
22695      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22696      : end' >>confcache
22697 if cmp -s $cache_file confcache; then :; else
22698   if test -w $cache_file; then
22699     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22700     cat confcache >$cache_file
22701   else
22702     echo "not updating unwritable cache $cache_file"
22703   fi
22704 fi
22705 rm -f confcache
22706
22707 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22708 # Let make expand exec_prefix.
22709 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22710
22711 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22712 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22713 # trailing colons and then remove the whole line if VPATH becomes empty
22714 # (actually we leave an empty line to preserve line numbers).
22715 if test "x$srcdir" = x.; then
22716   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22717 s/:*\$(srcdir):*/:/;
22718 s/:*\${srcdir}:*/:/;
22719 s/:*@srcdir@:*/:/;
22720 s/^\([^=]*=[    ]*\):*/\1/;
22721 s/:*$//;
22722 s/^[^=]*=[      ]*$//;
22723 }'
22724 fi
22725
22726 DEFS=-DHAVE_CONFIG_H
22727
22728 : ${CONFIG_STATUS=./config.status}
22729 ac_clean_files_save=$ac_clean_files
22730 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22731 { echo "$as_me:22731: creating $CONFIG_STATUS" >&5
22732 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22733 cat >$CONFIG_STATUS <<_ACEOF
22734 #! $SHELL
22735 # Generated automatically by configure.
22736 # Run this file to recreate the current configuration.
22737 # Compiler output produced by configure, useful for debugging
22738 # configure, is in config.log if it exists.
22739
22740 debug=false
22741 SHELL=\${CONFIG_SHELL-$SHELL}
22742 ac_cs_invocation="\$0 \$@"
22743
22744 _ACEOF
22745
22746 cat >>$CONFIG_STATUS <<\_ACEOF
22747 # Be Bourne compatible
22748 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22749   emulate sh
22750   NULLCMD=:
22751 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22752   set -o posix
22753 fi
22754
22755 # Name of the executable.
22756 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22757
22758 if expr a : '\(a\)' >/dev/null 2>&1; then
22759   as_expr=expr
22760 else
22761   as_expr=false
22762 fi
22763
22764 rm -f conf$$ conf$$.exe conf$$.file
22765 echo >conf$$.file
22766 if ln -s conf$$.file conf$$ 2>/dev/null; then
22767   # We could just check for DJGPP; but this test a) works b) is more generic
22768   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22769   if test -f conf$$.exe; then
22770     # Don't use ln at all; we don't have any links
22771     as_ln_s='cp -p'
22772   else
22773     as_ln_s='ln -s'
22774   fi
22775 elif ln conf$$.file conf$$ 2>/dev/null; then
22776   as_ln_s=ln
22777 else
22778   as_ln_s='cp -p'
22779 fi
22780 rm -f conf$$ conf$$.exe conf$$.file
22781
22782 as_executable_p="test -f"
22783
22784 # Support unset when possible.
22785 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22786   as_unset=unset
22787 else
22788   as_unset=false
22789 fi
22790
22791 # NLS nuisances.
22792 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22793 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22794 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22795 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22796 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22797 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22798 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22799 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22800
22801 # IFS
22802 # We need space, tab and new line, in precisely that order.
22803 as_nl='
22804 '
22805 IFS="   $as_nl"
22806
22807 # CDPATH.
22808 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22809
22810 exec 6>&1
22811
22812 _ACEOF
22813
22814 # Files that config.status was made for.
22815 if test -n "$ac_config_files"; then
22816   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22817 fi
22818
22819 if test -n "$ac_config_headers"; then
22820   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22821 fi
22822
22823 if test -n "$ac_config_links"; then
22824   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22825 fi
22826
22827 if test -n "$ac_config_commands"; then
22828   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22829 fi
22830
22831 cat >>$CONFIG_STATUS <<\EOF
22832
22833 ac_cs_usage="\
22834 \`$as_me' instantiates files from templates according to the
22835 current configuration.
22836
22837 Usage: $0 [OPTIONS] [FILE]...
22838
22839   -h, --help       print this help, then exit
22840   -V, --version    print version number, then exit
22841   -d, --debug      don't remove temporary files
22842       --recheck    update $as_me by reconfiguring in the same conditions
22843   --file=FILE[:TEMPLATE]
22844                    instantiate the configuration file FILE
22845   --header=FILE[:TEMPLATE]
22846                    instantiate the configuration header FILE
22847
22848 Configuration files:
22849 $config_files
22850
22851 Configuration headers:
22852 $config_headers
22853
22854 Configuration commands:
22855 $config_commands
22856
22857 Report bugs to <dickey@invisible-island.net>."
22858 EOF
22859
22860 cat >>$CONFIG_STATUS <<EOF
22861 ac_cs_version="\\
22862 config.status
22863 configured by $0, generated by GNU Autoconf 2.52.20150926,
22864   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22865
22866 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22867 Free Software Foundation, Inc.
22868 This config.status script is free software; the Free Software Foundation
22869 gives unlimited permission to copy, distribute and modify it."
22870 srcdir=$srcdir
22871 INSTALL="$INSTALL"
22872 EOF
22873
22874 cat >>$CONFIG_STATUS <<\EOF
22875 # If no file are specified by the user, then we need to provide default
22876 # value.  By we need to know if files were specified by the user.
22877 ac_need_defaults=:
22878 while test $# != 0
22879 do
22880   case $1 in
22881   --*=*)
22882     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22883     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22884     shift
22885     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22886     shift
22887     ;;
22888   -*);;
22889   *) # This is not an option, so the user has probably given explicit
22890      # arguments.
22891      ac_need_defaults=false;;
22892   esac
22893
22894   case $1 in
22895   # Handling of the options.
22896 EOF
22897 cat >>$CONFIG_STATUS <<EOF
22898   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22899     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22900     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22901 EOF
22902 cat >>$CONFIG_STATUS <<\EOF
22903   --version | --vers* | -V )
22904     echo "$ac_cs_version"; exit 0 ;;
22905   --he | --h)
22906     # Conflict between --help and --header
22907     { { echo "$as_me:22907: error: ambiguous option: $1
22908 Try \`$0 --help' for more information." >&5
22909 echo "$as_me: error: ambiguous option: $1
22910 Try \`$0 --help' for more information." >&2;}
22911    { (exit 1); exit 1; }; };;
22912   --help | --hel | -h )
22913     echo "$ac_cs_usage"; exit 0 ;;
22914   --debug | --d* | -d )
22915     debug=: ;;
22916   --file | --fil | --fi | --f )
22917     shift
22918     CONFIG_FILES="$CONFIG_FILES $1"
22919     ac_need_defaults=false;;
22920   --header | --heade | --head | --hea )
22921     shift
22922     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22923     ac_need_defaults=false;;
22924
22925   # This is an error.
22926   -*) { { echo "$as_me:22926: error: unrecognized option: $1
22927 Try \`$0 --help' for more information." >&5
22928 echo "$as_me: error: unrecognized option: $1
22929 Try \`$0 --help' for more information." >&2;}
22930    { (exit 1); exit 1; }; } ;;
22931
22932   *) ac_config_targets="$ac_config_targets $1" ;;
22933
22934   esac
22935   shift
22936 done
22937
22938 exec 5>>config.log
22939 cat >&5 << _ACEOF
22940
22941 ## ----------------------- ##
22942 ## Running config.status.  ##
22943 ## ----------------------- ##
22944
22945 This file was extended by $as_me 2.52.20150926, executed with
22946   CONFIG_FILES    = $CONFIG_FILES
22947   CONFIG_HEADERS  = $CONFIG_HEADERS
22948   CONFIG_LINKS    = $CONFIG_LINKS
22949   CONFIG_COMMANDS = $CONFIG_COMMANDS
22950   > $ac_cs_invocation
22951 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22952
22953 _ACEOF
22954 EOF
22955
22956 cat >>$CONFIG_STATUS <<EOF
22957 #
22958 # INIT-COMMANDS section.
22959 #
22960
22961 ### Special initialization commands, used to pass information from the
22962 ### configuration-run into config.status
22963
22964 AWK="$AWK"
22965 ALTERNATE_SYMS="$ALTERNATE_SYMS"
22966 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22967 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22968 ECHO_LD="$ECHO_LD"
22969 EXTRA_SUFFIX="$EXTRA_SUFFIX"
22970 LDCONFIG="$LDCONFIG"
22971 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22972 LIB_NAME="$LIB_NAME"
22973 LIB_PREFIX="$LIB_PREFIX"
22974 LIB_SUBSETS="$LIB_SUBSETS"
22975 LIB_SUFFIX="$LIB_SUFFIX"
22976 LIB_TRACING="$LIB_TRACING"
22977 LN_S="$LN_S"
22978 MAKE_TERMINFO="$MAKE_TERMINFO"
22979 NCURSES_MAJOR="$NCURSES_MAJOR"
22980 NCURSES_MINOR="$NCURSES_MINOR"
22981 NCURSES_OSPEED="$NCURSES_OSPEED"
22982 NCURSES_PATCH="$NCURSES_PATCH"
22983 SRC_SUBDIRS="$SRC_SUBDIRS"
22984 TERMINFO="$TERMINFO"
22985 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22986 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22987 TICS_NAME="$TICS_NAME"
22988 TICS_SUFFIX="$TICS_SUFFIX"
22989 TIC_PATH="$TIC_PATH"
22990 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22991 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22992 TINFO_NAME="$TINFO_NAME"
22993 TINFO_SUFFIX="$TINFO_SUFFIX"
22994 UNALTERED_SYMS="$UNALTERED_SYMS"
22995 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
22996 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
22997 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
22998 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22999 WILDCARD_SYMS="$WILDCARD_SYMS"
23000 WITH_CURSES_H="$with_curses_h"
23001 WITH_ECHO="${enable_echo:=yes}"
23002 WITH_OVERWRITE="$with_overwrite"
23003 cf_LIST_MODELS="$cf_list_models"
23004 cf_cv_abi_version="$cf_cv_abi_version"
23005 cf_cv_do_relink="$cf_cv_do_relink"
23006 cf_cv_do_symlinks="$cf_cv_do_symlinks"
23007 cf_cv_enable_lp64="$cf_cv_enable_lp64"
23008 cf_cv_enable_opaque="$cf_cv_enable_opaque"
23009 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
23010 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
23011 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
23012 cf_cv_rel_version="$cf_cv_rel_version"
23013 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
23014 cf_cv_shared_soname='$cf_cv_shared_soname'
23015 cf_cv_shlib_version="$cf_cv_shlib_version"
23016 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
23017 cf_cv_system_name="$cf_cv_system_name"
23018 cf_cv_term_driver="$with_term_driver"
23019 cf_with_ada="$cf_with_ada"
23020 cf_with_cxx_binding="$cf_with_cxx_binding"
23021 cf_with_db_install="$cf_with_db_install"
23022 cf_with_manpages="$cf_with_manpages"
23023 cf_with_tests="$cf_with_tests"
23024 host="$host"
23025 target="$target"
23026 with_shared_cxx="$with_shared_cxx"
23027
23028 EOF
23029
23030 cat >>$CONFIG_STATUS <<\EOF
23031 for ac_config_target in $ac_config_targets
23032 do
23033   case "$ac_config_target" in
23034   # Handling of arguments.
23035   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
23036   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
23037   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
23038   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
23039   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
23040   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
23041   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
23042   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23043   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23044   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
23045   *) { { echo "$as_me:23045: error: invalid argument: $ac_config_target" >&5
23046 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23047    { (exit 1); exit 1; }; };;
23048   esac
23049 done
23050
23051 # If the user did not use the arguments to specify the items to instantiate,
23052 # then the envvar interface is used.  Set only those that are not.
23053 # We use the long form for the default assignment because of an extremely
23054 # bizarre bug on SunOS 4.1.3.
23055 if $ac_need_defaults; then
23056   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23057   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23058   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23059 fi
23060
23061 # Create a temporary directory, and hook for its removal unless debugging.
23062 $debug ||
23063 {
23064   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23065   trap '{ (exit 1); exit 1; }' 1 2 13 15
23066 }
23067
23068 # Create a (secure) tmp directory for tmp files.
23069 : ${TMPDIR=/tmp}
23070 {
23071   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23072   test -n "$tmp" && test -d "$tmp"
23073 }  ||
23074 {
23075   tmp=$TMPDIR/cs$$-$RANDOM
23076   (umask 077 && mkdir $tmp)
23077 } ||
23078 {
23079    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23080    { (exit 1); exit 1; }
23081 }
23082
23083 EOF
23084
23085 cat >>$CONFIG_STATUS <<EOF
23086
23087 #
23088 # CONFIG_FILES section.
23089 #
23090
23091 # No need to generate the scripts if there are no CONFIG_FILES.
23092 # This happens for instance when ./config.status config.h
23093 if test -n "\$CONFIG_FILES"; then
23094   # Protect against being on the right side of a sed subst in config.status.
23095   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23096    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23097 s,@SHELL@,$SHELL,;t t
23098 s,@exec_prefix@,$exec_prefix,;t t
23099 s,@prefix@,$prefix,;t t
23100 s,@program_transform_name@,$program_transform_name,;t t
23101 s,@bindir@,$bindir,;t t
23102 s,@sbindir@,$sbindir,;t t
23103 s,@libexecdir@,$libexecdir,;t t
23104 s,@datarootdir@,$datarootdir,;t t
23105 s,@datadir@,$datadir,;t t
23106 s,@sysconfdir@,$sysconfdir,;t t
23107 s,@sharedstatedir@,$sharedstatedir,;t t
23108 s,@localstatedir@,$localstatedir,;t t
23109 s,@libdir@,$libdir,;t t
23110 s,@includedir@,$includedir,;t t
23111 s,@oldincludedir@,$oldincludedir,;t t
23112 s,@infodir@,$infodir,;t t
23113 s,@mandir@,$mandir,;t t
23114 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23115 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23116 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23117 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23118 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23119 s,@build_alias@,$build_alias,;t t
23120 s,@host_alias@,$host_alias,;t t
23121 s,@target_alias@,$target_alias,;t t
23122 s,@ECHO_C@,$ECHO_C,;t t
23123 s,@ECHO_N@,$ECHO_N,;t t
23124 s,@ECHO_T@,$ECHO_T,;t t
23125 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23126 s,@DEFS@,$DEFS,;t t
23127 s,@LIBS@,$LIBS,;t t
23128 s,@top_builddir@,$top_builddir,;t t
23129 s,@EGREP@,$EGREP,;t t
23130 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
23131 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
23132 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
23133 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23134 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23135 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
23136 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
23137 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
23138 s,@VERSION@,$VERSION,;t t
23139 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
23140 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
23141 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
23142 s,@PACKAGE@,$PACKAGE,;t t
23143 s,@build@,$build,;t t
23144 s,@build_cpu@,$build_cpu,;t t
23145 s,@build_vendor@,$build_vendor,;t t
23146 s,@build_os@,$build_os,;t t
23147 s,@host@,$host,;t t
23148 s,@host_cpu@,$host_cpu,;t t
23149 s,@host_vendor@,$host_vendor,;t t
23150 s,@host_os@,$host_os,;t t
23151 s,@target@,$target,;t t
23152 s,@target_cpu@,$target_cpu,;t t
23153 s,@target_vendor@,$target_vendor,;t t
23154 s,@target_os@,$target_os,;t t
23155 s,@CC@,$CC,;t t
23156 s,@CFLAGS@,$CFLAGS,;t t
23157 s,@LDFLAGS@,$LDFLAGS,;t t
23158 s,@CPPFLAGS@,$CPPFLAGS,;t t
23159 s,@ac_ct_CC@,$ac_ct_CC,;t t
23160 s,@EXEEXT@,$EXEEXT,;t t
23161 s,@OBJEXT@,$OBJEXT,;t t
23162 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23163 s,@CPP@,$CPP,;t t
23164 s,@LDCONFIG@,$LDCONFIG,;t t
23165 s,@CXX@,$CXX,;t t
23166 s,@CXXFLAGS@,$CXXFLAGS,;t t
23167 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
23168 s,@AWK@,$AWK,;t t
23169 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23170 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23171 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23172 s,@LINT@,$LINT,;t t
23173 s,@LINT_OPTS@,$LINT_OPTS,;t t
23174 s,@LN_S@,$LN_S,;t t
23175 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23176 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
23177 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
23178 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
23179 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
23180 s,@SET_MAKE@,$SET_MAKE,;t t
23181 s,@CTAGS@,$CTAGS,;t t
23182 s,@ETAGS@,$ETAGS,;t t
23183 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23184 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23185 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
23186 s,@RANLIB@,$RANLIB,;t t
23187 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23188 s,@LD@,$LD,;t t
23189 s,@ac_ct_LD@,$ac_ct_LD,;t t
23190 s,@AR@,$AR,;t t
23191 s,@ac_ct_AR@,$ac_ct_AR,;t t
23192 s,@NM@,$NM,;t t
23193 s,@ac_ct_NM@,$ac_ct_NM,;t t
23194 s,@ARFLAGS@,$ARFLAGS,;t t
23195 s,@DESTDIR@,$DESTDIR,;t t
23196 s,@BUILD_CC@,$BUILD_CC,;t t
23197 s,@BUILD_CPP@,$BUILD_CPP,;t t
23198 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
23199 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
23200 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
23201 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
23202 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
23203 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
23204 s,@cf_list_models@,$cf_list_models,;t t
23205 s,@ABI_VERSION@,$ABI_VERSION,;t t
23206 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
23207 s,@LIBTOOL@,$LIBTOOL,;t t
23208 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
23209 s,@LT_UNDEF@,$LT_UNDEF,;t t
23210 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
23211 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23212 s,@LIB_CREATE@,$LIB_CREATE,;t t
23213 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
23214 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
23215 s,@LIB_PREP@,$LIB_PREP,;t t
23216 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23217 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23218 s,@LIB_LINK@,$LIB_LINK,;t t
23219 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
23220 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
23221 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
23222 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23223 s,@TICS_NAME@,$TICS_NAME,;t t
23224 s,@TINFO_NAME@,$TINFO_NAME,;t t
23225 s,@LIB_NAME@,$LIB_NAME,;t t
23226 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
23227 s,@CC_G_OPT@,$CC_G_OPT,;t t
23228 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
23229 s,@LD_MODEL@,$LD_MODEL,;t t
23230 s,@shlibdir@,$shlibdir,;t t
23231 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
23232 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23233 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
23234 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23235 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
23236 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
23237 s,@LINK_PROGS@,$LINK_PROGS,;t t
23238 s,@LINK_TESTS@,$LINK_TESTS,;t t
23239 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
23240 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23241 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
23242 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
23243 s,@RPATH_LIST@,$RPATH_LIST,;t t
23244 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
23245 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
23246 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
23247 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
23248 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
23249 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
23250 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
23251 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
23252 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
23253 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
23254 s,@XTERM_KBS@,$XTERM_KBS,;t t
23255 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
23256 s,@TERMINFO@,$TERMINFO,;t t
23257 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
23258 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
23259 s,@TERMPATH@,$TERMPATH,;t t
23260 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
23261 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
23262 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
23263 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
23264 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
23265 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
23266 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
23267 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
23268 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
23269 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
23270 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
23271 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
23272 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
23273 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
23274 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
23275 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
23276 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
23277 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
23278 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
23279 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
23280 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
23281 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
23282 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
23283 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
23284 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
23285 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
23286 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
23287 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
23288 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
23289 s,@PTHREAD@,$PTHREAD,;t t
23290 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
23291 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
23292 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
23293 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
23294 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23295 s,@ECHO_LT@,$ECHO_LT,;t t
23296 s,@ECHO_LD@,$ECHO_LD,;t t
23297 s,@RULE_CC@,$RULE_CC,;t t
23298 s,@SHOW_CC@,$SHOW_CC,;t t
23299 s,@ECHO_CC@,$ECHO_CC,;t t
23300 s,@ECHO_LINK@,$ECHO_LINK,;t t
23301 s,@ADAFLAGS@,$ADAFLAGS,;t t
23302 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23303 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
23304 s,@ADA_TRACE@,$ADA_TRACE,;t t
23305 s,@MATH_LIB@,$MATH_LIB,;t t
23306 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
23307 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
23308 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
23309 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
23310 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
23311 s,@TEST_LIBS@,$TEST_LIBS,;t t
23312 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
23313 s,@CXXCPP@,$CXXCPP,;t t
23314 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
23315 s,@CXX_AR@,$CXX_AR,;t t
23316 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
23317 s,@CXXLIBS@,$CXXLIBS,;t t
23318 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
23319 s,@gnat_exists@,$gnat_exists,;t t
23320 s,@M4_exists@,$M4_exists,;t t
23321 s,@cf_ada_make@,$cf_ada_make,;t t
23322 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
23323 s,@cf_compile_generics@,$cf_compile_generics,;t t
23324 s,@cf_generic_objects@,$cf_generic_objects,;t t
23325 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
23326 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
23327 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
23328 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
23329 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
23330 s,@cf_ada_package@,$cf_ada_package,;t t
23331 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
23332 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
23333 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
23334 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
23335 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
23336 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
23337 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23338 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23339 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
23340 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
23341 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
23342 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
23343 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
23344 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
23345 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
23346 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
23347 s,@TICS_LIBS@,$TICS_LIBS,;t t
23348 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
23349 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
23350 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
23351 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23352 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23353 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
23354 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23355 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23356 s,@includesubdir@,$includesubdir,;t t
23357 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
23358 s,@TICS_LIST@,$TICS_LIST,;t t
23359 s,@TINFO_LIST@,$TINFO_LIST,;t t
23360 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
23361 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
23362 s,@TEST_ARGS@,$TEST_ARGS,;t t
23363 s,@TEST_DEPS@,$TEST_DEPS,;t t
23364 s,@TEST_ARG2@,$TEST_ARG2,;t t
23365 s,@TEST_DEP2@,$TEST_DEP2,;t t
23366 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
23367 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
23368 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
23369 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
23370 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
23371 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
23372 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
23373 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
23374 s,@cross_compiling@,$cross_compiling,;t t
23375 s,@TIC_PATH@,$TIC_PATH,;t t
23376 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
23377 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
23378 s,@PANEL_NAME@,$PANEL_NAME,;t t
23379 s,@MENU_NAME@,$MENU_NAME,;t t
23380 s,@FORM_NAME@,$FORM_NAME,;t t
23381 s,@CXX_NAME@,$CXX_NAME,;t t
23382 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
23383 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
23384 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
23385 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
23386 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
23387 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
23388 CEOF
23389
23390 EOF
23391
23392   cat >>$CONFIG_STATUS <<\EOF
23393   # Split the substitutions into bite-sized pieces for seds with
23394   # small command number limits, like on Digital OSF/1 and HP-UX.
23395   ac_max_sed_lines=48
23396   ac_sed_frag=1 # Number of current file.
23397   ac_beg=1 # First line for current file.
23398   ac_end=$ac_max_sed_lines # Line after last line for current file.
23399   ac_more_lines=:
23400   ac_sed_cmds=
23401   while $ac_more_lines; do
23402     if test $ac_beg -gt 1; then
23403       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23404     else
23405       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23406     fi
23407     if test ! -s $tmp/subs.frag; then
23408       ac_more_lines=false
23409     else
23410       # The purpose of the label and of the branching condition is to
23411       # speed up the sed processing (if there are no `@' at all, there
23412       # is no need to browse any of the substitutions).
23413       # These are the two extra sed commands mentioned above.
23414       (echo ':t
23415   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23416       # It is possible to make a multiline substitution using escaped newlines.
23417       # Ensure that we do not split the substitution between script fragments.
23418       ac_BEG=$ac_end
23419       ac_END=`expr $ac_end + $ac_max_sed_lines`
23420       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
23421       if test -s $tmp/subs.next; then
23422         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
23423         if test ! -s $tmp/subs.edit; then
23424           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
23425           if test ! -s $tmp/subs.edit; then
23426             if test $ac_beg -gt 1; then
23427               ac_end=`expr $ac_end - 1`
23428               continue
23429             fi
23430           fi
23431         fi
23432       fi
23433
23434       if test -z "$ac_sed_cmds"; then
23435         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23436       else
23437         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23438       fi
23439       ac_sed_frag=`expr $ac_sed_frag + 1`
23440       ac_beg=$ac_end
23441       ac_end=`expr $ac_end + $ac_max_sed_lines`
23442     fi
23443   done
23444   if test -z "$ac_sed_cmds"; then
23445     ac_sed_cmds=cat
23446   fi
23447 fi # test -n "$CONFIG_FILES"
23448
23449 EOF
23450 cat >>$CONFIG_STATUS <<\EOF
23451 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23452   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23453   case $ac_file in
23454   - | *:- | *:-:* ) # input from stdin
23455         cat >$tmp/stdin
23456         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23457         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23458   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23459         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23460   * )   ac_file_in=$ac_file.in ;;
23461   esac
23462
23463   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23464   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23465          X"$ac_file" : 'X\(//\)[^/]' \| \
23466          X"$ac_file" : 'X\(//\)$' \| \
23467          X"$ac_file" : 'X\(/\)' \| \
23468          .     : '\(.\)' 2>/dev/null ||
23469 echo X"$ac_file" |
23470     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23471           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23472           /^X\(\/\/\)$/{ s//\1/; q; }
23473           /^X\(\/\).*/{ s//\1/; q; }
23474           s/.*/./; q'`
23475   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23476     { case "$ac_dir" in
23477   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23478   *)                      as_incr_dir=.;;
23479 esac
23480 as_dummy="$ac_dir"
23481 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23482   case $as_mkdir_dir in
23483     # Skip DOS drivespec
23484     ?:) as_incr_dir=$as_mkdir_dir ;;
23485     *)
23486       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23487       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23488     ;;
23489   esac
23490 done; }
23491
23492     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23493     # A "../" for each directory in $ac_dir_suffix.
23494     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23495   else
23496     ac_dir_suffix= ac_dots=
23497   fi
23498
23499   case $srcdir in
23500   .)  ac_srcdir=.
23501       if test -z "$ac_dots"; then
23502          ac_top_srcdir=.
23503       else
23504          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23505       fi ;;
23506   [\\/]* | ?:[\\/]* )
23507       ac_srcdir=$srcdir$ac_dir_suffix;
23508       ac_top_srcdir=$srcdir ;;
23509   *) # Relative path.
23510     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23511     ac_top_srcdir=$ac_dots$srcdir ;;
23512   esac
23513
23514   case $INSTALL in
23515   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23516   *) ac_INSTALL=$ac_dots$INSTALL ;;
23517   esac
23518
23519   if test x"$ac_file" != x-; then
23520     { echo "$as_me:23520: creating $ac_file" >&5
23521 echo "$as_me: creating $ac_file" >&6;}
23522     rm -f "$ac_file"
23523   fi
23524   # Let's still pretend it is `configure' which instantiates (i.e., don't
23525   # use $as_me), people would be surprised to read:
23526   #    /* config.h.  Generated automatically by config.status.  */
23527   configure_input="Generated automatically from `echo $ac_file_in |
23528                                                  sed 's,.*/,,'` by configure."
23529
23530   # First look for the input files in the build tree, otherwise in the
23531   # src tree.
23532   ac_file_inputs=`IFS=:
23533     for f in $ac_file_in; do
23534       case $f in
23535       -) echo $tmp/stdin ;;
23536       [\\/$]*)
23537          # Absolute (can't be DOS-style, as IFS=:)
23538          test -f "$f" || { { echo "$as_me:23538: error: cannot find input file: $f" >&5
23539 echo "$as_me: error: cannot find input file: $f" >&2;}
23540    { (exit 1); exit 1; }; }
23541          echo $f;;
23542       *) # Relative
23543          if test -f "$f"; then
23544            # Build tree
23545            echo $f
23546          elif test -f "$srcdir/$f"; then
23547            # Source tree
23548            echo $srcdir/$f
23549          else
23550            # /dev/null tree
23551            { { echo "$as_me:23551: error: cannot find input file: $f" >&5
23552 echo "$as_me: error: cannot find input file: $f" >&2;}
23553    { (exit 1); exit 1; }; }
23554          fi;;
23555       esac
23556     done` || { (exit 1); exit 1; }
23557 EOF
23558 cat >>$CONFIG_STATUS <<\EOF
23559   ac_warn_datarootdir=no
23560   if test x"$ac_file" != x-; then
23561     for ac_item in $ac_file_inputs
23562     do
23563       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23564       if test -n "$ac_seen"; then
23565         ac_used=`grep '@datarootdir@' $ac_item`
23566         if test -z "$ac_used"; then
23567           { echo "$as_me:23567: WARNING: datarootdir was used implicitly but not set:
23568 $ac_seen" >&5
23569 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23570 $ac_seen" >&2;}
23571           ac_warn_datarootdir=yes
23572         fi
23573       fi
23574       ac_seen=`grep '${datarootdir}' $ac_item`
23575       if test -n "$ac_seen"; then
23576         { echo "$as_me:23576: WARNING: datarootdir was used explicitly but not set:
23577 $ac_seen" >&5
23578 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23579 $ac_seen" >&2;}
23580         ac_warn_datarootdir=yes
23581       fi
23582     done
23583   fi
23584
23585 if test "x$ac_warn_datarootdir" = xyes; then
23586   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23587 fi
23588
23589 EOF
23590 cat >>$CONFIG_STATUS <<EOF
23591   sed "$ac_vpsub
23592 $extrasub
23593 EOF
23594 cat >>$CONFIG_STATUS <<\EOF
23595 :t
23596 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23597 s,@configure_input@,$configure_input,;t t
23598 s,@srcdir@,$ac_srcdir,;t t
23599 s,@top_srcdir@,$ac_top_srcdir,;t t
23600 s,@INSTALL@,$ac_INSTALL,;t t
23601 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23602   rm -f $tmp/stdin
23603   if test x"$ac_file" != x-; then
23604     cp $tmp/out $ac_file
23605
23606     for ac_name in prefix exec_prefix datarootdir
23607     do
23608         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23609         if test -n "$ac_seen"; then
23610             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
23611             if test -z "$ac_init"; then
23612               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23613               { echo "$as_me:23613: WARNING: Variable $ac_name is used but was not set:
23614 $ac_seen" >&5
23615 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23616 $ac_seen" >&2;}
23617             fi
23618         fi
23619     done
23620     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23621     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23622     if test -s $tmp/out; then
23623       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23624       { echo "$as_me:23624: WARNING: Some variables may not be substituted:
23625 $ac_seen" >&5
23626 echo "$as_me: WARNING: Some variables may not be substituted:
23627 $ac_seen" >&2;}
23628     fi
23629   else
23630     cat $tmp/out
23631   fi
23632   rm -f $tmp/out
23633
23634 done
23635 EOF
23636 cat >>$CONFIG_STATUS <<\EOF
23637
23638 #
23639 # CONFIG_HEADER section.
23640 #
23641
23642 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23643 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23644 #
23645 # ac_d sets the value in "#define NAME VALUE" lines.
23646 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23647 ac_dB='[        ].*$,\1#\2'
23648 ac_dC=' '
23649 ac_dD=',;t'
23650 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23651 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23652 ac_iB='\([      ]\),\1#\2define\3'
23653 ac_iC=' '
23654 ac_iD='\4,;t'
23655 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23656 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23657 ac_uB='$,\1#\2define\3'
23658 ac_uC=' '
23659 ac_uD=',;t'
23660
23661 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23662   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23663   case $ac_file in
23664   - | *:- | *:-:* ) # input from stdin
23665         cat >$tmp/stdin
23666         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23667         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23668   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23669         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23670   * )   ac_file_in=$ac_file.in ;;
23671   esac
23672
23673   test x"$ac_file" != x- && { echo "$as_me:23673: creating $ac_file" >&5
23674 echo "$as_me: creating $ac_file" >&6;}
23675
23676   # First look for the input files in the build tree, otherwise in the
23677   # src tree.
23678   ac_file_inputs=`IFS=:
23679     for f in $ac_file_in; do
23680       case $f in
23681       -) echo $tmp/stdin ;;
23682       [\\/$]*)
23683          # Absolute (can't be DOS-style, as IFS=:)
23684          test -f "$f" || { { echo "$as_me:23684: error: cannot find input file: $f" >&5
23685 echo "$as_me: error: cannot find input file: $f" >&2;}
23686    { (exit 1); exit 1; }; }
23687          echo $f;;
23688       *) # Relative
23689          if test -f "$f"; then
23690            # Build tree
23691            echo $f
23692          elif test -f "$srcdir/$f"; then
23693            # Source tree
23694            echo $srcdir/$f
23695          else
23696            # /dev/null tree
23697            { { echo "$as_me:23697: error: cannot find input file: $f" >&5
23698 echo "$as_me: error: cannot find input file: $f" >&2;}
23699    { (exit 1); exit 1; }; }
23700          fi;;
23701       esac
23702     done` || { (exit 1); exit 1; }
23703   # Remove the trailing spaces.
23704   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23705
23706 EOF
23707
23708 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23709 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23710 # be either 'cat' or 'sort'.
23711 cat confdefs.h | uniq >conftest.vals
23712
23713 # Break up conftest.vals because some shells have a limit on
23714 # the size of here documents, and old seds have small limits too.
23715
23716 rm -f conftest.tail
23717 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23718 while grep . conftest.vals >/dev/null
23719 do
23720   # Write chunks of a limited-size here document to conftest.frag.
23721   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23722   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23723   echo 'CEOF' >> $CONFIG_STATUS
23724   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23725   rm -f conftest.vals
23726   mv conftest.tail conftest.vals
23727 done
23728 rm -f conftest.vals
23729
23730 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23731 # marker @DEFS@.
23732 echo '  cat >> conftest.edit <<CEOF
23733 /@DEFS@/r conftest.frag
23734 /@DEFS@/d
23735 CEOF
23736 sed -f conftest.edit $tmp/in > $tmp/out
23737 rm -f $tmp/in
23738 mv $tmp/out $tmp/in
23739 rm -f conftest.edit conftest.frag
23740 ' >> $CONFIG_STATUS
23741
23742 cat >>$CONFIG_STATUS <<\EOF
23743   # Let's still pretend it is `configure' which instantiates (i.e., don't
23744   # use $as_me), people would be surprised to read:
23745   #    /* config.h.  Generated automatically by config.status.  */
23746   if test x"$ac_file" = x-; then
23747     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23748   else
23749     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23750   fi
23751   cat $tmp/in >>$tmp/config.h
23752   rm -f $tmp/in
23753   if test x"$ac_file" != x-; then
23754     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23755       { echo "$as_me:23755: $ac_file is unchanged" >&5
23756 echo "$as_me: $ac_file is unchanged" >&6;}
23757     else
23758       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23759          X"$ac_file" : 'X\(//\)[^/]' \| \
23760          X"$ac_file" : 'X\(//\)$' \| \
23761          X"$ac_file" : 'X\(/\)' \| \
23762          .     : '\(.\)' 2>/dev/null ||
23763 echo X"$ac_file" |
23764     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23765           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23766           /^X\(\/\/\)$/{ s//\1/; q; }
23767           /^X\(\/\).*/{ s//\1/; q; }
23768           s/.*/./; q'`
23769       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23770         { case "$ac_dir" in
23771   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23772   *)                      as_incr_dir=.;;
23773 esac
23774 as_dummy="$ac_dir"
23775 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23776   case $as_mkdir_dir in
23777     # Skip DOS drivespec
23778     ?:) as_incr_dir=$as_mkdir_dir ;;
23779     *)
23780       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23781       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23782     ;;
23783   esac
23784 done; }
23785
23786       fi
23787       rm -f $ac_file
23788       mv $tmp/config.h $ac_file
23789     fi
23790   else
23791     cat $tmp/config.h
23792     rm -f $tmp/config.h
23793   fi
23794 done
23795 EOF
23796 cat >>$CONFIG_STATUS <<\EOF
23797 #
23798 # CONFIG_COMMANDS section.
23799 #
23800 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23801   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23802   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23803
23804   case $ac_dest in
23805     default )
23806 if test "x$cf_with_tests" != xno ; then
23807
23808 for cf_dir in test
23809 do
23810         if test ! -d $srcdir/$cf_dir; then
23811                 continue
23812         elif test -f $srcdir/$cf_dir/programs; then
23813                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23814         fi
23815 done
23816
23817 fi
23818
23819 cf_prefix=$LIB_PREFIX
23820
23821 case $cf_cv_shlib_version in
23822 (cygdll|msysdll|mingw)
23823         TINFO_NAME=$TINFO_ARG_SUFFIX
23824         TINFO_SUFFIX=.dll
23825         ;;
23826 esac
23827
23828 if test -n "$TINFO_SUFFIX" ; then
23829         case $TINFO_SUFFIX in
23830         (tw*)
23831                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
23832                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
23833                 ;;
23834         (t*)
23835                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
23836                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
23837                 ;;
23838         (w*)
23839                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
23840                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
23841                 ;;
23842         esac
23843 fi
23844
23845 for cf_dir in $SRC_SUBDIRS
23846 do
23847         if test ! -d $srcdir/$cf_dir ; then
23848                 continue
23849         elif test -f $srcdir/$cf_dir/modules; then
23850
23851                 SHARED_LIB=
23852                 Libs_To_Make=
23853                 cf_awk_program=
23854                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23855                 then
23856                         cf_awk_program="$cf_awk_program\
23857 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
23858 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
23859 "
23860                 fi
23861
23862                 if test "x$WILDCARD_SYMS" = xno
23863                 then
23864                         cf_awk_program="$cf_awk_program\
23865 /[      ]_\\*;/ { skip=1; next; }\
23866 "
23867                 fi
23868
23869                 if test "x$cf_awk_program" != "x"
23870                 then
23871                         cat >>$cf_dir/Makefile <<CF_EOF
23872
23873 # Generated by CF_LIB_RULES
23874 resulting.map: $UNALTERED_SYMS
23875         $AWK 'BEGIN { skip = 1; last=""; } \
23876 $cf_awk_program \
23877 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
23878  skip = 0; last = \$\$0; } \
23879 END { print last; }' < $UNALTERED_SYMS >\$@
23880
23881 distclean::
23882         rm -f resulting.map
23883 CF_EOF
23884                 fi
23885
23886                 for cf_item in $cf_LIST_MODELS
23887                 do
23888
23889         case X$cf_item in
23890         (Xlibtool)
23891                 cf_suffix='.la'
23892                 cf_depsuf=$cf_suffix
23893                 ;;
23894         (Xdebug)
23895                 cf_suffix='_g.a'
23896                 cf_depsuf=$cf_suffix
23897                 ;;
23898         (Xprofile)
23899                 cf_suffix='_p.a'
23900                 cf_depsuf=$cf_suffix
23901                 ;;
23902         (Xshared)
23903                 case $cf_cv_system_name in
23904                 (aix[5-7]*)
23905                         cf_suffix='.so'
23906                         cf_depsuf=$cf_suffix
23907                         ;;
23908                 (cygwin*|msys*|mingw*)
23909                         cf_suffix='.dll'
23910                         cf_depsuf='.dll.a'
23911                         ;;
23912                 (darwin*)
23913                         cf_suffix='.dylib'
23914                         cf_depsuf=$cf_suffix
23915                         ;;
23916                 (hpux*)
23917                         case $target in
23918                         (ia64*)
23919                                 cf_suffix='.so'
23920                                 cf_depsuf=$cf_suffix
23921                                 ;;
23922                         (*)
23923                                 cf_suffix='.sl'
23924                                 cf_depsuf=$cf_suffix
23925                                 ;;
23926                         esac
23927                         ;;
23928                 (*)
23929                         cf_suffix='.so'
23930                         cf_depsuf=$cf_suffix
23931                         ;;
23932                 esac
23933                 ;;
23934         (*)
23935                 cf_suffix='.a'
23936                 cf_depsuf=$cf_suffix
23937                 ;;
23938         esac
23939         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23940         then
23941                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23942                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23943         fi
23944
23945                         cf_libname=$cf_dir
23946                         test "$cf_dir" = c++ && cf_libname=ncurses++
23947                         if test $cf_item = shared ; then
23948                                 if test -n "${LIB_SUFFIX}"
23949                                 then
23950                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23951                                 else
23952                                         cf_shared_suffix="$cf_suffix"
23953                                 fi
23954                                 if test "$cf_cv_do_symlinks" = yes ; then
23955                                         cf_version_name=
23956
23957                                         case "$cf_cv_shlib_version" in
23958                                         (rel)
23959                                                 cf_version_name=REL_VERSION
23960                                                 ;;
23961                                         (abi)
23962                                                 cf_version_name=ABI_VERSION
23963                                                 ;;
23964                                         esac
23965
23966                                         if test -n "$cf_version_name"
23967                                         then
23968                                                 case "$cf_cv_system_name" in
23969                                                 (darwin*)
23970                                                         # "w", etc?
23971                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23972                                                         ;;
23973                                                 (*)
23974                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23975                                                         ;;
23976                                                 esac
23977                                         fi
23978                                         if test -n "${USE_LIB_SUFFIX}"
23979                                         then
23980                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23981                                         else
23982                                                 cf_shared_suffix="$cf_suffix"
23983                                         fi
23984                                 fi
23985                                 # cygwin needs import library, and has unique naming convention
23986                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23987                                 # use 'cyg' prefix for shared lib.
23988                                 case $cf_cv_shlib_version in
23989                                 (cygdll)
23990                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23991                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
23992                                         ;;
23993                                 (msysdll)
23994                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23995                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
23996                                         ;;
23997                                 (mingw)
23998                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23999                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
24000                                         ;;
24001                                 (*)
24002                                         cf_add_lib=
24003                                         ;;
24004                                 esac
24005                                 if test -n "$cf_add_lib"
24006                                 then
24007                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24008                                         continue
24009                                 fi
24010                         fi
24011                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
24012                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24013                 done
24014
24015                 if test $cf_dir = ncurses ; then
24016                         cf_subsets="$LIB_SUBSETS"
24017                         cf_r_parts="$cf_subsets"
24018                         cf_liblist="$Libs_To_Make"
24019
24020                         while test -n "$cf_r_parts"
24021                         do
24022                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
24023                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
24024                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
24025                                         cf_add_lib=
24026                                         case $cf_l_parts in
24027                                         (*termlib*)
24028                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
24029                                                 ;;
24030                                         (*ticlib*)
24031                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
24032                                                 ;;
24033                                         (*)
24034                                                 break
24035                                                 ;;
24036                                         esac
24037                                         if test -n "$cf_add_lib"; then
24038                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
24039                                         fi
24040                                 else
24041                                         break
24042                                 fi
24043                         done
24044                 else
24045                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
24046                 fi
24047
24048                 if test $cf_dir = c++; then
24049                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
24050                                 cf_list=
24051                                 for cf_item in $Libs_To_Make
24052                                 do
24053                                         case $cf_item in
24054                                         (*.a)
24055                                                 ;;
24056                                         (*)
24057                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
24058                                                 ;;
24059                                         esac
24060                                         for cf_test in $cf_list
24061                                         do
24062                                                 if test "$cf_test" = "$cf_item"
24063                                                 then
24064                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
24065                                                         cf_item=
24066                                                         break
24067                                                 fi
24068                                         done
24069                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
24070                                 done
24071                                 Libs_To_Make="$cf_list"
24072                         fi
24073                 fi
24074
24075                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
24076                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
24077                         $cf_dir/Makefile >$cf_dir/Makefile.out
24078                 mv $cf_dir/Makefile.out $cf_dir/Makefile
24079
24080                 $AWK -f $srcdir/mk-0th.awk \
24081                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
24082                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24083
24084                 for cf_subset in $cf_subsets
24085                 do
24086                         cf_subdirs=
24087                         for cf_item in $cf_LIST_MODELS
24088                         do
24089
24090                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
24091
24092 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24093
24094                         CXX_MODEL=$cf_ITEM
24095                         if test "$CXX_MODEL" = SHARED; then
24096                                 case $cf_cv_shlib_version in
24097                                 (cygdll|msysdll|mingw)
24098                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
24099
24100 echo "${as_me:-configure}:24100: testing overriding CXX_MODEL to SHARED ..." 1>&5
24101
24102                                         with_shared_cxx=yes
24103                                         ;;
24104                                 (*)
24105                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
24106                                         ;;
24107                                 esac
24108                         fi
24109
24110         case X$cf_item in
24111         (Xlibtool)
24112                 cf_suffix='.la'
24113                 cf_depsuf=$cf_suffix
24114                 ;;
24115         (Xdebug)
24116                 cf_suffix='_g.a'
24117                 cf_depsuf=$cf_suffix
24118                 ;;
24119         (Xprofile)
24120                 cf_suffix='_p.a'
24121                 cf_depsuf=$cf_suffix
24122                 ;;
24123         (Xshared)
24124                 case $cf_cv_system_name in
24125                 (aix[5-7]*)
24126                         cf_suffix='.so'
24127                         cf_depsuf=$cf_suffix
24128                         ;;
24129                 (cygwin*|msys*|mingw*)
24130                         cf_suffix='.dll'
24131                         cf_depsuf='.dll.a'
24132                         ;;
24133                 (darwin*)
24134                         cf_suffix='.dylib'
24135                         cf_depsuf=$cf_suffix
24136                         ;;
24137                 (hpux*)
24138                         case $target in
24139                         (ia64*)
24140                                 cf_suffix='.so'
24141                                 cf_depsuf=$cf_suffix
24142                                 ;;
24143                         (*)
24144                                 cf_suffix='.sl'
24145                                 cf_depsuf=$cf_suffix
24146                                 ;;
24147                         esac
24148                         ;;
24149                 (*)
24150                         cf_suffix='.so'
24151                         cf_depsuf=$cf_suffix
24152                         ;;
24153                 esac
24154                 ;;
24155         (*)
24156                 cf_suffix='.a'
24157                 cf_depsuf=$cf_suffix
24158                 ;;
24159         esac
24160         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24161         then
24162                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24163                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24164         fi
24165
24166         case $cf_item in
24167         (libtool) cf_subdir='obj_lo'  ;;
24168         (normal)  cf_subdir='objects' ;;
24169         (debug)   cf_subdir='obj_g' ;;
24170         (profile) cf_subdir='obj_p' ;;
24171         (shared)
24172                 case $cf_cv_system_name in
24173                 (cygwin|msys)
24174                         cf_subdir='objects' ;;
24175                 (*)
24176                         cf_subdir='obj_s' ;;
24177                 esac
24178         esac
24179
24180                         # Test for case where we build libtinfo with a different name.
24181                         cf_libname=$cf_dir
24182                         if test $cf_dir = ncurses ; then
24183                                 case $cf_subset in
24184                                 (*base*)
24185                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
24186                                         ;;
24187                                 (*termlib*)
24188                                         cf_libname=$TINFO_LIB_SUFFIX
24189                                         ;;
24190                                 (ticlib*)
24191                                         cf_libname=$TICS_LIB_SUFFIX
24192                                         ;;
24193                                 esac
24194                         elif test $cf_dir = c++ ; then
24195                                 cf_libname=ncurses++$USE_LIB_SUFFIX
24196                         else
24197                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
24198                         fi
24199                         if test -n "${USE_ARG_SUFFIX}" ; then
24200                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
24201                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
24202                         fi
24203
24204                         # These dependencies really are for development, not
24205                         # builds, but they are useful in porting, too.
24206                         cf_depend="../include/ncurses_cfg.h"
24207                         if test "$srcdir" = "."; then
24208                                 cf_reldir="."
24209                         else
24210                                 cf_reldir="\${srcdir}"
24211                         fi
24212
24213                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
24214                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
24215                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
24216                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
24217                         fi
24218
24219                         cf_dir_suffix=
24220                         old_cf_suffix="$cf_suffix"
24221                         if test "$cf_cv_shlib_version_infix" = yes ; then
24222                         if test -n "$USE_LIB_SUFFIX" ; then
24223                                 case $USE_LIB_SUFFIX in
24224                                 (tw*)
24225                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
24226                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
24227                                         cf_dir_suffix=tw$EXTRA_SUFFIX
24228                                         ;;
24229                                 (t*)
24230                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
24231                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
24232                                         cf_dir_suffix=t$EXTRA_SUFFIX
24233                                         ;;
24234                                 (w*)
24235                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
24236                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
24237                                         cf_dir_suffix=w$EXTRA_SUFFIX
24238                                         ;;
24239                                 (*)
24240                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
24241                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
24242                                         cf_dir_suffix=$EXTRA_SUFFIX
24243                                         ;;
24244                                 esac
24245                         fi
24246                         fi
24247
24248                         $AWK -f $srcdir/mk-1st.awk \
24249                                 name=${cf_libname}${cf_dir_suffix} \
24250                                 traces=$LIB_TRACING \
24251                                 MODEL=$cf_ITEM \
24252                                 CXX_MODEL=$CXX_MODEL \
24253                                 model=$cf_subdir \
24254                                 prefix=$cf_prefix \
24255                                 suffix=$cf_suffix \
24256                                 subset=$cf_subset \
24257                                 driver=$cf_cv_term_driver \
24258                                 SymLink="$LN_S" \
24259                                 TermlibRoot=$TINFO_NAME \
24260                                 TermlibSuffix=$TINFO_SUFFIX \
24261                                 ShlibVer=$cf_cv_shlib_version \
24262                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
24263                                 ReLink=${cf_cv_do_relink:-no} \
24264                                 DoLinks=$cf_cv_do_symlinks \
24265                                 rmSoLocs=$cf_cv_rm_so_locs \
24266                                 ldconfig="$LDCONFIG" \
24267                                 overwrite=$WITH_OVERWRITE \
24268                                 depend="$cf_depend" \
24269                                 host="$host" \
24270                                 libtool_version="$LIBTOOL_VERSION" \
24271                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24272
24273                         cf_suffix="$old_cf_suffix"
24274
24275                         for cf_subdir2 in $cf_subdirs lib
24276                         do
24277                                 test $cf_subdir = $cf_subdir2 && break
24278                         done
24279                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
24280                         $AWK -f $srcdir/mk-2nd.awk \
24281                                 name=$cf_dir \
24282                                 traces=$LIB_TRACING \
24283                                 MODEL=$cf_ITEM \
24284                                 model=$cf_subdir \
24285                                 subset=$cf_subset \
24286                                 srcdir=$srcdir \
24287                                 echo=$WITH_ECHO \
24288                                 crenames=$cf_cv_prog_CC_c_o \
24289                                 cxxrenames=$cf_cv_prog_CXX_c_o \
24290                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24291                         cf_subdirs="$cf_subdirs $cf_subdir"
24292                         done
24293                 done
24294         fi
24295
24296         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
24297 done
24298
24299 for cf_dir in $SRC_SUBDIRS
24300 do
24301         if test ! -d $srcdir/$cf_dir ; then
24302                 continue
24303         fi
24304
24305         if test -f $cf_dir/Makefile ; then
24306                 case "$cf_dir" in
24307                 (Ada95)
24308                         echo 'libs \' >> Makefile
24309                         echo 'install.libs \' >> Makefile
24310                         echo 'uninstall.libs ::' >> Makefile
24311                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
24312                         ;;
24313                 esac
24314         fi
24315
24316         if test -f $srcdir/$cf_dir/modules; then
24317                 echo >> Makefile
24318                 if test -f $srcdir/$cf_dir/headers; then
24319 cat >> Makefile <<CF_EOF
24320 install.includes \\
24321 uninstall.includes \\
24322 CF_EOF
24323                 fi
24324 if test "$cf_dir" != "c++" ; then
24325 echo 'lint \' >> Makefile
24326 fi
24327 cat >> Makefile <<CF_EOF
24328 libs \\
24329 lintlib \\
24330 install.libs \\
24331 uninstall.libs \\
24332 install.$cf_dir \\
24333 uninstall.$cf_dir ::
24334         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24335 CF_EOF
24336         elif test -f $srcdir/$cf_dir/headers; then
24337 cat >> Makefile <<CF_EOF
24338
24339 libs \\
24340 install.libs \\
24341 uninstall.libs \\
24342 install.includes \\
24343 uninstall.includes ::
24344         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24345 CF_EOF
24346 fi
24347 done
24348
24349 if test "x$cf_with_db_install" = xyes; then
24350 cat >> Makefile <<CF_EOF
24351
24352 install.libs uninstall.libs \\
24353 install.data uninstall.data ::
24354 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24355 CF_EOF
24356 else
24357 cat >> Makefile <<CF_EOF
24358
24359 install.libs uninstall.libs ::
24360         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24361 CF_EOF
24362 fi
24363
24364 if test "x$cf_with_manpages" = xyes; then
24365 cat >> Makefile <<CF_EOF
24366
24367 install.man \\
24368 uninstall.man ::
24369         cd man && \${MAKE} \${TOP_MFLAGS} \$@
24370 CF_EOF
24371 fi
24372
24373 cat >> Makefile <<CF_EOF
24374
24375 distclean ::
24376         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
24377         rm -f headers.sh headers.sed mk_shared_lib.sh
24378         rm -f edit_man.* man_alias.*
24379         rm -rf \${DIRS_TO_MAKE}
24380 CF_EOF
24381
24382 # Special case: tack's manpage lives in its own directory.
24383 if test "x$cf_with_manpages" = xyes; then
24384 if test -d tack ; then
24385 if test -f $srcdir/$tack.h; then
24386 cat >> Makefile <<CF_EOF
24387
24388 install.man \\
24389 uninstall.man ::
24390         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
24391 CF_EOF
24392 fi
24393 fi
24394 fi
24395
24396 rm -f headers.sed headers.sh
24397
24398 echo creating headers.sh
24399 cat >headers.sh <<CF_EOF
24400 #! $SHELL
24401 # This shell script is generated by the 'configure' script.  It is invoked in a
24402 # subdirectory of the build tree.  It generates a sed-script in the parent
24403 # directory that is used to adjust includes for header files that reside in a
24404 # subdirectory of /usr/include, etc.
24405 PRG=""
24406 while test \$# != 3
24407 do
24408 PRG="\$PRG \$1"; shift
24409 done
24410 DST=\$1
24411 REF=\$2
24412 SRC=\$3
24413 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
24414 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
24415 echo installing \$SRC in \$DST
24416 CF_EOF
24417
24418 if test $WITH_CURSES_H = yes; then
24419         cat >>headers.sh <<CF_EOF
24420 case \$DST in
24421 (/*/include/*)
24422         END=\`basename \$DST\`
24423         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24424         do
24425                 NAME=\`basename \$i\`
24426                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24427         done
24428         ;;
24429 (*)
24430         echo "" >> \$TMPSED
24431         ;;
24432 esac
24433 CF_EOF
24434
24435 else
24436         cat >>headers.sh <<CF_EOF
24437 case \$DST in
24438 (/*/include/*)
24439         END=\`basename \$DST\`
24440         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24441         do
24442                 NAME=\`basename \$i\`
24443                 if test "\$NAME" = "curses.h"
24444                 then
24445                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24446                         NAME=ncurses.h
24447                 fi
24448                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24449         done
24450         ;;
24451 (*)
24452         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24453         ;;
24454 esac
24455 CF_EOF
24456 fi
24457 cat >>headers.sh <<CF_EOF
24458 rm -f \$TMPSRC
24459 sed -f \$TMPSED \$SRC > \$TMPSRC
24460 NAME=\`basename \$SRC\`
24461 CF_EOF
24462 if test $WITH_CURSES_H != yes; then
24463         cat >>headers.sh <<CF_EOF
24464 test "\$NAME" = "curses.h" && NAME=ncurses.h
24465 CF_EOF
24466 fi
24467 cat >>headers.sh <<CF_EOF
24468 # Just in case someone gzip'd manpages, remove the conflicting copy.
24469 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
24470
24471 eval \$PRG \$TMPSRC \$DST/\$NAME
24472 rm -f \$TMPSRC \$TMPSED
24473 CF_EOF
24474
24475 chmod 0755 headers.sh
24476
24477 for cf_dir in $SRC_SUBDIRS
24478 do
24479         if test ! -d $srcdir/$cf_dir ; then
24480                 continue
24481         fi
24482
24483         if test -f $srcdir/$cf_dir/headers; then
24484                 $AWK -f $srcdir/mk-hdr.awk \
24485                         subset="$LIB_SUBSETS" \
24486                         compat="$WITH_CURSES_H" \
24487                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
24488         fi
24489
24490         if test -f $srcdir/$cf_dir/modules; then
24491                 if test "$cf_dir" != "c++" ; then
24492                         cat >>$cf_dir/Makefile <<"CF_EOF"
24493 depend : ${AUTO_SRC}
24494         makedepend -- ${CPPFLAGS} -- ${C_SRC}
24495
24496 # DO NOT DELETE THIS LINE -- make depend depends on it.
24497 CF_EOF
24498                 fi
24499         fi
24500 done
24501
24502 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24503 if test -z "$USE_OLD_MAKERULES" ; then
24504         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
24505 fi
24506 fi
24507  ;;
24508   esac
24509 done
24510 EOF
24511
24512 cat >>$CONFIG_STATUS <<\EOF
24513
24514 { (exit 0); exit 0; }
24515 EOF
24516 chmod +x $CONFIG_STATUS
24517 ac_clean_files=$ac_clean_files_save
24518
24519 # configure is writing to config.log, and then calls config.status.
24520 # config.status does its own redirection, appending to config.log.
24521 # Unfortunately, on DOS this fails, as config.log is still kept open
24522 # by configure, so config.status won't be able to write to it; its
24523 # output is simply discarded.  So we exec the FD to /dev/null,
24524 # effectively closing config.log, so it can be properly (re)opened and
24525 # appended to by config.status.  When coming back to configure, we
24526 # need to make the FD available again.
24527 if test "$no_create" != yes; then
24528   ac_cs_success=:
24529   exec 5>/dev/null
24530   $SHELL $CONFIG_STATUS || ac_cs_success=false
24531   exec 5>>config.log
24532   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24533   # would make configure fail if this is the last instruction.
24534   $ac_cs_success || { (exit 1); exit 1; }
24535 fi
24536 ${MAKE:-make} preinstall