]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
b2f191922ed0f6184225e6ba4e3d180fc55e4f26
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.631 .
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/[   ]-[IUD][^       ][^     ]*//g' -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 lint cppcheck splint
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                         with_gpm=yes
5265                 else
5266                         echo "$as_me:5266: checking for Gpm_Open in -lgpm" >&5
5267 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5268 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5269   echo $ECHO_N "(cached) $ECHO_C" >&6
5270 else
5271   ac_check_lib_save_LIBS=$LIBS
5272 LIBS="-lgpm  $LIBS"
5273 cat >conftest.$ac_ext <<_ACEOF
5274 #line 5274 "configure"
5275 #include "confdefs.h"
5276
5277 /* Override any gcc2 internal prototype to avoid an error.  */
5278 #ifdef __cplusplus
5279 extern "C"
5280 #endif
5281 /* We use char because int might match the return type of a gcc2
5282    builtin and then its argument prototype would still apply.  */
5283 char Gpm_Open ();
5284 int
5285 main ()
5286 {
5287 Gpm_Open ();
5288   ;
5289   return 0;
5290 }
5291 _ACEOF
5292 rm -f conftest.$ac_objext conftest$ac_exeext
5293 if { (eval echo "$as_me:5293: \"$ac_link\"") >&5
5294   (eval $ac_link) 2>&5
5295   ac_status=$?
5296   echo "$as_me:5296: \$? = $ac_status" >&5
5297   (exit $ac_status); } &&
5298          { ac_try='test -s conftest$ac_exeext'
5299   { (eval echo "$as_me:5299: \"$ac_try\"") >&5
5300   (eval $ac_try) 2>&5
5301   ac_status=$?
5302   echo "$as_me:5302: \$? = $ac_status" >&5
5303   (exit $ac_status); }; }; then
5304   ac_cv_lib_gpm_Gpm_Open=yes
5305 else
5306   echo "$as_me: failed program was:" >&5
5307 cat conftest.$ac_ext >&5
5308 ac_cv_lib_gpm_Gpm_Open=no
5309 fi
5310 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5311 LIBS=$ac_check_lib_save_LIBS
5312 fi
5313 echo "$as_me:5313: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5314 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5315 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5316   :
5317 else
5318
5319                                 if test "$with_gpm" = maybe; then
5320                                         { echo "$as_me:5320: WARNING: Cannot link with GPM library" >&5
5321 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
5322                                         with_gpm=no
5323                                 else
5324                                         { { echo "$as_me:5324: error: Cannot link with GPM library" >&5
5325 echo "$as_me: error: Cannot link with GPM library" >&2;}
5326    { (exit 1); exit 1; }; }
5327                                 fi
5328
5329 fi
5330
5331                 fi
5332
5333 else
5334
5335                 test "$with_gpm" != maybe && { echo "$as_me:5335: WARNING: Cannot find GPM header" >&5
5336 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5337                 with_gpm=no
5338
5339 fi
5340
5341 fi
5342
5343 if test "$with_gpm" != no ; then
5344         echo "$as_me:5344: checking if you want to load GPM dynamically" >&5
5345 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5346
5347 # Check whether --with-dlsym or --without-dlsym was given.
5348 if test "${with_dlsym+set}" = set; then
5349   withval="$with_dlsym"
5350   with_dlsym=$withval
5351 else
5352   with_dlsym=yes
5353 fi;
5354         echo "$as_me:5354: result: $with_dlsym" >&5
5355 echo "${ECHO_T}$with_dlsym" >&6
5356         if test "x$with_dlsym" = xyes ; then
5357
5358 cf_have_dlsym=no
5359 echo "$as_me:5359: checking for dlsym" >&5
5360 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5361 if test "${ac_cv_func_dlsym+set}" = set; then
5362   echo $ECHO_N "(cached) $ECHO_C" >&6
5363 else
5364   cat >conftest.$ac_ext <<_ACEOF
5365 #line 5365 "configure"
5366 #include "confdefs.h"
5367 /* System header to define __stub macros and hopefully few prototypes,
5368     which can conflict with char dlsym (); below.  */
5369 #include <assert.h>
5370 /* Override any gcc2 internal prototype to avoid an error.  */
5371 #ifdef __cplusplus
5372 extern "C"
5373 #endif
5374 /* We use char because int might match the return type of a gcc2
5375    builtin and then its argument prototype would still apply.  */
5376 char dlsym ();
5377 char (*f) ();
5378
5379 int
5380 main ()
5381 {
5382 /* The GNU C library defines this for functions which it implements
5383     to always fail with ENOSYS.  Some functions are actually named
5384     something starting with __ and the normal name is an alias.  */
5385 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5386 choke me
5387 #else
5388 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5389 #endif
5390
5391   ;
5392   return 0;
5393 }
5394 _ACEOF
5395 rm -f conftest.$ac_objext conftest$ac_exeext
5396 if { (eval echo "$as_me:5396: \"$ac_link\"") >&5
5397   (eval $ac_link) 2>&5
5398   ac_status=$?
5399   echo "$as_me:5399: \$? = $ac_status" >&5
5400   (exit $ac_status); } &&
5401          { ac_try='test -s conftest$ac_exeext'
5402   { (eval echo "$as_me:5402: \"$ac_try\"") >&5
5403   (eval $ac_try) 2>&5
5404   ac_status=$?
5405   echo "$as_me:5405: \$? = $ac_status" >&5
5406   (exit $ac_status); }; }; then
5407   ac_cv_func_dlsym=yes
5408 else
5409   echo "$as_me: failed program was:" >&5
5410 cat conftest.$ac_ext >&5
5411 ac_cv_func_dlsym=no
5412 fi
5413 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5414 fi
5415 echo "$as_me:5415: result: $ac_cv_func_dlsym" >&5
5416 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5417 if test $ac_cv_func_dlsym = yes; then
5418   cf_have_dlsym=yes
5419 else
5420
5421 cf_have_libdl=no
5422 echo "$as_me:5422: checking for dlsym in -ldl" >&5
5423 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5424 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5425   echo $ECHO_N "(cached) $ECHO_C" >&6
5426 else
5427   ac_check_lib_save_LIBS=$LIBS
5428 LIBS="-ldl  $LIBS"
5429 cat >conftest.$ac_ext <<_ACEOF
5430 #line 5430 "configure"
5431 #include "confdefs.h"
5432
5433 /* Override any gcc2 internal prototype to avoid an error.  */
5434 #ifdef __cplusplus
5435 extern "C"
5436 #endif
5437 /* We use char because int might match the return type of a gcc2
5438    builtin and then its argument prototype would still apply.  */
5439 char dlsym ();
5440 int
5441 main ()
5442 {
5443 dlsym ();
5444   ;
5445   return 0;
5446 }
5447 _ACEOF
5448 rm -f conftest.$ac_objext conftest$ac_exeext
5449 if { (eval echo "$as_me:5449: \"$ac_link\"") >&5
5450   (eval $ac_link) 2>&5
5451   ac_status=$?
5452   echo "$as_me:5452: \$? = $ac_status" >&5
5453   (exit $ac_status); } &&
5454          { ac_try='test -s conftest$ac_exeext'
5455   { (eval echo "$as_me:5455: \"$ac_try\"") >&5
5456   (eval $ac_try) 2>&5
5457   ac_status=$?
5458   echo "$as_me:5458: \$? = $ac_status" >&5
5459   (exit $ac_status); }; }; then
5460   ac_cv_lib_dl_dlsym=yes
5461 else
5462   echo "$as_me: failed program was:" >&5
5463 cat conftest.$ac_ext >&5
5464 ac_cv_lib_dl_dlsym=no
5465 fi
5466 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5467 LIBS=$ac_check_lib_save_LIBS
5468 fi
5469 echo "$as_me:5469: result: $ac_cv_lib_dl_dlsym" >&5
5470 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5471 if test $ac_cv_lib_dl_dlsym = yes; then
5472
5473         cf_have_dlsym=yes
5474         cf_have_libdl=yes
5475 fi
5476
5477 fi
5478
5479 if test "$cf_have_dlsym" = yes ; then
5480         test "$cf_have_libdl" = yes && {
5481 cf_add_libs="-ldl"
5482 # Filter out duplicates - this happens with badly-designed ".pc" files...
5483 for cf_add_1lib in $LIBS
5484 do
5485         for cf_add_2lib in $cf_add_libs
5486         do
5487                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5488                 then
5489                         cf_add_1lib=
5490                         break
5491                 fi
5492         done
5493         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5494 done
5495 LIBS="$cf_add_libs"
5496  }
5497
5498         echo "$as_me:5498: checking whether able to link to dl*() functions" >&5
5499 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5500         cat >conftest.$ac_ext <<_ACEOF
5501 #line 5501 "configure"
5502 #include "confdefs.h"
5503 #include <dlfcn.h>
5504 int
5505 main ()
5506 {
5507
5508                 void *obj;
5509                 if ((obj = dlopen("filename", 0)) != 0) {
5510                         if (dlsym(obj, "symbolname") == 0) {
5511                         dlclose(obj);
5512                         }
5513                 }
5514   ;
5515   return 0;
5516 }
5517 _ACEOF
5518 rm -f conftest.$ac_objext conftest$ac_exeext
5519 if { (eval echo "$as_me:5519: \"$ac_link\"") >&5
5520   (eval $ac_link) 2>&5
5521   ac_status=$?
5522   echo "$as_me:5522: \$? = $ac_status" >&5
5523   (exit $ac_status); } &&
5524          { ac_try='test -s conftest$ac_exeext'
5525   { (eval echo "$as_me:5525: \"$ac_try\"") >&5
5526   (eval $ac_try) 2>&5
5527   ac_status=$?
5528   echo "$as_me:5528: \$? = $ac_status" >&5
5529   (exit $ac_status); }; }; then
5530
5531 cat >>confdefs.h <<\EOF
5532 #define HAVE_LIBDL 1
5533 EOF
5534
5535 else
5536   echo "$as_me: failed program was:" >&5
5537 cat conftest.$ac_ext >&5
5538
5539                 { { echo "$as_me:5539: error: Cannot link test program for libdl" >&5
5540 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5541    { (exit 1); exit 1; }; }
5542 fi
5543 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5544         echo "$as_me:5544: result: ok" >&5
5545 echo "${ECHO_T}ok" >&6
5546 else
5547         { { echo "$as_me:5547: error: Cannot find dlsym function" >&5
5548 echo "$as_me: error: Cannot find dlsym function" >&2;}
5549    { (exit 1); exit 1; }; }
5550 fi
5551
5552                 if test "x$with_gpm" != xyes ; then
5553                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5554
5555 echo "${as_me:-configure}:5555: testing assuming soname for gpm is $with_gpm ..." 1>&5
5556
5557                         cf_cv_gpm_soname="$with_gpm"
5558                 else
5559
5560 echo "$as_me:5560: checking for soname of gpm library" >&5
5561 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5562 if test "${cf_cv_gpm_soname+set}" = set; then
5563   echo $ECHO_N "(cached) $ECHO_C" >&6
5564 else
5565
5566 cf_cv_gpm_soname=unknown
5567 if test "$cross_compiling" != yes ; then
5568 cat >conftest.$ac_ext <<CF_EOF
5569 #include <gpm.h>
5570 int main()
5571 {
5572 if (Gpm_Open(0,0)) Gpm_Close();
5573         ${cf_cv_main_return:-return}(0);
5574 }
5575 CF_EOF
5576 cf_save_LIBS="$LIBS"
5577
5578 cf_add_libs="-lgpm"
5579 # Filter out duplicates - this happens with badly-designed ".pc" files...
5580 for cf_add_1lib in $LIBS
5581 do
5582         for cf_add_2lib in $cf_add_libs
5583         do
5584                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5585                 then
5586                         cf_add_1lib=
5587                         break
5588                 fi
5589         done
5590         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5591 done
5592 LIBS="$cf_add_libs"
5593
5594         if { (eval echo "$as_me:5594: \"$ac_compile\"") >&5
5595   (eval $ac_compile) 2>&5
5596   ac_status=$?
5597   echo "$as_me:5597: \$? = $ac_status" >&5
5598   (exit $ac_status); } ; then
5599                 if { (eval echo "$as_me:5599: \"$ac_link\"") >&5
5600   (eval $ac_link) 2>&5
5601   ac_status=$?
5602   echo "$as_me:5602: \$? = $ac_status" >&5
5603   (exit $ac_status); } ; then
5604                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5605                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5606                 fi
5607         fi
5608 rm -rf conftest*
5609 LIBS="$cf_save_LIBS"
5610 fi
5611
5612 fi
5613 echo "$as_me:5613: result: $cf_cv_gpm_soname" >&5
5614 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5615
5616                 fi
5617                 test "$cf_cv_gpm_soname" != "unknown" &&
5618 cat >>confdefs.h <<EOF
5619 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5620 EOF
5621
5622                 SHLIB_LIST="-ldl $SHLIB_LIST"
5623         else
5624                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5625
5626 cf_add_libs="-lgpm"
5627 # Filter out duplicates - this happens with badly-designed ".pc" files...
5628 for cf_add_1lib in $TEST_LIBS
5629 do
5630         for cf_add_2lib in $cf_add_libs
5631         do
5632                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5633                 then
5634                         cf_add_1lib=
5635                         break
5636                 fi
5637         done
5638         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5639 done
5640 TEST_LIBS="$cf_add_libs"
5641
5642         fi
5643
5644 cat >>confdefs.h <<\EOF
5645 #define HAVE_LIBGPM 1
5646 EOF
5647
5648 echo "$as_me:5648: checking for Gpm_Wgetch in -lgpm" >&5
5649 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5650 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5651   echo $ECHO_N "(cached) $ECHO_C" >&6
5652 else
5653   ac_check_lib_save_LIBS=$LIBS
5654 LIBS="-lgpm  $LIBS"
5655 cat >conftest.$ac_ext <<_ACEOF
5656 #line 5656 "configure"
5657 #include "confdefs.h"
5658
5659 /* Override any gcc2 internal prototype to avoid an error.  */
5660 #ifdef __cplusplus
5661 extern "C"
5662 #endif
5663 /* We use char because int might match the return type of a gcc2
5664    builtin and then its argument prototype would still apply.  */
5665 char Gpm_Wgetch ();
5666 int
5667 main ()
5668 {
5669 Gpm_Wgetch ();
5670   ;
5671   return 0;
5672 }
5673 _ACEOF
5674 rm -f conftest.$ac_objext conftest$ac_exeext
5675 if { (eval echo "$as_me:5675: \"$ac_link\"") >&5
5676   (eval $ac_link) 2>&5
5677   ac_status=$?
5678   echo "$as_me:5678: \$? = $ac_status" >&5
5679   (exit $ac_status); } &&
5680          { ac_try='test -s conftest$ac_exeext'
5681   { (eval echo "$as_me:5681: \"$ac_try\"") >&5
5682   (eval $ac_try) 2>&5
5683   ac_status=$?
5684   echo "$as_me:5684: \$? = $ac_status" >&5
5685   (exit $ac_status); }; }; then
5686   ac_cv_lib_gpm_Gpm_Wgetch=yes
5687 else
5688   echo "$as_me: failed program was:" >&5
5689 cat conftest.$ac_ext >&5
5690 ac_cv_lib_gpm_Gpm_Wgetch=no
5691 fi
5692 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5693 LIBS=$ac_check_lib_save_LIBS
5694 fi
5695 echo "$as_me:5695: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5696 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5697 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5698
5699 echo "$as_me:5699: checking if GPM is weakly bound to curses library" >&5
5700 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5701 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5702   echo $ECHO_N "(cached) $ECHO_C" >&6
5703 else
5704
5705 cf_cv_check_gpm_wgetch=unknown
5706 if test "$cross_compiling" != yes ; then
5707
5708 cat >conftest.$ac_ext <<CF_EOF
5709 #include <gpm.h>
5710 int main()
5711 {
5712         Gpm_Wgetch();
5713         ${cf_cv_main_return:-return}(0);
5714 }
5715 CF_EOF
5716
5717         cf_save_LIBS="$LIBS"
5718         # This only works if we can look at the symbol table.  If a shared
5719         # library is stripped for install, we cannot use that.  So we're forced
5720         # to rely on the static library, noting that some packagers may not
5721         # include it.
5722         LIBS="-static -lgpm -dynamic $LIBS"
5723         if { (eval echo "$as_me:5723: \"$ac_compile\"") >&5
5724   (eval $ac_compile) 2>&5
5725   ac_status=$?
5726   echo "$as_me:5726: \$? = $ac_status" >&5
5727   (exit $ac_status); } ; then
5728                 if { (eval echo "$as_me:5728: \"$ac_link\"") >&5
5729   (eval $ac_link) 2>&5
5730   ac_status=$?
5731   echo "$as_me:5731: \$? = $ac_status" >&5
5732   (exit $ac_status); } ; then
5733                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5734                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5735                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5736                 fi
5737         fi
5738         rm -rf conftest*
5739         LIBS="$cf_save_LIBS"
5740 fi
5741
5742 fi
5743 echo "$as_me:5743: result: $cf_cv_check_gpm_wgetch" >&5
5744 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5745
5746 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5747         { echo "$as_me:5747: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5748 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5749 fi
5750
5751 fi
5752
5753 fi
5754
5755 # not everyone has "test -c"
5756 if test -c /dev/sysmouse 2>/dev/null ; then
5757 echo "$as_me:5757: checking if you want to use sysmouse" >&5
5758 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5759
5760 # Check whether --with-sysmouse or --without-sysmouse was given.
5761 if test "${with_sysmouse+set}" = set; then
5762   withval="$with_sysmouse"
5763   cf_with_sysmouse=$withval
5764 else
5765   cf_with_sysmouse=maybe
5766 fi;
5767         if test "$cf_with_sysmouse" != no ; then
5768         cat >conftest.$ac_ext <<_ACEOF
5769 #line 5769 "configure"
5770 #include "confdefs.h"
5771
5772 #include <osreldate.h>
5773 #if (__FreeBSD_version >= 400017)
5774 #include <sys/consio.h>
5775 #include <sys/fbio.h>
5776 #else
5777 #include <machine/console.h>
5778 #endif
5779
5780 int
5781 main ()
5782 {
5783
5784         struct mouse_info the_mouse;
5785         ioctl(0, CONS_MOUSECTL, &the_mouse);
5786
5787   ;
5788   return 0;
5789 }
5790 _ACEOF
5791 rm -f conftest.$ac_objext
5792 if { (eval echo "$as_me:5792: \"$ac_compile\"") >&5
5793   (eval $ac_compile) 2>&5
5794   ac_status=$?
5795   echo "$as_me:5795: \$? = $ac_status" >&5
5796   (exit $ac_status); } &&
5797          { ac_try='test -s conftest.$ac_objext'
5798   { (eval echo "$as_me:5798: \"$ac_try\"") >&5
5799   (eval $ac_try) 2>&5
5800   ac_status=$?
5801   echo "$as_me:5801: \$? = $ac_status" >&5
5802   (exit $ac_status); }; }; then
5803   cf_with_sysmouse=yes
5804 else
5805   echo "$as_me: failed program was:" >&5
5806 cat conftest.$ac_ext >&5
5807 cf_with_sysmouse=no
5808 fi
5809 rm -f conftest.$ac_objext conftest.$ac_ext
5810         fi
5811 echo "$as_me:5811: result: $cf_with_sysmouse" >&5
5812 echo "${ECHO_T}$cf_with_sysmouse" >&6
5813 test "$cf_with_sysmouse" = yes &&
5814 cat >>confdefs.h <<\EOF
5815 #define USE_SYSMOUSE 1
5816 EOF
5817
5818 fi
5819
5820 if test X"$CC_G_OPT" = X"" ; then
5821         CC_G_OPT='-g'
5822         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5823 fi
5824
5825 if test X"$CXX_G_OPT" = X"" ; then
5826         CXX_G_OPT='-g'
5827         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5828 fi
5829
5830 echo "$as_me:5830: checking for default loader flags" >&5
5831 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5832 case $DFT_LWR_MODEL in
5833 (libtool) LD_MODEL=''   ;;
5834 (normal)  LD_MODEL=''   ;;
5835 (debug)   LD_MODEL=$CC_G_OPT ;;
5836 (profile) LD_MODEL='-pg';;
5837 (shared)  LD_MODEL=''   ;;
5838 esac
5839 echo "$as_me:5839: result: $LD_MODEL" >&5
5840 echo "${ECHO_T}$LD_MODEL" >&6
5841
5842 case $DFT_LWR_MODEL in
5843 (shared)
5844
5845 echo "$as_me:5845: checking if rpath option should be used" >&5
5846 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5847
5848 # Check whether --enable-rpath or --disable-rpath was given.
5849 if test "${enable_rpath+set}" = set; then
5850   enableval="$enable_rpath"
5851   cf_cv_enable_rpath=$enableval
5852 else
5853   cf_cv_enable_rpath=no
5854 fi;
5855 echo "$as_me:5855: result: $cf_cv_enable_rpath" >&5
5856 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5857
5858 echo "$as_me:5858: checking if shared libraries should be relinked during install" >&5
5859 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5860
5861 # Check whether --enable-relink or --disable-relink was given.
5862 if test "${enable_relink+set}" = set; then
5863   enableval="$enable_relink"
5864   cf_cv_do_relink=$enableval
5865 else
5866   cf_cv_do_relink=yes
5867 fi;
5868 echo "$as_me:5868: result: $cf_cv_do_relink" >&5
5869 echo "${ECHO_T}$cf_cv_do_relink" >&6
5870         ;;
5871 esac
5872
5873 # we will build libraries one-level down.
5874 rel_builddir=..
5875
5876 LD_RPATH_OPT=
5877 echo "$as_me:5877: checking for an rpath option" >&5
5878 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5879 case $cf_cv_system_name in
5880 (irix*)
5881         if test "$GCC" = yes; then
5882                 LD_RPATH_OPT="-Wl,-rpath,"
5883         else
5884                 LD_RPATH_OPT="-rpath "
5885         fi
5886         ;;
5887 (linux*|gnu*|k*bsd*-gnu|freebsd*)
5888         LD_RPATH_OPT="-Wl,-rpath,"
5889         ;;
5890 (openbsd[2-9].*|mirbsd*)
5891         LD_RPATH_OPT="-Wl,-rpath,"
5892         ;;
5893 (dragonfly*)
5894         LD_RPATH_OPT="-rpath "
5895         ;;
5896 (netbsd*)
5897         LD_RPATH_OPT="-Wl,-rpath,"
5898         ;;
5899 (osf*|mls+*)
5900         LD_RPATH_OPT="-rpath "
5901         ;;
5902 (solaris2*)
5903         LD_RPATH_OPT="-R"
5904         ;;
5905 (*)
5906         ;;
5907 esac
5908 echo "$as_me:5908: result: $LD_RPATH_OPT" >&5
5909 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5910
5911 case "x$LD_RPATH_OPT" in
5912 (x-R*)
5913         echo "$as_me:5913: checking if we need a space after rpath option" >&5
5914 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5915         cf_save_LIBS="$LIBS"
5916
5917 cf_add_libs="${LD_RPATH_OPT}$libdir"
5918 # Filter out duplicates - this happens with badly-designed ".pc" files...
5919 for cf_add_1lib in $LIBS
5920 do
5921         for cf_add_2lib in $cf_add_libs
5922         do
5923                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5924                 then
5925                         cf_add_1lib=
5926                         break
5927                 fi
5928         done
5929         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5930 done
5931 LIBS="$cf_add_libs"
5932
5933         cat >conftest.$ac_ext <<_ACEOF
5934 #line 5934 "configure"
5935 #include "confdefs.h"
5936
5937 int
5938 main ()
5939 {
5940
5941   ;
5942   return 0;
5943 }
5944 _ACEOF
5945 rm -f conftest.$ac_objext conftest$ac_exeext
5946 if { (eval echo "$as_me:5946: \"$ac_link\"") >&5
5947   (eval $ac_link) 2>&5
5948   ac_status=$?
5949   echo "$as_me:5949: \$? = $ac_status" >&5
5950   (exit $ac_status); } &&
5951          { ac_try='test -s conftest$ac_exeext'
5952   { (eval echo "$as_me:5952: \"$ac_try\"") >&5
5953   (eval $ac_try) 2>&5
5954   ac_status=$?
5955   echo "$as_me:5955: \$? = $ac_status" >&5
5956   (exit $ac_status); }; }; then
5957   cf_rpath_space=no
5958 else
5959   echo "$as_me: failed program was:" >&5
5960 cat conftest.$ac_ext >&5
5961 cf_rpath_space=yes
5962 fi
5963 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5964         LIBS="$cf_save_LIBS"
5965         echo "$as_me:5965: result: $cf_rpath_space" >&5
5966 echo "${ECHO_T}$cf_rpath_space" >&6
5967         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5968         ;;
5969 esac
5970
5971         RM_SHARED_OPTS=
5972         LOCAL_LDFLAGS=
5973         LOCAL_LDFLAGS2=
5974         LD_SHARED_OPTS=
5975         INSTALL_LIB="-m 644"
5976         : ${rel_builddir:=.}
5977
5978         shlibdir=$libdir
5979
5980         MAKE_DLLS="#"
5981
5982         cf_cv_do_symlinks=no
5983         cf_ld_rpath_opt=
5984         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5985
5986         echo "$as_me:5986: checking if release/abi version should be used for shared libs" >&5
5987 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5988
5989 # Check whether --with-shlib-version or --without-shlib-version was given.
5990 if test "${with_shlib_version+set}" = set; then
5991   withval="$with_shlib_version"
5992   test -z "$withval" && withval=auto
5993         case $withval in
5994         (yes)
5995                 cf_cv_shlib_version=auto
5996                 ;;
5997         (rel|abi|auto)
5998                 cf_cv_shlib_version=$withval
5999                 ;;
6000         (*)
6001                 echo "$as_me:6001: result: $withval" >&5
6002 echo "${ECHO_T}$withval" >&6
6003                 { { echo "$as_me:6003: error: option value must be one of: rel, abi, or auto" >&5
6004 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6005    { (exit 1); exit 1; }; }
6006                 ;;
6007         esac
6008
6009 else
6010   cf_cv_shlib_version=auto
6011 fi;
6012         echo "$as_me:6012: result: $cf_cv_shlib_version" >&5
6013 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6014
6015         cf_cv_rm_so_locs=no
6016         cf_try_cflags=
6017
6018         # Some less-capable ports of gcc support only -fpic
6019         CC_SHARED_OPTS=
6020         if test "$GCC" = yes
6021         then
6022                 echo "$as_me:6022: checking which $CC option to use" >&5
6023 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6024                 cf_save_CFLAGS="$CFLAGS"
6025                 for CC_SHARED_OPTS in -fPIC -fpic ''
6026                 do
6027                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6028                         cat >conftest.$ac_ext <<_ACEOF
6029 #line 6029 "configure"
6030 #include "confdefs.h"
6031 #include <stdio.h>
6032 int
6033 main ()
6034 {
6035 int x = 1
6036   ;
6037   return 0;
6038 }
6039 _ACEOF
6040 rm -f conftest.$ac_objext
6041 if { (eval echo "$as_me:6041: \"$ac_compile\"") >&5
6042   (eval $ac_compile) 2>&5
6043   ac_status=$?
6044   echo "$as_me:6044: \$? = $ac_status" >&5
6045   (exit $ac_status); } &&
6046          { ac_try='test -s conftest.$ac_objext'
6047   { (eval echo "$as_me:6047: \"$ac_try\"") >&5
6048   (eval $ac_try) 2>&5
6049   ac_status=$?
6050   echo "$as_me:6050: \$? = $ac_status" >&5
6051   (exit $ac_status); }; }; then
6052   break
6053 else
6054   echo "$as_me: failed program was:" >&5
6055 cat conftest.$ac_ext >&5
6056 fi
6057 rm -f conftest.$ac_objext conftest.$ac_ext
6058                 done
6059                 echo "$as_me:6059: result: $CC_SHARED_OPTS" >&5
6060 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6061                 CFLAGS="$cf_save_CFLAGS"
6062         fi
6063
6064         cf_cv_shlib_version_infix=no
6065
6066         case $cf_cv_system_name in
6067         (aix4.3-9*|aix[5-7]*)
6068                 if test "$GCC" = yes; then
6069                         CC_SHARED_OPTS='-Wl,-brtl'
6070                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6071                 else
6072                         CC_SHARED_OPTS='-brtl'
6073                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6074                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6075                 fi
6076                 ;;
6077         (beos*)
6078                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6079                 ;;
6080         (cygwin*)
6081                 CC_SHARED_OPTS=
6082                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6083                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6084                 cf_cv_shlib_version=cygdll
6085                 cf_cv_shlib_version_infix=cygdll
6086                 shlibdir=$bindir
6087                 MAKE_DLLS=
6088                 cat >mk_shared_lib.sh <<-CF_EOF
6089                 #!$SHELL
6090                 SHARED_LIB=\$1
6091                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6092                 shift
6093                 cat <<-EOF
6094                 Linking shared library
6095                 ** SHARED_LIB \$SHARED_LIB
6096                 ** IMPORT_LIB \$IMPORT_LIB
6097 EOF
6098                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6099 CF_EOF
6100                 chmod +x mk_shared_lib.sh
6101                 ;;
6102         (msys*)
6103                 CC_SHARED_OPTS=
6104                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6105                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6106                 cf_cv_shlib_version=msysdll
6107                 cf_cv_shlib_version_infix=msysdll
6108                 shlibdir=$bindir
6109                 MAKE_DLLS=
6110                 cat >mk_shared_lib.sh <<-CF_EOF
6111                 #!$SHELL
6112                 SHARED_LIB=\$1
6113                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6114                 shift
6115                 cat <<-EOF
6116                 Linking shared library
6117                 ** SHARED_LIB \$SHARED_LIB
6118                 ** IMPORT_LIB \$IMPORT_LIB
6119 EOF
6120                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6121 CF_EOF
6122                 chmod +x mk_shared_lib.sh
6123                 ;;
6124         (darwin*)
6125                 cf_try_cflags="no-cpp-precomp"
6126                 CC_SHARED_OPTS="-dynamic"
6127                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6128                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6129                 cf_cv_shlib_version_infix=yes
6130                 echo "$as_me:6130: checking if ld -search_paths_first works" >&5
6131 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6132 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6133   echo $ECHO_N "(cached) $ECHO_C" >&6
6134 else
6135
6136                         cf_save_LDFLAGS=$LDFLAGS
6137                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6138                         cat >conftest.$ac_ext <<_ACEOF
6139 #line 6139 "configure"
6140 #include "confdefs.h"
6141
6142 int
6143 main ()
6144 {
6145 int i;
6146   ;
6147   return 0;
6148 }
6149 _ACEOF
6150 rm -f conftest.$ac_objext conftest$ac_exeext
6151 if { (eval echo "$as_me:6151: \"$ac_link\"") >&5
6152   (eval $ac_link) 2>&5
6153   ac_status=$?
6154   echo "$as_me:6154: \$? = $ac_status" >&5
6155   (exit $ac_status); } &&
6156          { ac_try='test -s conftest$ac_exeext'
6157   { (eval echo "$as_me:6157: \"$ac_try\"") >&5
6158   (eval $ac_try) 2>&5
6159   ac_status=$?
6160   echo "$as_me:6160: \$? = $ac_status" >&5
6161   (exit $ac_status); }; }; then
6162   cf_cv_ldflags_search_paths_first=yes
6163 else
6164   echo "$as_me: failed program was:" >&5
6165 cat conftest.$ac_ext >&5
6166 cf_cv_ldflags_search_paths_first=no
6167 fi
6168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6169                                 LDFLAGS=$cf_save_LDFLAGS
6170 fi
6171 echo "$as_me:6171: result: $cf_cv_ldflags_search_paths_first" >&5
6172 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6173                 if test $cf_cv_ldflags_search_paths_first = yes; then
6174                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6175                 fi
6176                 ;;
6177         (hpux[7-8]*)
6178                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6179                 if test "$GCC" != yes; then
6180                         CC_SHARED_OPTS='+Z'
6181                 fi
6182                 MK_SHARED_LIB='${LD} -b -o $@'
6183                 INSTALL_LIB="-m 555"
6184                 ;;
6185         (hpux*)
6186                 # (tested with gcc 2.7.2 -- I don't have c89)
6187                 if test "$GCC" = yes; then
6188                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6189                 else
6190                         CC_SHARED_OPTS='+Z'
6191                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6192                 fi
6193                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6194                 # HP-UX shared libraries must be executable, and should be
6195                 # readonly to exploit a quirk in the memory manager.
6196                 INSTALL_LIB="-m 555"
6197                 ;;
6198         (interix*)
6199                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6200                 if test "$cf_cv_shlib_version" = rel; then
6201                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6202                 else
6203                         cf_shared_soname='`basename `'
6204                 fi
6205                 CC_SHARED_OPTS=
6206                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6207                 ;;
6208         (irix*)
6209                 if test "$cf_cv_enable_rpath" = yes ; then
6210                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6211                 fi
6212                 # tested with IRIX 5.2 and 'cc'.
6213                 if test "$GCC" != yes; then
6214                         CC_SHARED_OPTS='-KPIC'
6215                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6216                 else
6217                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6218                 fi
6219                 cf_cv_rm_so_locs=yes
6220                 ;;
6221         (linux*|gnu*|k*bsd*-gnu)
6222                 if test "$DFT_LWR_MODEL" = "shared" ; then
6223                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6224                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6225                 fi
6226                 if test "$cf_cv_enable_rpath" = yes ; then
6227                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6228                 fi
6229
6230         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6231         if test "$cf_cv_shlib_version" = rel; then
6232                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6233         else
6234                 cf_cv_shared_soname='`basename $@`'
6235         fi
6236
6237                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6238                 ;;
6239         (mingw*)
6240                 cf_cv_shlib_version=mingw
6241                 cf_cv_shlib_version_infix=mingw
6242                 shlibdir=$bindir
6243                 MAKE_DLLS=
6244                 if test "$DFT_LWR_MODEL" = "shared" ; then
6245                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6246                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6247                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6248                 fi
6249                 CC_SHARED_OPTS=
6250                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6251                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6252                 cat >mk_shared_lib.sh <<-CF_EOF
6253                 #!$SHELL
6254                 SHARED_LIB=\$1
6255                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6256                 shift
6257                 cat <<-EOF
6258                 Linking shared library
6259                 ** SHARED_LIB \$SHARED_LIB
6260                 ** IMPORT_LIB \$IMPORT_LIB
6261 EOF
6262                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6263 CF_EOF
6264                 chmod +x mk_shared_lib.sh
6265                 ;;
6266         (openbsd[2-9].*|mirbsd*)
6267                 if test "$DFT_LWR_MODEL" = "shared" ; then
6268                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6269                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6270                 fi
6271                 if test "$cf_cv_enable_rpath" = yes ; then
6272                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6273                 fi
6274                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6275
6276         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6277         if test "$cf_cv_shlib_version" = rel; then
6278                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6279         else
6280                 cf_cv_shared_soname='`basename $@`'
6281         fi
6282
6283                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6284                 ;;
6285         (nto-qnx*|openbsd*|freebsd[12].*)
6286                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6287                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6288                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6289                 ;;
6290         (dragonfly*|freebsd*)
6291                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6292                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6293                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6294                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6295                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6296                 fi
6297
6298         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6299         if test "$cf_cv_shlib_version" = rel; then
6300                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6301         else
6302                 cf_cv_shared_soname='`basename $@`'
6303         fi
6304
6305                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6306                 ;;
6307         (netbsd*)
6308                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6309                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6310                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6311                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6312                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6313                         if test "$cf_cv_shlib_version" = auto; then
6314                         if test -f /usr/libexec/ld.elf_so; then
6315                                 cf_cv_shlib_version=abi
6316                         else
6317                                 cf_cv_shlib_version=rel
6318                         fi
6319                         fi
6320
6321         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6322         if test "$cf_cv_shlib_version" = rel; then
6323                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6324         else
6325                 cf_cv_shared_soname='`basename $@`'
6326         fi
6327
6328                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6329                 else
6330                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6331                 fi
6332                 ;;
6333         (osf*|mls+*)
6334                 # tested with OSF/1 V3.2 and 'cc'
6335                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6336                 # link with shared libs).
6337                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6338                 case $host_os in
6339                 (osf4*)
6340                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6341                         ;;
6342                 esac
6343                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6344                 if test "$DFT_LWR_MODEL" = "shared" ; then
6345                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6346                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6347                 fi
6348                 cf_cv_rm_so_locs=yes
6349                 ;;
6350         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6351                 # tested with osr5.0.5
6352                 if test "$GCC" != yes; then
6353                         CC_SHARED_OPTS='-belf -KPIC'
6354                 fi
6355                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6356                 if test "$cf_cv_enable_rpath" = yes ; then
6357                         # only way is to set LD_RUN_PATH but no switch for it
6358                         RUN_PATH=$libdir
6359                 fi
6360                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6361                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6362                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6363                 ;;
6364         (sunos4*)
6365                 # tested with SunOS 4.1.1 and gcc 2.7.0
6366                 if test "$GCC" != yes; then
6367                         CC_SHARED_OPTS='-KPIC'
6368                 fi
6369                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6370                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6371                 ;;
6372         (solaris2*)
6373                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6374                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6375                 if test "$DFT_LWR_MODEL" = "shared" ; then
6376                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6377                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6378                 fi
6379                 if test "$cf_cv_enable_rpath" = yes ; then
6380                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6381                 fi
6382
6383         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6384         if test "$cf_cv_shlib_version" = rel; then
6385                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6386         else
6387                 cf_cv_shared_soname='`basename $@`'
6388         fi
6389
6390                 if test "$GCC" != yes; then
6391                         cf_save_CFLAGS="$CFLAGS"
6392                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6393                         do
6394                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6395                                 cat >conftest.$ac_ext <<_ACEOF
6396 #line 6396 "configure"
6397 #include "confdefs.h"
6398 #include <stdio.h>
6399 int
6400 main ()
6401 {
6402 printf("Hello\n");
6403   ;
6404   return 0;
6405 }
6406 _ACEOF
6407 rm -f conftest.$ac_objext
6408 if { (eval echo "$as_me:6408: \"$ac_compile\"") >&5
6409   (eval $ac_compile) 2>&5
6410   ac_status=$?
6411   echo "$as_me:6411: \$? = $ac_status" >&5
6412   (exit $ac_status); } &&
6413          { ac_try='test -s conftest.$ac_objext'
6414   { (eval echo "$as_me:6414: \"$ac_try\"") >&5
6415   (eval $ac_try) 2>&5
6416   ac_status=$?
6417   echo "$as_me:6417: \$? = $ac_status" >&5
6418   (exit $ac_status); }; }; then
6419   break
6420 else
6421   echo "$as_me: failed program was:" >&5
6422 cat conftest.$ac_ext >&5
6423 fi
6424 rm -f conftest.$ac_objext conftest.$ac_ext
6425                         done
6426                         CFLAGS="$cf_save_CFLAGS"
6427                         CC_SHARED_OPTS=$cf_shared_opts
6428                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6429                 else
6430                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6431                 fi
6432                 ;;
6433         (sysv5uw7*|unix_sv*)
6434                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6435                 if test "$GCC" != yes; then
6436                         CC_SHARED_OPTS='-KPIC'
6437                 fi
6438                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6439                 ;;
6440         (*)
6441                 CC_SHARED_OPTS='unknown'
6442                 MK_SHARED_LIB='echo unknown'
6443                 ;;
6444         esac
6445
6446         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6447         case "$cf_cv_shlib_version" in
6448         (rel|abi)
6449                 case "$MK_SHARED_LIB" in
6450                 (*'-o $@')
6451                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6452                         ;;
6453                 (*)
6454                         { echo "$as_me:6454: WARNING: ignored --with-shlib-version" >&5
6455 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6456                         ;;
6457                 esac
6458                 ;;
6459         esac
6460
6461         if test -n "$cf_try_cflags"
6462         then
6463 cat > conftest.$ac_ext <<EOF
6464 #line 6464 "${as_me:-configure}"
6465 #include <stdio.h>
6466 int main(int argc, char *argv[])
6467 {
6468         printf("hello\n");
6469         return (argv[argc-1] == 0) ;
6470 }
6471 EOF
6472                 cf_save_CFLAGS="$CFLAGS"
6473                 for cf_opt in $cf_try_cflags
6474                 do
6475                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6476                         echo "$as_me:6476: checking if CFLAGS option -$cf_opt works" >&5
6477 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6478                         if { (eval echo "$as_me:6478: \"$ac_compile\"") >&5
6479   (eval $ac_compile) 2>&5
6480   ac_status=$?
6481   echo "$as_me:6481: \$? = $ac_status" >&5
6482   (exit $ac_status); }; then
6483                                 echo "$as_me:6483: result: yes" >&5
6484 echo "${ECHO_T}yes" >&6
6485                                 cf_save_CFLAGS="$CFLAGS"
6486                         else
6487                                 echo "$as_me:6487: result: no" >&5
6488 echo "${ECHO_T}no" >&6
6489                         fi
6490                 done
6491                 CFLAGS="$cf_save_CFLAGS"
6492         fi
6493
6494         # RPATH_LIST is a colon-separated list of directories
6495         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6496         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6497
6498         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6499
6500         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6501
6502 echo "${as_me:-configure}:6502: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6503
6504         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6505
6506 echo "${as_me:-configure}:6506: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6507
6508 for model in $cf_list_models; do
6509         case $model in
6510         (libtool)
6511
6512 echo "$as_me:6512: checking for additional libtool options" >&5
6513 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6514
6515 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6516 if test "${with_libtool_opts+set}" = set; then
6517   withval="$with_libtool_opts"
6518   with_libtool_opts=$withval
6519 else
6520   with_libtool_opts=no
6521 fi;
6522 echo "$as_me:6522: result: $with_libtool_opts" >&5
6523 echo "${ECHO_T}$with_libtool_opts" >&6
6524
6525 case .$with_libtool_opts in
6526 (.yes|.no|.)
6527         ;;
6528 (*)
6529         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6530         ;;
6531 esac
6532
6533 echo "$as_me:6533: checking if exported-symbols file should be used" >&5
6534 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6535
6536 # Check whether --with-export-syms or --without-export-syms was given.
6537 if test "${with_export_syms+set}" = set; then
6538   withval="$with_export_syms"
6539   with_export_syms=$withval
6540 else
6541   with_export_syms=no
6542 fi;
6543 if test "x$with_export_syms" = xyes
6544 then
6545         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6546
6547 fi
6548 echo "$as_me:6548: result: $with_export_syms" >&5
6549 echo "${ECHO_T}$with_export_syms" >&6
6550 if test "x$with_export_syms" != xno
6551 then
6552         EXPORT_SYMS="-export-symbols $with_export_syms"
6553
6554 fi
6555
6556                 ;;
6557         (shared)
6558                 if test "$CC_SHARED_OPTS" = "unknown"; then
6559                         { { echo "$as_me:6559: error: Shared libraries are not supported in this version" >&5
6560 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6561    { (exit 1); exit 1; }; }
6562                 fi
6563                 # workaround for inept transition to PIE vs PIC...
6564                 echo "$as_me:6564: checking if current CFLAGS link properly" >&5
6565 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6566                 cat >conftest.$ac_ext <<_ACEOF
6567 #line 6567 "configure"
6568 #include "confdefs.h"
6569 #include <stdio.h>
6570 int
6571 main ()
6572 {
6573 printf("Hello work\n");
6574   ;
6575   return 0;
6576 }
6577 _ACEOF
6578 rm -f conftest.$ac_objext conftest$ac_exeext
6579 if { (eval echo "$as_me:6579: \"$ac_link\"") >&5
6580   (eval $ac_link) 2>&5
6581   ac_status=$?
6582   echo "$as_me:6582: \$? = $ac_status" >&5
6583   (exit $ac_status); } &&
6584          { ac_try='test -s conftest$ac_exeext'
6585   { (eval echo "$as_me:6585: \"$ac_try\"") >&5
6586   (eval $ac_try) 2>&5
6587   ac_status=$?
6588   echo "$as_me:6588: \$? = $ac_status" >&5
6589   (exit $ac_status); }; }; then
6590   cf_cflags_work=yes
6591 else
6592   echo "$as_me: failed program was:" >&5
6593 cat conftest.$ac_ext >&5
6594 cf_cflags_work=no
6595 fi
6596 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6597                 echo "$as_me:6597: result: $cf_cflags_work" >&5
6598 echo "${ECHO_T}$cf_cflags_work" >&6
6599                 if test "$cf_cflags_work" = no
6600                 then
6601                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6602
6603 echo "${as_me:-configure}:6603: testing try to work around by appending shared-options ..." 1>&5
6604
6605                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6606                 fi
6607
6608 echo "$as_me:6608: checking if versioned-symbols file should be used" >&5
6609 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6610
6611 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6612 if test "${with_versioned_syms+set}" = set; then
6613   withval="$with_versioned_syms"
6614   with_versioned_syms=$withval
6615 else
6616   with_versioned_syms=no
6617 fi;
6618 if test "x$with_versioned_syms" = xyes
6619 then
6620         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6621
6622 fi
6623 echo "$as_me:6623: result: $with_versioned_syms" >&5
6624 echo "${ECHO_T}$with_versioned_syms" >&6
6625
6626 RESULTING_SYMS=
6627 VERSIONED_SYMS=
6628 WILDCARD_SYMS=
6629
6630 if test "x$with_versioned_syms" != xno
6631 then
6632         RESULTING_SYMS=$with_versioned_syms
6633         case "x$MK_SHARED_LIB" in
6634         (*-Wl,*)
6635                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6636                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6637                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6638
6639 echo "${as_me:-configure}:6639: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6640
6641                 ;;
6642         (*-dy\ *)
6643                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6644                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6645                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6646
6647 echo "${as_me:-configure}:6647: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6648
6649                 ;;
6650         (*)
6651                 { echo "$as_me:6651: WARNING: this system does not support versioned-symbols" >&5
6652 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6653                 ;;
6654         esac
6655
6656         # Linux ld can selectively override scope, e.g., of symbols beginning with
6657         # "_" by first declaring some as global, and then using a wildcard to
6658         # declare the others as local.  Some other loaders cannot do this.  Check
6659         # by constructing a (very) simple shared library and inspecting its
6660         # symbols.
6661         if test "x$VERSIONED_SYMS" != "x"
6662         then
6663                 echo "$as_me:6663: checking if wildcards can be used to selectively omit symbols" >&5
6664 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6665                 WILDCARD_SYMS=no
6666
6667                 # make sources
6668                 rm -f conftest.*
6669
6670                 cat >conftest.ver <<EOF
6671 module_1.0 {
6672 global:
6673         globalf1;
6674 local:
6675         localf1;
6676 };
6677 module_2.0 {
6678 global:
6679         globalf2;
6680 local:
6681         localf2;
6682         _*;
6683 } module_1.0;
6684 submodule_1.0 {
6685 global:
6686         subglobalf1;
6687         _ismissing;
6688 local:
6689         sublocalf1;
6690 };
6691 submodule_2.0 {
6692 global:
6693         subglobalf2;
6694 local:
6695         sublocalf2;
6696         _*;
6697 } submodule_1.0;
6698 EOF
6699                 cat >conftest.$ac_ext <<EOF
6700 #line 6700 "configure"
6701 int     _ismissing(void) { return 1; }
6702 int     _localf1(void) { return 1; }
6703 int     _localf2(void) { return 2; }
6704 int     globalf1(void) { return 1; }
6705 int     globalf2(void) { return 2; }
6706 int     _sublocalf1(void) { return 1; }
6707 int     _sublocalf2(void) { return 2; }
6708 int     subglobalf1(void) { return 1; }
6709 int     subglobalf2(void) { return 2; }
6710 EOF
6711                 cat >conftest.mk <<EOF
6712 CC=${CC}
6713 CFLAGS=${CFLAGS}
6714 CPPFLAGS=${CPPFLAGS}
6715 LDFLAGS=${LDFLAGS}
6716 LIBS=${LIBS}
6717 VERSIONED_SYMS=${VERSIONED_SYMS}
6718 RESULTING_SYMS=conftest.ver
6719 MK_SHARED_LIB=${MK_SHARED_LIB}
6720 conftest.so: conftest.$ac_cv_objext
6721                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6722 EOF
6723
6724                 # compile source, make library
6725                 if make -f conftest.mk 2>&5 >/dev/null
6726                 then
6727                         # test for missing symbol in either Data or Text section
6728                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6729                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6730                 fi
6731                 echo "$as_me:6731: result: $WILDCARD_SYMS" >&5
6732 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6733                 rm -f conftest.*
6734         fi
6735 fi
6736
6737                 ;;
6738         esac
6739 done
6740
6741 # pretend that ncurses==ncursesw==ncursest
6742 echo "$as_me:6742: checking if you want to disable library suffixes" >&5
6743 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6744
6745 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6746 if test "${enable_lib_suffixes+set}" = set; then
6747   enableval="$enable_lib_suffixes"
6748   test "$enableval" != no && enableval=yes
6749         if test "$enableval" != "yes" ; then
6750     disable_lib_suffixes=yes
6751         else
6752                 disable_lib_suffixes=no
6753         fi
6754 else
6755   enableval=yes
6756         disable_lib_suffixes=no
6757
6758 fi;
6759 echo "$as_me:6759: result: $disable_lib_suffixes" >&5
6760 echo "${ECHO_T}$disable_lib_suffixes" >&6
6761
6762 ### If we're building with rpath, try to link non-standard libs that way too.
6763 if test "$DFT_LWR_MODEL" = "shared"; then
6764
6765 echo "$as_me:6765: checking if rpath-hack should be disabled" >&5
6766 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6767
6768 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6769 if test "${enable_rpath_hack+set}" = set; then
6770   enableval="$enable_rpath_hack"
6771   test "$enableval" != no && enableval=yes
6772         if test "$enableval" != "yes" ; then
6773     cf_disable_rpath_hack=yes
6774         else
6775                 cf_disable_rpath_hack=no
6776         fi
6777 else
6778   enableval=yes
6779         cf_disable_rpath_hack=no
6780
6781 fi;
6782 echo "$as_me:6782: result: $cf_disable_rpath_hack" >&5
6783 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6784 if test "$cf_disable_rpath_hack" = no ; then
6785
6786 echo "$as_me:6786: checking for updated LDFLAGS" >&5
6787 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6788 if test -n "$LD_RPATH_OPT" ; then
6789         echo "$as_me:6789: result: maybe" >&5
6790 echo "${ECHO_T}maybe" >&6
6791
6792         for ac_prog in ldd
6793 do
6794   # Extract the first word of "$ac_prog", so it can be a program name with args.
6795 set dummy $ac_prog; ac_word=$2
6796 echo "$as_me:6796: checking for $ac_word" >&5
6797 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6798 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6799   echo $ECHO_N "(cached) $ECHO_C" >&6
6800 else
6801   if test -n "$cf_ldd_prog"; then
6802   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6803 else
6804   ac_save_IFS=$IFS; IFS=$ac_path_separator
6805 ac_dummy="$PATH"
6806 for ac_dir in $ac_dummy; do
6807   IFS=$ac_save_IFS
6808   test -z "$ac_dir" && ac_dir=.
6809   $as_executable_p "$ac_dir/$ac_word" || continue
6810 ac_cv_prog_cf_ldd_prog="$ac_prog"
6811 echo "$as_me:6811: found $ac_dir/$ac_word" >&5
6812 break
6813 done
6814
6815 fi
6816 fi
6817 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6818 if test -n "$cf_ldd_prog"; then
6819   echo "$as_me:6819: result: $cf_ldd_prog" >&5
6820 echo "${ECHO_T}$cf_ldd_prog" >&6
6821 else
6822   echo "$as_me:6822: result: no" >&5
6823 echo "${ECHO_T}no" >&6
6824 fi
6825
6826   test -n "$cf_ldd_prog" && break
6827 done
6828 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6829
6830         cf_rpath_list="/usr/lib /lib"
6831         if test "$cf_ldd_prog" != no
6832         then
6833                 cf_rpath_oops=
6834
6835 cat >conftest.$ac_ext <<_ACEOF
6836 #line 6836 "configure"
6837 #include "confdefs.h"
6838 #include <stdio.h>
6839 int
6840 main ()
6841 {
6842 printf("Hello");
6843   ;
6844   return 0;
6845 }
6846 _ACEOF
6847 rm -f conftest.$ac_objext conftest$ac_exeext
6848 if { (eval echo "$as_me:6848: \"$ac_link\"") >&5
6849   (eval $ac_link) 2>&5
6850   ac_status=$?
6851   echo "$as_me:6851: \$? = $ac_status" >&5
6852   (exit $ac_status); } &&
6853          { ac_try='test -s conftest$ac_exeext'
6854   { (eval echo "$as_me:6854: \"$ac_try\"") >&5
6855   (eval $ac_try) 2>&5
6856   ac_status=$?
6857   echo "$as_me:6857: \$? = $ac_status" >&5
6858   (exit $ac_status); }; }; then
6859   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6860                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6861 else
6862   echo "$as_me: failed program was:" >&5
6863 cat conftest.$ac_ext >&5
6864 fi
6865 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6866
6867                 # If we passed the link-test, but get a "not found" on a given library,
6868                 # this could be due to inept reconfiguration of gcc to make it only
6869                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6870                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6871                 # /usr/local libraries.
6872                 if test -n "$cf_rpath_oops"
6873                 then
6874                         for cf_rpath_src in $cf_rpath_oops
6875                         do
6876                                 for cf_rpath_dir in \
6877                                         /usr/local \
6878                                         /usr/pkg \
6879                                         /opt/sfw
6880                                 do
6881                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6882                                         then
6883                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6884
6885 echo "${as_me:-configure}:6885: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6886
6887                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6888                                                 break
6889                                         fi
6890                                 done
6891                         done
6892                 fi
6893         fi
6894
6895         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6896
6897 echo "${as_me:-configure}:6897: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6898
6899 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6900
6901 echo "${as_me:-configure}:6901: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6902
6903 cf_rpath_dst=
6904 for cf_rpath_src in $LDFLAGS
6905 do
6906         case $cf_rpath_src in
6907         (-L*)
6908
6909                 # check if this refers to a directory which we will ignore
6910                 cf_rpath_skip=no
6911                 if test -n "$cf_rpath_list"
6912                 then
6913                         for cf_rpath_item in $cf_rpath_list
6914                         do
6915                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6916                                 then
6917                                         cf_rpath_skip=yes
6918                                         break
6919                                 fi
6920                         done
6921                 fi
6922
6923                 if test "$cf_rpath_skip" = no
6924                 then
6925                         # transform the option
6926                         if test "$LD_RPATH_OPT" = "-R " ; then
6927                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6928                         else
6929                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6930                         fi
6931
6932                         # if we have not already added this, add it now
6933                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6934                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6935                         then
6936                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6937
6938 echo "${as_me:-configure}:6938: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6939
6940                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6941                         fi
6942                 fi
6943                 ;;
6944         esac
6945         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6946 done
6947 LDFLAGS=$cf_rpath_dst
6948
6949 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6950
6951 echo "${as_me:-configure}:6951: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6952
6953 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6954
6955 echo "${as_me:-configure}:6955: testing ...checking LIBS $LIBS ..." 1>&5
6956
6957 cf_rpath_dst=
6958 for cf_rpath_src in $LIBS
6959 do
6960         case $cf_rpath_src in
6961         (-L*)
6962
6963                 # check if this refers to a directory which we will ignore
6964                 cf_rpath_skip=no
6965                 if test -n "$cf_rpath_list"
6966                 then
6967                         for cf_rpath_item in $cf_rpath_list
6968                         do
6969                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6970                                 then
6971                                         cf_rpath_skip=yes
6972                                         break
6973                                 fi
6974                         done
6975                 fi
6976
6977                 if test "$cf_rpath_skip" = no
6978                 then
6979                         # transform the option
6980                         if test "$LD_RPATH_OPT" = "-R " ; then
6981                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6982                         else
6983                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6984                         fi
6985
6986                         # if we have not already added this, add it now
6987                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6988                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6989                         then
6990                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6991
6992 echo "${as_me:-configure}:6992: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6993
6994                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6995                         fi
6996                 fi
6997                 ;;
6998         esac
6999         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7000 done
7001 LIBS=$cf_rpath_dst
7002
7003 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7004
7005 echo "${as_me:-configure}:7005: testing ...checked LIBS $LIBS ..." 1>&5
7006
7007         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7008
7009 echo "${as_me:-configure}:7009: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7010
7011 else
7012         echo "$as_me:7012: result: no" >&5
7013 echo "${ECHO_T}no" >&6
7014 fi
7015
7016 fi
7017
7018 fi
7019
7020 ###############################################################################
7021
7022 ###     use option --with-extra-suffix to append suffix to headers and libraries
7023 echo "$as_me:7023: checking if you wish to append extra suffix to header/library paths" >&5
7024 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7025 EXTRA_SUFFIX=
7026
7027 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7028 if test "${with_extra_suffix+set}" = set; then
7029   withval="$with_extra_suffix"
7030   case x$withval in
7031         (no)
7032                 ;;
7033         (xyes|x)
7034                 EXTRA_SUFFIX=$cf_cv_abi_version
7035                 ;;
7036         (*)
7037                 EXTRA_SUFFIX=$withval
7038                 ;;
7039         esac
7040
7041 fi;
7042 echo "$as_me:7042: result: $EXTRA_SUFFIX" >&5
7043 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7044
7045 ###     use option --disable-overwrite to leave out the link to -lcurses
7046 echo "$as_me:7046: checking if you wish to install ncurses overwriting curses" >&5
7047 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7048
7049 # Check whether --enable-overwrite or --disable-overwrite was given.
7050 if test "${enable_overwrite+set}" = set; then
7051   enableval="$enable_overwrite"
7052   with_overwrite=$enableval
7053 else
7054   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7055 fi;
7056 echo "$as_me:7056: result: $with_overwrite" >&5
7057 echo "${ECHO_T}$with_overwrite" >&6
7058
7059 echo "$as_me:7059: checking if external terminfo-database is used" >&5
7060 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7061
7062 # Check whether --enable-database or --disable-database was given.
7063 if test "${enable_database+set}" = set; then
7064   enableval="$enable_database"
7065   use_database=$enableval
7066 else
7067   use_database=yes
7068 fi;
7069 echo "$as_me:7069: result: $use_database" >&5
7070 echo "${ECHO_T}$use_database" >&6
7071
7072 case $host_os in
7073 (os2*)
7074         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7075         ;;
7076 (*)
7077         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7078         ;;
7079 esac
7080
7081 NCURSES_USE_DATABASE=0
7082 if test "$use_database" != no ; then
7083         NCURSES_USE_DATABASE=1
7084
7085         echo "$as_me:7085: checking which terminfo source-file will be installed" >&5
7086 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7087
7088 # Check whether --with-database or --without-database was given.
7089 if test "${with_database+set}" = set; then
7090   withval="$with_database"
7091   TERMINFO_SRC=$withval
7092 fi;
7093         echo "$as_me:7093: result: $TERMINFO_SRC" >&5
7094 echo "${ECHO_T}$TERMINFO_SRC" >&6
7095
7096         echo "$as_me:7096: checking whether to use hashed database instead of directory/tree" >&5
7097 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7098
7099 # Check whether --with-hashed-db or --without-hashed-db was given.
7100 if test "${with_hashed_db+set}" = set; then
7101   withval="$with_hashed_db"
7102
7103 else
7104   with_hashed_db=no
7105 fi;
7106         echo "$as_me:7106: result: $with_hashed_db" >&5
7107 echo "${ECHO_T}$with_hashed_db" >&6
7108 else
7109         with_hashed_db=no
7110 fi
7111
7112 echo "$as_me:7112: checking for list of fallback descriptions" >&5
7113 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7114
7115 # Check whether --with-fallbacks or --without-fallbacks was given.
7116 if test "${with_fallbacks+set}" = set; then
7117   withval="$with_fallbacks"
7118   with_fallback=$withval
7119 else
7120   with_fallback=
7121 fi;
7122 echo "$as_me:7122: result: $with_fallback" >&5
7123 echo "${ECHO_T}$with_fallback" >&6
7124 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7125
7126 echo "$as_me:7126: checking if you want modern xterm or antique" >&5
7127 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7128
7129 # Check whether --with-xterm-new or --without-xterm-new was given.
7130 if test "${with_xterm_new+set}" = set; then
7131   withval="$with_xterm_new"
7132   with_xterm_new=$withval
7133 else
7134   with_xterm_new=yes
7135 fi;
7136 case $with_xterm_new in
7137 (no) with_xterm_new=xterm-old;;
7138 (*)      with_xterm_new=xterm-new;;
7139 esac
7140 echo "$as_me:7140: result: $with_xterm_new" >&5
7141 echo "${ECHO_T}$with_xterm_new" >&6
7142 WHICH_XTERM=$with_xterm_new
7143
7144 echo "$as_me:7144: checking if xterm backspace sends BS or DEL" >&5
7145 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7146
7147 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7148 if test "${with_xterm_kbs+set}" = set; then
7149   withval="$with_xterm_kbs"
7150   with_xterm_kbs=$withval
7151 else
7152   with_xterm_kbs=BS
7153 fi;
7154 case x$with_xterm_kbs in
7155 (xyes|xno|xBS|xbs|x8)
7156         with_xterm_kbs=BS
7157         ;;
7158 (xDEL|xdel|x127)
7159         with_xterm_kbs=DEL
7160         ;;
7161 (*)
7162         with_xterm_kbs=$withval
7163         ;;
7164 esac
7165 echo "$as_me:7165: result: $with_xterm_kbs" >&5
7166 echo "${ECHO_T}$with_xterm_kbs" >&6
7167 XTERM_KBS=$with_xterm_kbs
7168
7169 MAKE_TERMINFO=
7170 if test "$use_database" = no ; then
7171         TERMINFO="${datadir}/terminfo"
7172         MAKE_TERMINFO="#"
7173 else
7174
7175 echo "$as_me:7175: checking for list of terminfo directories" >&5
7176 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7177
7178 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7179 if test "${with_terminfo_dirs+set}" = set; then
7180   withval="$with_terminfo_dirs"
7181
7182 else
7183   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7184 fi;
7185 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7186 cf_dst_path=
7187 for cf_src_path in $withval
7188 do
7189
7190 if test "x$prefix" != xNONE; then
7191         cf_path_syntax="$prefix"
7192 else
7193         cf_path_syntax="$ac_default_prefix"
7194 fi
7195
7196 case ".$cf_src_path" in
7197 (.\$\(*\)*|.\'*\'*)
7198         ;;
7199 (..|./*|.\\*)
7200         ;;
7201 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7202         ;;
7203 (.\${*prefix}*|.\${*dir}*)
7204         eval cf_src_path="$cf_src_path"
7205         case ".$cf_src_path" in
7206         (.NONE/*)
7207                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7208                 ;;
7209         esac
7210         ;;
7211 (.no|.NONE/*)
7212         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7213         ;;
7214 (*)
7215         { { echo "$as_me:7215: error: expected a pathname, not \"$cf_src_path\"" >&5
7216 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7217    { (exit 1); exit 1; }; }
7218         ;;
7219 esac
7220
7221   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7222   cf_dst_path="${cf_dst_path}${cf_src_path}"
7223 done
7224 IFS="$ac_save_ifs"
7225
7226 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7227 # so we have to check/work around.  We do prefer the result of "eval"...
7228 eval cf_dst_eval="$cf_dst_path"
7229 case "x$cf_dst_eval" in
7230 (xNONE*)
7231         TERMINFO_DIRS=$cf_dst_path
7232         ;;
7233 (*)
7234         TERMINFO_DIRS="$cf_dst_eval"
7235         ;;
7236 esac
7237
7238 echo "$as_me:7238: result: $TERMINFO_DIRS" >&5
7239 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7240 test -n "$TERMINFO_DIRS" &&
7241 cat >>confdefs.h <<EOF
7242 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7243 EOF
7244
7245 echo "$as_me:7245: checking for default terminfo directory" >&5
7246 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7247
7248 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7249 if test "${with_default_terminfo_dir+set}" = set; then
7250   withval="$with_default_terminfo_dir"
7251
7252 else
7253   withval="${TERMINFO:-${datadir}/terminfo}"
7254 fi; if test -n "${datadir}/terminfo" ; then
7255
7256 if test "x$prefix" != xNONE; then
7257         cf_path_syntax="$prefix"
7258 else
7259         cf_path_syntax="$ac_default_prefix"
7260 fi
7261
7262 case ".$withval" in
7263 (.\$\(*\)*|.\'*\'*)
7264         ;;
7265 (..|./*|.\\*)
7266         ;;
7267 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7268         ;;
7269 (.\${*prefix}*|.\${*dir}*)
7270         eval withval="$withval"
7271         case ".$withval" in
7272         (.NONE/*)
7273                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7274                 ;;
7275         esac
7276         ;;
7277 (.no|.NONE/*)
7278         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7279         ;;
7280 (*)
7281         { { echo "$as_me:7281: error: expected a pathname, not \"$withval\"" >&5
7282 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7283    { (exit 1); exit 1; }; }
7284         ;;
7285 esac
7286
7287 fi
7288 eval TERMINFO="$withval"
7289
7290 echo "$as_me:7290: result: $TERMINFO" >&5
7291 echo "${ECHO_T}$TERMINFO" >&6
7292
7293 cat >>confdefs.h <<EOF
7294 #define TERMINFO "$TERMINFO"
7295 EOF
7296
7297 fi
7298
7299 ###     use option --disable-big-core to make tic run on small machines
7300 ###     We need 4Mb, check if we can allocate 50% more than that.
7301 echo "$as_me:7301: checking if big-core option selected" >&5
7302 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7303
7304 # Check whether --enable-big-core or --disable-big-core was given.
7305 if test "${enable_big_core+set}" = set; then
7306   enableval="$enable_big_core"
7307   with_big_core=$enableval
7308 else
7309   if test "$cross_compiling" = yes; then
7310   with_big_core=no
7311 else
7312   cat >conftest.$ac_ext <<_ACEOF
7313 #line 7313 "configure"
7314 #include "confdefs.h"
7315
7316 #include <stdlib.h>
7317 #include <string.h>
7318 int main() {
7319         unsigned long n = 6000000L;
7320         char *s = malloc(n);
7321         if (s != 0)
7322                 s[0] = s[n-1] = 0;
7323         ${cf_cv_main_return:-return}(s == 0);
7324 }
7325 _ACEOF
7326 rm -f conftest$ac_exeext
7327 if { (eval echo "$as_me:7327: \"$ac_link\"") >&5
7328   (eval $ac_link) 2>&5
7329   ac_status=$?
7330   echo "$as_me:7330: \$? = $ac_status" >&5
7331   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7332   { (eval echo "$as_me:7332: \"$ac_try\"") >&5
7333   (eval $ac_try) 2>&5
7334   ac_status=$?
7335   echo "$as_me:7335: \$? = $ac_status" >&5
7336   (exit $ac_status); }; }; then
7337   with_big_core=yes
7338 else
7339   echo "$as_me: program exited with status $ac_status" >&5
7340 echo "$as_me: failed program was:" >&5
7341 cat conftest.$ac_ext >&5
7342 with_big_core=no
7343 fi
7344 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7345 fi
7346 fi;
7347 echo "$as_me:7347: result: $with_big_core" >&5
7348 echo "${ECHO_T}$with_big_core" >&6
7349 test "x$with_big_core" = "xyes" &&
7350 cat >>confdefs.h <<\EOF
7351 #define HAVE_BIG_CORE 1
7352 EOF
7353
7354 ### ISO C only guarantees 512-char strings, we have tables which load faster
7355 ### when constructed using "big" strings.  More than the C compiler, the awk
7356 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7357 echo "$as_me:7357: checking if big-strings option selected" >&5
7358 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7359
7360 # Check whether --enable-big-strings or --disable-big-strings was given.
7361 if test "${enable_big_strings+set}" = set; then
7362   enableval="$enable_big_strings"
7363   with_big_strings=$enableval
7364 else
7365
7366         case x$AWK in
7367         (x)
7368                 eval with_big_strings=no
7369                 ;;
7370         (*)
7371                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7372                         | $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
7373                         eval with_big_strings=yes
7374                 else
7375                         eval with_big_strings=no
7376                 fi
7377                 ;;
7378         esac
7379
7380 fi;
7381 echo "$as_me:7381: result: $with_big_strings" >&5
7382 echo "${ECHO_T}$with_big_strings" >&6
7383
7384 USE_BIG_STRINGS=0
7385 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7386
7387 ###     use option --enable-termcap to compile in the termcap fallback support
7388 echo "$as_me:7388: checking if you want termcap-fallback support" >&5
7389 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7390
7391 # Check whether --enable-termcap or --disable-termcap was given.
7392 if test "${enable_termcap+set}" = set; then
7393   enableval="$enable_termcap"
7394   with_termcap=$enableval
7395 else
7396   with_termcap=no
7397 fi;
7398 echo "$as_me:7398: result: $with_termcap" >&5
7399 echo "${ECHO_T}$with_termcap" >&6
7400
7401 NCURSES_USE_TERMCAP=0
7402 if test "x$with_termcap" != "xyes" ; then
7403         if test "$use_database" = no ; then
7404                 if test -z "$with_fallback" ; then
7405                         { { echo "$as_me:7405: error: You have disabled the database w/o specifying fallbacks" >&5
7406 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7407    { (exit 1); exit 1; }; }
7408                 fi
7409         fi
7410
7411 cat >>confdefs.h <<\EOF
7412 #define PURE_TERMINFO 1
7413 EOF
7414
7415 else
7416
7417         if test "$with_ticlib" != no ; then
7418                 { { echo "$as_me:7418: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7419 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7420    { (exit 1); exit 1; }; }
7421         fi
7422
7423         NCURSES_USE_TERMCAP=1
7424         echo "$as_me:7424: checking for list of termcap files" >&5
7425 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7426
7427 # Check whether --with-termpath or --without-termpath was given.
7428 if test "${with_termpath+set}" = set; then
7429   withval="$with_termpath"
7430
7431 else
7432   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7433 fi;
7434 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7435 cf_dst_path=
7436 for cf_src_path in $withval
7437 do
7438
7439 if test "x$prefix" != xNONE; then
7440         cf_path_syntax="$prefix"
7441 else
7442         cf_path_syntax="$ac_default_prefix"
7443 fi
7444
7445 case ".$cf_src_path" in
7446 (.\$\(*\)*|.\'*\'*)
7447         ;;
7448 (..|./*|.\\*)
7449         ;;
7450 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7451         ;;
7452 (.\${*prefix}*|.\${*dir}*)
7453         eval cf_src_path="$cf_src_path"
7454         case ".$cf_src_path" in
7455         (.NONE/*)
7456                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7457                 ;;
7458         esac
7459         ;;
7460 (.no|.NONE/*)
7461         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7462         ;;
7463 (*)
7464         { { echo "$as_me:7464: error: expected a pathname, not \"$cf_src_path\"" >&5
7465 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7466    { (exit 1); exit 1; }; }
7467         ;;
7468 esac
7469
7470   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7471   cf_dst_path="${cf_dst_path}${cf_src_path}"
7472 done
7473 IFS="$ac_save_ifs"
7474
7475 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7476 # so we have to check/work around.  We do prefer the result of "eval"...
7477 eval cf_dst_eval="$cf_dst_path"
7478 case "x$cf_dst_eval" in
7479 (xNONE*)
7480         TERMPATH=$cf_dst_path
7481         ;;
7482 (*)
7483         TERMPATH="$cf_dst_eval"
7484         ;;
7485 esac
7486
7487         echo "$as_me:7487: result: $TERMPATH" >&5
7488 echo "${ECHO_T}$TERMPATH" >&6
7489         test -n "$TERMPATH" &&
7490 cat >>confdefs.h <<EOF
7491 #define TERMPATH "$TERMPATH"
7492 EOF
7493
7494         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7495         echo "$as_me:7495: checking if fast termcap-loader is needed" >&5
7496 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7497
7498 # Check whether --enable-getcap or --disable-getcap was given.
7499 if test "${enable_getcap+set}" = set; then
7500   enableval="$enable_getcap"
7501   with_getcap=$enableval
7502 else
7503   with_getcap=no
7504 fi;
7505         echo "$as_me:7505: result: $with_getcap" >&5
7506 echo "${ECHO_T}$with_getcap" >&6
7507         test "x$with_getcap" = "xyes" &&
7508 cat >>confdefs.h <<\EOF
7509 #define USE_GETCAP 1
7510 EOF
7511
7512         echo "$as_me:7512: checking if translated termcaps will be cached in ~/.terminfo" >&5
7513 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7514
7515 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7516 if test "${enable_getcap_cache+set}" = set; then
7517   enableval="$enable_getcap_cache"
7518   with_getcap_cache=$enableval
7519 else
7520   with_getcap_cache=no
7521 fi;
7522         echo "$as_me:7522: result: $with_getcap_cache" >&5
7523 echo "${ECHO_T}$with_getcap_cache" >&6
7524         test "x$with_getcap_cache" = "xyes" &&
7525 cat >>confdefs.h <<\EOF
7526 #define USE_GETCAP_CACHE 1
7527 EOF
7528
7529 fi
7530
7531 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7532 echo "$as_me:7532: checking if ~/.terminfo is wanted" >&5
7533 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7534
7535 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7536 if test "${enable_home_terminfo+set}" = set; then
7537   enableval="$enable_home_terminfo"
7538   with_home_terminfo=$enableval
7539 else
7540   with_home_terminfo=yes
7541 fi;
7542 echo "$as_me:7542: result: $with_home_terminfo" >&5
7543 echo "${ECHO_T}$with_home_terminfo" >&6
7544 test "x$with_home_terminfo" = "xyes" &&
7545 cat >>confdefs.h <<\EOF
7546 #define USE_HOME_TERMINFO 1
7547 EOF
7548
7549 echo "$as_me:7549: checking if you want to use restricted environment when running as root" >&5
7550 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7551
7552 # Check whether --enable-root-environ or --disable-root-environ was given.
7553 if test "${enable_root_environ+set}" = set; then
7554   enableval="$enable_root_environ"
7555   with_root_environ=$enableval
7556 else
7557   with_root_environ=yes
7558 fi;
7559 echo "$as_me:7559: result: $with_root_environ" >&5
7560 echo "${ECHO_T}$with_root_environ" >&6
7561 test "x$with_root_environ" = xyes &&
7562 cat >>confdefs.h <<\EOF
7563 #define USE_ROOT_ENVIRON 1
7564 EOF
7565
7566 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7567 ###   to reduce storage requirements for the terminfo database.
7568
7569 for ac_func in \
7570         remove \
7571         unlink
7572 do
7573 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7574 echo "$as_me:7574: checking for $ac_func" >&5
7575 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7576 if eval "test \"\${$as_ac_var+set}\" = set"; then
7577   echo $ECHO_N "(cached) $ECHO_C" >&6
7578 else
7579   cat >conftest.$ac_ext <<_ACEOF
7580 #line 7580 "configure"
7581 #include "confdefs.h"
7582 /* System header to define __stub macros and hopefully few prototypes,
7583     which can conflict with char $ac_func (); below.  */
7584 #include <assert.h>
7585 /* Override any gcc2 internal prototype to avoid an error.  */
7586 #ifdef __cplusplus
7587 extern "C"
7588 #endif
7589 /* We use char because int might match the return type of a gcc2
7590    builtin and then its argument prototype would still apply.  */
7591 char $ac_func ();
7592 char (*f) ();
7593
7594 int
7595 main ()
7596 {
7597 /* The GNU C library defines this for functions which it implements
7598     to always fail with ENOSYS.  Some functions are actually named
7599     something starting with __ and the normal name is an alias.  */
7600 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7601 choke me
7602 #else
7603 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7604 #endif
7605
7606   ;
7607   return 0;
7608 }
7609 _ACEOF
7610 rm -f conftest.$ac_objext conftest$ac_exeext
7611 if { (eval echo "$as_me:7611: \"$ac_link\"") >&5
7612   (eval $ac_link) 2>&5
7613   ac_status=$?
7614   echo "$as_me:7614: \$? = $ac_status" >&5
7615   (exit $ac_status); } &&
7616          { ac_try='test -s conftest$ac_exeext'
7617   { (eval echo "$as_me:7617: \"$ac_try\"") >&5
7618   (eval $ac_try) 2>&5
7619   ac_status=$?
7620   echo "$as_me:7620: \$? = $ac_status" >&5
7621   (exit $ac_status); }; }; then
7622   eval "$as_ac_var=yes"
7623 else
7624   echo "$as_me: failed program was:" >&5
7625 cat conftest.$ac_ext >&5
7626 eval "$as_ac_var=no"
7627 fi
7628 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7629 fi
7630 echo "$as_me:7630: result: `eval echo '${'$as_ac_var'}'`" >&5
7631 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7632 if test `eval echo '${'$as_ac_var'}'` = yes; then
7633   cat >>confdefs.h <<EOF
7634 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7635 EOF
7636
7637 fi
7638 done
7639
7640 if test "$cross_compiling" = yes ; then
7641
7642 for ac_func in \
7643                 link \
7644                 symlink
7645 do
7646 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7647 echo "$as_me:7647: checking for $ac_func" >&5
7648 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7649 if eval "test \"\${$as_ac_var+set}\" = set"; then
7650   echo $ECHO_N "(cached) $ECHO_C" >&6
7651 else
7652   cat >conftest.$ac_ext <<_ACEOF
7653 #line 7653 "configure"
7654 #include "confdefs.h"
7655 /* System header to define __stub macros and hopefully few prototypes,
7656     which can conflict with char $ac_func (); below.  */
7657 #include <assert.h>
7658 /* Override any gcc2 internal prototype to avoid an error.  */
7659 #ifdef __cplusplus
7660 extern "C"
7661 #endif
7662 /* We use char because int might match the return type of a gcc2
7663    builtin and then its argument prototype would still apply.  */
7664 char $ac_func ();
7665 char (*f) ();
7666
7667 int
7668 main ()
7669 {
7670 /* The GNU C library defines this for functions which it implements
7671     to always fail with ENOSYS.  Some functions are actually named
7672     something starting with __ and the normal name is an alias.  */
7673 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7674 choke me
7675 #else
7676 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7677 #endif
7678
7679   ;
7680   return 0;
7681 }
7682 _ACEOF
7683 rm -f conftest.$ac_objext conftest$ac_exeext
7684 if { (eval echo "$as_me:7684: \"$ac_link\"") >&5
7685   (eval $ac_link) 2>&5
7686   ac_status=$?
7687   echo "$as_me:7687: \$? = $ac_status" >&5
7688   (exit $ac_status); } &&
7689          { ac_try='test -s conftest$ac_exeext'
7690   { (eval echo "$as_me:7690: \"$ac_try\"") >&5
7691   (eval $ac_try) 2>&5
7692   ac_status=$?
7693   echo "$as_me:7693: \$? = $ac_status" >&5
7694   (exit $ac_status); }; }; then
7695   eval "$as_ac_var=yes"
7696 else
7697   echo "$as_me: failed program was:" >&5
7698 cat conftest.$ac_ext >&5
7699 eval "$as_ac_var=no"
7700 fi
7701 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7702 fi
7703 echo "$as_me:7703: result: `eval echo '${'$as_ac_var'}'`" >&5
7704 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7705 if test `eval echo '${'$as_ac_var'}'` = yes; then
7706   cat >>confdefs.h <<EOF
7707 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7708 EOF
7709
7710 fi
7711 done
7712
7713 else
7714         echo "$as_me:7714: checking if link/symlink functions work" >&5
7715 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7716 if test "${cf_cv_link_funcs+set}" = set; then
7717   echo $ECHO_N "(cached) $ECHO_C" >&6
7718 else
7719
7720                 cf_cv_link_funcs=
7721                 for cf_func in link symlink ; do
7722                         if test "$cross_compiling" = yes; then
7723
7724                         eval 'ac_cv_func_'$cf_func'=error'
7725 else
7726   cat >conftest.$ac_ext <<_ACEOF
7727 #line 7727 "configure"
7728 #include "confdefs.h"
7729
7730 #include <sys/types.h>
7731 #include <sys/stat.h>
7732 #ifdef HAVE_UNISTD_H
7733 #include <unistd.h>
7734 #endif
7735 int main()
7736 {
7737         int fail = 0;
7738         char *src = "config.log";
7739         char *dst = "conftest.chk";
7740         struct stat src_sb;
7741         struct stat dst_sb;
7742
7743         stat(src, &src_sb);
7744         fail = ($cf_func("config.log", "conftest.chk") < 0)
7745             || (stat(dst, &dst_sb) < 0)
7746             || (dst_sb.st_mtime != src_sb.st_mtime);
7747 #ifdef HAVE_UNLINK
7748         unlink(dst);
7749 #else
7750         remove(dst);
7751 #endif
7752         ${cf_cv_main_return:-return} (fail);
7753 }
7754
7755 _ACEOF
7756 rm -f conftest$ac_exeext
7757 if { (eval echo "$as_me:7757: \"$ac_link\"") >&5
7758   (eval $ac_link) 2>&5
7759   ac_status=$?
7760   echo "$as_me:7760: \$? = $ac_status" >&5
7761   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7762   { (eval echo "$as_me:7762: \"$ac_try\"") >&5
7763   (eval $ac_try) 2>&5
7764   ac_status=$?
7765   echo "$as_me:7765: \$? = $ac_status" >&5
7766   (exit $ac_status); }; }; then
7767
7768                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7769                         eval 'ac_cv_func_'$cf_func'=yes'
7770 else
7771   echo "$as_me: program exited with status $ac_status" >&5
7772 echo "$as_me: failed program was:" >&5
7773 cat conftest.$ac_ext >&5
7774
7775                         eval 'ac_cv_func_'$cf_func'=no'
7776 fi
7777 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7778 fi
7779                 done
7780                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7781
7782 fi
7783 echo "$as_me:7783: result: $cf_cv_link_funcs" >&5
7784 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7785         test "$ac_cv_func_link"    = yes &&
7786 cat >>confdefs.h <<\EOF
7787 #define HAVE_LINK 1
7788 EOF
7789
7790         test "$ac_cv_func_symlink" = yes &&
7791 cat >>confdefs.h <<\EOF
7792 #define HAVE_SYMLINK 1
7793 EOF
7794
7795 fi
7796
7797 with_links=no
7798 with_symlinks=no
7799
7800 # soft links (symbolic links) are useful for some systems where hard links do
7801 # not work, or to make it simpler to copy terminfo trees around.
7802 if test "x$ac_cv_func_symlink" = xyes ; then
7803         echo "$as_me:7803: checking if tic should use symbolic links" >&5
7804 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7805
7806 # Check whether --enable-symlinks or --disable-symlinks was given.
7807 if test "${enable_symlinks+set}" = set; then
7808   enableval="$enable_symlinks"
7809   with_symlinks=$enableval
7810 else
7811   with_symlinks=no
7812 fi;
7813         echo "$as_me:7813: result: $with_symlinks" >&5
7814 echo "${ECHO_T}$with_symlinks" >&6
7815 fi
7816
7817 # If we have hard links and did not choose to use soft links instead, there is
7818 # no reason to make this choice optional - use the hard links.
7819 if test "$with_symlinks" = no ; then
7820         echo "$as_me:7820: checking if tic should use hard links" >&5
7821 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7822         if test "x$ac_cv_func_link" = xyes ; then
7823                 with_links=yes
7824         else
7825                 with_links=no
7826         fi
7827         echo "$as_me:7827: result: $with_links" >&5
7828 echo "${ECHO_T}$with_links" >&6
7829 fi
7830
7831 test "x$with_links" = xyes &&
7832 cat >>confdefs.h <<\EOF
7833 #define USE_LINKS 1
7834 EOF
7835
7836 test "x$with_symlinks" = xyes &&
7837 cat >>confdefs.h <<\EOF
7838 #define USE_SYMLINKS 1
7839 EOF
7840
7841 ###   use option --enable-broken-linker to force on use of broken-linker support
7842 echo "$as_me:7842: checking if you want broken-linker support code" >&5
7843 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7844
7845 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7846 if test "${enable_broken_linker+set}" = set; then
7847   enableval="$enable_broken_linker"
7848   with_broken_linker=$enableval
7849 else
7850   with_broken_linker=${BROKEN_LINKER:-no}
7851 fi;
7852 echo "$as_me:7852: result: $with_broken_linker" >&5
7853 echo "${ECHO_T}$with_broken_linker" >&6
7854
7855 BROKEN_LINKER=0
7856 if test "x$with_broken_linker" = xyes ; then
7857
7858 cat >>confdefs.h <<\EOF
7859 #define BROKEN_LINKER 1
7860 EOF
7861
7862         BROKEN_LINKER=1
7863 elif test "$DFT_LWR_MODEL" = shared ; then
7864         case $cf_cv_system_name in
7865         (cygwin*)
7866
7867 cat >>confdefs.h <<\EOF
7868 #define BROKEN_LINKER 1
7869 EOF
7870
7871                 BROKEN_LINKER=1
7872                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7873
7874 echo "${as_me:-configure}:7874: testing cygwin linker is broken anyway ..." 1>&5
7875
7876                 ;;
7877         esac
7878 fi
7879
7880 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7881 echo "$as_me:7881: checking if tputs should process BSD-style prefix padding" >&5
7882 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7883
7884 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7885 if test "${enable_bsdpad+set}" = set; then
7886   enableval="$enable_bsdpad"
7887   with_bsdpad=$enableval
7888 else
7889   with_bsdpad=no
7890 fi;
7891 echo "$as_me:7891: result: $with_bsdpad" >&5
7892 echo "${ECHO_T}$with_bsdpad" >&6
7893 test "x$with_bsdpad" = xyes &&
7894 cat >>confdefs.h <<\EOF
7895 #define BSD_TPUTS 1
7896 EOF
7897
7898 ###   use option --enable-widec to turn on use of wide-character support
7899 NCURSES_CH_T=chtype
7900 NCURSES_LIBUTF8=0
7901
7902 NEED_WCHAR_H=0
7903 NCURSES_MBSTATE_T=0
7904 NCURSES_WCHAR_T=0
7905 NCURSES_WINT_T=0
7906
7907 # Check to define _XOPEN_SOURCE "automatically"
7908 CPPFLAGS_before_XOPEN="$CPPFLAGS"
7909
7910 cf_XOPEN_SOURCE=500
7911 cf_POSIX_C_SOURCE=199506L
7912 cf_xopen_source=
7913
7914 case $host_os in
7915 (aix[4-7]*)
7916         cf_xopen_source="-D_ALL_SOURCE"
7917         ;;
7918 (cygwin|msys)
7919         cf_XOPEN_SOURCE=600
7920         ;;
7921 (darwin[0-8].*)
7922         cf_xopen_source="-D_APPLE_C_SOURCE"
7923         ;;
7924 (darwin*)
7925         cf_xopen_source="-D_DARWIN_C_SOURCE"
7926         cf_XOPEN_SOURCE=
7927         ;;
7928 (freebsd*|dragonfly*)
7929         # 5.x headers associate
7930         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7931         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7932         cf_POSIX_C_SOURCE=200112L
7933         cf_XOPEN_SOURCE=600
7934         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7935         ;;
7936 (hpux11*)
7937         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7938         ;;
7939 (hpux*)
7940         cf_xopen_source="-D_HPUX_SOURCE"
7941         ;;
7942 (irix[56].*)
7943         cf_xopen_source="-D_SGI_SOURCE"
7944         cf_XOPEN_SOURCE=
7945         ;;
7946 (linux*|gnu*|mint*|k*bsd*-gnu)
7947
7948 echo "$as_me:7948: checking if we must define _GNU_SOURCE" >&5
7949 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7950 if test "${cf_cv_gnu_source+set}" = set; then
7951   echo $ECHO_N "(cached) $ECHO_C" >&6
7952 else
7953
7954 cat >conftest.$ac_ext <<_ACEOF
7955 #line 7955 "configure"
7956 #include "confdefs.h"
7957 #include <sys/types.h>
7958 int
7959 main ()
7960 {
7961
7962 #ifndef _XOPEN_SOURCE
7963 make an error
7964 #endif
7965   ;
7966   return 0;
7967 }
7968 _ACEOF
7969 rm -f conftest.$ac_objext
7970 if { (eval echo "$as_me:7970: \"$ac_compile\"") >&5
7971   (eval $ac_compile) 2>&5
7972   ac_status=$?
7973   echo "$as_me:7973: \$? = $ac_status" >&5
7974   (exit $ac_status); } &&
7975          { ac_try='test -s conftest.$ac_objext'
7976   { (eval echo "$as_me:7976: \"$ac_try\"") >&5
7977   (eval $ac_try) 2>&5
7978   ac_status=$?
7979   echo "$as_me:7979: \$? = $ac_status" >&5
7980   (exit $ac_status); }; }; then
7981   cf_cv_gnu_source=no
7982 else
7983   echo "$as_me: failed program was:" >&5
7984 cat conftest.$ac_ext >&5
7985 cf_save="$CPPFLAGS"
7986          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7987          cat >conftest.$ac_ext <<_ACEOF
7988 #line 7988 "configure"
7989 #include "confdefs.h"
7990 #include <sys/types.h>
7991 int
7992 main ()
7993 {
7994
7995 #ifdef _XOPEN_SOURCE
7996 make an error
7997 #endif
7998   ;
7999   return 0;
8000 }
8001 _ACEOF
8002 rm -f conftest.$ac_objext
8003 if { (eval echo "$as_me:8003: \"$ac_compile\"") >&5
8004   (eval $ac_compile) 2>&5
8005   ac_status=$?
8006   echo "$as_me:8006: \$? = $ac_status" >&5
8007   (exit $ac_status); } &&
8008          { ac_try='test -s conftest.$ac_objext'
8009   { (eval echo "$as_me:8009: \"$ac_try\"") >&5
8010   (eval $ac_try) 2>&5
8011   ac_status=$?
8012   echo "$as_me:8012: \$? = $ac_status" >&5
8013   (exit $ac_status); }; }; then
8014   cf_cv_gnu_source=no
8015 else
8016   echo "$as_me: failed program was:" >&5
8017 cat conftest.$ac_ext >&5
8018 cf_cv_gnu_source=yes
8019 fi
8020 rm -f conftest.$ac_objext conftest.$ac_ext
8021         CPPFLAGS="$cf_save"
8022
8023 fi
8024 rm -f conftest.$ac_objext conftest.$ac_ext
8025
8026 fi
8027 echo "$as_me:8027: result: $cf_cv_gnu_source" >&5
8028 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8029 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8030
8031         ;;
8032 (minix*)
8033         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
8034         ;;
8035 (mirbsd*)
8036         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8037         cf_XOPEN_SOURCE=
8038
8039 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8040
8041 cf_save_CFLAGS="$CFLAGS"
8042 cf_save_CPPFLAGS="$CPPFLAGS"
8043
8044 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8045         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8046                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8047
8048 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8049         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8050                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8051
8052 echo "$as_me:8052: checking if we should define _POSIX_C_SOURCE" >&5
8053 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8054 if test "${cf_cv_posix_c_source+set}" = set; then
8055   echo $ECHO_N "(cached) $ECHO_C" >&6
8056 else
8057
8058 echo "${as_me:-configure}:8058: testing if the symbol is already defined go no further ..." 1>&5
8059
8060         cat >conftest.$ac_ext <<_ACEOF
8061 #line 8061 "configure"
8062 #include "confdefs.h"
8063 #include <sys/types.h>
8064 int
8065 main ()
8066 {
8067
8068 #ifndef _POSIX_C_SOURCE
8069 make an error
8070 #endif
8071   ;
8072   return 0;
8073 }
8074 _ACEOF
8075 rm -f conftest.$ac_objext
8076 if { (eval echo "$as_me:8076: \"$ac_compile\"") >&5
8077   (eval $ac_compile) 2>&5
8078   ac_status=$?
8079   echo "$as_me:8079: \$? = $ac_status" >&5
8080   (exit $ac_status); } &&
8081          { ac_try='test -s conftest.$ac_objext'
8082   { (eval echo "$as_me:8082: \"$ac_try\"") >&5
8083   (eval $ac_try) 2>&5
8084   ac_status=$?
8085   echo "$as_me:8085: \$? = $ac_status" >&5
8086   (exit $ac_status); }; }; then
8087   cf_cv_posix_c_source=no
8088 else
8089   echo "$as_me: failed program was:" >&5
8090 cat conftest.$ac_ext >&5
8091 cf_want_posix_source=no
8092          case .$cf_POSIX_C_SOURCE in
8093          (.[12]??*)
8094                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8095                 ;;
8096          (.2)
8097                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8098                 cf_want_posix_source=yes
8099                 ;;
8100          (.*)
8101                 cf_want_posix_source=yes
8102                 ;;
8103          esac
8104          if test "$cf_want_posix_source" = yes ; then
8105                 cat >conftest.$ac_ext <<_ACEOF
8106 #line 8106 "configure"
8107 #include "confdefs.h"
8108 #include <sys/types.h>
8109 int
8110 main ()
8111 {
8112
8113 #ifdef _POSIX_SOURCE
8114 make an error
8115 #endif
8116   ;
8117   return 0;
8118 }
8119 _ACEOF
8120 rm -f conftest.$ac_objext
8121 if { (eval echo "$as_me:8121: \"$ac_compile\"") >&5
8122   (eval $ac_compile) 2>&5
8123   ac_status=$?
8124   echo "$as_me:8124: \$? = $ac_status" >&5
8125   (exit $ac_status); } &&
8126          { ac_try='test -s conftest.$ac_objext'
8127   { (eval echo "$as_me:8127: \"$ac_try\"") >&5
8128   (eval $ac_try) 2>&5
8129   ac_status=$?
8130   echo "$as_me:8130: \$? = $ac_status" >&5
8131   (exit $ac_status); }; }; then
8132   :
8133 else
8134   echo "$as_me: failed program was:" >&5
8135 cat conftest.$ac_ext >&5
8136 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8137 fi
8138 rm -f conftest.$ac_objext conftest.$ac_ext
8139          fi
8140
8141 echo "${as_me:-configure}:8141: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8142
8143          CFLAGS="$cf_trim_CFLAGS"
8144          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8145
8146 echo "${as_me:-configure}:8146: testing if the second compile does not leave our definition intact error ..." 1>&5
8147
8148          cat >conftest.$ac_ext <<_ACEOF
8149 #line 8149 "configure"
8150 #include "confdefs.h"
8151 #include <sys/types.h>
8152 int
8153 main ()
8154 {
8155
8156 #ifndef _POSIX_C_SOURCE
8157 make an error
8158 #endif
8159   ;
8160   return 0;
8161 }
8162 _ACEOF
8163 rm -f conftest.$ac_objext
8164 if { (eval echo "$as_me:8164: \"$ac_compile\"") >&5
8165   (eval $ac_compile) 2>&5
8166   ac_status=$?
8167   echo "$as_me:8167: \$? = $ac_status" >&5
8168   (exit $ac_status); } &&
8169          { ac_try='test -s conftest.$ac_objext'
8170   { (eval echo "$as_me:8170: \"$ac_try\"") >&5
8171   (eval $ac_try) 2>&5
8172   ac_status=$?
8173   echo "$as_me:8173: \$? = $ac_status" >&5
8174   (exit $ac_status); }; }; then
8175   :
8176 else
8177   echo "$as_me: failed program was:" >&5
8178 cat conftest.$ac_ext >&5
8179 cf_cv_posix_c_source=no
8180 fi
8181 rm -f conftest.$ac_objext conftest.$ac_ext
8182          CFLAGS="$cf_save_CFLAGS"
8183          CPPFLAGS="$cf_save_CPPFLAGS"
8184
8185 fi
8186 rm -f conftest.$ac_objext conftest.$ac_ext
8187
8188 fi
8189 echo "$as_me:8189: result: $cf_cv_posix_c_source" >&5
8190 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8191
8192 if test "$cf_cv_posix_c_source" != no ; then
8193         CFLAGS="$cf_trim_CFLAGS"
8194         CPPFLAGS="$cf_trim_CPPFLAGS"
8195
8196 cf_fix_cppflags=no
8197 cf_new_cflags=
8198 cf_new_cppflags=
8199 cf_new_extra_cppflags=
8200
8201 for cf_add_cflags in $cf_cv_posix_c_source
8202 do
8203 case $cf_fix_cppflags in
8204 (no)
8205         case $cf_add_cflags in
8206         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8207                 case $cf_add_cflags in
8208                 (-D*)
8209                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8210
8211                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8212                                 && test -z "${cf_tst_cflags}" \
8213                                 && cf_fix_cppflags=yes
8214
8215                         if test $cf_fix_cppflags = yes ; then
8216                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8217                                 continue
8218                         elif test "${cf_tst_cflags}" = "\"'" ; then
8219                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8220                                 continue
8221                         fi
8222                         ;;
8223                 esac
8224                 case "$CPPFLAGS" in
8225                 (*$cf_add_cflags)
8226                         ;;
8227                 (*)
8228                         case $cf_add_cflags in
8229                         (-D*)
8230                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8231
8232 CPPFLAGS=`echo "$CPPFLAGS" | \
8233         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8234                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8235
8236                                 ;;
8237                         esac
8238                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8239                         ;;
8240                 esac
8241                 ;;
8242         (*)
8243                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8244                 ;;
8245         esac
8246         ;;
8247 (yes)
8248         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8249
8250         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8251
8252         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8253                 && test -z "${cf_tst_cflags}" \
8254                 && cf_fix_cppflags=no
8255         ;;
8256 esac
8257 done
8258
8259 if test -n "$cf_new_cflags" ; then
8260
8261         CFLAGS="$CFLAGS $cf_new_cflags"
8262 fi
8263
8264 if test -n "$cf_new_cppflags" ; then
8265
8266         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8267 fi
8268
8269 if test -n "$cf_new_extra_cppflags" ; then
8270
8271         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8272 fi
8273
8274 fi
8275
8276         ;;
8277 (netbsd*)
8278         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8279         ;;
8280 (openbsd[4-9]*)
8281         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8282         cf_xopen_source="-D_BSD_SOURCE"
8283         cf_XOPEN_SOURCE=600
8284         ;;
8285 (openbsd*)
8286         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8287         ;;
8288 (os2*)
8289         cf_XOPEN_SOURCE=
8290         ;;
8291 (osf[45]*)
8292         cf_xopen_source="-D_OSF_SOURCE"
8293         ;;
8294 (nto-qnx*)
8295         cf_xopen_source="-D_QNX_SOURCE"
8296         ;;
8297 (sco*)
8298         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8299         ;;
8300 (solaris2.*)
8301         cf_xopen_source="-D__EXTENSIONS__"
8302         cf_cv_xopen_source=broken
8303         ;;
8304 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8305         cf_XOPEN_SOURCE=
8306         cf_POSIX_C_SOURCE=
8307         ;;
8308 (*)
8309
8310 echo "$as_me:8310: checking if we should define _XOPEN_SOURCE" >&5
8311 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8312 if test "${cf_cv_xopen_source+set}" = set; then
8313   echo $ECHO_N "(cached) $ECHO_C" >&6
8314 else
8315
8316         cat >conftest.$ac_ext <<_ACEOF
8317 #line 8317 "configure"
8318 #include "confdefs.h"
8319
8320 #include <stdlib.h>
8321 #include <string.h>
8322 #include <sys/types.h>
8323
8324 int
8325 main ()
8326 {
8327
8328 #ifndef _XOPEN_SOURCE
8329 make an error
8330 #endif
8331   ;
8332   return 0;
8333 }
8334 _ACEOF
8335 rm -f conftest.$ac_objext
8336 if { (eval echo "$as_me:8336: \"$ac_compile\"") >&5
8337   (eval $ac_compile) 2>&5
8338   ac_status=$?
8339   echo "$as_me:8339: \$? = $ac_status" >&5
8340   (exit $ac_status); } &&
8341          { ac_try='test -s conftest.$ac_objext'
8342   { (eval echo "$as_me:8342: \"$ac_try\"") >&5
8343   (eval $ac_try) 2>&5
8344   ac_status=$?
8345   echo "$as_me:8345: \$? = $ac_status" >&5
8346   (exit $ac_status); }; }; then
8347   cf_cv_xopen_source=no
8348 else
8349   echo "$as_me: failed program was:" >&5
8350 cat conftest.$ac_ext >&5
8351 cf_save="$CPPFLAGS"
8352          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8353          cat >conftest.$ac_ext <<_ACEOF
8354 #line 8354 "configure"
8355 #include "confdefs.h"
8356
8357 #include <stdlib.h>
8358 #include <string.h>
8359 #include <sys/types.h>
8360
8361 int
8362 main ()
8363 {
8364
8365 #ifdef _XOPEN_SOURCE
8366 make an error
8367 #endif
8368   ;
8369   return 0;
8370 }
8371 _ACEOF
8372 rm -f conftest.$ac_objext
8373 if { (eval echo "$as_me:8373: \"$ac_compile\"") >&5
8374   (eval $ac_compile) 2>&5
8375   ac_status=$?
8376   echo "$as_me:8376: \$? = $ac_status" >&5
8377   (exit $ac_status); } &&
8378          { ac_try='test -s conftest.$ac_objext'
8379   { (eval echo "$as_me:8379: \"$ac_try\"") >&5
8380   (eval $ac_try) 2>&5
8381   ac_status=$?
8382   echo "$as_me:8382: \$? = $ac_status" >&5
8383   (exit $ac_status); }; }; then
8384   cf_cv_xopen_source=no
8385 else
8386   echo "$as_me: failed program was:" >&5
8387 cat conftest.$ac_ext >&5
8388 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8389 fi
8390 rm -f conftest.$ac_objext conftest.$ac_ext
8391         CPPFLAGS="$cf_save"
8392
8393 fi
8394 rm -f conftest.$ac_objext conftest.$ac_ext
8395
8396 fi
8397 echo "$as_me:8397: result: $cf_cv_xopen_source" >&5
8398 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8399
8400 if test "$cf_cv_xopen_source" != no ; then
8401
8402 CFLAGS=`echo "$CFLAGS" | \
8403         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8404                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8405
8406 CPPFLAGS=`echo "$CPPFLAGS" | \
8407         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8408                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8409
8410         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8411
8412 cf_fix_cppflags=no
8413 cf_new_cflags=
8414 cf_new_cppflags=
8415 cf_new_extra_cppflags=
8416
8417 for cf_add_cflags in $cf_temp_xopen_source
8418 do
8419 case $cf_fix_cppflags in
8420 (no)
8421         case $cf_add_cflags in
8422         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8423                 case $cf_add_cflags in
8424                 (-D*)
8425                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8426
8427                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8428                                 && test -z "${cf_tst_cflags}" \
8429                                 && cf_fix_cppflags=yes
8430
8431                         if test $cf_fix_cppflags = yes ; then
8432                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8433                                 continue
8434                         elif test "${cf_tst_cflags}" = "\"'" ; then
8435                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8436                                 continue
8437                         fi
8438                         ;;
8439                 esac
8440                 case "$CPPFLAGS" in
8441                 (*$cf_add_cflags)
8442                         ;;
8443                 (*)
8444                         case $cf_add_cflags in
8445                         (-D*)
8446                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8447
8448 CPPFLAGS=`echo "$CPPFLAGS" | \
8449         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8450                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8451
8452                                 ;;
8453                         esac
8454                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8455                         ;;
8456                 esac
8457                 ;;
8458         (*)
8459                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8460                 ;;
8461         esac
8462         ;;
8463 (yes)
8464         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8465
8466         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8467
8468         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8469                 && test -z "${cf_tst_cflags}" \
8470                 && cf_fix_cppflags=no
8471         ;;
8472 esac
8473 done
8474
8475 if test -n "$cf_new_cflags" ; then
8476
8477         CFLAGS="$CFLAGS $cf_new_cflags"
8478 fi
8479
8480 if test -n "$cf_new_cppflags" ; then
8481
8482         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8483 fi
8484
8485 if test -n "$cf_new_extra_cppflags" ; then
8486
8487         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8488 fi
8489
8490 fi
8491
8492 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8493
8494 cf_save_CFLAGS="$CFLAGS"
8495 cf_save_CPPFLAGS="$CPPFLAGS"
8496
8497 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8498         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8499                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8500
8501 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8502         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8503                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8504
8505 echo "$as_me:8505: checking if we should define _POSIX_C_SOURCE" >&5
8506 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8507 if test "${cf_cv_posix_c_source+set}" = set; then
8508   echo $ECHO_N "(cached) $ECHO_C" >&6
8509 else
8510
8511 echo "${as_me:-configure}:8511: testing if the symbol is already defined go no further ..." 1>&5
8512
8513         cat >conftest.$ac_ext <<_ACEOF
8514 #line 8514 "configure"
8515 #include "confdefs.h"
8516 #include <sys/types.h>
8517 int
8518 main ()
8519 {
8520
8521 #ifndef _POSIX_C_SOURCE
8522 make an error
8523 #endif
8524   ;
8525   return 0;
8526 }
8527 _ACEOF
8528 rm -f conftest.$ac_objext
8529 if { (eval echo "$as_me:8529: \"$ac_compile\"") >&5
8530   (eval $ac_compile) 2>&5
8531   ac_status=$?
8532   echo "$as_me:8532: \$? = $ac_status" >&5
8533   (exit $ac_status); } &&
8534          { ac_try='test -s conftest.$ac_objext'
8535   { (eval echo "$as_me:8535: \"$ac_try\"") >&5
8536   (eval $ac_try) 2>&5
8537   ac_status=$?
8538   echo "$as_me:8538: \$? = $ac_status" >&5
8539   (exit $ac_status); }; }; then
8540   cf_cv_posix_c_source=no
8541 else
8542   echo "$as_me: failed program was:" >&5
8543 cat conftest.$ac_ext >&5
8544 cf_want_posix_source=no
8545          case .$cf_POSIX_C_SOURCE in
8546          (.[12]??*)
8547                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8548                 ;;
8549          (.2)
8550                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8551                 cf_want_posix_source=yes
8552                 ;;
8553          (.*)
8554                 cf_want_posix_source=yes
8555                 ;;
8556          esac
8557          if test "$cf_want_posix_source" = yes ; then
8558                 cat >conftest.$ac_ext <<_ACEOF
8559 #line 8559 "configure"
8560 #include "confdefs.h"
8561 #include <sys/types.h>
8562 int
8563 main ()
8564 {
8565
8566 #ifdef _POSIX_SOURCE
8567 make an error
8568 #endif
8569   ;
8570   return 0;
8571 }
8572 _ACEOF
8573 rm -f conftest.$ac_objext
8574 if { (eval echo "$as_me:8574: \"$ac_compile\"") >&5
8575   (eval $ac_compile) 2>&5
8576   ac_status=$?
8577   echo "$as_me:8577: \$? = $ac_status" >&5
8578   (exit $ac_status); } &&
8579          { ac_try='test -s conftest.$ac_objext'
8580   { (eval echo "$as_me:8580: \"$ac_try\"") >&5
8581   (eval $ac_try) 2>&5
8582   ac_status=$?
8583   echo "$as_me:8583: \$? = $ac_status" >&5
8584   (exit $ac_status); }; }; then
8585   :
8586 else
8587   echo "$as_me: failed program was:" >&5
8588 cat conftest.$ac_ext >&5
8589 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8590 fi
8591 rm -f conftest.$ac_objext conftest.$ac_ext
8592          fi
8593
8594 echo "${as_me:-configure}:8594: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8595
8596          CFLAGS="$cf_trim_CFLAGS"
8597          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8598
8599 echo "${as_me:-configure}:8599: testing if the second compile does not leave our definition intact error ..." 1>&5
8600
8601          cat >conftest.$ac_ext <<_ACEOF
8602 #line 8602 "configure"
8603 #include "confdefs.h"
8604 #include <sys/types.h>
8605 int
8606 main ()
8607 {
8608
8609 #ifndef _POSIX_C_SOURCE
8610 make an error
8611 #endif
8612   ;
8613   return 0;
8614 }
8615 _ACEOF
8616 rm -f conftest.$ac_objext
8617 if { (eval echo "$as_me:8617: \"$ac_compile\"") >&5
8618   (eval $ac_compile) 2>&5
8619   ac_status=$?
8620   echo "$as_me:8620: \$? = $ac_status" >&5
8621   (exit $ac_status); } &&
8622          { ac_try='test -s conftest.$ac_objext'
8623   { (eval echo "$as_me:8623: \"$ac_try\"") >&5
8624   (eval $ac_try) 2>&5
8625   ac_status=$?
8626   echo "$as_me:8626: \$? = $ac_status" >&5
8627   (exit $ac_status); }; }; then
8628   :
8629 else
8630   echo "$as_me: failed program was:" >&5
8631 cat conftest.$ac_ext >&5
8632 cf_cv_posix_c_source=no
8633 fi
8634 rm -f conftest.$ac_objext conftest.$ac_ext
8635          CFLAGS="$cf_save_CFLAGS"
8636          CPPFLAGS="$cf_save_CPPFLAGS"
8637
8638 fi
8639 rm -f conftest.$ac_objext conftest.$ac_ext
8640
8641 fi
8642 echo "$as_me:8642: result: $cf_cv_posix_c_source" >&5
8643 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8644
8645 if test "$cf_cv_posix_c_source" != no ; then
8646         CFLAGS="$cf_trim_CFLAGS"
8647         CPPFLAGS="$cf_trim_CPPFLAGS"
8648
8649 cf_fix_cppflags=no
8650 cf_new_cflags=
8651 cf_new_cppflags=
8652 cf_new_extra_cppflags=
8653
8654 for cf_add_cflags in $cf_cv_posix_c_source
8655 do
8656 case $cf_fix_cppflags in
8657 (no)
8658         case $cf_add_cflags in
8659         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8660                 case $cf_add_cflags in
8661                 (-D*)
8662                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8663
8664                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8665                                 && test -z "${cf_tst_cflags}" \
8666                                 && cf_fix_cppflags=yes
8667
8668                         if test $cf_fix_cppflags = yes ; then
8669                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8670                                 continue
8671                         elif test "${cf_tst_cflags}" = "\"'" ; then
8672                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8673                                 continue
8674                         fi
8675                         ;;
8676                 esac
8677                 case "$CPPFLAGS" in
8678                 (*$cf_add_cflags)
8679                         ;;
8680                 (*)
8681                         case $cf_add_cflags in
8682                         (-D*)
8683                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8684
8685 CPPFLAGS=`echo "$CPPFLAGS" | \
8686         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8687                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8688
8689                                 ;;
8690                         esac
8691                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8692                         ;;
8693                 esac
8694                 ;;
8695         (*)
8696                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8697                 ;;
8698         esac
8699         ;;
8700 (yes)
8701         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8702
8703         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8704
8705         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8706                 && test -z "${cf_tst_cflags}" \
8707                 && cf_fix_cppflags=no
8708         ;;
8709 esac
8710 done
8711
8712 if test -n "$cf_new_cflags" ; then
8713
8714         CFLAGS="$CFLAGS $cf_new_cflags"
8715 fi
8716
8717 if test -n "$cf_new_cppflags" ; then
8718
8719         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8720 fi
8721
8722 if test -n "$cf_new_extra_cppflags" ; then
8723
8724         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8725 fi
8726
8727 fi
8728
8729         ;;
8730 esac
8731
8732 if test -n "$cf_xopen_source" ; then
8733
8734 cf_fix_cppflags=no
8735 cf_new_cflags=
8736 cf_new_cppflags=
8737 cf_new_extra_cppflags=
8738
8739 for cf_add_cflags in $cf_xopen_source
8740 do
8741 case $cf_fix_cppflags in
8742 (no)
8743         case $cf_add_cflags in
8744         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8745                 case $cf_add_cflags in
8746                 (-D*)
8747                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8748
8749                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8750                                 && test -z "${cf_tst_cflags}" \
8751                                 && cf_fix_cppflags=yes
8752
8753                         if test $cf_fix_cppflags = yes ; then
8754                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8755                                 continue
8756                         elif test "${cf_tst_cflags}" = "\"'" ; then
8757                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8758                                 continue
8759                         fi
8760                         ;;
8761                 esac
8762                 case "$CPPFLAGS" in
8763                 (*$cf_add_cflags)
8764                         ;;
8765                 (*)
8766                         case $cf_add_cflags in
8767                         (-D*)
8768                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8769
8770 CPPFLAGS=`echo "$CPPFLAGS" | \
8771         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8772                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8773
8774                                 ;;
8775                         esac
8776                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8777                         ;;
8778                 esac
8779                 ;;
8780         (*)
8781                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8782                 ;;
8783         esac
8784         ;;
8785 (yes)
8786         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8787
8788         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8789
8790         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8791                 && test -z "${cf_tst_cflags}" \
8792                 && cf_fix_cppflags=no
8793         ;;
8794 esac
8795 done
8796
8797 if test -n "$cf_new_cflags" ; then
8798         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8799
8800 echo "${as_me:-configure}:8800: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8801
8802         CFLAGS="$CFLAGS $cf_new_cflags"
8803 fi
8804
8805 if test -n "$cf_new_cppflags" ; then
8806         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8807
8808 echo "${as_me:-configure}:8808: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8809
8810         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8811 fi
8812
8813 if test -n "$cf_new_extra_cppflags" ; then
8814         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8815
8816 echo "${as_me:-configure}:8816: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8817
8818         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8819 fi
8820
8821 fi
8822
8823 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8824         echo "$as_me:8824: checking if _XOPEN_SOURCE really is set" >&5
8825 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8826         cat >conftest.$ac_ext <<_ACEOF
8827 #line 8827 "configure"
8828 #include "confdefs.h"
8829 #include <stdlib.h>
8830 int
8831 main ()
8832 {
8833
8834 #ifndef _XOPEN_SOURCE
8835 make an error
8836 #endif
8837   ;
8838   return 0;
8839 }
8840 _ACEOF
8841 rm -f conftest.$ac_objext
8842 if { (eval echo "$as_me:8842: \"$ac_compile\"") >&5
8843   (eval $ac_compile) 2>&5
8844   ac_status=$?
8845   echo "$as_me:8845: \$? = $ac_status" >&5
8846   (exit $ac_status); } &&
8847          { ac_try='test -s conftest.$ac_objext'
8848   { (eval echo "$as_me:8848: \"$ac_try\"") >&5
8849   (eval $ac_try) 2>&5
8850   ac_status=$?
8851   echo "$as_me:8851: \$? = $ac_status" >&5
8852   (exit $ac_status); }; }; then
8853   cf_XOPEN_SOURCE_set=yes
8854 else
8855   echo "$as_me: failed program was:" >&5
8856 cat conftest.$ac_ext >&5
8857 cf_XOPEN_SOURCE_set=no
8858 fi
8859 rm -f conftest.$ac_objext conftest.$ac_ext
8860         echo "$as_me:8860: result: $cf_XOPEN_SOURCE_set" >&5
8861 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8862         if test $cf_XOPEN_SOURCE_set = yes
8863         then
8864                 cat >conftest.$ac_ext <<_ACEOF
8865 #line 8865 "configure"
8866 #include "confdefs.h"
8867 #include <stdlib.h>
8868 int
8869 main ()
8870 {
8871
8872 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8873 make an error
8874 #endif
8875   ;
8876   return 0;
8877 }
8878 _ACEOF
8879 rm -f conftest.$ac_objext
8880 if { (eval echo "$as_me:8880: \"$ac_compile\"") >&5
8881   (eval $ac_compile) 2>&5
8882   ac_status=$?
8883   echo "$as_me:8883: \$? = $ac_status" >&5
8884   (exit $ac_status); } &&
8885          { ac_try='test -s conftest.$ac_objext'
8886   { (eval echo "$as_me:8886: \"$ac_try\"") >&5
8887   (eval $ac_try) 2>&5
8888   ac_status=$?
8889   echo "$as_me:8889: \$? = $ac_status" >&5
8890   (exit $ac_status); }; }; then
8891   cf_XOPEN_SOURCE_set_ok=yes
8892 else
8893   echo "$as_me: failed program was:" >&5
8894 cat conftest.$ac_ext >&5
8895 cf_XOPEN_SOURCE_set_ok=no
8896 fi
8897 rm -f conftest.$ac_objext conftest.$ac_ext
8898                 if test $cf_XOPEN_SOURCE_set_ok = no
8899                 then
8900                         { echo "$as_me:8900: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8901 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8902                 fi
8903         else
8904
8905 echo "$as_me:8905: checking if we should define _XOPEN_SOURCE" >&5
8906 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8907 if test "${cf_cv_xopen_source+set}" = set; then
8908   echo $ECHO_N "(cached) $ECHO_C" >&6
8909 else
8910
8911         cat >conftest.$ac_ext <<_ACEOF
8912 #line 8912 "configure"
8913 #include "confdefs.h"
8914
8915 #include <stdlib.h>
8916 #include <string.h>
8917 #include <sys/types.h>
8918
8919 int
8920 main ()
8921 {
8922
8923 #ifndef _XOPEN_SOURCE
8924 make an error
8925 #endif
8926   ;
8927   return 0;
8928 }
8929 _ACEOF
8930 rm -f conftest.$ac_objext
8931 if { (eval echo "$as_me:8931: \"$ac_compile\"") >&5
8932   (eval $ac_compile) 2>&5
8933   ac_status=$?
8934   echo "$as_me:8934: \$? = $ac_status" >&5
8935   (exit $ac_status); } &&
8936          { ac_try='test -s conftest.$ac_objext'
8937   { (eval echo "$as_me:8937: \"$ac_try\"") >&5
8938   (eval $ac_try) 2>&5
8939   ac_status=$?
8940   echo "$as_me:8940: \$? = $ac_status" >&5
8941   (exit $ac_status); }; }; then
8942   cf_cv_xopen_source=no
8943 else
8944   echo "$as_me: failed program was:" >&5
8945 cat conftest.$ac_ext >&5
8946 cf_save="$CPPFLAGS"
8947          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8948          cat >conftest.$ac_ext <<_ACEOF
8949 #line 8949 "configure"
8950 #include "confdefs.h"
8951
8952 #include <stdlib.h>
8953 #include <string.h>
8954 #include <sys/types.h>
8955
8956 int
8957 main ()
8958 {
8959
8960 #ifdef _XOPEN_SOURCE
8961 make an error
8962 #endif
8963   ;
8964   return 0;
8965 }
8966 _ACEOF
8967 rm -f conftest.$ac_objext
8968 if { (eval echo "$as_me:8968: \"$ac_compile\"") >&5
8969   (eval $ac_compile) 2>&5
8970   ac_status=$?
8971   echo "$as_me:8971: \$? = $ac_status" >&5
8972   (exit $ac_status); } &&
8973          { ac_try='test -s conftest.$ac_objext'
8974   { (eval echo "$as_me:8974: \"$ac_try\"") >&5
8975   (eval $ac_try) 2>&5
8976   ac_status=$?
8977   echo "$as_me:8977: \$? = $ac_status" >&5
8978   (exit $ac_status); }; }; then
8979   cf_cv_xopen_source=no
8980 else
8981   echo "$as_me: failed program was:" >&5
8982 cat conftest.$ac_ext >&5
8983 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8984 fi
8985 rm -f conftest.$ac_objext conftest.$ac_ext
8986         CPPFLAGS="$cf_save"
8987
8988 fi
8989 rm -f conftest.$ac_objext conftest.$ac_ext
8990
8991 fi
8992 echo "$as_me:8992: result: $cf_cv_xopen_source" >&5
8993 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8994
8995 if test "$cf_cv_xopen_source" != no ; then
8996
8997 CFLAGS=`echo "$CFLAGS" | \
8998         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8999                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9000
9001 CPPFLAGS=`echo "$CPPFLAGS" | \
9002         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9003                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9004
9005         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9006
9007 cf_fix_cppflags=no
9008 cf_new_cflags=
9009 cf_new_cppflags=
9010 cf_new_extra_cppflags=
9011
9012 for cf_add_cflags in $cf_temp_xopen_source
9013 do
9014 case $cf_fix_cppflags in
9015 (no)
9016         case $cf_add_cflags in
9017         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9018                 case $cf_add_cflags in
9019                 (-D*)
9020                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9021
9022                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9023                                 && test -z "${cf_tst_cflags}" \
9024                                 && cf_fix_cppflags=yes
9025
9026                         if test $cf_fix_cppflags = yes ; then
9027                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9028                                 continue
9029                         elif test "${cf_tst_cflags}" = "\"'" ; then
9030                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9031                                 continue
9032                         fi
9033                         ;;
9034                 esac
9035                 case "$CPPFLAGS" in
9036                 (*$cf_add_cflags)
9037                         ;;
9038                 (*)
9039                         case $cf_add_cflags in
9040                         (-D*)
9041                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9042
9043 CPPFLAGS=`echo "$CPPFLAGS" | \
9044         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9045                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9046
9047                                 ;;
9048                         esac
9049                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9050                         ;;
9051                 esac
9052                 ;;
9053         (*)
9054                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9055                 ;;
9056         esac
9057         ;;
9058 (yes)
9059         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9060
9061         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9062
9063         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9064                 && test -z "${cf_tst_cflags}" \
9065                 && cf_fix_cppflags=no
9066         ;;
9067 esac
9068 done
9069
9070 if test -n "$cf_new_cflags" ; then
9071
9072         CFLAGS="$CFLAGS $cf_new_cflags"
9073 fi
9074
9075 if test -n "$cf_new_cppflags" ; then
9076
9077         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9078 fi
9079
9080 if test -n "$cf_new_extra_cppflags" ; then
9081
9082         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9083 fi
9084
9085 fi
9086
9087         fi
9088 fi
9089
9090 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9091
9092 # Work around breakage on OS X
9093
9094 echo "$as_me:9094: checking if SIGWINCH is defined" >&5
9095 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9096 if test "${cf_cv_define_sigwinch+set}" = set; then
9097   echo $ECHO_N "(cached) $ECHO_C" >&6
9098 else
9099
9100         cat >conftest.$ac_ext <<_ACEOF
9101 #line 9101 "configure"
9102 #include "confdefs.h"
9103
9104 #include <sys/types.h>
9105 #include <sys/signal.h>
9106
9107 int
9108 main ()
9109 {
9110 int x = SIGWINCH
9111   ;
9112   return 0;
9113 }
9114 _ACEOF
9115 rm -f conftest.$ac_objext
9116 if { (eval echo "$as_me:9116: \"$ac_compile\"") >&5
9117   (eval $ac_compile) 2>&5
9118   ac_status=$?
9119   echo "$as_me:9119: \$? = $ac_status" >&5
9120   (exit $ac_status); } &&
9121          { ac_try='test -s conftest.$ac_objext'
9122   { (eval echo "$as_me:9122: \"$ac_try\"") >&5
9123   (eval $ac_try) 2>&5
9124   ac_status=$?
9125   echo "$as_me:9125: \$? = $ac_status" >&5
9126   (exit $ac_status); }; }; then
9127   cf_cv_define_sigwinch=yes
9128 else
9129   echo "$as_me: failed program was:" >&5
9130 cat conftest.$ac_ext >&5
9131 cat >conftest.$ac_ext <<_ACEOF
9132 #line 9132 "configure"
9133 #include "confdefs.h"
9134
9135 #undef _XOPEN_SOURCE
9136 #undef _POSIX_SOURCE
9137 #undef _POSIX_C_SOURCE
9138 #include <sys/types.h>
9139 #include <sys/signal.h>
9140
9141 int
9142 main ()
9143 {
9144 int x = SIGWINCH
9145   ;
9146   return 0;
9147 }
9148 _ACEOF
9149 rm -f conftest.$ac_objext
9150 if { (eval echo "$as_me:9150: \"$ac_compile\"") >&5
9151   (eval $ac_compile) 2>&5
9152   ac_status=$?
9153   echo "$as_me:9153: \$? = $ac_status" >&5
9154   (exit $ac_status); } &&
9155          { ac_try='test -s conftest.$ac_objext'
9156   { (eval echo "$as_me:9156: \"$ac_try\"") >&5
9157   (eval $ac_try) 2>&5
9158   ac_status=$?
9159   echo "$as_me:9159: \$? = $ac_status" >&5
9160   (exit $ac_status); }; }; then
9161   cf_cv_define_sigwinch=maybe
9162 else
9163   echo "$as_me: failed program was:" >&5
9164 cat conftest.$ac_ext >&5
9165 cf_cv_define_sigwinch=no
9166 fi
9167 rm -f conftest.$ac_objext conftest.$ac_ext
9168
9169 fi
9170 rm -f conftest.$ac_objext conftest.$ac_ext
9171
9172 fi
9173 echo "$as_me:9173: result: $cf_cv_define_sigwinch" >&5
9174 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9175
9176 if test "$cf_cv_define_sigwinch" = maybe ; then
9177 echo "$as_me:9177: checking for actual SIGWINCH definition" >&5
9178 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9179 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9180   echo $ECHO_N "(cached) $ECHO_C" >&6
9181 else
9182
9183 cf_cv_fixup_sigwinch=unknown
9184 cf_sigwinch=32
9185 while test $cf_sigwinch != 1
9186 do
9187         cat >conftest.$ac_ext <<_ACEOF
9188 #line 9188 "configure"
9189 #include "confdefs.h"
9190
9191 #undef _XOPEN_SOURCE
9192 #undef _POSIX_SOURCE
9193 #undef _POSIX_C_SOURCE
9194 #include <sys/types.h>
9195 #include <sys/signal.h>
9196
9197 int
9198 main ()
9199 {
9200
9201 #if SIGWINCH != $cf_sigwinch
9202 make an error
9203 #endif
9204 int x = SIGWINCH
9205   ;
9206   return 0;
9207 }
9208 _ACEOF
9209 rm -f conftest.$ac_objext
9210 if { (eval echo "$as_me:9210: \"$ac_compile\"") >&5
9211   (eval $ac_compile) 2>&5
9212   ac_status=$?
9213   echo "$as_me:9213: \$? = $ac_status" >&5
9214   (exit $ac_status); } &&
9215          { ac_try='test -s conftest.$ac_objext'
9216   { (eval echo "$as_me:9216: \"$ac_try\"") >&5
9217   (eval $ac_try) 2>&5
9218   ac_status=$?
9219   echo "$as_me:9219: \$? = $ac_status" >&5
9220   (exit $ac_status); }; }; then
9221   cf_cv_fixup_sigwinch=$cf_sigwinch
9222          break
9223 else
9224   echo "$as_me: failed program was:" >&5
9225 cat conftest.$ac_ext >&5
9226 fi
9227 rm -f conftest.$ac_objext conftest.$ac_ext
9228
9229 cf_sigwinch=`expr $cf_sigwinch - 1`
9230 done
9231
9232 fi
9233 echo "$as_me:9233: result: $cf_cv_fixup_sigwinch" >&5
9234 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9235
9236         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9237                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9238         fi
9239 fi
9240
9241 # Checks for CODESET support.
9242
9243 echo "$as_me:9243: checking for nl_langinfo and CODESET" >&5
9244 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9245 if test "${am_cv_langinfo_codeset+set}" = set; then
9246   echo $ECHO_N "(cached) $ECHO_C" >&6
9247 else
9248   cat >conftest.$ac_ext <<_ACEOF
9249 #line 9249 "configure"
9250 #include "confdefs.h"
9251 #include <langinfo.h>
9252 int
9253 main ()
9254 {
9255 char* cs = nl_langinfo(CODESET);
9256   ;
9257   return 0;
9258 }
9259 _ACEOF
9260 rm -f conftest.$ac_objext conftest$ac_exeext
9261 if { (eval echo "$as_me:9261: \"$ac_link\"") >&5
9262   (eval $ac_link) 2>&5
9263   ac_status=$?
9264   echo "$as_me:9264: \$? = $ac_status" >&5
9265   (exit $ac_status); } &&
9266          { ac_try='test -s conftest$ac_exeext'
9267   { (eval echo "$as_me:9267: \"$ac_try\"") >&5
9268   (eval $ac_try) 2>&5
9269   ac_status=$?
9270   echo "$as_me:9270: \$? = $ac_status" >&5
9271   (exit $ac_status); }; }; then
9272   am_cv_langinfo_codeset=yes
9273 else
9274   echo "$as_me: failed program was:" >&5
9275 cat conftest.$ac_ext >&5
9276 am_cv_langinfo_codeset=no
9277 fi
9278 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9279
9280 fi
9281 echo "$as_me:9281: result: $am_cv_langinfo_codeset" >&5
9282 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9283         if test $am_cv_langinfo_codeset = yes; then
9284
9285 cat >>confdefs.h <<\EOF
9286 #define HAVE_LANGINFO_CODESET 1
9287 EOF
9288
9289         fi
9290
9291 # use these variables to work around a defect in gcc's fixincludes.
9292 NCURSES_OK_WCHAR_T=
9293 NCURSES_OK_WINT_T=
9294
9295 echo "$as_me:9295: checking if you want wide-character code" >&5
9296 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9297
9298 # Check whether --enable-widec or --disable-widec was given.
9299 if test "${enable_widec+set}" = set; then
9300   enableval="$enable_widec"
9301   with_widec=$enableval
9302 else
9303   with_widec=no
9304 fi;
9305 echo "$as_me:9305: result: $with_widec" >&5
9306 echo "${ECHO_T}$with_widec" >&6
9307
9308 NCURSES_WCWIDTH_GRAPHICS=1
9309
9310 if test "x$with_widec" = xyes ; then
9311         if test "x$disable_lib_suffixes" = xno ; then
9312                 LIB_SUFFIX="w${LIB_SUFFIX}"
9313         fi
9314
9315 cat >>confdefs.h <<\EOF
9316 #define USE_WIDEC_SUPPORT 1
9317 EOF
9318
9319 cat >>confdefs.h <<\EOF
9320 #define NCURSES_WIDECHAR 1
9321 EOF
9322
9323 echo "$as_me:9323: checking if wchar.h can be used as is" >&5
9324 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9325 if test "${cf_cv_wchar_h_okay+set}" = set; then
9326   echo $ECHO_N "(cached) $ECHO_C" >&6
9327 else
9328
9329 cat >conftest.$ac_ext <<_ACEOF
9330 #line 9330 "configure"
9331 #include "confdefs.h"
9332
9333 #include <stdlib.h>
9334 #include <wchar.h>
9335
9336 int
9337 main ()
9338 {
9339
9340         wint_t foo = 0;
9341         int bar = iswpunct(foo)
9342   ;
9343   return 0;
9344 }
9345 _ACEOF
9346 rm -f conftest.$ac_objext
9347 if { (eval echo "$as_me:9347: \"$ac_compile\"") >&5
9348   (eval $ac_compile) 2>&5
9349   ac_status=$?
9350   echo "$as_me:9350: \$? = $ac_status" >&5
9351   (exit $ac_status); } &&
9352          { ac_try='test -s conftest.$ac_objext'
9353   { (eval echo "$as_me:9353: \"$ac_try\"") >&5
9354   (eval $ac_try) 2>&5
9355   ac_status=$?
9356   echo "$as_me:9356: \$? = $ac_status" >&5
9357   (exit $ac_status); }; }; then
9358   cf_cv_wchar_h_okay=yes
9359 else
9360   echo "$as_me: failed program was:" >&5
9361 cat conftest.$ac_ext >&5
9362 cf_cv_wchar_h_okay=no
9363 fi
9364 rm -f conftest.$ac_objext conftest.$ac_ext
9365 fi
9366 echo "$as_me:9366: result: $cf_cv_wchar_h_okay" >&5
9367 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9368
9369 if test $cf_cv_wchar_h_okay = no
9370 then
9371
9372 echo "$as_me:9372: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9373 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9374 cat >conftest.$ac_ext <<_ACEOF
9375 #line 9375 "configure"
9376 #include "confdefs.h"
9377 #include <sys/types.h>
9378
9379 int
9380 main ()
9381 {
9382
9383 #ifndef _XOPEN_SOURCE_EXTENDED
9384 make an error
9385 #endif
9386   ;
9387   return 0;
9388 }
9389 _ACEOF
9390 rm -f conftest.$ac_objext
9391 if { (eval echo "$as_me:9391: \"$ac_compile\"") >&5
9392   (eval $ac_compile) 2>&5
9393   ac_status=$?
9394   echo "$as_me:9394: \$? = $ac_status" >&5
9395   (exit $ac_status); } &&
9396          { ac_try='test -s conftest.$ac_objext'
9397   { (eval echo "$as_me:9397: \"$ac_try\"") >&5
9398   (eval $ac_try) 2>&5
9399   ac_status=$?
9400   echo "$as_me:9400: \$? = $ac_status" >&5
9401   (exit $ac_status); }; }; then
9402   cf_result=no
9403 else
9404   echo "$as_me: failed program was:" >&5
9405 cat conftest.$ac_ext >&5
9406 cf_result=yes
9407 fi
9408 rm -f conftest.$ac_objext conftest.$ac_ext
9409 echo "$as_me:9409: result: $cf_result" >&5
9410 echo "${ECHO_T}$cf_result" >&6
9411
9412 if test "$cf_result" = yes ; then
9413         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9414 elif test "x" != "x" ; then
9415         echo "$as_me:9415: checking checking for compatible value versus " >&5
9416 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9417         cat >conftest.$ac_ext <<_ACEOF
9418 #line 9418 "configure"
9419 #include "confdefs.h"
9420 #include <sys/types.h>
9421
9422 int
9423 main ()
9424 {
9425
9426 #if _XOPEN_SOURCE_EXTENDED- < 0
9427 make an error
9428 #endif
9429   ;
9430   return 0;
9431 }
9432 _ACEOF
9433 rm -f conftest.$ac_objext
9434 if { (eval echo "$as_me:9434: \"$ac_compile\"") >&5
9435   (eval $ac_compile) 2>&5
9436   ac_status=$?
9437   echo "$as_me:9437: \$? = $ac_status" >&5
9438   (exit $ac_status); } &&
9439          { ac_try='test -s conftest.$ac_objext'
9440   { (eval echo "$as_me:9440: \"$ac_try\"") >&5
9441   (eval $ac_try) 2>&5
9442   ac_status=$?
9443   echo "$as_me:9443: \$? = $ac_status" >&5
9444   (exit $ac_status); }; }; then
9445   cf_result=yes
9446 else
9447   echo "$as_me: failed program was:" >&5
9448 cat conftest.$ac_ext >&5
9449 cf_result=no
9450 fi
9451 rm -f conftest.$ac_objext conftest.$ac_ext
9452         echo "$as_me:9452: result: $cf_result" >&5
9453 echo "${ECHO_T}$cf_result" >&6
9454         if test "$cf_result" = no ; then
9455                 # perhaps we can override it - try...
9456                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9457         fi
9458 fi
9459
9460 fi
9461
9462 echo "$as_me:9462: checking if wcwidth agrees graphics are single-width" >&5
9463 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
9464 if test "${cf_cv_wcwidth_graphics+set}" = set; then
9465   echo $ECHO_N "(cached) $ECHO_C" >&6
9466 else
9467
9468 cat >conftest.in <<CF_EOF
9469 -       VT100 symbols
9470 0x250c  upper left corner
9471 0x2514  lower left corner
9472 0x2510  upper right corner
9473 0x2518  lower right corner
9474 0x251c  tee pointing left
9475 0x2524  tee pointing right
9476 0x2534  tee pointing up
9477 0x252c  tee pointing down
9478 0x2500  horizontal line
9479 0x2502  vertical line
9480 0x253c  large plus or crossover
9481 0x23ba  scan line 1
9482 0x23bd  scan line 9
9483 0x25c6  diamond
9484 0x2592  checker board (stipple)
9485 0x00b0  degree symbol
9486 0x00b1  plus/minus
9487 0x00b7  bullet
9488 -       Teletype 5410v1 symbols
9489 0x2190  arrow pointing left
9490 0x2192  arrow pointing right
9491 0x2193  arrow pointing down
9492 0x2191  arrow pointing up
9493 0x2592  board of squares
9494 0x2603  lantern symbol
9495 0x25ae  solid square block
9496 -       these defaults were invented for ncurses
9497 0x23bb  scan line 3
9498 0x23bc  scan line 7
9499 0x2264  less-than-or-equal-to
9500 0x2265  greater-than-or-equal-to
9501 0x03c0  greek pi
9502 0x2260  not-equal
9503 0x00a3  pound-sterling symbol
9504 -       thick-line-drawing
9505 0x250f  upper left corner
9506 0x2517  lower left corner
9507 0x2513  upper right corner
9508 0x251b  lower right corner
9509 0x2523  tee pointing left
9510 0x252b  tee pointing right
9511 0x253b  tee pointing up
9512 0x2533  tee pointing down
9513 0x2501  horizontal line
9514 0x2503  vertical line
9515 0x254b  large plus or crossover
9516 -       double-line-drawing
9517 0x2554  upper left corner
9518 0x255a  lower left corner
9519 0x2557  upper right corner
9520 0x255d  lower right corner
9521 0x2563  tee pointing left
9522 0x2560  tee pointing right
9523 0x2569  tee pointing up
9524 0x2566  tee pointing down
9525 0x2550  horizontal line
9526 0x2551  vertical line
9527 0x256c  large plus or crossover
9528 CF_EOF
9529 if test "$cross_compiling" = yes; then
9530   cf_cv_wcwidth_graphics=unknown
9531 else
9532   cat >conftest.$ac_ext <<_ACEOF
9533 #line 9533 "configure"
9534 #include "confdefs.h"
9535
9536 #include <locale.h>
9537 #include <stdio.h>
9538 #include <wchar.h>
9539
9540 #define MY_LEN 80
9541
9542 int
9543 main(void)
9544 {
9545         FILE *fp;
9546         int value;
9547         char buffer[MY_LEN + 1];
9548         char notes[MY_LEN + 1];
9549         int totals = 0;
9550         int passed = 0;
9551
9552         if (setlocale(LC_ALL, "en_US.UTF8") ||
9553                 setlocale(LC_ALL, "en_US.UTF-8") ||
9554                 setlocale(LC_ALL, "en_US.utf8") ||
9555                 setlocale(LC_ALL, "en_US.utf-8")) {
9556                 if ((fp = fopen("conftest.in", "r")) != 0) {
9557                         while (fgets(buffer, MY_LEN, fp) != 0) {
9558                                 if (*buffer == '-') {
9559                                         fprintf(stderr, "\t%s", buffer);
9560                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
9561                                         ++totals;
9562                                         if (wcwidth(value) == 1)
9563                                                 ++passed;
9564                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
9565                                 } else {
9566                                         fprintf(stderr, "?\t%s", buffer);
9567                                 }
9568                         }
9569                 }
9570         }
9571         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
9572         return (totals == passed) ? 0 : 1;
9573 }
9574
9575 _ACEOF
9576 rm -f conftest$ac_exeext
9577 if { (eval echo "$as_me:9577: \"$ac_link\"") >&5
9578   (eval $ac_link) 2>&5
9579   ac_status=$?
9580   echo "$as_me:9580: \$? = $ac_status" >&5
9581   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9582   { (eval echo "$as_me:9582: \"$ac_try\"") >&5
9583   (eval $ac_try) 2>&5
9584   ac_status=$?
9585   echo "$as_me:9585: \$? = $ac_status" >&5
9586   (exit $ac_status); }; }; then
9587   cf_cv_wcwidth_graphics=yes
9588 else
9589   echo "$as_me: program exited with status $ac_status" >&5
9590 echo "$as_me: failed program was:" >&5
9591 cat conftest.$ac_ext >&5
9592 cf_cv_wcwidth_graphics=no
9593 fi
9594 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9595 fi
9596
9597 fi
9598 echo "$as_me:9598: result: $cf_cv_wcwidth_graphics" >&5
9599 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
9600
9601         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
9602
9603         # with_overwrite=no
9604         NCURSES_CH_T=cchar_t
9605
9606 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9607 do
9608 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9609 echo "$as_me:9609: checking for $ac_func" >&5
9610 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9611 if eval "test \"\${$as_ac_var+set}\" = set"; then
9612   echo $ECHO_N "(cached) $ECHO_C" >&6
9613 else
9614   cat >conftest.$ac_ext <<_ACEOF
9615 #line 9615 "configure"
9616 #include "confdefs.h"
9617 /* System header to define __stub macros and hopefully few prototypes,
9618     which can conflict with char $ac_func (); below.  */
9619 #include <assert.h>
9620 /* Override any gcc2 internal prototype to avoid an error.  */
9621 #ifdef __cplusplus
9622 extern "C"
9623 #endif
9624 /* We use char because int might match the return type of a gcc2
9625    builtin and then its argument prototype would still apply.  */
9626 char $ac_func ();
9627 char (*f) ();
9628
9629 int
9630 main ()
9631 {
9632 /* The GNU C library defines this for functions which it implements
9633     to always fail with ENOSYS.  Some functions are actually named
9634     something starting with __ and the normal name is an alias.  */
9635 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9636 choke me
9637 #else
9638 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9639 #endif
9640
9641   ;
9642   return 0;
9643 }
9644 _ACEOF
9645 rm -f conftest.$ac_objext conftest$ac_exeext
9646 if { (eval echo "$as_me:9646: \"$ac_link\"") >&5
9647   (eval $ac_link) 2>&5
9648   ac_status=$?
9649   echo "$as_me:9649: \$? = $ac_status" >&5
9650   (exit $ac_status); } &&
9651          { ac_try='test -s conftest$ac_exeext'
9652   { (eval echo "$as_me:9652: \"$ac_try\"") >&5
9653   (eval $ac_try) 2>&5
9654   ac_status=$?
9655   echo "$as_me:9655: \$? = $ac_status" >&5
9656   (exit $ac_status); }; }; then
9657   eval "$as_ac_var=yes"
9658 else
9659   echo "$as_me: failed program was:" >&5
9660 cat conftest.$ac_ext >&5
9661 eval "$as_ac_var=no"
9662 fi
9663 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9664 fi
9665 echo "$as_me:9665: result: `eval echo '${'$as_ac_var'}'`" >&5
9666 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9667 if test `eval echo '${'$as_ac_var'}'` = yes; then
9668   cat >>confdefs.h <<EOF
9669 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9670 EOF
9671
9672 fi
9673 done
9674
9675         if test "x$ac_cv_func_putwc" != xyes ; then
9676
9677 echo "$as_me:9677: checking for multibyte character support" >&5
9678 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9679 if test "${cf_cv_utf8_lib+set}" = set; then
9680   echo $ECHO_N "(cached) $ECHO_C" >&6
9681 else
9682
9683         cf_save_LIBS="$LIBS"
9684         cat >conftest.$ac_ext <<_ACEOF
9685 #line 9685 "configure"
9686 #include "confdefs.h"
9687
9688 #include <stdlib.h>
9689 int
9690 main ()
9691 {
9692 putwc(0,0);
9693   ;
9694   return 0;
9695 }
9696 _ACEOF
9697 rm -f conftest.$ac_objext conftest$ac_exeext
9698 if { (eval echo "$as_me:9698: \"$ac_link\"") >&5
9699   (eval $ac_link) 2>&5
9700   ac_status=$?
9701   echo "$as_me:9701: \$? = $ac_status" >&5
9702   (exit $ac_status); } &&
9703          { ac_try='test -s conftest$ac_exeext'
9704   { (eval echo "$as_me:9704: \"$ac_try\"") >&5
9705   (eval $ac_try) 2>&5
9706   ac_status=$?
9707   echo "$as_me:9707: \$? = $ac_status" >&5
9708   (exit $ac_status); }; }; then
9709   cf_cv_utf8_lib=yes
9710 else
9711   echo "$as_me: failed program was:" >&5
9712 cat conftest.$ac_ext >&5
9713
9714 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9715 # will be set on completion of the AC_TRY_LINK below.
9716 cf_cv_header_path_utf8=
9717 cf_cv_library_path_utf8=
9718
9719 echo "${as_me:-configure}:9719: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9720
9721 cf_save_LIBS="$LIBS"
9722
9723 cat >conftest.$ac_ext <<_ACEOF
9724 #line 9724 "configure"
9725 #include "confdefs.h"
9726
9727 #include <libutf8.h>
9728 int
9729 main ()
9730 {
9731 putwc(0,0);
9732   ;
9733   return 0;
9734 }
9735 _ACEOF
9736 rm -f conftest.$ac_objext conftest$ac_exeext
9737 if { (eval echo "$as_me:9737: \"$ac_link\"") >&5
9738   (eval $ac_link) 2>&5
9739   ac_status=$?
9740   echo "$as_me:9740: \$? = $ac_status" >&5
9741   (exit $ac_status); } &&
9742          { ac_try='test -s conftest$ac_exeext'
9743   { (eval echo "$as_me:9743: \"$ac_try\"") >&5
9744   (eval $ac_try) 2>&5
9745   ac_status=$?
9746   echo "$as_me:9746: \$? = $ac_status" >&5
9747   (exit $ac_status); }; }; then
9748
9749         cf_cv_find_linkage_utf8=yes
9750         cf_cv_header_path_utf8=/usr/include
9751         cf_cv_library_path_utf8=/usr/lib
9752
9753 else
9754   echo "$as_me: failed program was:" >&5
9755 cat conftest.$ac_ext >&5
9756
9757 LIBS="-lutf8  $cf_save_LIBS"
9758
9759 cat >conftest.$ac_ext <<_ACEOF
9760 #line 9760 "configure"
9761 #include "confdefs.h"
9762
9763 #include <libutf8.h>
9764 int
9765 main ()
9766 {
9767 putwc(0,0);
9768   ;
9769   return 0;
9770 }
9771 _ACEOF
9772 rm -f conftest.$ac_objext conftest$ac_exeext
9773 if { (eval echo "$as_me:9773: \"$ac_link\"") >&5
9774   (eval $ac_link) 2>&5
9775   ac_status=$?
9776   echo "$as_me:9776: \$? = $ac_status" >&5
9777   (exit $ac_status); } &&
9778          { ac_try='test -s conftest$ac_exeext'
9779   { (eval echo "$as_me:9779: \"$ac_try\"") >&5
9780   (eval $ac_try) 2>&5
9781   ac_status=$?
9782   echo "$as_me:9782: \$? = $ac_status" >&5
9783   (exit $ac_status); }; }; then
9784
9785         cf_cv_find_linkage_utf8=yes
9786         cf_cv_header_path_utf8=/usr/include
9787         cf_cv_library_path_utf8=/usr/lib
9788         cf_cv_library_file_utf8="-lutf8"
9789
9790 else
9791   echo "$as_me: failed program was:" >&5
9792 cat conftest.$ac_ext >&5
9793
9794         cf_cv_find_linkage_utf8=no
9795         LIBS="$cf_save_LIBS"
9796
9797         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
9798
9799 echo "${as_me:-configure}:9799: testing find linkage for utf8 library ..." 1>&5
9800
9801 echo "${as_me:-configure}:9801: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9802
9803         cf_save_CPPFLAGS="$CPPFLAGS"
9804         cf_test_CPPFLAGS="$CPPFLAGS"
9805
9806 cf_search=
9807
9808 # collect the current set of include-directories from compiler flags
9809 cf_header_path_list=""
9810 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9811         for cf_header_path in $CPPFLAGS $CFLAGS
9812         do
9813                 case $cf_header_path in
9814                 (-I*)
9815                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9816
9817 test "x$cf_header_path" != "xNONE" && \
9818 test -d "$cf_header_path" && \
9819  {
9820         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9821         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9822         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9823         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9824         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9825         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9826 }
9827
9828                         cf_header_path_list="$cf_header_path_list $cf_search"
9829                         ;;
9830                 esac
9831         done
9832 fi
9833
9834 # add the variations for the package we are looking for
9835
9836 cf_search=
9837
9838 test "x$prefix" != "xNONE" && \
9839 test -d "$prefix" && \
9840  {
9841         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9842         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9843         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9844         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9845         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9846         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9847 }
9848
9849 for cf_subdir_prefix in \
9850         /usr \
9851         /usr/local \
9852         /usr/pkg \
9853         /opt \
9854         /opt/local \
9855         $HOME
9856 do
9857
9858 test "x$cf_subdir_prefix" != "x$prefix" && \
9859 test -d "$cf_subdir_prefix" && \
9860 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9861         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9862         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9863         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9864         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9865         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9866         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9867 }
9868
9869 done
9870
9871 test "$includedir" != NONE && \
9872 test "$includedir" != "/usr/include" && \
9873 test -d "$includedir" && {
9874         test -d $includedir &&    cf_search="$cf_search $includedir"
9875         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9876 }
9877
9878 test "$oldincludedir" != NONE && \
9879 test "$oldincludedir" != "/usr/include" && \
9880 test -d "$oldincludedir" && {
9881         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9882         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9883 }
9884
9885 cf_search="$cf_search $cf_header_path_list"
9886
9887         for cf_cv_header_path_utf8 in $cf_search
9888         do
9889                 if test -d $cf_cv_header_path_utf8 ; then
9890                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9891
9892 echo "${as_me:-configure}:9892: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9893
9894                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9895                         cat >conftest.$ac_ext <<_ACEOF
9896 #line 9896 "configure"
9897 #include "confdefs.h"
9898
9899 #include <libutf8.h>
9900 int
9901 main ()
9902 {
9903 putwc(0,0);
9904   ;
9905   return 0;
9906 }
9907 _ACEOF
9908 rm -f conftest.$ac_objext
9909 if { (eval echo "$as_me:9909: \"$ac_compile\"") >&5
9910   (eval $ac_compile) 2>&5
9911   ac_status=$?
9912   echo "$as_me:9912: \$? = $ac_status" >&5
9913   (exit $ac_status); } &&
9914          { ac_try='test -s conftest.$ac_objext'
9915   { (eval echo "$as_me:9915: \"$ac_try\"") >&5
9916   (eval $ac_try) 2>&5
9917   ac_status=$?
9918   echo "$as_me:9918: \$? = $ac_status" >&5
9919   (exit $ac_status); }; }; then
9920
9921                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9922
9923 echo "${as_me:-configure}:9923: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9924
9925                                 cf_cv_find_linkage_utf8=maybe
9926                                 cf_test_CPPFLAGS="$CPPFLAGS"
9927                                 break
9928 else
9929   echo "$as_me: failed program was:" >&5
9930 cat conftest.$ac_ext >&5
9931
9932                                 CPPFLAGS="$cf_save_CPPFLAGS"
9933
9934 fi
9935 rm -f conftest.$ac_objext conftest.$ac_ext
9936                 fi
9937         done
9938
9939         if test "$cf_cv_find_linkage_utf8" = maybe ; then
9940
9941 echo "${as_me:-configure}:9941: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9942
9943                 cf_save_LIBS="$LIBS"
9944                 cf_save_LDFLAGS="$LDFLAGS"
9945
9946                 if test "$cf_cv_find_linkage_utf8" != yes ; then
9947
9948 cf_search=
9949 cf_library_path_list=""
9950 if test -n "${LDFLAGS}${LIBS}" ; then
9951         for cf_library_path in $LDFLAGS $LIBS
9952         do
9953                 case $cf_library_path in
9954                 (-L*)
9955                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9956
9957 test "x$cf_library_path" != "xNONE" && \
9958 test -d "$cf_library_path" && \
9959  {
9960         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9961         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9962         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9963         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9964         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9965         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9966 }
9967
9968                         cf_library_path_list="$cf_library_path_list $cf_search"
9969                         ;;
9970                 esac
9971         done
9972 fi
9973
9974 cf_search=
9975
9976 test "x$prefix" != "xNONE" && \
9977 test -d "$prefix" && \
9978  {
9979         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9980         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9981         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9982         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9983         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9984         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9985 }
9986
9987 for cf_subdir_prefix in \
9988         /usr \
9989         /usr/local \
9990         /usr/pkg \
9991         /opt \
9992         /opt/local \
9993         $HOME
9994 do
9995
9996 test "x$cf_subdir_prefix" != "x$prefix" && \
9997 test -d "$cf_subdir_prefix" && \
9998 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9999         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
10000         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
10001         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
10002         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
10003         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
10004         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
10005 }
10006
10007 done
10008
10009 cf_search="$cf_library_path_list $cf_search"
10010
10011                         for cf_cv_library_path_utf8 in $cf_search
10012                         do
10013                                 if test -d $cf_cv_library_path_utf8 ; then
10014                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
10015
10016 echo "${as_me:-configure}:10016: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
10017
10018                                         CPPFLAGS="$cf_test_CPPFLAGS"
10019                                         LIBS="-lutf8  $cf_save_LIBS"
10020                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
10021                                         cat >conftest.$ac_ext <<_ACEOF
10022 #line 10022 "configure"
10023 #include "confdefs.h"
10024
10025 #include <libutf8.h>
10026 int
10027 main ()
10028 {
10029 putwc(0,0);
10030   ;
10031   return 0;
10032 }
10033 _ACEOF
10034 rm -f conftest.$ac_objext conftest$ac_exeext
10035 if { (eval echo "$as_me:10035: \"$ac_link\"") >&5
10036   (eval $ac_link) 2>&5
10037   ac_status=$?
10038   echo "$as_me:10038: \$? = $ac_status" >&5
10039   (exit $ac_status); } &&
10040          { ac_try='test -s conftest$ac_exeext'
10041   { (eval echo "$as_me:10041: \"$ac_try\"") >&5
10042   (eval $ac_try) 2>&5
10043   ac_status=$?
10044   echo "$as_me:10044: \$? = $ac_status" >&5
10045   (exit $ac_status); }; }; then
10046
10047                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
10048
10049 echo "${as_me:-configure}:10049: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
10050
10051                                         cf_cv_find_linkage_utf8=yes
10052                                         cf_cv_library_file_utf8="-lutf8"
10053                                         break
10054 else
10055   echo "$as_me: failed program was:" >&5
10056 cat conftest.$ac_ext >&5
10057
10058                                         CPPFLAGS="$cf_save_CPPFLAGS"
10059                                         LIBS="$cf_save_LIBS"
10060                                         LDFLAGS="$cf_save_LDFLAGS"
10061
10062 fi
10063 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10064                                 fi
10065                         done
10066                         CPPFLAGS="$cf_save_CPPFLAGS"
10067                         LDFLAGS="$cf_save_LDFLAGS"
10068                 fi
10069
10070         else
10071                 cf_cv_find_linkage_utf8=no
10072         fi
10073
10074 fi
10075 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10076
10077 fi
10078 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10079
10080 LIBS="$cf_save_LIBS"
10081
10082 if test "$cf_cv_find_linkage_utf8" = yes ; then
10083 cf_cv_utf8_lib=add-on
10084 else
10085 cf_cv_utf8_lib=no
10086 fi
10087
10088 fi
10089 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10090 fi
10091 echo "$as_me:10091: result: $cf_cv_utf8_lib" >&5
10092 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10093
10094 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10095 # ncurses/ncursesw:
10096 if test "$cf_cv_utf8_lib" = "add-on" ; then
10097
10098 cat >>confdefs.h <<\EOF
10099 #define HAVE_LIBUTF8_H 1
10100 EOF
10101
10102 if test -n "$cf_cv_header_path_utf8" ; then
10103   for cf_add_incdir in $cf_cv_header_path_utf8
10104   do
10105         while test $cf_add_incdir != /usr/include
10106         do
10107           if test -d $cf_add_incdir
10108           then
10109                 cf_have_incdir=no
10110                 if test -n "$CFLAGS$CPPFLAGS" ; then
10111                   # a loop is needed to ensure we can add subdirs of existing dirs
10112                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10113                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10114                           cf_have_incdir=yes; break
10115                         fi
10116                   done
10117                 fi
10118
10119                 if test "$cf_have_incdir" = no ; then
10120                   if test "$cf_add_incdir" = /usr/local/include ; then
10121                         if test "$GCC" = yes
10122                         then
10123                           cf_save_CPPFLAGS=$CPPFLAGS
10124                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10125                           cat >conftest.$ac_ext <<_ACEOF
10126 #line 10126 "configure"
10127 #include "confdefs.h"
10128 #include <stdio.h>
10129 int
10130 main ()
10131 {
10132 printf("Hello")
10133   ;
10134   return 0;
10135 }
10136 _ACEOF
10137 rm -f conftest.$ac_objext
10138 if { (eval echo "$as_me:10138: \"$ac_compile\"") >&5
10139   (eval $ac_compile) 2>&5
10140   ac_status=$?
10141   echo "$as_me:10141: \$? = $ac_status" >&5
10142   (exit $ac_status); } &&
10143          { ac_try='test -s conftest.$ac_objext'
10144   { (eval echo "$as_me:10144: \"$ac_try\"") >&5
10145   (eval $ac_try) 2>&5
10146   ac_status=$?
10147   echo "$as_me:10147: \$? = $ac_status" >&5
10148   (exit $ac_status); }; }; then
10149   :
10150 else
10151   echo "$as_me: failed program was:" >&5
10152 cat conftest.$ac_ext >&5
10153 cf_have_incdir=yes
10154 fi
10155 rm -f conftest.$ac_objext conftest.$ac_ext
10156                           CPPFLAGS=$cf_save_CPPFLAGS
10157                         fi
10158                   fi
10159                 fi
10160
10161                 if test "$cf_have_incdir" = no ; then
10162                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10163
10164 echo "${as_me:-configure}:10164: testing adding $cf_add_incdir to include-path ..." 1>&5
10165
10166                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10167
10168                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10169                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10170                   cf_add_incdir="$cf_top_incdir"
10171                 else
10172                   break
10173                 fi
10174           else
10175                 break
10176           fi
10177         done
10178   done
10179 fi
10180
10181 if test -n "$cf_cv_library_path_utf8" ; then
10182         for cf_add_libdir in $cf_cv_library_path_utf8
10183         do
10184                 if test $cf_add_libdir = /usr/lib ; then
10185                         :
10186                 elif test -d $cf_add_libdir
10187                 then
10188                         cf_have_libdir=no
10189                         if test -n "$LDFLAGS$LIBS" ; then
10190                                 # a loop is needed to ensure we can add subdirs of existing dirs
10191                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10192                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10193                                                 cf_have_libdir=yes; break
10194                                         fi
10195                                 done
10196                         fi
10197                         if test "$cf_have_libdir" = no ; then
10198                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10199
10200 echo "${as_me:-configure}:10200: testing adding $cf_add_libdir to library-path ..." 1>&5
10201
10202                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10203                         fi
10204                 fi
10205         done
10206 fi
10207
10208 cf_add_libs="$cf_cv_library_file_utf8"
10209 # Filter out duplicates - this happens with badly-designed ".pc" files...
10210 for cf_add_1lib in $LIBS
10211 do
10212         for cf_add_2lib in $cf_add_libs
10213         do
10214                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10215                 then
10216                         cf_add_1lib=
10217                         break
10218                 fi
10219         done
10220         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10221 done
10222 LIBS="$cf_add_libs"
10223
10224 fi
10225
10226                 if test "$cf_cv_utf8_lib" != no ; then
10227                         NCURSES_LIBUTF8=1
10228                 fi
10229         fi
10230
10231 # This is needed on Tru64 5.0 to declare mbstate_t
10232 echo "$as_me:10232: checking if we must include wchar.h to declare mbstate_t" >&5
10233 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10234 if test "${cf_cv_mbstate_t+set}" = set; then
10235   echo $ECHO_N "(cached) $ECHO_C" >&6
10236 else
10237
10238 cat >conftest.$ac_ext <<_ACEOF
10239 #line 10239 "configure"
10240 #include "confdefs.h"
10241
10242 #include <stdlib.h>
10243 #include <stdarg.h>
10244 #include <stdio.h>
10245 #ifdef HAVE_LIBUTF8_H
10246 #include <libutf8.h>
10247 #endif
10248 int
10249 main ()
10250 {
10251 mbstate_t state
10252   ;
10253   return 0;
10254 }
10255 _ACEOF
10256 rm -f conftest.$ac_objext
10257 if { (eval echo "$as_me:10257: \"$ac_compile\"") >&5
10258   (eval $ac_compile) 2>&5
10259   ac_status=$?
10260   echo "$as_me:10260: \$? = $ac_status" >&5
10261   (exit $ac_status); } &&
10262          { ac_try='test -s conftest.$ac_objext'
10263   { (eval echo "$as_me:10263: \"$ac_try\"") >&5
10264   (eval $ac_try) 2>&5
10265   ac_status=$?
10266   echo "$as_me:10266: \$? = $ac_status" >&5
10267   (exit $ac_status); }; }; then
10268   cf_cv_mbstate_t=no
10269 else
10270   echo "$as_me: failed program was:" >&5
10271 cat conftest.$ac_ext >&5
10272 cat >conftest.$ac_ext <<_ACEOF
10273 #line 10273 "configure"
10274 #include "confdefs.h"
10275
10276 #include <stdlib.h>
10277 #include <stdarg.h>
10278 #include <stdio.h>
10279 #include <wchar.h>
10280 #ifdef HAVE_LIBUTF8_H
10281 #include <libutf8.h>
10282 #endif
10283 int
10284 main ()
10285 {
10286 mbstate_t value
10287   ;
10288   return 0;
10289 }
10290 _ACEOF
10291 rm -f conftest.$ac_objext
10292 if { (eval echo "$as_me:10292: \"$ac_compile\"") >&5
10293   (eval $ac_compile) 2>&5
10294   ac_status=$?
10295   echo "$as_me:10295: \$? = $ac_status" >&5
10296   (exit $ac_status); } &&
10297          { ac_try='test -s conftest.$ac_objext'
10298   { (eval echo "$as_me:10298: \"$ac_try\"") >&5
10299   (eval $ac_try) 2>&5
10300   ac_status=$?
10301   echo "$as_me:10301: \$? = $ac_status" >&5
10302   (exit $ac_status); }; }; then
10303   cf_cv_mbstate_t=yes
10304 else
10305   echo "$as_me: failed program was:" >&5
10306 cat conftest.$ac_ext >&5
10307 cf_cv_mbstate_t=unknown
10308 fi
10309 rm -f conftest.$ac_objext conftest.$ac_ext
10310 fi
10311 rm -f conftest.$ac_objext conftest.$ac_ext
10312 fi
10313 echo "$as_me:10313: result: $cf_cv_mbstate_t" >&5
10314 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10315
10316 if test "$cf_cv_mbstate_t" = yes ; then
10317
10318 cat >>confdefs.h <<\EOF
10319 #define NEED_WCHAR_H 1
10320 EOF
10321
10322         NEED_WCHAR_H=1
10323 fi
10324
10325 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10326 if test "$cf_cv_mbstate_t" = unknown ; then
10327         NCURSES_MBSTATE_T=1
10328 fi
10329
10330 # This is needed on Tru64 5.0 to declare wchar_t
10331 echo "$as_me:10331: checking if we must include wchar.h to declare wchar_t" >&5
10332 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10333 if test "${cf_cv_wchar_t+set}" = set; then
10334   echo $ECHO_N "(cached) $ECHO_C" >&6
10335 else
10336
10337 cat >conftest.$ac_ext <<_ACEOF
10338 #line 10338 "configure"
10339 #include "confdefs.h"
10340
10341 #include <stdlib.h>
10342 #include <stdarg.h>
10343 #include <stdio.h>
10344 #ifdef HAVE_LIBUTF8_H
10345 #include <libutf8.h>
10346 #endif
10347 int
10348 main ()
10349 {
10350 wchar_t state
10351   ;
10352   return 0;
10353 }
10354 _ACEOF
10355 rm -f conftest.$ac_objext
10356 if { (eval echo "$as_me:10356: \"$ac_compile\"") >&5
10357   (eval $ac_compile) 2>&5
10358   ac_status=$?
10359   echo "$as_me:10359: \$? = $ac_status" >&5
10360   (exit $ac_status); } &&
10361          { ac_try='test -s conftest.$ac_objext'
10362   { (eval echo "$as_me:10362: \"$ac_try\"") >&5
10363   (eval $ac_try) 2>&5
10364   ac_status=$?
10365   echo "$as_me:10365: \$? = $ac_status" >&5
10366   (exit $ac_status); }; }; then
10367   cf_cv_wchar_t=no
10368 else
10369   echo "$as_me: failed program was:" >&5
10370 cat conftest.$ac_ext >&5
10371 cat >conftest.$ac_ext <<_ACEOF
10372 #line 10372 "configure"
10373 #include "confdefs.h"
10374
10375 #include <stdlib.h>
10376 #include <stdarg.h>
10377 #include <stdio.h>
10378 #include <wchar.h>
10379 #ifdef HAVE_LIBUTF8_H
10380 #include <libutf8.h>
10381 #endif
10382 int
10383 main ()
10384 {
10385 wchar_t value
10386   ;
10387   return 0;
10388 }
10389 _ACEOF
10390 rm -f conftest.$ac_objext
10391 if { (eval echo "$as_me:10391: \"$ac_compile\"") >&5
10392   (eval $ac_compile) 2>&5
10393   ac_status=$?
10394   echo "$as_me:10394: \$? = $ac_status" >&5
10395   (exit $ac_status); } &&
10396          { ac_try='test -s conftest.$ac_objext'
10397   { (eval echo "$as_me:10397: \"$ac_try\"") >&5
10398   (eval $ac_try) 2>&5
10399   ac_status=$?
10400   echo "$as_me:10400: \$? = $ac_status" >&5
10401   (exit $ac_status); }; }; then
10402   cf_cv_wchar_t=yes
10403 else
10404   echo "$as_me: failed program was:" >&5
10405 cat conftest.$ac_ext >&5
10406 cf_cv_wchar_t=unknown
10407 fi
10408 rm -f conftest.$ac_objext conftest.$ac_ext
10409 fi
10410 rm -f conftest.$ac_objext conftest.$ac_ext
10411 fi
10412 echo "$as_me:10412: result: $cf_cv_wchar_t" >&5
10413 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10414
10415 if test "$cf_cv_wchar_t" = yes ; then
10416
10417 cat >>confdefs.h <<\EOF
10418 #define NEED_WCHAR_H 1
10419 EOF
10420
10421         NEED_WCHAR_H=1
10422 fi
10423
10424 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10425 if test "$cf_cv_wchar_t" = unknown ; then
10426         NCURSES_WCHAR_T=1
10427 fi
10428
10429 # if we find wchar_t in either place, use substitution to provide a fallback.
10430 if test "$cf_cv_wchar_t" != unknown ; then
10431         NCURSES_OK_WCHAR_T=1
10432 fi
10433
10434 # This is needed on Tru64 5.0 to declare wint_t
10435 echo "$as_me:10435: checking if we must include wchar.h to declare wint_t" >&5
10436 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10437 if test "${cf_cv_wint_t+set}" = set; then
10438   echo $ECHO_N "(cached) $ECHO_C" >&6
10439 else
10440
10441 cat >conftest.$ac_ext <<_ACEOF
10442 #line 10442 "configure"
10443 #include "confdefs.h"
10444
10445 #include <stdlib.h>
10446 #include <stdarg.h>
10447 #include <stdio.h>
10448 #ifdef HAVE_LIBUTF8_H
10449 #include <libutf8.h>
10450 #endif
10451 int
10452 main ()
10453 {
10454 wint_t state
10455   ;
10456   return 0;
10457 }
10458 _ACEOF
10459 rm -f conftest.$ac_objext
10460 if { (eval echo "$as_me:10460: \"$ac_compile\"") >&5
10461   (eval $ac_compile) 2>&5
10462   ac_status=$?
10463   echo "$as_me:10463: \$? = $ac_status" >&5
10464   (exit $ac_status); } &&
10465          { ac_try='test -s conftest.$ac_objext'
10466   { (eval echo "$as_me:10466: \"$ac_try\"") >&5
10467   (eval $ac_try) 2>&5
10468   ac_status=$?
10469   echo "$as_me:10469: \$? = $ac_status" >&5
10470   (exit $ac_status); }; }; then
10471   cf_cv_wint_t=no
10472 else
10473   echo "$as_me: failed program was:" >&5
10474 cat conftest.$ac_ext >&5
10475 cat >conftest.$ac_ext <<_ACEOF
10476 #line 10476 "configure"
10477 #include "confdefs.h"
10478
10479 #include <stdlib.h>
10480 #include <stdarg.h>
10481 #include <stdio.h>
10482 #include <wchar.h>
10483 #ifdef HAVE_LIBUTF8_H
10484 #include <libutf8.h>
10485 #endif
10486 int
10487 main ()
10488 {
10489 wint_t value
10490   ;
10491   return 0;
10492 }
10493 _ACEOF
10494 rm -f conftest.$ac_objext
10495 if { (eval echo "$as_me:10495: \"$ac_compile\"") >&5
10496   (eval $ac_compile) 2>&5
10497   ac_status=$?
10498   echo "$as_me:10498: \$? = $ac_status" >&5
10499   (exit $ac_status); } &&
10500          { ac_try='test -s conftest.$ac_objext'
10501   { (eval echo "$as_me:10501: \"$ac_try\"") >&5
10502   (eval $ac_try) 2>&5
10503   ac_status=$?
10504   echo "$as_me:10504: \$? = $ac_status" >&5
10505   (exit $ac_status); }; }; then
10506   cf_cv_wint_t=yes
10507 else
10508   echo "$as_me: failed program was:" >&5
10509 cat conftest.$ac_ext >&5
10510 cf_cv_wint_t=unknown
10511 fi
10512 rm -f conftest.$ac_objext conftest.$ac_ext
10513 fi
10514 rm -f conftest.$ac_objext conftest.$ac_ext
10515 fi
10516 echo "$as_me:10516: result: $cf_cv_wint_t" >&5
10517 echo "${ECHO_T}$cf_cv_wint_t" >&6
10518
10519 if test "$cf_cv_wint_t" = yes ; then
10520
10521 cat >>confdefs.h <<\EOF
10522 #define NEED_WCHAR_H 1
10523 EOF
10524
10525         NEED_WCHAR_H=1
10526 fi
10527
10528 # if we do not find wint_t in either place, use substitution to provide a fallback.
10529 if test "$cf_cv_wint_t" = unknown ; then
10530         NCURSES_WINT_T=1
10531 fi
10532
10533 # if we find wint_t in either place, use substitution to provide a fallback.
10534 if test "$cf_cv_wint_t" != unknown ; then
10535         NCURSES_OK_WINT_T=1
10536 fi
10537
10538         if test "$NCURSES_MBSTATE_T" != 0; then
10539
10540 cat >>confdefs.h <<\EOF
10541 #define NEED_MBSTATE_T_DEF 1
10542 EOF
10543
10544         fi
10545 fi
10546
10547 ###   use option --disable-lp64 to allow long chtype
10548 echo "$as_me:10548: checking whether to enable _LP64 definition in curses.h" >&5
10549 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10550
10551 # Check whether --enable-lp64 or --disable-lp64 was given.
10552 if test "${enable_lp64+set}" = set; then
10553   enableval="$enable_lp64"
10554   with_lp64=$enableval
10555 else
10556   with_lp64=$cf_dft_with_lp64
10557 fi;
10558 echo "$as_me:10558: result: $with_lp64" >&5
10559 echo "${ECHO_T}$with_lp64" >&6
10560
10561 if test "x$with_lp64" = xyes ; then
10562         cf_cv_enable_lp64=1
10563 else
10564         cf_cv_enable_lp64=0
10565 fi
10566
10567 # Check whether --enable-largefile or --disable-largefile was given.
10568 if test "${enable_largefile+set}" = set; then
10569   enableval="$enable_largefile"
10570
10571 fi;
10572 if test "$enable_largefile" != no; then
10573
10574   echo "$as_me:10574: checking for special C compiler options needed for large files" >&5
10575 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10576 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10577   echo $ECHO_N "(cached) $ECHO_C" >&6
10578 else
10579   ac_cv_sys_largefile_CC=no
10580      if test "$GCC" != yes; then
10581        ac_save_CC=$CC
10582        while :; do
10583          # IRIX 6.2 and later do not support large files by default,
10584          # so use the C compiler's -n32 option if that helps.
10585          cat >conftest.$ac_ext <<_ACEOF
10586 #line 10586 "configure"
10587 #include "confdefs.h"
10588 #include <sys/types.h>
10589  /* Check that off_t can represent 2**63 - 1 correctly.
10590     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10591     since some C++ compilers masquerading as C compilers
10592     incorrectly reject 9223372036854775807.  */
10593 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10594   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10595                        && LARGE_OFF_T % 2147483647 == 1)
10596                       ? 1 : -1];
10597 int
10598 main ()
10599 {
10600
10601   ;
10602   return 0;
10603 }
10604 _ACEOF
10605          rm -f conftest.$ac_objext
10606 if { (eval echo "$as_me:10606: \"$ac_compile\"") >&5
10607   (eval $ac_compile) 2>&5
10608   ac_status=$?
10609   echo "$as_me:10609: \$? = $ac_status" >&5
10610   (exit $ac_status); } &&
10611          { ac_try='test -s conftest.$ac_objext'
10612   { (eval echo "$as_me:10612: \"$ac_try\"") >&5
10613   (eval $ac_try) 2>&5
10614   ac_status=$?
10615   echo "$as_me:10615: \$? = $ac_status" >&5
10616   (exit $ac_status); }; }; then
10617   break
10618 else
10619   echo "$as_me: failed program was:" >&5
10620 cat conftest.$ac_ext >&5
10621 fi
10622 rm -f conftest.$ac_objext
10623          CC="$CC -n32"
10624          rm -f conftest.$ac_objext
10625 if { (eval echo "$as_me:10625: \"$ac_compile\"") >&5
10626   (eval $ac_compile) 2>&5
10627   ac_status=$?
10628   echo "$as_me:10628: \$? = $ac_status" >&5
10629   (exit $ac_status); } &&
10630          { ac_try='test -s conftest.$ac_objext'
10631   { (eval echo "$as_me:10631: \"$ac_try\"") >&5
10632   (eval $ac_try) 2>&5
10633   ac_status=$?
10634   echo "$as_me:10634: \$? = $ac_status" >&5
10635   (exit $ac_status); }; }; then
10636   ac_cv_sys_largefile_CC=' -n32'; break
10637 else
10638   echo "$as_me: failed program was:" >&5
10639 cat conftest.$ac_ext >&5
10640 fi
10641 rm -f conftest.$ac_objext
10642          break
10643        done
10644        CC=$ac_save_CC
10645        rm -f conftest.$ac_ext
10646     fi
10647 fi
10648 echo "$as_me:10648: result: $ac_cv_sys_largefile_CC" >&5
10649 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10650   if test "$ac_cv_sys_largefile_CC" != no; then
10651     CC=$CC$ac_cv_sys_largefile_CC
10652   fi
10653
10654   echo "$as_me:10654: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10655 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10656 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10657   echo $ECHO_N "(cached) $ECHO_C" >&6
10658 else
10659   while :; do
10660   ac_cv_sys_file_offset_bits=no
10661   cat >conftest.$ac_ext <<_ACEOF
10662 #line 10662 "configure"
10663 #include "confdefs.h"
10664 #include <sys/types.h>
10665  /* Check that off_t can represent 2**63 - 1 correctly.
10666     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10667     since some C++ compilers masquerading as C compilers
10668     incorrectly reject 9223372036854775807.  */
10669 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10670   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10671                        && LARGE_OFF_T % 2147483647 == 1)
10672                       ? 1 : -1];
10673 int
10674 main ()
10675 {
10676
10677   ;
10678   return 0;
10679 }
10680 _ACEOF
10681 rm -f conftest.$ac_objext
10682 if { (eval echo "$as_me:10682: \"$ac_compile\"") >&5
10683   (eval $ac_compile) 2>&5
10684   ac_status=$?
10685   echo "$as_me:10685: \$? = $ac_status" >&5
10686   (exit $ac_status); } &&
10687          { ac_try='test -s conftest.$ac_objext'
10688   { (eval echo "$as_me:10688: \"$ac_try\"") >&5
10689   (eval $ac_try) 2>&5
10690   ac_status=$?
10691   echo "$as_me:10691: \$? = $ac_status" >&5
10692   (exit $ac_status); }; }; then
10693   break
10694 else
10695   echo "$as_me: failed program was:" >&5
10696 cat conftest.$ac_ext >&5
10697 fi
10698 rm -f conftest.$ac_objext conftest.$ac_ext
10699   cat >conftest.$ac_ext <<_ACEOF
10700 #line 10700 "configure"
10701 #include "confdefs.h"
10702 #define _FILE_OFFSET_BITS 64
10703 #include <sys/types.h>
10704  /* Check that off_t can represent 2**63 - 1 correctly.
10705     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10706     since some C++ compilers masquerading as C compilers
10707     incorrectly reject 9223372036854775807.  */
10708 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10709   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10710                        && LARGE_OFF_T % 2147483647 == 1)
10711                       ? 1 : -1];
10712 int
10713 main ()
10714 {
10715
10716   ;
10717   return 0;
10718 }
10719 _ACEOF
10720 rm -f conftest.$ac_objext
10721 if { (eval echo "$as_me:10721: \"$ac_compile\"") >&5
10722   (eval $ac_compile) 2>&5
10723   ac_status=$?
10724   echo "$as_me:10724: \$? = $ac_status" >&5
10725   (exit $ac_status); } &&
10726          { ac_try='test -s conftest.$ac_objext'
10727   { (eval echo "$as_me:10727: \"$ac_try\"") >&5
10728   (eval $ac_try) 2>&5
10729   ac_status=$?
10730   echo "$as_me:10730: \$? = $ac_status" >&5
10731   (exit $ac_status); }; }; then
10732   ac_cv_sys_file_offset_bits=64; break
10733 else
10734   echo "$as_me: failed program was:" >&5
10735 cat conftest.$ac_ext >&5
10736 fi
10737 rm -f conftest.$ac_objext conftest.$ac_ext
10738   break
10739 done
10740 fi
10741 echo "$as_me:10741: result: $ac_cv_sys_file_offset_bits" >&5
10742 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10743 if test "$ac_cv_sys_file_offset_bits" != no; then
10744
10745 cat >>confdefs.h <<EOF
10746 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10747 EOF
10748
10749 fi
10750 rm -rf conftest*
10751   echo "$as_me:10751: checking for _LARGE_FILES value needed for large files" >&5
10752 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10753 if test "${ac_cv_sys_large_files+set}" = set; then
10754   echo $ECHO_N "(cached) $ECHO_C" >&6
10755 else
10756   while :; do
10757   ac_cv_sys_large_files=no
10758   cat >conftest.$ac_ext <<_ACEOF
10759 #line 10759 "configure"
10760 #include "confdefs.h"
10761 #include <sys/types.h>
10762  /* Check that off_t can represent 2**63 - 1 correctly.
10763     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10764     since some C++ compilers masquerading as C compilers
10765     incorrectly reject 9223372036854775807.  */
10766 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10767   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10768                        && LARGE_OFF_T % 2147483647 == 1)
10769                       ? 1 : -1];
10770 int
10771 main ()
10772 {
10773
10774   ;
10775   return 0;
10776 }
10777 _ACEOF
10778 rm -f conftest.$ac_objext
10779 if { (eval echo "$as_me:10779: \"$ac_compile\"") >&5
10780   (eval $ac_compile) 2>&5
10781   ac_status=$?
10782   echo "$as_me:10782: \$? = $ac_status" >&5
10783   (exit $ac_status); } &&
10784          { ac_try='test -s conftest.$ac_objext'
10785   { (eval echo "$as_me:10785: \"$ac_try\"") >&5
10786   (eval $ac_try) 2>&5
10787   ac_status=$?
10788   echo "$as_me:10788: \$? = $ac_status" >&5
10789   (exit $ac_status); }; }; then
10790   break
10791 else
10792   echo "$as_me: failed program was:" >&5
10793 cat conftest.$ac_ext >&5
10794 fi
10795 rm -f conftest.$ac_objext conftest.$ac_ext
10796   cat >conftest.$ac_ext <<_ACEOF
10797 #line 10797 "configure"
10798 #include "confdefs.h"
10799 #define _LARGE_FILES 1
10800 #include <sys/types.h>
10801  /* Check that off_t can represent 2**63 - 1 correctly.
10802     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10803     since some C++ compilers masquerading as C compilers
10804     incorrectly reject 9223372036854775807.  */
10805 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10806   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10807                        && LARGE_OFF_T % 2147483647 == 1)
10808                       ? 1 : -1];
10809 int
10810 main ()
10811 {
10812
10813   ;
10814   return 0;
10815 }
10816 _ACEOF
10817 rm -f conftest.$ac_objext
10818 if { (eval echo "$as_me:10818: \"$ac_compile\"") >&5
10819   (eval $ac_compile) 2>&5
10820   ac_status=$?
10821   echo "$as_me:10821: \$? = $ac_status" >&5
10822   (exit $ac_status); } &&
10823          { ac_try='test -s conftest.$ac_objext'
10824   { (eval echo "$as_me:10824: \"$ac_try\"") >&5
10825   (eval $ac_try) 2>&5
10826   ac_status=$?
10827   echo "$as_me:10827: \$? = $ac_status" >&5
10828   (exit $ac_status); }; }; then
10829   ac_cv_sys_large_files=1; break
10830 else
10831   echo "$as_me: failed program was:" >&5
10832 cat conftest.$ac_ext >&5
10833 fi
10834 rm -f conftest.$ac_objext conftest.$ac_ext
10835   break
10836 done
10837 fi
10838 echo "$as_me:10838: result: $ac_cv_sys_large_files" >&5
10839 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10840 if test "$ac_cv_sys_large_files" != no; then
10841
10842 cat >>confdefs.h <<EOF
10843 #define _LARGE_FILES $ac_cv_sys_large_files
10844 EOF
10845
10846 fi
10847 rm -rf conftest*
10848 fi
10849
10850         if test "$enable_largefile" != no ; then
10851         echo "$as_me:10851: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10852 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10853 if test "${ac_cv_sys_largefile_source+set}" = set; then
10854   echo $ECHO_N "(cached) $ECHO_C" >&6
10855 else
10856   while :; do
10857   ac_cv_sys_largefile_source=no
10858   cat >conftest.$ac_ext <<_ACEOF
10859 #line 10859 "configure"
10860 #include "confdefs.h"
10861 #include <stdio.h>
10862 int
10863 main ()
10864 {
10865 return !fseeko;
10866   ;
10867   return 0;
10868 }
10869 _ACEOF
10870 rm -f conftest.$ac_objext
10871 if { (eval echo "$as_me:10871: \"$ac_compile\"") >&5
10872   (eval $ac_compile) 2>&5
10873   ac_status=$?
10874   echo "$as_me:10874: \$? = $ac_status" >&5
10875   (exit $ac_status); } &&
10876          { ac_try='test -s conftest.$ac_objext'
10877   { (eval echo "$as_me:10877: \"$ac_try\"") >&5
10878   (eval $ac_try) 2>&5
10879   ac_status=$?
10880   echo "$as_me:10880: \$? = $ac_status" >&5
10881   (exit $ac_status); }; }; then
10882   break
10883 else
10884   echo "$as_me: failed program was:" >&5
10885 cat conftest.$ac_ext >&5
10886 fi
10887 rm -f conftest.$ac_objext conftest.$ac_ext
10888   cat >conftest.$ac_ext <<_ACEOF
10889 #line 10889 "configure"
10890 #include "confdefs.h"
10891 #define _LARGEFILE_SOURCE 1
10892 #include <stdio.h>
10893 int
10894 main ()
10895 {
10896 return !fseeko;
10897   ;
10898   return 0;
10899 }
10900 _ACEOF
10901 rm -f conftest.$ac_objext
10902 if { (eval echo "$as_me:10902: \"$ac_compile\"") >&5
10903   (eval $ac_compile) 2>&5
10904   ac_status=$?
10905   echo "$as_me:10905: \$? = $ac_status" >&5
10906   (exit $ac_status); } &&
10907          { ac_try='test -s conftest.$ac_objext'
10908   { (eval echo "$as_me:10908: \"$ac_try\"") >&5
10909   (eval $ac_try) 2>&5
10910   ac_status=$?
10911   echo "$as_me:10911: \$? = $ac_status" >&5
10912   (exit $ac_status); }; }; then
10913   ac_cv_sys_largefile_source=1; break
10914 else
10915   echo "$as_me: failed program was:" >&5
10916 cat conftest.$ac_ext >&5
10917 fi
10918 rm -f conftest.$ac_objext conftest.$ac_ext
10919   break
10920 done
10921 fi
10922 echo "$as_me:10922: result: $ac_cv_sys_largefile_source" >&5
10923 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10924 if test "$ac_cv_sys_largefile_source" != no; then
10925
10926 cat >>confdefs.h <<EOF
10927 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10928 EOF
10929
10930 fi
10931 rm -rf conftest*
10932
10933 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10934 # in glibc 2.1.3, but that breaks too many other things.
10935 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10936 echo "$as_me:10936: checking for fseeko" >&5
10937 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10938 if test "${ac_cv_func_fseeko+set}" = set; then
10939   echo $ECHO_N "(cached) $ECHO_C" >&6
10940 else
10941   cat >conftest.$ac_ext <<_ACEOF
10942 #line 10942 "configure"
10943 #include "confdefs.h"
10944 #include <stdio.h>
10945 int
10946 main ()
10947 {
10948 return fseeko && fseeko (stdin, 0, 0);
10949   ;
10950   return 0;
10951 }
10952 _ACEOF
10953 rm -f conftest.$ac_objext conftest$ac_exeext
10954 if { (eval echo "$as_me:10954: \"$ac_link\"") >&5
10955   (eval $ac_link) 2>&5
10956   ac_status=$?
10957   echo "$as_me:10957: \$? = $ac_status" >&5
10958   (exit $ac_status); } &&
10959          { ac_try='test -s conftest$ac_exeext'
10960   { (eval echo "$as_me:10960: \"$ac_try\"") >&5
10961   (eval $ac_try) 2>&5
10962   ac_status=$?
10963   echo "$as_me:10963: \$? = $ac_status" >&5
10964   (exit $ac_status); }; }; then
10965   ac_cv_func_fseeko=yes
10966 else
10967   echo "$as_me: failed program was:" >&5
10968 cat conftest.$ac_ext >&5
10969 ac_cv_func_fseeko=no
10970 fi
10971 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10972 fi
10973 echo "$as_me:10973: result: $ac_cv_func_fseeko" >&5
10974 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10975 if test $ac_cv_func_fseeko = yes; then
10976
10977 cat >>confdefs.h <<\EOF
10978 #define HAVE_FSEEKO 1
10979 EOF
10980
10981 fi
10982
10983         # Normally we would collect these definitions in the config.h,
10984         # but (like _XOPEN_SOURCE), some environments rely on having these
10985         # defined before any of the system headers are included.  Another
10986         # case comes up with C++, e.g., on AIX the compiler compiles the
10987         # header files by themselves before looking at the body files it is
10988         # told to compile.  For ncurses, those header files do not include
10989         # the config.h
10990         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10991         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10992         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10993
10994         echo "$as_me:10994: checking whether to use struct dirent64" >&5
10995 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10996 if test "${cf_cv_struct_dirent64+set}" = set; then
10997   echo $ECHO_N "(cached) $ECHO_C" >&6
10998 else
10999
11000                 cat >conftest.$ac_ext <<_ACEOF
11001 #line 11001 "configure"
11002 #include "confdefs.h"
11003
11004 #include <sys/types.h>
11005 #include <dirent.h>
11006
11007 int
11008 main ()
11009 {
11010
11011                 /* if transitional largefile support is setup, this is true */
11012                 extern struct dirent64 * readdir(DIR *);
11013                 struct dirent64 *x = readdir((DIR *)0);
11014                 struct dirent *y = readdir((DIR *)0);
11015                 int z = x - y;
11016
11017   ;
11018   return 0;
11019 }
11020 _ACEOF
11021 rm -f conftest.$ac_objext
11022 if { (eval echo "$as_me:11022: \"$ac_compile\"") >&5
11023   (eval $ac_compile) 2>&5
11024   ac_status=$?
11025   echo "$as_me:11025: \$? = $ac_status" >&5
11026   (exit $ac_status); } &&
11027          { ac_try='test -s conftest.$ac_objext'
11028   { (eval echo "$as_me:11028: \"$ac_try\"") >&5
11029   (eval $ac_try) 2>&5
11030   ac_status=$?
11031   echo "$as_me:11031: \$? = $ac_status" >&5
11032   (exit $ac_status); }; }; then
11033   cf_cv_struct_dirent64=yes
11034 else
11035   echo "$as_me: failed program was:" >&5
11036 cat conftest.$ac_ext >&5
11037 cf_cv_struct_dirent64=no
11038 fi
11039 rm -f conftest.$ac_objext conftest.$ac_ext
11040
11041 fi
11042 echo "$as_me:11042: result: $cf_cv_struct_dirent64" >&5
11043 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11044         test "$cf_cv_struct_dirent64" = yes &&
11045 cat >>confdefs.h <<\EOF
11046 #define HAVE_STRUCT_DIRENT64 1
11047 EOF
11048
11049         fi
11050
11051 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
11052 echo "$as_me:11052: checking if you want tparm not to use X/Open fixed-parameter list" >&5
11053 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
11054
11055 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
11056 if test "${enable_tparm_varargs+set}" = set; then
11057   enableval="$enable_tparm_varargs"
11058   with_tparm_varargs=$enableval
11059 else
11060   with_tparm_varargs=yes
11061 fi;
11062 echo "$as_me:11062: result: $with_tparm_varargs" >&5
11063 echo "${ECHO_T}$with_tparm_varargs" >&6
11064 NCURSES_TPARM_VARARGS=0
11065 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
11066
11067 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
11068 if test "$with_ticlib" != no ; then
11069 echo "$as_me:11069: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
11070 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
11071
11072 # Check whether --enable-tic-depends or --disable-tic-depends was given.
11073 if test "${enable_tic_depends+set}" = set; then
11074   enableval="$enable_tic_depends"
11075   with_tic_depends=$enableval
11076 else
11077   with_tic_depends=yes
11078 fi;
11079 echo "$as_me:11079: result: $with_tic_depends" >&5
11080 echo "${ECHO_T}$with_tic_depends" >&6
11081 else
11082         with_tic_depends=no
11083 fi
11084
11085 ###   use option --with-bool to override bool's type
11086 echo "$as_me:11086: checking for type of bool" >&5
11087 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
11088
11089 # Check whether --with-bool or --without-bool was given.
11090 if test "${with_bool+set}" = set; then
11091   withval="$with_bool"
11092   NCURSES_BOOL="$withval"
11093 else
11094   NCURSES_BOOL=auto
11095 fi;
11096 echo "$as_me:11096: result: $NCURSES_BOOL" >&5
11097 echo "${ECHO_T}$NCURSES_BOOL" >&6
11098
11099 echo "$as_me:11099: checking for alternate terminal capabilities file" >&5
11100 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
11101
11102 # Check whether --with-caps or --without-caps was given.
11103 if test "${with_caps+set}" = set; then
11104   withval="$with_caps"
11105   TERMINFO_CAPS=Caps.$withval
11106 else
11107   TERMINFO_CAPS=Caps
11108 fi;
11109 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
11110 echo "$as_me:11110: result: $TERMINFO_CAPS" >&5
11111 echo "${ECHO_T}$TERMINFO_CAPS" >&6
11112
11113 ###   use option --with-chtype to override chtype's type
11114 echo "$as_me:11114: checking for type of chtype" >&5
11115 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11116
11117 # Check whether --with-chtype or --without-chtype was given.
11118 if test "${with_chtype+set}" = set; then
11119   withval="$with_chtype"
11120   NCURSES_CHTYPE="$withval"
11121 else
11122   NCURSES_CHTYPE=$cf_dft_chtype
11123 fi;
11124 echo "$as_me:11124: result: $NCURSES_CHTYPE" >&5
11125 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
11126
11127 ###   use option --with-ospeed to override ospeed's type
11128 echo "$as_me:11128: checking for type of ospeed" >&5
11129 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
11130
11131 # Check whether --with-ospeed or --without-ospeed was given.
11132 if test "${with_ospeed+set}" = set; then
11133   withval="$with_ospeed"
11134   NCURSES_OSPEED="$withval"
11135 else
11136   NCURSES_OSPEED=short
11137 fi;
11138 echo "$as_me:11138: result: $NCURSES_OSPEED" >&5
11139 echo "${ECHO_T}$NCURSES_OSPEED" >&6
11140
11141 ###   use option --with-mmask-t to override mmask_t's type
11142 echo "$as_me:11142: checking for type of mmask_t" >&5
11143 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
11144
11145 # Check whether --with-mmask-t or --without-mmask-t was given.
11146 if test "${with_mmask_t+set}" = set; then
11147   withval="$with_mmask_t"
11148   NCURSES_MMASK_T="$withval"
11149 else
11150   NCURSES_MMASK_T=$cf_dft_mmask_t
11151 fi;
11152 echo "$as_me:11152: result: $NCURSES_MMASK_T" >&5
11153 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
11154
11155 ###   use option --with-ccharw-max to override CCHARW_MAX size
11156 echo "$as_me:11156: checking for size CCHARW_MAX" >&5
11157 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
11158
11159 # Check whether --with-ccharw-max or --without-ccharw-max was given.
11160 if test "${with_ccharw_max+set}" = set; then
11161   withval="$with_ccharw_max"
11162   NCURSES_CCHARW_MAX="$withval"
11163 else
11164   NCURSES_CCHARW_MAX=5
11165 fi;
11166 echo "$as_me:11166: result: $NCURSES_CCHARW_MAX" >&5
11167 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
11168
11169 ###   use option --with-tparm-arg to override tparm's argument type
11170 echo "$as_me:11170: checking for type of tparm args" >&5
11171 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
11172
11173 # Check whether --with-tparm-arg or --without-tparm-arg was given.
11174 if test "${with_tparm_arg+set}" = set; then
11175   withval="$with_tparm_arg"
11176   NCURSES_TPARM_ARG="$withval"
11177 else
11178   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
11179 fi;
11180 echo "$as_me:11180: result: $NCURSES_TPARM_ARG" >&5
11181 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
11182
11183 ### Enable compiling-in rcs id's
11184 echo "$as_me:11184: checking if RCS identifiers should be compiled-in" >&5
11185 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11186
11187 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11188 if test "${with_rcs_ids+set}" = set; then
11189   withval="$with_rcs_ids"
11190   with_rcs_ids=$withval
11191 else
11192   with_rcs_ids=no
11193 fi;
11194 echo "$as_me:11194: result: $with_rcs_ids" >&5
11195 echo "${ECHO_T}$with_rcs_ids" >&6
11196 test "x$with_rcs_ids" = xyes &&
11197 cat >>confdefs.h <<\EOF
11198 #define USE_RCS_IDS 1
11199 EOF
11200
11201 ###############################################################################
11202
11203 echo "$as_me:11203: checking format of man-pages" >&5
11204 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
11205
11206 # Check whether --with-manpage-format or --without-manpage-format was given.
11207 if test "${with_manpage_format+set}" = set; then
11208   withval="$with_manpage_format"
11209   MANPAGE_FORMAT=$withval
11210 else
11211   MANPAGE_FORMAT=unknown
11212 fi;
11213
11214 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
11215 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
11216
11217 cf_unknown=
11218
11219 case $MANPAGE_FORMAT in
11220 (unknown)
11221         if test -z "$MANPATH" ; then
11222                 MANPATH="/usr/man:/usr/share/man"
11223         fi
11224
11225         # look for the 'date' man-page (it's most likely to be installed!)
11226         MANPAGE_FORMAT=
11227         cf_preform=no
11228         cf_catonly=yes
11229         cf_example=date
11230
11231         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11232         for cf_dir in $MANPATH; do
11233                 test -z "$cf_dir" && cf_dir=/usr/man
11234                 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
11235                 do
11236                         cf_test=`echo $cf_name | sed -e 's/*//'`
11237                         if test "x$cf_test" = "x$cf_name" ; then
11238
11239                                 case "$cf_name" in
11240                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11241                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11242                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11243                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11244                                 esac
11245
11246                                 case "$cf_name" in
11247                                 ($cf_dir/man*)
11248                                         cf_catonly=no
11249                                         ;;
11250                                 ($cf_dir/cat*)
11251                                         cf_preform=yes
11252                                         ;;
11253                                 esac
11254                                 break
11255                         fi
11256
11257                         # if we found a match in either man* or cat*, stop looking
11258                         if test -n "$MANPAGE_FORMAT" ; then
11259                                 cf_found=no
11260                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11261                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11262                                 case "$cf_name" in
11263                                 ($cf_dir/cat*)
11264                                         cf_found=yes
11265                                         ;;
11266                                 esac
11267                                 test $cf_found=yes && break
11268                         fi
11269                 done
11270                 # only check the first directory in $MANPATH where we find manpages
11271                 if test -n "$MANPAGE_FORMAT" ; then
11272                         break
11273                 fi
11274         done
11275         # if we did not find the example, just assume it is normal
11276         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11277         IFS="$ac_save_ifs"
11278         ;;
11279 (*)
11280         for cf_option in $MANPAGE_FORMAT; do
11281         case $cf_option in
11282         (gzip|compress|BSDI|normal|formatted|catonly)
11283                 ;;
11284         (*)
11285                 cf_unknown="$cf_unknown $cf_option"
11286                 ;;
11287         esac
11288         done
11289         ;;
11290 esac
11291
11292 echo "$as_me:11292: result: $MANPAGE_FORMAT" >&5
11293 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11294 if test -n "$cf_unknown" ; then
11295         { echo "$as_me:11295: WARNING: Unexpected manpage-format $cf_unknown" >&5
11296 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11297 fi
11298
11299 echo "$as_me:11299: checking for manpage renaming" >&5
11300 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11301
11302 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11303 if test "${with_manpage_renames+set}" = set; then
11304   withval="$with_manpage_renames"
11305   MANPAGE_RENAMES=$withval
11306 else
11307   MANPAGE_RENAMES=yes
11308 fi;
11309
11310 case ".$MANPAGE_RENAMES" in
11311 (.no)
11312         ;;
11313 (.|.yes)
11314         # Debian 'man' program?
11315         if test -f /etc/debian_version ; then
11316                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11317         else
11318                 MANPAGE_RENAMES=no
11319         fi
11320         ;;
11321 esac
11322
11323 if test "$MANPAGE_RENAMES" != no ; then
11324         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11325                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11326         elif test ! -f $MANPAGE_RENAMES ; then
11327                 { { echo "$as_me:11327: error: not a filename: $MANPAGE_RENAMES" >&5
11328 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11329    { (exit 1); exit 1; }; }
11330         fi
11331
11332         test ! -d man && mkdir man
11333
11334         # Construct a sed-script to perform renaming within man-pages
11335         if test -n "$MANPAGE_RENAMES" ; then
11336                 test ! -d man && mkdir man
11337                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11338         fi
11339 fi
11340
11341 echo "$as_me:11341: result: $MANPAGE_RENAMES" >&5
11342 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11343
11344 echo "$as_me:11344: checking if manpage aliases will be installed" >&5
11345 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11346
11347 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11348 if test "${with_manpage_aliases+set}" = set; then
11349   withval="$with_manpage_aliases"
11350   MANPAGE_ALIASES=$withval
11351 else
11352   MANPAGE_ALIASES=yes
11353 fi;
11354
11355 echo "$as_me:11355: result: $MANPAGE_ALIASES" >&5
11356 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11357
11358 case "x$LN_S" in
11359 (xln*)
11360         cf_use_symlinks=yes
11361         ;;
11362 (*)
11363         cf_use_symlinks=no
11364         ;;
11365 esac
11366
11367 MANPAGE_SYMLINKS=no
11368 if test "$MANPAGE_ALIASES" = yes ; then
11369 echo "$as_me:11369: checking if manpage symlinks should be used" >&5
11370 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11371
11372 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11373 if test "${with_manpage_symlinks+set}" = set; then
11374   withval="$with_manpage_symlinks"
11375   MANPAGE_SYMLINKS=$withval
11376 else
11377   MANPAGE_SYMLINKS=$cf_use_symlinks
11378 fi;
11379
11380 if test "$$cf_use_symlinks" = no; then
11381 if test "$MANPAGE_SYMLINKS" = yes ; then
11382         { echo "$as_me:11382: WARNING: cannot make symlinks" >&5
11383 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11384         MANPAGE_SYMLINKS=no
11385 fi
11386 fi
11387
11388 echo "$as_me:11388: result: $MANPAGE_SYMLINKS" >&5
11389 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11390 fi
11391
11392 echo "$as_me:11392: checking for manpage tbl" >&5
11393 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11394
11395 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11396 if test "${with_manpage_tbl+set}" = set; then
11397   withval="$with_manpage_tbl"
11398   MANPAGE_TBL=$withval
11399 else
11400   MANPAGE_TBL=no
11401 fi;
11402
11403 echo "$as_me:11403: result: $MANPAGE_TBL" >&5
11404 echo "${ECHO_T}$MANPAGE_TBL" >&6
11405
11406 if test "$prefix" = "NONE" ; then
11407         cf_prefix="$ac_default_prefix"
11408 else
11409         cf_prefix="$prefix"
11410 fi
11411
11412 case "$MANPAGE_FORMAT" in
11413 (*catonly*)
11414         cf_format=yes
11415         cf_inboth=no
11416         ;;
11417 (*formatted*)
11418         cf_format=yes
11419         cf_inboth=yes
11420         ;;
11421 (*)
11422         cf_format=no
11423         cf_inboth=no
11424         ;;
11425 esac
11426
11427 test ! -d man && mkdir man
11428
11429 cf_so_strip=
11430 cf_compress=
11431 case "$MANPAGE_FORMAT" in
11432 (*compress*)
11433         cf_so_strip="Z"
11434         cf_compress=compress
11435         ;;
11436 (*gzip*)
11437         cf_so_strip="gz"
11438         cf_compress=gzip
11439         ;;
11440 esac
11441
11442 cf_edit_man=./edit_man.sh
11443 cf_man_alias=`pwd`/man_alias.sed
11444
11445 cat >$cf_edit_man <<CF_EOF
11446 #! $SHELL
11447 # this script is generated by the configure-script CF_MAN_PAGES macro.
11448
11449 prefix="$cf_prefix"
11450 datarootdir="$datarootdir"
11451 datadir="$datadir"
11452
11453 NCURSES_MAJOR="$NCURSES_MAJOR"
11454 NCURSES_MINOR="$NCURSES_MINOR"
11455 NCURSES_PATCH="$NCURSES_PATCH"
11456
11457 NCURSES_OSPEED="$NCURSES_OSPEED"
11458 TERMINFO="$TERMINFO"
11459
11460 INSTALL="$INSTALL"
11461 INSTALL_DATA="$INSTALL_DATA"
11462
11463 transform="$program_transform_name"
11464
11465 TMP=\${TMPDIR:=/tmp}/man\$\$
11466 trap "rm -f \$TMP" 0 1 2 5 15
11467
11468 form=\$1
11469 shift || exit 1
11470
11471 verb=\$1
11472 shift || exit 1
11473
11474 mandir=\$1
11475 shift || exit 1
11476
11477 srcdir=\$1
11478 top_srcdir=\$srcdir/..
11479 shift || exit 1
11480
11481 if test "\$form" = normal ; then
11482         if test "$cf_format" = yes ; then
11483         if test "$cf_inboth" = no ; then
11484                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11485                 exit $?
11486         fi
11487         fi
11488         cf_subdir=\$mandir/man
11489         cf_tables=$MANPAGE_TBL
11490 else
11491         cf_subdir=\$mandir/cat
11492         cf_tables=yes
11493 fi
11494
11495 # process the list of source-files
11496 for i in \$* ; do
11497 case \$i in
11498 (*.orig|*.rej) ;;
11499 (*.[0-9]*)
11500         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11501         if test \$verb = installing ; then
11502         if test ! -d \$cf_subdir\${section} ; then
11503                 mkdir -p \$cf_subdir\$section
11504         fi
11505         fi
11506
11507         # replace variables in man page
11508         if test ! -f $cf_man_alias ; then
11509 cat >>$cf_man_alias <<-CF_EOF2
11510                 s,@DATADIR@,\$datadir,g
11511                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11512                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11513                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11514                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11515                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11516                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11517 CF_EOF
11518
11519         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
11520         do
11521                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11522                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11523 cat >>$cf_edit_man <<-CF_EOF
11524                 s,@$cf_NAME@,$cf_name,g
11525 CF_EOF
11526         done
11527
11528 cat >>$cf_edit_man <<CF_EOF
11529 CF_EOF2
11530                 echo "...made $cf_man_alias"
11531         fi
11532
11533         aliases=
11534         cf_source=\`basename \$i\`
11535         inalias=\$cf_source
11536         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11537         if test ! -f \$inalias ; then
11538                 echo .. skipped \$cf_source
11539                 continue
11540         fi
11541 CF_EOF
11542
11543 if test "$MANPAGE_ALIASES" != no ; then
11544 cat >>$cf_edit_man <<CF_EOF
11545         nCurses=ignore.3x
11546         test $with_curses_h = yes && nCurses=ncurses.3x
11547         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11548 CF_EOF
11549 fi
11550
11551 if test "$MANPAGE_RENAMES" = no ; then
11552 cat >>$cf_edit_man <<CF_EOF
11553         # perform program transformations for section 1 man pages
11554         if test \$section = 1 ; then
11555                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11556         else
11557                 cf_target=\$cf_subdir\${section}/\$cf_source
11558         fi
11559 CF_EOF
11560 else
11561 cat >>$cf_edit_man <<CF_EOF
11562         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11563         if test -z "\$cf_target" ; then
11564                 echo '? missing rename for '\$cf_source
11565                 cf_target="\$cf_source"
11566         fi
11567         cf_target="\$cf_subdir\${section}/\${cf_target}"
11568
11569 CF_EOF
11570 fi
11571
11572 cat >>$cf_edit_man <<CF_EOF
11573         sed     -f $cf_man_alias \\
11574 CF_EOF
11575
11576 if test -f $MANPAGE_RENAMES ; then
11577 cat >>$cf_edit_man <<CF_EOF
11578                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11579 CF_EOF
11580 else
11581 cat >>$cf_edit_man <<CF_EOF
11582                 < \$i >\$TMP
11583 CF_EOF
11584 fi
11585
11586 cat >>$cf_edit_man <<CF_EOF
11587 if test \$cf_tables = yes ; then
11588         tbl \$TMP >\$TMP.out
11589         mv \$TMP.out \$TMP
11590 fi
11591 CF_EOF
11592
11593 if test $with_overwrite != yes ; then
11594 cat >>$cf_edit_man <<CF_EOF
11595         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11596         mv \$TMP.out \$TMP
11597 CF_EOF
11598 fi
11599
11600 if test $with_curses_h != yes ; then
11601 cat >>$cf_edit_man <<CF_EOF
11602         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11603         mv \$TMP.out \$TMP
11604 CF_EOF
11605 fi
11606
11607 cat >>$cf_edit_man <<CF_EOF
11608         if test \$form = format ; then
11609                 nroff -man \$TMP >\$TMP.out
11610                 mv \$TMP.out \$TMP
11611         fi
11612 CF_EOF
11613
11614 if test -n "$cf_compress" ; then
11615 cat >>$cf_edit_man <<CF_EOF
11616         if test \$verb = installing ; then
11617         if ( $cf_compress -f \$TMP )
11618         then
11619                 mv \$TMP.$cf_so_strip \$TMP
11620         fi
11621         fi
11622         cf_target="\$cf_target.$cf_so_strip"
11623 CF_EOF
11624 fi
11625
11626 case "$MANPAGE_FORMAT" in
11627 (*BSDI*)
11628 cat >>$cf_edit_man <<CF_EOF
11629         if test \$form = format ; then
11630                 # BSDI installs only .0 suffixes in the cat directories
11631                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11632         fi
11633 CF_EOF
11634   ;;
11635 esac
11636
11637 cat >>$cf_edit_man <<CF_EOF
11638         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11639         if test \$verb = installing ; then
11640                 echo \$verb \$cf_target
11641                 \$INSTALL_DATA \$TMP \$cf_target
11642                 test -d \$cf_subdir\${section} &&
11643                 test -n "\$aliases" && (
11644                         cd \$cf_subdir\${section} && (
11645                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11646                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11647                                 cf_target=\`basename \$cf_target\`
11648                                 for cf_alias in \$aliases
11649                                 do
11650                                         if test \$section = 1 ; then
11651                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11652                                         fi
11653
11654                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11655                                                 if test -f \$cf_alias\${suffix} ; then
11656                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11657                                                         then
11658                                                                 continue
11659                                                         fi
11660                                                 fi
11661                                                 echo .. \$verb alias \$cf_alias\${suffix}
11662 CF_EOF
11663 case "x$LN_S" in
11664 (*-f)
11665 cat >>$cf_edit_man <<CF_EOF
11666                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11667 CF_EOF
11668         ;;
11669 (*)
11670 cat >>$cf_edit_man <<CF_EOF
11671                                                 rm -f \$cf_alias\${suffix}
11672                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11673 CF_EOF
11674         ;;
11675 esac
11676 cat >>$cf_edit_man <<CF_EOF
11677                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11678                                                 echo ".so \$cf_source" >\$TMP
11679 CF_EOF
11680 if test -n "$cf_compress" ; then
11681 cat >>$cf_edit_man <<CF_EOF
11682                                                 if test -n "$cf_so_strip" ; then
11683                                                         $cf_compress -f \$TMP
11684                                                         mv \$TMP.$cf_so_strip \$TMP
11685                                                 fi
11686 CF_EOF
11687 fi
11688 cat >>$cf_edit_man <<CF_EOF
11689                                                 echo .. \$verb alias \$cf_alias\${suffix}
11690                                                 rm -f \$cf_alias\${suffix}
11691                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11692                                         fi
11693                                 done
11694                         )
11695                 )
11696         elif test \$verb = removing ; then
11697                 test -f \$cf_target && (
11698                         echo \$verb \$cf_target
11699                         rm -f \$cf_target
11700                 )
11701                 test -d \$cf_subdir\${section} &&
11702                 test -n "\$aliases" && (
11703                         cd \$cf_subdir\${section} && (
11704                                 for cf_alias in \$aliases
11705                                 do
11706                                         if test \$section = 1 ; then
11707                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11708                                         fi
11709
11710                                         echo .. \$verb alias \$cf_alias\${suffix}
11711                                         rm -f \$cf_alias\${suffix}
11712                                 done
11713                         )
11714                 )
11715         else
11716 #               echo ".hy 0"
11717                 cat \$TMP
11718         fi
11719         ;;
11720 esac
11721 done
11722
11723 if test $cf_inboth = yes ; then
11724 if test \$form != format ; then
11725         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11726 fi
11727 fi
11728
11729 exit 0
11730 CF_EOF
11731 chmod 755 $cf_edit_man
11732
11733 ###############################################################################
11734
11735 ### Note that some functions (such as const) are normally disabled anyway.
11736 echo "$as_me:11736: checking if you want to build with function extensions" >&5
11737 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11738
11739 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11740 if test "${enable_ext_funcs+set}" = set; then
11741   enableval="$enable_ext_funcs"
11742   with_ext_funcs=$enableval
11743 else
11744   with_ext_funcs=yes
11745 fi;
11746 echo "$as_me:11746: result: $with_ext_funcs" >&5
11747 echo "${ECHO_T}$with_ext_funcs" >&6
11748 if test "x$with_ext_funcs" = xyes ; then
11749         NCURSES_EXT_FUNCS=1
11750
11751 cat >>confdefs.h <<\EOF
11752 #define HAVE_ASSUME_DEFAULT_COLORS 1
11753 EOF
11754
11755 cat >>confdefs.h <<\EOF
11756 #define HAVE_CURSES_VERSION 1
11757 EOF
11758
11759 cat >>confdefs.h <<\EOF
11760 #define HAVE_HAS_KEY 1
11761 EOF
11762
11763 cat >>confdefs.h <<\EOF
11764 #define HAVE_RESIZETERM 1
11765 EOF
11766
11767 cat >>confdefs.h <<\EOF
11768 #define HAVE_RESIZE_TERM 1
11769 EOF
11770
11771 cat >>confdefs.h <<\EOF
11772 #define HAVE_TERM_ENTRY_H 1
11773 EOF
11774
11775 cat >>confdefs.h <<\EOF
11776 #define HAVE_USE_DEFAULT_COLORS 1
11777 EOF
11778
11779 cat >>confdefs.h <<\EOF
11780 #define HAVE_USE_EXTENDED_NAMES 1
11781 EOF
11782
11783 cat >>confdefs.h <<\EOF
11784 #define HAVE_USE_SCREEN 1
11785 EOF
11786
11787 cat >>confdefs.h <<\EOF
11788 #define HAVE_USE_WINDOW 1
11789 EOF
11790
11791 cat >>confdefs.h <<\EOF
11792 #define HAVE_WRESIZE 1
11793 EOF
11794
11795 cat >>confdefs.h <<\EOF
11796 #define NCURSES_EXT_FUNCS 1
11797 EOF
11798
11799         GENERATED_EXT_FUNCS=generated
11800 else
11801         NCURSES_EXT_FUNCS=0
11802         GENERATED_EXT_FUNCS=
11803 fi
11804
11805 echo "$as_me:11805: checking if you want to build with SCREEN extensions" >&5
11806 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
11807
11808 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11809 if test "${enable_sp_funcs+set}" = set; then
11810   enableval="$enable_sp_funcs"
11811   with_sp_funcs=$enableval
11812 else
11813   with_sp_funcs=$cf_dft_ext_spfuncs
11814 fi;
11815 echo "$as_me:11815: result: $with_sp_funcs" >&5
11816 echo "${ECHO_T}$with_sp_funcs" >&6
11817 if test "x$with_sp_funcs" = xyes ; then
11818         NCURSES_SP_FUNCS=1
11819
11820 cat >>confdefs.h <<\EOF
11821 #define NCURSES_SP_FUNCS 1
11822 EOF
11823
11824         GENERATED_SP_FUNCS=generated
11825 else
11826         NCURSES_SP_FUNCS=0
11827         GENERATED_SP_FUNCS=
11828 fi
11829
11830 echo "$as_me:11830: checking if you want to build with terminal-driver" >&5
11831 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
11832
11833 # Check whether --enable-term-driver or --disable-term-driver was given.
11834 if test "${enable_term_driver+set}" = set; then
11835   enableval="$enable_term_driver"
11836   with_term_driver=$enableval
11837 else
11838   with_term_driver=no
11839 fi;
11840 echo "$as_me:11840: result: $with_term_driver" >&5
11841 echo "${ECHO_T}$with_term_driver" >&6
11842 if test "x$with_term_driver" = xyes ; then
11843
11844 cat >>confdefs.h <<\EOF
11845 #define USE_TERM_DRIVER 1
11846 EOF
11847
11848         if test "x$with_termlib" != xno ; then
11849                 { { echo "$as_me:11849: error: The term-driver option conflicts with the termlib option" >&5
11850 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
11851    { (exit 1); exit 1; }; }
11852         fi
11853         if test "x$with_sp_funcs" != xyes ; then
11854                 { { echo "$as_me:11854: error: The term-driver option relies upon sp-funcs" >&5
11855 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11856    { (exit 1); exit 1; }; }
11857         fi
11858 fi
11859
11860 ###   use option --enable-const to turn on use of const beyond that in XSI.
11861 echo "$as_me:11861: checking for extended use of const keyword" >&5
11862 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11863
11864 # Check whether --enable-const or --disable-const was given.
11865 if test "${enable_const+set}" = set; then
11866   enableval="$enable_const"
11867   with_ext_const=$enableval
11868 else
11869   with_ext_const=$cf_dft_ext_const
11870 fi;
11871 echo "$as_me:11871: result: $with_ext_const" >&5
11872 echo "${ECHO_T}$with_ext_const" >&6
11873 NCURSES_CONST='/*nothing*/'
11874 if test "x$with_ext_const" = xyes ; then
11875         NCURSES_CONST=const
11876 fi
11877
11878 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11879 echo "$as_me:11879: checking if you want to use extended colors" >&5
11880 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11881
11882 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11883 if test "${enable_ext_colors+set}" = set; then
11884   enableval="$enable_ext_colors"
11885   with_ext_colors=$enableval
11886 else
11887   with_ext_colors=$cf_dft_ext_colors
11888 fi;
11889 echo "$as_me:11889: result: $with_ext_colors" >&5
11890 echo "${ECHO_T}$with_ext_colors" >&6
11891 NCURSES_EXT_COLORS=0
11892 if test "x$with_ext_colors" = xyes ; then
11893         if test "x$with_widec" != xyes ; then
11894                 { echo "$as_me:11894: WARNING: This option applies only to wide-character library" >&5
11895 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
11896         else
11897                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11898
11899 if test "${with_abi_version+set}" != set; then
11900         case $cf_cv_rel_version in
11901         (5.*)
11902                 cf_cv_rel_version=6.0
11903                 cf_cv_abi_version=6
11904                 { echo "$as_me:11904: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11905 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11906                 ;;
11907         esac
11908 fi
11909
11910                 NCURSES_EXT_COLORS=1
11911
11912 cat >>confdefs.h <<\EOF
11913 #define NCURSES_EXT_COLORS 1
11914 EOF
11915
11916         fi
11917 fi
11918
11919 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11920 echo "$as_me:11920: checking if you want to use extended mouse encoding" >&5
11921 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11922
11923 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11924 if test "${enable_ext_mouse+set}" = set; then
11925   enableval="$enable_ext_mouse"
11926   with_ext_mouse=$enableval
11927 else
11928   with_ext_mouse=$cf_dft_ext_mouse
11929 fi;
11930 echo "$as_me:11930: result: $with_ext_mouse" >&5
11931 echo "${ECHO_T}$with_ext_mouse" >&6
11932 NCURSES_MOUSE_VERSION=1
11933 if test "x$with_ext_mouse" = xyes ; then
11934         NCURSES_MOUSE_VERSION=2
11935
11936 if test "${with_abi_version+set}" != set; then
11937         case $cf_cv_rel_version in
11938         (5.*)
11939                 cf_cv_rel_version=6.0
11940                 cf_cv_abi_version=6
11941                 { echo "$as_me:11941: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11942 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11943                 ;;
11944         esac
11945 fi
11946
11947 fi
11948
11949 ###   use option --enable-ext-putwin to turn on extended screendumps
11950 echo "$as_me:11950: checking if you want to use extended putwin/screendump" >&5
11951 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
11952
11953 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
11954 if test "${enable_ext_putwin+set}" = set; then
11955   enableval="$enable_ext_putwin"
11956   with_ext_putwin=$enableval
11957 else
11958   with_ext_putwin=$cf_dft_ext_putwin
11959 fi;
11960 echo "$as_me:11960: result: $with_ext_putwin" >&5
11961 echo "${ECHO_T}$with_ext_putwin" >&6
11962 if test "x$with_ext_putwin" = xyes ; then
11963
11964 cat >>confdefs.h <<\EOF
11965 #define NCURSES_EXT_PUTWIN 1
11966 EOF
11967
11968 fi
11969
11970 echo "$as_me:11970: checking if you want \$NCURSES_NO_PADDING code" >&5
11971 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11972
11973 # Check whether --enable-no-padding or --disable-no-padding was given.
11974 if test "${enable_no_padding+set}" = set; then
11975   enableval="$enable_no_padding"
11976   with_no_padding=$enableval
11977 else
11978   with_no_padding=$with_ext_funcs
11979 fi;
11980 echo "$as_me:11980: result: $with_no_padding" >&5
11981 echo "${ECHO_T}$with_no_padding" >&6
11982 test "x$with_no_padding" = xyes &&
11983 cat >>confdefs.h <<\EOF
11984 #define NCURSES_NO_PADDING 1
11985 EOF
11986
11987 echo "$as_me:11987: checking for ANSI C header files" >&5
11988 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11989 if test "${ac_cv_header_stdc+set}" = set; then
11990   echo $ECHO_N "(cached) $ECHO_C" >&6
11991 else
11992   cat >conftest.$ac_ext <<_ACEOF
11993 #line 11993 "configure"
11994 #include "confdefs.h"
11995 #include <stdlib.h>
11996 #include <stdarg.h>
11997 #include <string.h>
11998 #include <float.h>
11999
12000 _ACEOF
12001 if { (eval echo "$as_me:12001: \"$ac_cpp conftest.$ac_ext\"") >&5
12002   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12003   ac_status=$?
12004   egrep -v '^ *\+' conftest.er1 >conftest.err
12005   rm -f conftest.er1
12006   cat conftest.err >&5
12007   echo "$as_me:12007: \$? = $ac_status" >&5
12008   (exit $ac_status); } >/dev/null; then
12009   if test -s conftest.err; then
12010     ac_cpp_err=$ac_c_preproc_warn_flag
12011   else
12012     ac_cpp_err=
12013   fi
12014 else
12015   ac_cpp_err=yes
12016 fi
12017 if test -z "$ac_cpp_err"; then
12018   ac_cv_header_stdc=yes
12019 else
12020   echo "$as_me: failed program was:" >&5
12021   cat conftest.$ac_ext >&5
12022   ac_cv_header_stdc=no
12023 fi
12024 rm -f conftest.err conftest.$ac_ext
12025
12026 if test $ac_cv_header_stdc = yes; then
12027   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12028   cat >conftest.$ac_ext <<_ACEOF
12029 #line 12029 "configure"
12030 #include "confdefs.h"
12031 #include <string.h>
12032
12033 _ACEOF
12034 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12035   egrep "memchr" >/dev/null 2>&1; then
12036   :
12037 else
12038   ac_cv_header_stdc=no
12039 fi
12040 rm -rf conftest*
12041
12042 fi
12043
12044 if test $ac_cv_header_stdc = yes; then
12045   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12046   cat >conftest.$ac_ext <<_ACEOF
12047 #line 12047 "configure"
12048 #include "confdefs.h"
12049 #include <stdlib.h>
12050
12051 _ACEOF
12052 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12053   egrep "free" >/dev/null 2>&1; then
12054   :
12055 else
12056   ac_cv_header_stdc=no
12057 fi
12058 rm -rf conftest*
12059
12060 fi
12061
12062 if test $ac_cv_header_stdc = yes; then
12063   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12064   if test "$cross_compiling" = yes; then
12065   :
12066 else
12067   cat >conftest.$ac_ext <<_ACEOF
12068 #line 12068 "configure"
12069 #include "confdefs.h"
12070 #include <ctype.h>
12071 #if ((' ' & 0x0FF) == 0x020)
12072 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12073 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12074 #else
12075 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12076                      || ('j' <= (c) && (c) <= 'r') \
12077                      || ('s' <= (c) && (c) <= 'z'))
12078 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12079 #endif
12080
12081 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12082 int
12083 main ()
12084 {
12085   int i;
12086   for (i = 0; i < 256; i++)
12087     if (XOR (islower (i), ISLOWER (i))
12088         || toupper (i) != TOUPPER (i))
12089       $ac_main_return(2);
12090   $ac_main_return (0);
12091 }
12092 _ACEOF
12093 rm -f conftest$ac_exeext
12094 if { (eval echo "$as_me:12094: \"$ac_link\"") >&5
12095   (eval $ac_link) 2>&5
12096   ac_status=$?
12097   echo "$as_me:12097: \$? = $ac_status" >&5
12098   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12099   { (eval echo "$as_me:12099: \"$ac_try\"") >&5
12100   (eval $ac_try) 2>&5
12101   ac_status=$?
12102   echo "$as_me:12102: \$? = $ac_status" >&5
12103   (exit $ac_status); }; }; then
12104   :
12105 else
12106   echo "$as_me: program exited with status $ac_status" >&5
12107 echo "$as_me: failed program was:" >&5
12108 cat conftest.$ac_ext >&5
12109 ac_cv_header_stdc=no
12110 fi
12111 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12112 fi
12113 fi
12114 fi
12115 echo "$as_me:12115: result: $ac_cv_header_stdc" >&5
12116 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12117 if test $ac_cv_header_stdc = yes; then
12118
12119 cat >>confdefs.h <<\EOF
12120 #define STDC_HEADERS 1
12121 EOF
12122
12123 fi
12124
12125 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12126
12127 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12128                   inttypes.h stdint.h unistd.h
12129 do
12130 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12131 echo "$as_me:12131: checking for $ac_header" >&5
12132 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12133 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12134   echo $ECHO_N "(cached) $ECHO_C" >&6
12135 else
12136   cat >conftest.$ac_ext <<_ACEOF
12137 #line 12137 "configure"
12138 #include "confdefs.h"
12139 $ac_includes_default
12140 #include <$ac_header>
12141 _ACEOF
12142 rm -f conftest.$ac_objext
12143 if { (eval echo "$as_me:12143: \"$ac_compile\"") >&5
12144   (eval $ac_compile) 2>&5
12145   ac_status=$?
12146   echo "$as_me:12146: \$? = $ac_status" >&5
12147   (exit $ac_status); } &&
12148          { ac_try='test -s conftest.$ac_objext'
12149   { (eval echo "$as_me:12149: \"$ac_try\"") >&5
12150   (eval $ac_try) 2>&5
12151   ac_status=$?
12152   echo "$as_me:12152: \$? = $ac_status" >&5
12153   (exit $ac_status); }; }; then
12154   eval "$as_ac_Header=yes"
12155 else
12156   echo "$as_me: failed program was:" >&5
12157 cat conftest.$ac_ext >&5
12158 eval "$as_ac_Header=no"
12159 fi
12160 rm -f conftest.$ac_objext conftest.$ac_ext
12161 fi
12162 echo "$as_me:12162: result: `eval echo '${'$as_ac_Header'}'`" >&5
12163 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12164 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12165   cat >>confdefs.h <<EOF
12166 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12167 EOF
12168
12169 fi
12170 done
12171
12172 echo "$as_me:12172: checking for signed char" >&5
12173 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12174 if test "${ac_cv_type_signed_char+set}" = set; then
12175   echo $ECHO_N "(cached) $ECHO_C" >&6
12176 else
12177   cat >conftest.$ac_ext <<_ACEOF
12178 #line 12178 "configure"
12179 #include "confdefs.h"
12180 $ac_includes_default
12181 int
12182 main ()
12183 {
12184 if ((signed char *) 0)
12185   return 0;
12186 if (sizeof (signed char))
12187   return 0;
12188   ;
12189   return 0;
12190 }
12191 _ACEOF
12192 rm -f conftest.$ac_objext
12193 if { (eval echo "$as_me:12193: \"$ac_compile\"") >&5
12194   (eval $ac_compile) 2>&5
12195   ac_status=$?
12196   echo "$as_me:12196: \$? = $ac_status" >&5
12197   (exit $ac_status); } &&
12198          { ac_try='test -s conftest.$ac_objext'
12199   { (eval echo "$as_me:12199: \"$ac_try\"") >&5
12200   (eval $ac_try) 2>&5
12201   ac_status=$?
12202   echo "$as_me:12202: \$? = $ac_status" >&5
12203   (exit $ac_status); }; }; then
12204   ac_cv_type_signed_char=yes
12205 else
12206   echo "$as_me: failed program was:" >&5
12207 cat conftest.$ac_ext >&5
12208 ac_cv_type_signed_char=no
12209 fi
12210 rm -f conftest.$ac_objext conftest.$ac_ext
12211 fi
12212 echo "$as_me:12212: result: $ac_cv_type_signed_char" >&5
12213 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12214
12215 echo "$as_me:12215: checking size of signed char" >&5
12216 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12217 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12218   echo $ECHO_N "(cached) $ECHO_C" >&6
12219 else
12220   if test "$ac_cv_type_signed_char" = yes; then
12221   if test "$cross_compiling" = yes; then
12222   # Depending upon the size, compute the lo and hi bounds.
12223 cat >conftest.$ac_ext <<_ACEOF
12224 #line 12224 "configure"
12225 #include "confdefs.h"
12226 $ac_includes_default
12227 int
12228 main ()
12229 {
12230 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12231   ;
12232   return 0;
12233 }
12234 _ACEOF
12235 rm -f conftest.$ac_objext
12236 if { (eval echo "$as_me:12236: \"$ac_compile\"") >&5
12237   (eval $ac_compile) 2>&5
12238   ac_status=$?
12239   echo "$as_me:12239: \$? = $ac_status" >&5
12240   (exit $ac_status); } &&
12241          { ac_try='test -s conftest.$ac_objext'
12242   { (eval echo "$as_me:12242: \"$ac_try\"") >&5
12243   (eval $ac_try) 2>&5
12244   ac_status=$?
12245   echo "$as_me:12245: \$? = $ac_status" >&5
12246   (exit $ac_status); }; }; then
12247   ac_lo=0 ac_mid=0
12248   while :; do
12249     cat >conftest.$ac_ext <<_ACEOF
12250 #line 12250 "configure"
12251 #include "confdefs.h"
12252 $ac_includes_default
12253 int
12254 main ()
12255 {
12256 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12257   ;
12258   return 0;
12259 }
12260 _ACEOF
12261 rm -f conftest.$ac_objext
12262 if { (eval echo "$as_me:12262: \"$ac_compile\"") >&5
12263   (eval $ac_compile) 2>&5
12264   ac_status=$?
12265   echo "$as_me:12265: \$? = $ac_status" >&5
12266   (exit $ac_status); } &&
12267          { ac_try='test -s conftest.$ac_objext'
12268   { (eval echo "$as_me:12268: \"$ac_try\"") >&5
12269   (eval $ac_try) 2>&5
12270   ac_status=$?
12271   echo "$as_me:12271: \$? = $ac_status" >&5
12272   (exit $ac_status); }; }; then
12273   ac_hi=$ac_mid; break
12274 else
12275   echo "$as_me: failed program was:" >&5
12276 cat conftest.$ac_ext >&5
12277 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12278 fi
12279 rm -f conftest.$ac_objext conftest.$ac_ext
12280   done
12281 else
12282   echo "$as_me: failed program was:" >&5
12283 cat conftest.$ac_ext >&5
12284 ac_hi=-1 ac_mid=-1
12285   while :; do
12286     cat >conftest.$ac_ext <<_ACEOF
12287 #line 12287 "configure"
12288 #include "confdefs.h"
12289 $ac_includes_default
12290 int
12291 main ()
12292 {
12293 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12294   ;
12295   return 0;
12296 }
12297 _ACEOF
12298 rm -f conftest.$ac_objext
12299 if { (eval echo "$as_me:12299: \"$ac_compile\"") >&5
12300   (eval $ac_compile) 2>&5
12301   ac_status=$?
12302   echo "$as_me:12302: \$? = $ac_status" >&5
12303   (exit $ac_status); } &&
12304          { ac_try='test -s conftest.$ac_objext'
12305   { (eval echo "$as_me:12305: \"$ac_try\"") >&5
12306   (eval $ac_try) 2>&5
12307   ac_status=$?
12308   echo "$as_me:12308: \$? = $ac_status" >&5
12309   (exit $ac_status); }; }; then
12310   ac_lo=$ac_mid; break
12311 else
12312   echo "$as_me: failed program was:" >&5
12313 cat conftest.$ac_ext >&5
12314 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12315 fi
12316 rm -f conftest.$ac_objext conftest.$ac_ext
12317   done
12318 fi
12319 rm -f conftest.$ac_objext conftest.$ac_ext
12320 # Binary search between lo and hi bounds.
12321 while test "x$ac_lo" != "x$ac_hi"; do
12322   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12323   cat >conftest.$ac_ext <<_ACEOF
12324 #line 12324 "configure"
12325 #include "confdefs.h"
12326 $ac_includes_default
12327 int
12328 main ()
12329 {
12330 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12331   ;
12332   return 0;
12333 }
12334 _ACEOF
12335 rm -f conftest.$ac_objext
12336 if { (eval echo "$as_me:12336: \"$ac_compile\"") >&5
12337   (eval $ac_compile) 2>&5
12338   ac_status=$?
12339   echo "$as_me:12339: \$? = $ac_status" >&5
12340   (exit $ac_status); } &&
12341          { ac_try='test -s conftest.$ac_objext'
12342   { (eval echo "$as_me:12342: \"$ac_try\"") >&5
12343   (eval $ac_try) 2>&5
12344   ac_status=$?
12345   echo "$as_me:12345: \$? = $ac_status" >&5
12346   (exit $ac_status); }; }; then
12347   ac_hi=$ac_mid
12348 else
12349   echo "$as_me: failed program was:" >&5
12350 cat conftest.$ac_ext >&5
12351 ac_lo=`expr $ac_mid + 1`
12352 fi
12353 rm -f conftest.$ac_objext conftest.$ac_ext
12354 done
12355 ac_cv_sizeof_signed_char=$ac_lo
12356 else
12357   if test "$cross_compiling" = yes; then
12358   { { echo "$as_me:12358: error: cannot run test program while cross compiling" >&5
12359 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12360    { (exit 1); exit 1; }; }
12361 else
12362   cat >conftest.$ac_ext <<_ACEOF
12363 #line 12363 "configure"
12364 #include "confdefs.h"
12365 $ac_includes_default
12366 int
12367 main ()
12368 {
12369 FILE *f = fopen ("conftest.val", "w");
12370 if (!f)
12371   $ac_main_return (1);
12372 fprintf (f, "%d", (sizeof (signed char)));
12373 fclose (f);
12374   ;
12375   return 0;
12376 }
12377 _ACEOF
12378 rm -f conftest$ac_exeext
12379 if { (eval echo "$as_me:12379: \"$ac_link\"") >&5
12380   (eval $ac_link) 2>&5
12381   ac_status=$?
12382   echo "$as_me:12382: \$? = $ac_status" >&5
12383   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12384   { (eval echo "$as_me:12384: \"$ac_try\"") >&5
12385   (eval $ac_try) 2>&5
12386   ac_status=$?
12387   echo "$as_me:12387: \$? = $ac_status" >&5
12388   (exit $ac_status); }; }; then
12389   ac_cv_sizeof_signed_char=`cat conftest.val`
12390 else
12391   echo "$as_me: program exited with status $ac_status" >&5
12392 echo "$as_me: failed program was:" >&5
12393 cat conftest.$ac_ext >&5
12394 fi
12395 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12396 fi
12397 fi
12398 rm -f conftest.val
12399 else
12400   ac_cv_sizeof_signed_char=0
12401 fi
12402 fi
12403 echo "$as_me:12403: result: $ac_cv_sizeof_signed_char" >&5
12404 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12405 cat >>confdefs.h <<EOF
12406 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12407 EOF
12408
12409 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12410         NCURSES_SBOOL="signed char"
12411 else
12412         NCURSES_SBOOL="char"
12413 fi
12414 echo "$as_me:12414: checking if you want to use signed Boolean array in term.h" >&5
12415 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12416
12417 # Check whether --enable-signed-char or --disable-signed-char was given.
12418 if test "${enable_signed_char+set}" = set; then
12419   enableval="$enable_signed_char"
12420   with_signed_char=$enableval
12421 else
12422   with_signed_char=no
12423 fi;
12424 echo "$as_me:12424: result: $with_signed_char" >&5
12425 echo "${ECHO_T}$with_signed_char" >&6
12426 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12427
12428 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12429 echo "$as_me:12429: checking if you want SIGWINCH handler" >&5
12430 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12431
12432 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12433 if test "${enable_sigwinch+set}" = set; then
12434   enableval="$enable_sigwinch"
12435   with_sigwinch=$enableval
12436 else
12437   with_sigwinch=$with_ext_funcs
12438 fi;
12439 echo "$as_me:12439: result: $with_sigwinch" >&5
12440 echo "${ECHO_T}$with_sigwinch" >&6
12441 test "x$with_sigwinch" = xyes &&
12442 cat >>confdefs.h <<\EOF
12443 #define USE_SIGWINCH 1
12444 EOF
12445
12446 ###   use option --enable-tcap-names to allow user to define new capabilities
12447 echo "$as_me:12447: checking if you want user-definable terminal capabilities like termcap" >&5
12448 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12449
12450 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12451 if test "${enable_tcap_names+set}" = set; then
12452   enableval="$enable_tcap_names"
12453   with_tcap_names=$enableval
12454 else
12455   with_tcap_names=$with_ext_funcs
12456 fi;
12457 echo "$as_me:12457: result: $with_tcap_names" >&5
12458 echo "${ECHO_T}$with_tcap_names" >&6
12459 NCURSES_XNAMES=0
12460 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12461
12462 ###############################################################################
12463 # These options are relatively safe to experiment with.
12464
12465 echo "$as_me:12465: checking if you want all development code" >&5
12466 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12467
12468 # Check whether --with-develop or --without-develop was given.
12469 if test "${with_develop+set}" = set; then
12470   withval="$with_develop"
12471   with_develop=$withval
12472 else
12473   with_develop=no
12474 fi;
12475 echo "$as_me:12475: result: $with_develop" >&5
12476 echo "${ECHO_T}$with_develop" >&6
12477
12478 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12479 echo "$as_me:12479: checking if you want hard-tabs code" >&5
12480 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12481
12482 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12483 if test "${enable_hard_tabs+set}" = set; then
12484   enableval="$enable_hard_tabs"
12485
12486 else
12487   enable_hard_tabs=$with_develop
12488 fi;
12489 echo "$as_me:12489: result: $enable_hard_tabs" >&5
12490 echo "${ECHO_T}$enable_hard_tabs" >&6
12491 test "x$enable_hard_tabs" = xyes &&
12492 cat >>confdefs.h <<\EOF
12493 #define USE_HARD_TABS 1
12494 EOF
12495
12496 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12497 echo "$as_me:12497: checking if you want limited support for xmc" >&5
12498 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12499
12500 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12501 if test "${enable_xmc_glitch+set}" = set; then
12502   enableval="$enable_xmc_glitch"
12503
12504 else
12505   enable_xmc_glitch=$with_develop
12506 fi;
12507 echo "$as_me:12507: result: $enable_xmc_glitch" >&5
12508 echo "${ECHO_T}$enable_xmc_glitch" >&6
12509 test "x$enable_xmc_glitch" = xyes &&
12510 cat >>confdefs.h <<\EOF
12511 #define USE_XMC_SUPPORT 1
12512 EOF
12513
12514 ###############################################################################
12515 # These are just experimental, probably should not be in a package:
12516
12517 echo "$as_me:12517: checking if you do not want to assume colors are white-on-black" >&5
12518 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12519
12520 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12521 if test "${enable_assumed_color+set}" = set; then
12522   enableval="$enable_assumed_color"
12523   with_assumed_color=$enableval
12524 else
12525   with_assumed_color=yes
12526 fi;
12527 echo "$as_me:12527: result: $with_assumed_color" >&5
12528 echo "${ECHO_T}$with_assumed_color" >&6
12529 test "x$with_assumed_color" = xyes &&
12530 cat >>confdefs.h <<\EOF
12531 #define USE_ASSUMED_COLOR 1
12532 EOF
12533
12534 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12535 echo "$as_me:12535: checking if you want hashmap scrolling-optimization code" >&5
12536 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12537
12538 # Check whether --enable-hashmap or --disable-hashmap was given.
12539 if test "${enable_hashmap+set}" = set; then
12540   enableval="$enable_hashmap"
12541   with_hashmap=$enableval
12542 else
12543   with_hashmap=yes
12544 fi;
12545 echo "$as_me:12545: result: $with_hashmap" >&5
12546 echo "${ECHO_T}$with_hashmap" >&6
12547 test "x$with_hashmap" = xyes &&
12548 cat >>confdefs.h <<\EOF
12549 #define USE_HASHMAP 1
12550 EOF
12551
12552 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12553 echo "$as_me:12553: checking if you want colorfgbg code" >&5
12554 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12555
12556 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12557 if test "${enable_colorfgbg+set}" = set; then
12558   enableval="$enable_colorfgbg"
12559   with_colorfgbg=$enableval
12560 else
12561   with_colorfgbg=no
12562 fi;
12563 echo "$as_me:12563: result: $with_colorfgbg" >&5
12564 echo "${ECHO_T}$with_colorfgbg" >&6
12565 test "x$with_colorfgbg" = xyes &&
12566 cat >>confdefs.h <<\EOF
12567 #define USE_COLORFGBG 1
12568 EOF
12569
12570 ###   use option --enable-interop to turn on use of bindings used for interop
12571 echo "$as_me:12571: checking if you want interop bindings" >&5
12572 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12573
12574 # Check whether --enable-interop or --disable-interop was given.
12575 if test "${enable_interop+set}" = set; then
12576   enableval="$enable_interop"
12577   with_exp_interop=$enableval
12578 else
12579   with_exp_interop=$cf_dft_interop
12580 fi;
12581 echo "$as_me:12581: result: $with_exp_interop" >&5
12582 echo "${ECHO_T}$with_exp_interop" >&6
12583
12584 NCURSES_INTEROP_FUNCS=0
12585 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12586
12587 # This is still experimental (20080329), but should ultimately be moved to
12588 # the script-block --with-normal, etc.
12589
12590 echo "$as_me:12590: checking if you want to link with the pthread library" >&5
12591 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12592
12593 # Check whether --with-pthread or --without-pthread was given.
12594 if test "${with_pthread+set}" = set; then
12595   withval="$with_pthread"
12596   with_pthread=$withval
12597 else
12598   with_pthread=no
12599 fi;
12600 echo "$as_me:12600: result: $with_pthread" >&5
12601 echo "${ECHO_T}$with_pthread" >&6
12602
12603 if test "$with_pthread" != no ; then
12604         echo "$as_me:12604: checking for pthread.h" >&5
12605 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12606 if test "${ac_cv_header_pthread_h+set}" = set; then
12607   echo $ECHO_N "(cached) $ECHO_C" >&6
12608 else
12609   cat >conftest.$ac_ext <<_ACEOF
12610 #line 12610 "configure"
12611 #include "confdefs.h"
12612 #include <pthread.h>
12613 _ACEOF
12614 if { (eval echo "$as_me:12614: \"$ac_cpp conftest.$ac_ext\"") >&5
12615   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12616   ac_status=$?
12617   egrep -v '^ *\+' conftest.er1 >conftest.err
12618   rm -f conftest.er1
12619   cat conftest.err >&5
12620   echo "$as_me:12620: \$? = $ac_status" >&5
12621   (exit $ac_status); } >/dev/null; then
12622   if test -s conftest.err; then
12623     ac_cpp_err=$ac_c_preproc_warn_flag
12624   else
12625     ac_cpp_err=
12626   fi
12627 else
12628   ac_cpp_err=yes
12629 fi
12630 if test -z "$ac_cpp_err"; then
12631   ac_cv_header_pthread_h=yes
12632 else
12633   echo "$as_me: failed program was:" >&5
12634   cat conftest.$ac_ext >&5
12635   ac_cv_header_pthread_h=no
12636 fi
12637 rm -f conftest.err conftest.$ac_ext
12638 fi
12639 echo "$as_me:12639: result: $ac_cv_header_pthread_h" >&5
12640 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12641 if test $ac_cv_header_pthread_h = yes; then
12642
12643 cat >>confdefs.h <<\EOF
12644 #define HAVE_PTHREADS_H 1
12645 EOF
12646
12647         for cf_lib_pthread in pthread c_r
12648         do
12649             echo "$as_me:12649: checking if we can link with the $cf_lib_pthread library" >&5
12650 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12651             cf_save_LIBS="$LIBS"
12652
12653 cf_add_libs="-l$cf_lib_pthread"
12654 # Filter out duplicates - this happens with badly-designed ".pc" files...
12655 for cf_add_1lib in $LIBS
12656 do
12657         for cf_add_2lib in $cf_add_libs
12658         do
12659                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12660                 then
12661                         cf_add_1lib=
12662                         break
12663                 fi
12664         done
12665         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12666 done
12667 LIBS="$cf_add_libs"
12668
12669             cat >conftest.$ac_ext <<_ACEOF
12670 #line 12670 "configure"
12671 #include "confdefs.h"
12672
12673 #include <pthread.h>
12674
12675 int
12676 main ()
12677 {
12678
12679                 int rc = pthread_create(0,0,0,0);
12680                 int r2 = pthread_mutexattr_settype(0, 0);
12681
12682   ;
12683   return 0;
12684 }
12685 _ACEOF
12686 rm -f conftest.$ac_objext conftest$ac_exeext
12687 if { (eval echo "$as_me:12687: \"$ac_link\"") >&5
12688   (eval $ac_link) 2>&5
12689   ac_status=$?
12690   echo "$as_me:12690: \$? = $ac_status" >&5
12691   (exit $ac_status); } &&
12692          { ac_try='test -s conftest$ac_exeext'
12693   { (eval echo "$as_me:12693: \"$ac_try\"") >&5
12694   (eval $ac_try) 2>&5
12695   ac_status=$?
12696   echo "$as_me:12696: \$? = $ac_status" >&5
12697   (exit $ac_status); }; }; then
12698   with_pthread=yes
12699 else
12700   echo "$as_me: failed program was:" >&5
12701 cat conftest.$ac_ext >&5
12702 with_pthread=no
12703 fi
12704 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12705             LIBS="$cf_save_LIBS"
12706             echo "$as_me:12706: result: $with_pthread" >&5
12707 echo "${ECHO_T}$with_pthread" >&6
12708             test "$with_pthread" = yes && break
12709         done
12710
12711         if test "$with_pthread" = yes ; then
12712
12713 cf_add_libs="-l$cf_lib_pthread"
12714 # Filter out duplicates - this happens with badly-designed ".pc" files...
12715 for cf_add_1lib in $LIBS
12716 do
12717         for cf_add_2lib in $cf_add_libs
12718         do
12719                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12720                 then
12721                         cf_add_1lib=
12722                         break
12723                 fi
12724         done
12725         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12726 done
12727 LIBS="$cf_add_libs"
12728
12729 cat >>confdefs.h <<\EOF
12730 #define HAVE_LIBPTHREADS 1
12731 EOF
12732
12733         else
12734             { { echo "$as_me:12734: error: Cannot link with pthread library" >&5
12735 echo "$as_me: error: Cannot link with pthread library" >&2;}
12736    { (exit 1); exit 1; }; }
12737         fi
12738
12739 fi
12740
12741 fi
12742
12743 if test "x$with_pthread" != xno; then
12744         echo "$as_me:12744: checking for pthread_kill" >&5
12745 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12746 if test "${ac_cv_func_pthread_kill+set}" = set; then
12747   echo $ECHO_N "(cached) $ECHO_C" >&6
12748 else
12749   cat >conftest.$ac_ext <<_ACEOF
12750 #line 12750 "configure"
12751 #include "confdefs.h"
12752 /* System header to define __stub macros and hopefully few prototypes,
12753     which can conflict with char pthread_kill (); below.  */
12754 #include <assert.h>
12755 /* Override any gcc2 internal prototype to avoid an error.  */
12756 #ifdef __cplusplus
12757 extern "C"
12758 #endif
12759 /* We use char because int might match the return type of a gcc2
12760    builtin and then its argument prototype would still apply.  */
12761 char pthread_kill ();
12762 char (*f) ();
12763
12764 int
12765 main ()
12766 {
12767 /* The GNU C library defines this for functions which it implements
12768     to always fail with ENOSYS.  Some functions are actually named
12769     something starting with __ and the normal name is an alias.  */
12770 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12771 choke me
12772 #else
12773 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12774 #endif
12775
12776   ;
12777   return 0;
12778 }
12779 _ACEOF
12780 rm -f conftest.$ac_objext conftest$ac_exeext
12781 if { (eval echo "$as_me:12781: \"$ac_link\"") >&5
12782   (eval $ac_link) 2>&5
12783   ac_status=$?
12784   echo "$as_me:12784: \$? = $ac_status" >&5
12785   (exit $ac_status); } &&
12786          { ac_try='test -s conftest$ac_exeext'
12787   { (eval echo "$as_me:12787: \"$ac_try\"") >&5
12788   (eval $ac_try) 2>&5
12789   ac_status=$?
12790   echo "$as_me:12790: \$? = $ac_status" >&5
12791   (exit $ac_status); }; }; then
12792   ac_cv_func_pthread_kill=yes
12793 else
12794   echo "$as_me: failed program was:" >&5
12795 cat conftest.$ac_ext >&5
12796 ac_cv_func_pthread_kill=no
12797 fi
12798 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12799 fi
12800 echo "$as_me:12800: result: $ac_cv_func_pthread_kill" >&5
12801 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12802 if test $ac_cv_func_pthread_kill = yes; then
12803
12804                 echo "$as_me:12804: checking if you want to allow EINTR in wgetch with pthreads" >&5
12805 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12806
12807 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12808 if test "${enable_pthreads_eintr+set}" = set; then
12809   enableval="$enable_pthreads_eintr"
12810   use_pthreads_eintr=$enableval
12811 else
12812   use_pthreads_eintr=no
12813 fi;
12814                 echo "$as_me:12814: result: $use_pthreads_eintr" >&5
12815 echo "${ECHO_T}$use_pthreads_eintr" >&6
12816                 if test "x$use_pthreads_eintr" = xyes ; then
12817
12818 cat >>confdefs.h <<\EOF
12819 #define USE_PTHREADS_EINTR 1
12820 EOF
12821
12822                 fi
12823 fi
12824
12825         echo "$as_me:12825: checking if you want to use weak-symbols for pthreads" >&5
12826 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12827
12828 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12829 if test "${enable_weak_symbols+set}" = set; then
12830   enableval="$enable_weak_symbols"
12831   use_weak_symbols=$enableval
12832 else
12833   use_weak_symbols=no
12834 fi;
12835         echo "$as_me:12835: result: $use_weak_symbols" >&5
12836 echo "${ECHO_T}$use_weak_symbols" >&6
12837         if test "x$use_weak_symbols" = xyes ; then
12838
12839 echo "$as_me:12839: checking if $CC supports weak symbols" >&5
12840 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12841 if test "${cf_cv_weak_symbols+set}" = set; then
12842   echo $ECHO_N "(cached) $ECHO_C" >&6
12843 else
12844
12845 cat >conftest.$ac_ext <<_ACEOF
12846 #line 12846 "configure"
12847 #include "confdefs.h"
12848
12849 #include <stdio.h>
12850 int
12851 main ()
12852 {
12853
12854 #if defined(__GNUC__)
12855 #  if defined __USE_ISOC99
12856 #    define _cat_pragma(exp)    _Pragma(#exp)
12857 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12858 #  else
12859 #    define _weak_pragma(exp)
12860 #  endif
12861 #  define _declare(name)        __extension__ extern __typeof__(name) name
12862 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12863 #endif
12864
12865 weak_symbol(fopen);
12866
12867   ;
12868   return 0;
12869 }
12870 _ACEOF
12871 rm -f conftest.$ac_objext
12872 if { (eval echo "$as_me:12872: \"$ac_compile\"") >&5
12873   (eval $ac_compile) 2>&5
12874   ac_status=$?
12875   echo "$as_me:12875: \$? = $ac_status" >&5
12876   (exit $ac_status); } &&
12877          { ac_try='test -s conftest.$ac_objext'
12878   { (eval echo "$as_me:12878: \"$ac_try\"") >&5
12879   (eval $ac_try) 2>&5
12880   ac_status=$?
12881   echo "$as_me:12881: \$? = $ac_status" >&5
12882   (exit $ac_status); }; }; then
12883   cf_cv_weak_symbols=yes
12884 else
12885   echo "$as_me: failed program was:" >&5
12886 cat conftest.$ac_ext >&5
12887 cf_cv_weak_symbols=no
12888 fi
12889 rm -f conftest.$ac_objext conftest.$ac_ext
12890
12891 fi
12892 echo "$as_me:12892: result: $cf_cv_weak_symbols" >&5
12893 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12894
12895         else
12896                 cf_cv_weak_symbols=no
12897         fi
12898
12899         if test "x$cf_cv_weak_symbols" = xyes ; then
12900
12901 cat >>confdefs.h <<\EOF
12902 #define USE_WEAK_SYMBOLS 1
12903 EOF
12904
12905         fi
12906 fi
12907
12908 PTHREAD=
12909 if test "x$with_pthread" = "xyes" ; then
12910
12911 cat >>confdefs.h <<\EOF
12912 #define USE_PTHREADS 1
12913 EOF
12914
12915         enable_reentrant=yes
12916         if test "x$cf_cv_weak_symbols" = xyes ; then
12917                 PTHREAD=-lpthread
12918         fi
12919 fi
12920
12921 # Reentrant code has to be opaque; there's little advantage to making ncurses
12922 # opaque outside of that, so there is no --enable-opaque option.  We can use
12923 # this option without --with-pthreads, but this will be always set for
12924 # pthreads.
12925 echo "$as_me:12925: checking if you want reentrant code" >&5
12926 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
12927
12928 # Check whether --enable-reentrant or --disable-reentrant was given.
12929 if test "${enable_reentrant+set}" = set; then
12930   enableval="$enable_reentrant"
12931   with_reentrant=$enableval
12932 else
12933   with_reentrant=no
12934 fi;
12935 echo "$as_me:12935: result: $with_reentrant" >&5
12936 echo "${ECHO_T}$with_reentrant" >&6
12937 if test "x$with_reentrant" = xyes ; then
12938         cf_cv_enable_reentrant=1
12939         cf_cv_enable_opaque="NCURSES_INTERNALS"
12940         NCURSES_OPAQUE=1
12941         NCURSES_SIZE_T=int
12942         if test "x$cf_cv_weak_symbols" = xyes ; then
12943
12944 # remove pthread library from $LIBS
12945 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12946
12947 cf_add_libs="-lpthread"
12948 # Filter out duplicates - this happens with badly-designed ".pc" files...
12949 for cf_add_1lib in $TEST_LIBS
12950 do
12951         for cf_add_2lib in $cf_add_libs
12952         do
12953                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12954                 then
12955                         cf_add_1lib=
12956                         break
12957                 fi
12958         done
12959         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12960 done
12961 TEST_LIBS="$cf_add_libs"
12962
12963 cf_add_libs="-lpthread"
12964 # Filter out duplicates - this happens with badly-designed ".pc" files...
12965 for cf_add_1lib in $TEST_LIBS2
12966 do
12967         for cf_add_2lib in $cf_add_libs
12968         do
12969                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12970                 then
12971                         cf_add_1lib=
12972                         break
12973                 fi
12974         done
12975         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12976 done
12977 TEST_LIBS2="$cf_add_libs"
12978
12979         else
12980                 # when not using weak symbols but with_reentrant,
12981                 # add 't' to the library suffix on all platforms
12982                 # except cygwin, where we only do that if ALSO
12983                 # compiling with full thread support.
12984                 case "$host" in
12985                 (*cygwin* | *msys*)
12986                         if test "$with_pthread" = "yes" ; then
12987                                 if test "x$disable_lib_suffixes" = "xno" ; then
12988                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12989                                 fi
12990                         fi ;;
12991                 (*)
12992                         if test "x$disable_lib_suffixes" = "xno" ; then
12993                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12994                         fi
12995                         ;;
12996                 esac
12997         fi
12998
12999 cat >>confdefs.h <<\EOF
13000 #define USE_REENTRANT 1
13001 EOF
13002
13003 if test "${with_abi_version+set}" != set; then
13004         case $cf_cv_rel_version in
13005         (5.*)
13006                 cf_cv_rel_version=6.0
13007                 cf_cv_abi_version=6
13008                 { echo "$as_me:13008: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13009 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13010                 ;;
13011         esac
13012 fi
13013
13014 else
13015         cf_cv_enable_reentrant=0
13016         cf_cv_enable_opaque="NCURSES_OPAQUE"
13017         NCURSES_OPAQUE=0
13018         NCURSES_SIZE_T=short
13019 fi
13020
13021 ### Allow using a different wrap-prefix
13022 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13023         echo "$as_me:13023: checking for prefix used to wrap public variables" >&5
13024 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13025
13026 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13027 if test "${with_wrap_prefix+set}" = set; then
13028   withval="$with_wrap_prefix"
13029   NCURSES_WRAP_PREFIX=$withval
13030 else
13031   NCURSES_WRAP_PREFIX=_nc_
13032 fi;
13033         echo "$as_me:13033: result: $NCURSES_WRAP_PREFIX" >&5
13034 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13035 else
13036         NCURSES_WRAP_PREFIX=_nc_
13037 fi
13038
13039 cat >>confdefs.h <<EOF
13040 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13041 EOF
13042
13043 echo "$as_me:13043: checking if you want experimental safe-sprintf code" >&5
13044 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
13045
13046 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
13047 if test "${enable_safe_sprintf+set}" = set; then
13048   enableval="$enable_safe_sprintf"
13049   with_safe_sprintf=$enableval
13050 else
13051   with_safe_sprintf=no
13052 fi;
13053 echo "$as_me:13053: result: $with_safe_sprintf" >&5
13054 echo "${ECHO_T}$with_safe_sprintf" >&6
13055 test "x$with_safe_sprintf" = xyes &&
13056 cat >>confdefs.h <<\EOF
13057 #define USE_SAFE_SPRINTF 1
13058 EOF
13059
13060 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
13061 # when hashmap is used scroll hints are useless
13062 if test "$with_hashmap" = no ; then
13063 echo "$as_me:13063: checking if you want to experiment without scrolling-hints code" >&5
13064 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
13065
13066 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
13067 if test "${enable_scroll_hints+set}" = set; then
13068   enableval="$enable_scroll_hints"
13069   with_scroll_hints=$enableval
13070 else
13071   with_scroll_hints=yes
13072 fi;
13073 echo "$as_me:13073: result: $with_scroll_hints" >&5
13074 echo "${ECHO_T}$with_scroll_hints" >&6
13075 test "x$with_scroll_hints" = xyes &&
13076 cat >>confdefs.h <<\EOF
13077 #define USE_SCROLL_HINTS 1
13078 EOF
13079
13080 fi
13081
13082 echo "$as_me:13082: checking if you want wgetch-events code" >&5
13083 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
13084
13085 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
13086 if test "${enable_wgetch_events+set}" = set; then
13087   enableval="$enable_wgetch_events"
13088   with_wgetch_events=$enableval
13089 else
13090   with_wgetch_events=no
13091 fi;
13092 echo "$as_me:13092: result: $with_wgetch_events" >&5
13093 echo "${ECHO_T}$with_wgetch_events" >&6
13094 test "x$with_wgetch_events" = xyes &&
13095 cat >>confdefs.h <<\EOF
13096 #define NCURSES_WGETCH_EVENTS 1
13097 EOF
13098
13099 ###############################################################################
13100
13101 ###     use option --disable-echo to suppress full display compiling commands
13102
13103 echo "$as_me:13103: checking if you want to see long compiling messages" >&5
13104 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13105
13106 # Check whether --enable-echo or --disable-echo was given.
13107 if test "${enable_echo+set}" = set; then
13108   enableval="$enable_echo"
13109   test "$enableval" != no && enableval=yes
13110         if test "$enableval" != "yes" ; then
13111
13112         ECHO_LT='--silent'
13113         ECHO_LD='@echo linking $@;'
13114         RULE_CC='@echo compiling $<'
13115         SHOW_CC='@echo compiling $@'
13116         ECHO_CC='@'
13117
13118         else
13119
13120         ECHO_LT=''
13121         ECHO_LD=''
13122         RULE_CC=''
13123         SHOW_CC=''
13124         ECHO_CC=''
13125
13126         fi
13127 else
13128   enableval=yes
13129
13130         ECHO_LT=''
13131         ECHO_LD=''
13132         RULE_CC=''
13133         SHOW_CC=''
13134         ECHO_CC=''
13135
13136 fi;
13137 echo "$as_me:13137: result: $enableval" >&5
13138 echo "${ECHO_T}$enableval" >&6
13139
13140 if test "x$enable_echo" = xyes; then
13141         ECHO_LINK=
13142 else
13143         ECHO_LINK='@ echo linking $@ ... ;'
13144         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
13145         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
13146 fi
13147
13148 ###     use option --enable-warnings to turn on all gcc warnings
13149 echo "$as_me:13149: checking if you want to see compiler warnings" >&5
13150 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13151
13152 # Check whether --enable-warnings or --disable-warnings was given.
13153 if test "${enable_warnings+set}" = set; then
13154   enableval="$enable_warnings"
13155   with_warnings=$enableval
13156 fi;
13157 echo "$as_me:13157: result: $with_warnings" >&5
13158 echo "${ECHO_T}$with_warnings" >&6
13159
13160 if test "x$with_warnings" = "xyes"; then
13161
13162         ADAFLAGS="$ADAFLAGS -gnatg"
13163
13164 INTEL_COMPILER=no
13165
13166 if test "$GCC" = yes ; then
13167         case $host_os in
13168         (linux*|gnu*)
13169                 echo "$as_me:13169: checking if this is really Intel C compiler" >&5
13170 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13171                 cf_save_CFLAGS="$CFLAGS"
13172                 CFLAGS="$CFLAGS -no-gcc"
13173                 cat >conftest.$ac_ext <<_ACEOF
13174 #line 13174 "configure"
13175 #include "confdefs.h"
13176
13177 int
13178 main ()
13179 {
13180
13181 #ifdef __INTEL_COMPILER
13182 #else
13183 make an error
13184 #endif
13185
13186   ;
13187   return 0;
13188 }
13189 _ACEOF
13190 rm -f conftest.$ac_objext
13191 if { (eval echo "$as_me:13191: \"$ac_compile\"") >&5
13192   (eval $ac_compile) 2>&5
13193   ac_status=$?
13194   echo "$as_me:13194: \$? = $ac_status" >&5
13195   (exit $ac_status); } &&
13196          { ac_try='test -s conftest.$ac_objext'
13197   { (eval echo "$as_me:13197: \"$ac_try\"") >&5
13198   (eval $ac_try) 2>&5
13199   ac_status=$?
13200   echo "$as_me:13200: \$? = $ac_status" >&5
13201   (exit $ac_status); }; }; then
13202   INTEL_COMPILER=yes
13203 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13204
13205 else
13206   echo "$as_me: failed program was:" >&5
13207 cat conftest.$ac_ext >&5
13208 fi
13209 rm -f conftest.$ac_objext conftest.$ac_ext
13210                 CFLAGS="$cf_save_CFLAGS"
13211                 echo "$as_me:13211: result: $INTEL_COMPILER" >&5
13212 echo "${ECHO_T}$INTEL_COMPILER" >&6
13213                 ;;
13214         esac
13215 fi
13216
13217 CLANG_COMPILER=no
13218
13219 if test "$GCC" = yes ; then
13220         echo "$as_me:13220: checking if this is really Clang C compiler" >&5
13221 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13222         cf_save_CFLAGS="$CFLAGS"
13223         CFLAGS="$CFLAGS -Qunused-arguments"
13224         cat >conftest.$ac_ext <<_ACEOF
13225 #line 13225 "configure"
13226 #include "confdefs.h"
13227
13228 int
13229 main ()
13230 {
13231
13232 #ifdef __clang__
13233 #else
13234 make an error
13235 #endif
13236
13237   ;
13238   return 0;
13239 }
13240 _ACEOF
13241 rm -f conftest.$ac_objext
13242 if { (eval echo "$as_me:13242: \"$ac_compile\"") >&5
13243   (eval $ac_compile) 2>&5
13244   ac_status=$?
13245   echo "$as_me:13245: \$? = $ac_status" >&5
13246   (exit $ac_status); } &&
13247          { ac_try='test -s conftest.$ac_objext'
13248   { (eval echo "$as_me:13248: \"$ac_try\"") >&5
13249   (eval $ac_try) 2>&5
13250   ac_status=$?
13251   echo "$as_me:13251: \$? = $ac_status" >&5
13252   (exit $ac_status); }; }; then
13253   CLANG_COMPILER=yes
13254 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13255
13256 else
13257   echo "$as_me: failed program was:" >&5
13258 cat conftest.$ac_ext >&5
13259 fi
13260 rm -f conftest.$ac_objext conftest.$ac_ext
13261         CFLAGS="$cf_save_CFLAGS"
13262         echo "$as_me:13262: result: $CLANG_COMPILER" >&5
13263 echo "${ECHO_T}$CLANG_COMPILER" >&6
13264 fi
13265
13266 cat > conftest.$ac_ext <<EOF
13267 #line 13267 "${as_me:-configure}"
13268 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13269 EOF
13270
13271 if test "$INTEL_COMPILER" = yes
13272 then
13273 # The "-wdXXX" options suppress warnings:
13274 # remark #1419: external declaration in primary source file
13275 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13276 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13277 # remark #193: zero used for undefined preprocessing identifier
13278 # remark #593: variable "curs_sb_left_arrow" was set but never used
13279 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13280 # remark #869: parameter "tw" was never referenced
13281 # remark #981: operands are evaluated in unspecified order
13282 # warning #279: controlling expression is constant
13283
13284         { echo "$as_me:13284: checking for $CC warning options..." >&5
13285 echo "$as_me: checking for $CC warning options..." >&6;}
13286         cf_save_CFLAGS="$CFLAGS"
13287         EXTRA_CFLAGS="-Wall"
13288         for cf_opt in \
13289                 wd1419 \
13290                 wd1683 \
13291                 wd1684 \
13292                 wd193 \
13293                 wd593 \
13294                 wd279 \
13295                 wd810 \
13296                 wd869 \
13297                 wd981
13298         do
13299                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13300                 if { (eval echo "$as_me:13300: \"$ac_compile\"") >&5
13301   (eval $ac_compile) 2>&5
13302   ac_status=$?
13303   echo "$as_me:13303: \$? = $ac_status" >&5
13304   (exit $ac_status); }; then
13305                         test -n "$verbose" && echo "$as_me:13305: result: ... -$cf_opt" >&5
13306 echo "${ECHO_T}... -$cf_opt" >&6
13307                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13308                 fi
13309         done
13310         CFLAGS="$cf_save_CFLAGS"
13311
13312 elif test "$GCC" = yes
13313 then
13314         { echo "$as_me:13314: checking for $CC warning options..." >&5
13315 echo "$as_me: checking for $CC warning options..." >&6;}
13316         cf_save_CFLAGS="$CFLAGS"
13317         EXTRA_CFLAGS=
13318         cf_warn_CONST=""
13319         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13320         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13321         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13322         for cf_opt in W Wall \
13323                 Wbad-function-cast \
13324                 Wcast-align \
13325                 Wcast-qual \
13326                 Wdeclaration-after-statement \
13327                 Wextra \
13328                 Winline \
13329                 Wmissing-declarations \
13330                 Wmissing-prototypes \
13331                 Wnested-externs \
13332                 Wpointer-arith \
13333                 Wshadow \
13334                 Wstrict-prototypes \
13335                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13336         do
13337                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13338                 if { (eval echo "$as_me:13338: \"$ac_compile\"") >&5
13339   (eval $ac_compile) 2>&5
13340   ac_status=$?
13341   echo "$as_me:13341: \$? = $ac_status" >&5
13342   (exit $ac_status); }; then
13343                         test -n "$verbose" && echo "$as_me:13343: result: ... -$cf_opt" >&5
13344 echo "${ECHO_T}... -$cf_opt" >&6
13345                         case $cf_opt in
13346                         (Wcast-qual)
13347                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13348                                 ;;
13349                         (Winline)
13350                                 case $GCC_VERSION in
13351                                 ([34].*)
13352                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13353
13354 echo "${as_me:-configure}:13354: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13355
13356                                         continue;;
13357                                 esac
13358                                 ;;
13359                         (Wpointer-arith)
13360                                 case $GCC_VERSION in
13361                                 ([12].*)
13362                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13363
13364 echo "${as_me:-configure}:13364: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13365
13366                                         continue;;
13367                                 esac
13368                                 ;;
13369                         esac
13370                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13371                 fi
13372         done
13373         CFLAGS="$cf_save_CFLAGS"
13374 fi
13375 rm -rf conftest*
13376
13377         if test "x$cf_with_cxx" = xyes ; then
13378
13379 INTEL_CPLUSPLUS=no
13380
13381 if test "$GCC" = yes ; then
13382         case $host_os in
13383         (linux*|gnu*)
13384                 echo "$as_me:13384: checking if this is really Intel C++ compiler" >&5
13385 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13386                 cf_save_CFLAGS="$CXXFLAGS"
13387                 CXXFLAGS="$CXXFLAGS -no-gcc"
13388                 cat >conftest.$ac_ext <<_ACEOF
13389 #line 13389 "configure"
13390 #include "confdefs.h"
13391
13392 int
13393 main ()
13394 {
13395
13396 #ifdef __INTEL_COMPILER
13397 #else
13398 make an error
13399 #endif
13400
13401   ;
13402   return 0;
13403 }
13404 _ACEOF
13405 rm -f conftest.$ac_objext
13406 if { (eval echo "$as_me:13406: \"$ac_compile\"") >&5
13407   (eval $ac_compile) 2>&5
13408   ac_status=$?
13409   echo "$as_me:13409: \$? = $ac_status" >&5
13410   (exit $ac_status); } &&
13411          { ac_try='test -s conftest.$ac_objext'
13412   { (eval echo "$as_me:13412: \"$ac_try\"") >&5
13413   (eval $ac_try) 2>&5
13414   ac_status=$?
13415   echo "$as_me:13415: \$? = $ac_status" >&5
13416   (exit $ac_status); }; }; then
13417   INTEL_CPLUSPLUS=yes
13418 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13419
13420 else
13421   echo "$as_me: failed program was:" >&5
13422 cat conftest.$ac_ext >&5
13423 fi
13424 rm -f conftest.$ac_objext conftest.$ac_ext
13425                 CXXFLAGS="$cf_save_CFLAGS"
13426                 echo "$as_me:13426: result: $INTEL_CPLUSPLUS" >&5
13427 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13428                 ;;
13429         esac
13430 fi
13431
13432 CLANG_CPLUSPLUS=no
13433
13434 if test "$GCC" = yes ; then
13435         echo "$as_me:13435: checking if this is really Clang C++ compiler" >&5
13436 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13437         cf_save_CFLAGS="$CXXFLAGS"
13438         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13439         cat >conftest.$ac_ext <<_ACEOF
13440 #line 13440 "configure"
13441 #include "confdefs.h"
13442
13443 int
13444 main ()
13445 {
13446
13447 #ifdef __clang__
13448 #else
13449 make an error
13450 #endif
13451
13452   ;
13453   return 0;
13454 }
13455 _ACEOF
13456 rm -f conftest.$ac_objext
13457 if { (eval echo "$as_me:13457: \"$ac_compile\"") >&5
13458   (eval $ac_compile) 2>&5
13459   ac_status=$?
13460   echo "$as_me:13460: \$? = $ac_status" >&5
13461   (exit $ac_status); } &&
13462          { ac_try='test -s conftest.$ac_objext'
13463   { (eval echo "$as_me:13463: \"$ac_try\"") >&5
13464   (eval $ac_try) 2>&5
13465   ac_status=$?
13466   echo "$as_me:13466: \$? = $ac_status" >&5
13467   (exit $ac_status); }; }; then
13468   CLANG_CPLUSPLUS=yes
13469 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13470
13471 else
13472   echo "$as_me: failed program was:" >&5
13473 cat conftest.$ac_ext >&5
13474 fi
13475 rm -f conftest.$ac_objext conftest.$ac_ext
13476         CXXFLAGS="$cf_save_CFLAGS"
13477         echo "$as_me:13477: result: $CLANG_CPLUSPLUS" >&5
13478 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13479 fi
13480
13481 ac_ext=cc
13482 ac_cpp='$CXXCPP $CPPFLAGS'
13483 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13484 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13485 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13486 ac_main_return=return
13487
13488 cat > conftest.$ac_ext <<EOF
13489 #line 13489 "configure"
13490 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13491 EOF
13492
13493 if test "$INTEL_CPLUSPLUS" = yes
13494 then
13495 # The "-wdXXX" options suppress warnings:
13496 # remark #1419: external declaration in primary source file
13497 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13498 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13499 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13500 # remark #193: zero used for undefined preprocessing identifier
13501 # remark #593: variable "curs_sb_left_arrow" was set but never used
13502 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13503 # remark #869: parameter "tw" was never referenced
13504 # remark #981: operands are evaluated in unspecified order
13505 # warning #269: invalid format string conversion
13506
13507         { echo "$as_me:13507: checking for $CC warning options..." >&5
13508 echo "$as_me: checking for $CC warning options..." >&6;}
13509         cf_save_CXXFLAGS="$CXXFLAGS"
13510         EXTRA_CXXFLAGS="-Wall"
13511         for cf_opt in \
13512                 wd1419 \
13513                 wd1682 \
13514                 wd1683 \
13515                 wd1684 \
13516                 wd193 \
13517                 wd279 \
13518                 wd593 \
13519                 wd810 \
13520                 wd869 \
13521                 wd981
13522         do
13523                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13524                 if { (eval echo "$as_me:13524: \"$ac_compile\"") >&5
13525   (eval $ac_compile) 2>&5
13526   ac_status=$?
13527   echo "$as_me:13527: \$? = $ac_status" >&5
13528   (exit $ac_status); }; then
13529                         test -n "$verbose" && echo "$as_me:13529: result: ... -$cf_opt" >&5
13530 echo "${ECHO_T}... -$cf_opt" >&6
13531                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13532                 fi
13533         done
13534         CXXFLAGS="$cf_save_CXXFLAGS"
13535
13536 elif test "$GXX" = yes
13537 then
13538         { echo "$as_me:13538: checking for $CXX warning options..." >&5
13539 echo "$as_me: checking for $CXX warning options..." >&6;}
13540         cf_save_CXXFLAGS="$CXXFLAGS"
13541         EXTRA_CXXFLAGS="-W -Wall"
13542         cf_gxx_extra_warnings=""
13543         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13544         case "$GCC_VERSION" in
13545         ([1-2].*)
13546                 ;;
13547         (*)
13548                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13549                 ;;
13550         esac
13551         for cf_opt in \
13552                 Wabi \
13553                 fabi-version=0 \
13554                 Wextra \
13555                 Wignored-qualifiers \
13556                 Wlogical-op \
13557                 Woverloaded-virtual \
13558                 Wsign-promo \
13559                 Wsynth \
13560                 Wold-style-cast \
13561                 Wcast-align \
13562                 Wcast-qual \
13563                 Wpointer-arith \
13564                 Wshadow \
13565                 Wundef $cf_gxx_extra_warnings Wno-unused
13566         do
13567                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13568                 if { (eval echo "$as_me:13568: \"$ac_compile\"") >&5
13569   (eval $ac_compile) 2>&5
13570   ac_status=$?
13571   echo "$as_me:13571: \$? = $ac_status" >&5
13572   (exit $ac_status); }; then
13573                         test -n "$verbose" && echo "$as_me:13573: result: ... -$cf_opt" >&5
13574 echo "${ECHO_T}... -$cf_opt" >&6
13575                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13576                 else
13577                         test -n "$verbose" && echo "$as_me:13577: result: ... no -$cf_opt" >&5
13578 echo "${ECHO_T}... no -$cf_opt" >&6
13579                 fi
13580         done
13581         CXXFLAGS="$cf_save_CXXFLAGS"
13582 fi
13583
13584 rm -rf conftest*
13585 ac_ext=c
13586 ac_cpp='$CPP $CPPFLAGS'
13587 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13588 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13589 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13590 ac_main_return=return
13591
13592         fi
13593 fi
13594
13595 if test "$GCC" = yes
13596 then
13597 cat > conftest.i <<EOF
13598 #ifndef GCC_PRINTF
13599 #define GCC_PRINTF 0
13600 #endif
13601 #ifndef GCC_SCANF
13602 #define GCC_SCANF 0
13603 #endif
13604 #ifndef GCC_NORETURN
13605 #define GCC_NORETURN /* nothing */
13606 #endif
13607 #ifndef GCC_UNUSED
13608 #define GCC_UNUSED /* nothing */
13609 #endif
13610 EOF
13611 if test "$GCC" = yes
13612 then
13613         { echo "$as_me:13613: checking for $CC __attribute__ directives..." >&5
13614 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13615 cat > conftest.$ac_ext <<EOF
13616 #line 13616 "${as_me:-configure}"
13617 #include "confdefs.h"
13618 #include "conftest.h"
13619 #include "conftest.i"
13620 #if     GCC_PRINTF
13621 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13622 #else
13623 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13624 #endif
13625 #if     GCC_SCANF
13626 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13627 #else
13628 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13629 #endif
13630 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13631 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13632 extern void foo(void) GCC_NORETURN;
13633 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13634 EOF
13635         cf_printf_attribute=no
13636         cf_scanf_attribute=no
13637         for cf_attribute in scanf printf unused noreturn
13638         do
13639
13640 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13641
13642                 cf_directive="__attribute__(($cf_attribute))"
13643                 echo "checking for $CC $cf_directive" 1>&5
13644
13645                 case $cf_attribute in
13646                 (printf)
13647                         cf_printf_attribute=yes
13648                         cat >conftest.h <<EOF
13649 #define GCC_$cf_ATTRIBUTE 1
13650 EOF
13651                         ;;
13652                 (scanf)
13653                         cf_scanf_attribute=yes
13654                         cat >conftest.h <<EOF
13655 #define GCC_$cf_ATTRIBUTE 1
13656 EOF
13657                         ;;
13658                 (*)
13659                         cat >conftest.h <<EOF
13660 #define GCC_$cf_ATTRIBUTE $cf_directive
13661 EOF
13662                         ;;
13663                 esac
13664
13665                 if { (eval echo "$as_me:13665: \"$ac_compile\"") >&5
13666   (eval $ac_compile) 2>&5
13667   ac_status=$?
13668   echo "$as_me:13668: \$? = $ac_status" >&5
13669   (exit $ac_status); }; then
13670                         test -n "$verbose" && echo "$as_me:13670: result: ... $cf_attribute" >&5
13671 echo "${ECHO_T}... $cf_attribute" >&6
13672                         cat conftest.h >>confdefs.h
13673                         case $cf_attribute in
13674                         (noreturn)
13675
13676 cat >>confdefs.h <<EOF
13677 #define GCC_NORETURN $cf_directive
13678 EOF
13679
13680                                 ;;
13681                         (printf)
13682                                 cf_value='/* nothing */'
13683                                 if test "$cf_printf_attribute" != no ; then
13684                                         cf_value='__attribute__((format(printf,fmt,var)))'
13685
13686 cat >>confdefs.h <<\EOF
13687 #define GCC_PRINTF 1
13688 EOF
13689
13690                                 fi
13691
13692 cat >>confdefs.h <<EOF
13693 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13694 EOF
13695
13696                                 ;;
13697                         (scanf)
13698                                 cf_value='/* nothing */'
13699                                 if test "$cf_scanf_attribute" != no ; then
13700                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13701
13702 cat >>confdefs.h <<\EOF
13703 #define GCC_SCANF 1
13704 EOF
13705
13706                                 fi
13707
13708 cat >>confdefs.h <<EOF
13709 #define GCC_SCANFLIKE(fmt,var) $cf_value
13710 EOF
13711
13712                                 ;;
13713                         (unused)
13714
13715 cat >>confdefs.h <<EOF
13716 #define GCC_UNUSED $cf_directive
13717 EOF
13718
13719                                 ;;
13720                         esac
13721                 fi
13722         done
13723 else
13724         fgrep define conftest.i >>confdefs.h
13725 fi
13726 rm -rf conftest*
13727 fi
13728
13729 echo "$as_me:13729: checking if you want to work around bogus compiler/loader warnings" >&5
13730 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13731
13732 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13733 if test "${enable_string_hacks+set}" = set; then
13734   enableval="$enable_string_hacks"
13735   with_string_hacks=$enableval
13736 else
13737   with_string_hacks=no
13738 fi;
13739 echo "$as_me:13739: result: $with_string_hacks" >&5
13740 echo "${ECHO_T}$with_string_hacks" >&6
13741
13742 if test "x$with_string_hacks" = "xyes"; then
13743
13744 cat >>confdefs.h <<\EOF
13745 #define USE_STRING_HACKS 1
13746 EOF
13747
13748         { echo "$as_me:13748: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13749 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13750
13751 for ac_func in strlcat strlcpy snprintf
13752 do
13753 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13754 echo "$as_me:13754: checking for $ac_func" >&5
13755 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13756 if eval "test \"\${$as_ac_var+set}\" = set"; then
13757   echo $ECHO_N "(cached) $ECHO_C" >&6
13758 else
13759   cat >conftest.$ac_ext <<_ACEOF
13760 #line 13760 "configure"
13761 #include "confdefs.h"
13762 /* System header to define __stub macros and hopefully few prototypes,
13763     which can conflict with char $ac_func (); below.  */
13764 #include <assert.h>
13765 /* Override any gcc2 internal prototype to avoid an error.  */
13766 #ifdef __cplusplus
13767 extern "C"
13768 #endif
13769 /* We use char because int might match the return type of a gcc2
13770    builtin and then its argument prototype would still apply.  */
13771 char $ac_func ();
13772 char (*f) ();
13773
13774 int
13775 main ()
13776 {
13777 /* The GNU C library defines this for functions which it implements
13778     to always fail with ENOSYS.  Some functions are actually named
13779     something starting with __ and the normal name is an alias.  */
13780 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13781 choke me
13782 #else
13783 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13784 #endif
13785
13786   ;
13787   return 0;
13788 }
13789 _ACEOF
13790 rm -f conftest.$ac_objext conftest$ac_exeext
13791 if { (eval echo "$as_me:13791: \"$ac_link\"") >&5
13792   (eval $ac_link) 2>&5
13793   ac_status=$?
13794   echo "$as_me:13794: \$? = $ac_status" >&5
13795   (exit $ac_status); } &&
13796          { ac_try='test -s conftest$ac_exeext'
13797   { (eval echo "$as_me:13797: \"$ac_try\"") >&5
13798   (eval $ac_try) 2>&5
13799   ac_status=$?
13800   echo "$as_me:13800: \$? = $ac_status" >&5
13801   (exit $ac_status); }; }; then
13802   eval "$as_ac_var=yes"
13803 else
13804   echo "$as_me: failed program was:" >&5
13805 cat conftest.$ac_ext >&5
13806 eval "$as_ac_var=no"
13807 fi
13808 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13809 fi
13810 echo "$as_me:13810: result: `eval echo '${'$as_ac_var'}'`" >&5
13811 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13812 if test `eval echo '${'$as_ac_var'}'` = yes; then
13813   cat >>confdefs.h <<EOF
13814 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13815 EOF
13816
13817 fi
13818 done
13819
13820 fi
13821
13822 ###     use option --enable-assertions to turn on generation of assertion code
13823 echo "$as_me:13823: checking if you want to enable runtime assertions" >&5
13824 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13825
13826 # Check whether --enable-assertions or --disable-assertions was given.
13827 if test "${enable_assertions+set}" = set; then
13828   enableval="$enable_assertions"
13829   with_assertions=$enableval
13830 else
13831   with_assertions=no
13832 fi;
13833 echo "$as_me:13833: result: $with_assertions" >&5
13834 echo "${ECHO_T}$with_assertions" >&6
13835 if test -n "$GCC"
13836 then
13837         if test "$with_assertions" = no
13838         then
13839                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13840         else
13841
13842         ADAFLAGS="$ADAFLAGS -gnata"
13843
13844         fi
13845 fi
13846
13847 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13848
13849 echo "$as_me:13849: checking if you want to use dmalloc for testing" >&5
13850 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13851
13852 # Check whether --with-dmalloc or --without-dmalloc was given.
13853 if test "${with_dmalloc+set}" = set; then
13854   withval="$with_dmalloc"
13855
13856 cat >>confdefs.h <<EOF
13857 #define USE_DMALLOC 1
13858 EOF
13859
13860         : ${with_cflags:=-g}
13861         : ${with_no_leaks:=yes}
13862          with_dmalloc=yes
13863 else
13864   with_dmalloc=
13865 fi;
13866 echo "$as_me:13866: result: ${with_dmalloc:-no}" >&5
13867 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13868
13869 case .$with_cflags in
13870 (.*-g*)
13871         case .$CFLAGS in
13872         (.*-g*)
13873                 ;;
13874         (*)
13875
13876 cf_fix_cppflags=no
13877 cf_new_cflags=
13878 cf_new_cppflags=
13879 cf_new_extra_cppflags=
13880
13881 for cf_add_cflags in -g
13882 do
13883 case $cf_fix_cppflags in
13884 (no)
13885         case $cf_add_cflags in
13886         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13887                 case $cf_add_cflags in
13888                 (-D*)
13889                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13890
13891                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13892                                 && test -z "${cf_tst_cflags}" \
13893                                 && cf_fix_cppflags=yes
13894
13895                         if test $cf_fix_cppflags = yes ; then
13896                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13897                                 continue
13898                         elif test "${cf_tst_cflags}" = "\"'" ; then
13899                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13900                                 continue
13901                         fi
13902                         ;;
13903                 esac
13904                 case "$CPPFLAGS" in
13905                 (*$cf_add_cflags)
13906                         ;;
13907                 (*)
13908                         case $cf_add_cflags in
13909                         (-D*)
13910                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13911
13912 CPPFLAGS=`echo "$CPPFLAGS" | \
13913         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13914                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13915
13916                                 ;;
13917                         esac
13918                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13919                         ;;
13920                 esac
13921                 ;;
13922         (*)
13923                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13924                 ;;
13925         esac
13926         ;;
13927 (yes)
13928         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13929
13930         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13931
13932         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13933                 && test -z "${cf_tst_cflags}" \
13934                 && cf_fix_cppflags=no
13935         ;;
13936 esac
13937 done
13938
13939 if test -n "$cf_new_cflags" ; then
13940
13941         CFLAGS="$CFLAGS $cf_new_cflags"
13942 fi
13943
13944 if test -n "$cf_new_cppflags" ; then
13945
13946         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13947 fi
13948
13949 if test -n "$cf_new_extra_cppflags" ; then
13950
13951         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13952 fi
13953
13954                 ;;
13955         esac
13956         ;;
13957 esac
13958
13959 if test "$with_dmalloc" = yes ; then
13960         echo "$as_me:13960: checking for dmalloc.h" >&5
13961 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13962 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13963   echo $ECHO_N "(cached) $ECHO_C" >&6
13964 else
13965   cat >conftest.$ac_ext <<_ACEOF
13966 #line 13966 "configure"
13967 #include "confdefs.h"
13968 #include <dmalloc.h>
13969 _ACEOF
13970 if { (eval echo "$as_me:13970: \"$ac_cpp conftest.$ac_ext\"") >&5
13971   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13972   ac_status=$?
13973   egrep -v '^ *\+' conftest.er1 >conftest.err
13974   rm -f conftest.er1
13975   cat conftest.err >&5
13976   echo "$as_me:13976: \$? = $ac_status" >&5
13977   (exit $ac_status); } >/dev/null; then
13978   if test -s conftest.err; then
13979     ac_cpp_err=$ac_c_preproc_warn_flag
13980   else
13981     ac_cpp_err=
13982   fi
13983 else
13984   ac_cpp_err=yes
13985 fi
13986 if test -z "$ac_cpp_err"; then
13987   ac_cv_header_dmalloc_h=yes
13988 else
13989   echo "$as_me: failed program was:" >&5
13990   cat conftest.$ac_ext >&5
13991   ac_cv_header_dmalloc_h=no
13992 fi
13993 rm -f conftest.err conftest.$ac_ext
13994 fi
13995 echo "$as_me:13995: result: $ac_cv_header_dmalloc_h" >&5
13996 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13997 if test $ac_cv_header_dmalloc_h = yes; then
13998
13999 echo "$as_me:13999: checking for dmalloc_debug in -ldmalloc" >&5
14000 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
14001 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
14002   echo $ECHO_N "(cached) $ECHO_C" >&6
14003 else
14004   ac_check_lib_save_LIBS=$LIBS
14005 LIBS="-ldmalloc  $LIBS"
14006 cat >conftest.$ac_ext <<_ACEOF
14007 #line 14007 "configure"
14008 #include "confdefs.h"
14009
14010 /* Override any gcc2 internal prototype to avoid an error.  */
14011 #ifdef __cplusplus
14012 extern "C"
14013 #endif
14014 /* We use char because int might match the return type of a gcc2
14015    builtin and then its argument prototype would still apply.  */
14016 char dmalloc_debug ();
14017 int
14018 main ()
14019 {
14020 dmalloc_debug ();
14021   ;
14022   return 0;
14023 }
14024 _ACEOF
14025 rm -f conftest.$ac_objext conftest$ac_exeext
14026 if { (eval echo "$as_me:14026: \"$ac_link\"") >&5
14027   (eval $ac_link) 2>&5
14028   ac_status=$?
14029   echo "$as_me:14029: \$? = $ac_status" >&5
14030   (exit $ac_status); } &&
14031          { ac_try='test -s conftest$ac_exeext'
14032   { (eval echo "$as_me:14032: \"$ac_try\"") >&5
14033   (eval $ac_try) 2>&5
14034   ac_status=$?
14035   echo "$as_me:14035: \$? = $ac_status" >&5
14036   (exit $ac_status); }; }; then
14037   ac_cv_lib_dmalloc_dmalloc_debug=yes
14038 else
14039   echo "$as_me: failed program was:" >&5
14040 cat conftest.$ac_ext >&5
14041 ac_cv_lib_dmalloc_dmalloc_debug=no
14042 fi
14043 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14044 LIBS=$ac_check_lib_save_LIBS
14045 fi
14046 echo "$as_me:14046: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
14047 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
14048 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
14049   cat >>confdefs.h <<EOF
14050 #define HAVE_LIBDMALLOC 1
14051 EOF
14052
14053   LIBS="-ldmalloc $LIBS"
14054
14055 fi
14056
14057 fi
14058
14059 fi
14060
14061 echo "$as_me:14061: checking if you want to use dbmalloc for testing" >&5
14062 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
14063
14064 # Check whether --with-dbmalloc or --without-dbmalloc was given.
14065 if test "${with_dbmalloc+set}" = set; then
14066   withval="$with_dbmalloc"
14067
14068 cat >>confdefs.h <<EOF
14069 #define USE_DBMALLOC 1
14070 EOF
14071
14072         : ${with_cflags:=-g}
14073         : ${with_no_leaks:=yes}
14074          with_dbmalloc=yes
14075 else
14076   with_dbmalloc=
14077 fi;
14078 echo "$as_me:14078: result: ${with_dbmalloc:-no}" >&5
14079 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
14080
14081 case .$with_cflags in
14082 (.*-g*)
14083         case .$CFLAGS in
14084         (.*-g*)
14085                 ;;
14086         (*)
14087
14088 cf_fix_cppflags=no
14089 cf_new_cflags=
14090 cf_new_cppflags=
14091 cf_new_extra_cppflags=
14092
14093 for cf_add_cflags in -g
14094 do
14095 case $cf_fix_cppflags in
14096 (no)
14097         case $cf_add_cflags in
14098         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14099                 case $cf_add_cflags in
14100                 (-D*)
14101                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14102
14103                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14104                                 && test -z "${cf_tst_cflags}" \
14105                                 && cf_fix_cppflags=yes
14106
14107                         if test $cf_fix_cppflags = yes ; then
14108                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14109                                 continue
14110                         elif test "${cf_tst_cflags}" = "\"'" ; then
14111                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14112                                 continue
14113                         fi
14114                         ;;
14115                 esac
14116                 case "$CPPFLAGS" in
14117                 (*$cf_add_cflags)
14118                         ;;
14119                 (*)
14120                         case $cf_add_cflags in
14121                         (-D*)
14122                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14123
14124 CPPFLAGS=`echo "$CPPFLAGS" | \
14125         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14126                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14127
14128                                 ;;
14129                         esac
14130                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14131                         ;;
14132                 esac
14133                 ;;
14134         (*)
14135                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14136                 ;;
14137         esac
14138         ;;
14139 (yes)
14140         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14141
14142         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14143
14144         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14145                 && test -z "${cf_tst_cflags}" \
14146                 && cf_fix_cppflags=no
14147         ;;
14148 esac
14149 done
14150
14151 if test -n "$cf_new_cflags" ; then
14152
14153         CFLAGS="$CFLAGS $cf_new_cflags"
14154 fi
14155
14156 if test -n "$cf_new_cppflags" ; then
14157
14158         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14159 fi
14160
14161 if test -n "$cf_new_extra_cppflags" ; then
14162
14163         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14164 fi
14165
14166                 ;;
14167         esac
14168         ;;
14169 esac
14170
14171 if test "$with_dbmalloc" = yes ; then
14172         echo "$as_me:14172: checking for dbmalloc.h" >&5
14173 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
14174 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
14175   echo $ECHO_N "(cached) $ECHO_C" >&6
14176 else
14177   cat >conftest.$ac_ext <<_ACEOF
14178 #line 14178 "configure"
14179 #include "confdefs.h"
14180 #include <dbmalloc.h>
14181 _ACEOF
14182 if { (eval echo "$as_me:14182: \"$ac_cpp conftest.$ac_ext\"") >&5
14183   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14184   ac_status=$?
14185   egrep -v '^ *\+' conftest.er1 >conftest.err
14186   rm -f conftest.er1
14187   cat conftest.err >&5
14188   echo "$as_me:14188: \$? = $ac_status" >&5
14189   (exit $ac_status); } >/dev/null; then
14190   if test -s conftest.err; then
14191     ac_cpp_err=$ac_c_preproc_warn_flag
14192   else
14193     ac_cpp_err=
14194   fi
14195 else
14196   ac_cpp_err=yes
14197 fi
14198 if test -z "$ac_cpp_err"; then
14199   ac_cv_header_dbmalloc_h=yes
14200 else
14201   echo "$as_me: failed program was:" >&5
14202   cat conftest.$ac_ext >&5
14203   ac_cv_header_dbmalloc_h=no
14204 fi
14205 rm -f conftest.err conftest.$ac_ext
14206 fi
14207 echo "$as_me:14207: result: $ac_cv_header_dbmalloc_h" >&5
14208 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
14209 if test $ac_cv_header_dbmalloc_h = yes; then
14210
14211 echo "$as_me:14211: checking for debug_malloc in -ldbmalloc" >&5
14212 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
14213 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
14214   echo $ECHO_N "(cached) $ECHO_C" >&6
14215 else
14216   ac_check_lib_save_LIBS=$LIBS
14217 LIBS="-ldbmalloc  $LIBS"
14218 cat >conftest.$ac_ext <<_ACEOF
14219 #line 14219 "configure"
14220 #include "confdefs.h"
14221
14222 /* Override any gcc2 internal prototype to avoid an error.  */
14223 #ifdef __cplusplus
14224 extern "C"
14225 #endif
14226 /* We use char because int might match the return type of a gcc2
14227    builtin and then its argument prototype would still apply.  */
14228 char debug_malloc ();
14229 int
14230 main ()
14231 {
14232 debug_malloc ();
14233   ;
14234   return 0;
14235 }
14236 _ACEOF
14237 rm -f conftest.$ac_objext conftest$ac_exeext
14238 if { (eval echo "$as_me:14238: \"$ac_link\"") >&5
14239   (eval $ac_link) 2>&5
14240   ac_status=$?
14241   echo "$as_me:14241: \$? = $ac_status" >&5
14242   (exit $ac_status); } &&
14243          { ac_try='test -s conftest$ac_exeext'
14244   { (eval echo "$as_me:14244: \"$ac_try\"") >&5
14245   (eval $ac_try) 2>&5
14246   ac_status=$?
14247   echo "$as_me:14247: \$? = $ac_status" >&5
14248   (exit $ac_status); }; }; then
14249   ac_cv_lib_dbmalloc_debug_malloc=yes
14250 else
14251   echo "$as_me: failed program was:" >&5
14252 cat conftest.$ac_ext >&5
14253 ac_cv_lib_dbmalloc_debug_malloc=no
14254 fi
14255 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14256 LIBS=$ac_check_lib_save_LIBS
14257 fi
14258 echo "$as_me:14258: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14259 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14260 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14261   cat >>confdefs.h <<EOF
14262 #define HAVE_LIBDBMALLOC 1
14263 EOF
14264
14265   LIBS="-ldbmalloc $LIBS"
14266
14267 fi
14268
14269 fi
14270
14271 fi
14272
14273 echo "$as_me:14273: checking if you want to use valgrind for testing" >&5
14274 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14275
14276 # Check whether --with-valgrind or --without-valgrind was given.
14277 if test "${with_valgrind+set}" = set; then
14278   withval="$with_valgrind"
14279
14280 cat >>confdefs.h <<EOF
14281 #define USE_VALGRIND 1
14282 EOF
14283
14284         : ${with_cflags:=-g}
14285         : ${with_no_leaks:=yes}
14286          with_valgrind=yes
14287 else
14288   with_valgrind=
14289 fi;
14290 echo "$as_me:14290: result: ${with_valgrind:-no}" >&5
14291 echo "${ECHO_T}${with_valgrind:-no}" >&6
14292
14293 case .$with_cflags in
14294 (.*-g*)
14295         case .$CFLAGS in
14296         (.*-g*)
14297                 ;;
14298         (*)
14299
14300 cf_fix_cppflags=no
14301 cf_new_cflags=
14302 cf_new_cppflags=
14303 cf_new_extra_cppflags=
14304
14305 for cf_add_cflags in -g
14306 do
14307 case $cf_fix_cppflags in
14308 (no)
14309         case $cf_add_cflags in
14310         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14311                 case $cf_add_cflags in
14312                 (-D*)
14313                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14314
14315                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14316                                 && test -z "${cf_tst_cflags}" \
14317                                 && cf_fix_cppflags=yes
14318
14319                         if test $cf_fix_cppflags = yes ; then
14320                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14321                                 continue
14322                         elif test "${cf_tst_cflags}" = "\"'" ; then
14323                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14324                                 continue
14325                         fi
14326                         ;;
14327                 esac
14328                 case "$CPPFLAGS" in
14329                 (*$cf_add_cflags)
14330                         ;;
14331                 (*)
14332                         case $cf_add_cflags in
14333                         (-D*)
14334                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14335
14336 CPPFLAGS=`echo "$CPPFLAGS" | \
14337         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14338                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14339
14340                                 ;;
14341                         esac
14342                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14343                         ;;
14344                 esac
14345                 ;;
14346         (*)
14347                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14348                 ;;
14349         esac
14350         ;;
14351 (yes)
14352         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14353
14354         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14355
14356         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14357                 && test -z "${cf_tst_cflags}" \
14358                 && cf_fix_cppflags=no
14359         ;;
14360 esac
14361 done
14362
14363 if test -n "$cf_new_cflags" ; then
14364
14365         CFLAGS="$CFLAGS $cf_new_cflags"
14366 fi
14367
14368 if test -n "$cf_new_cppflags" ; then
14369
14370         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14371 fi
14372
14373 if test -n "$cf_new_extra_cppflags" ; then
14374
14375         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14376 fi
14377
14378                 ;;
14379         esac
14380         ;;
14381 esac
14382
14383 echo "$as_me:14383: checking if you want to perform memory-leak testing" >&5
14384 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14385
14386 # Check whether --enable-leaks or --disable-leaks was given.
14387 if test "${enable_leaks+set}" = set; then
14388   enableval="$enable_leaks"
14389   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14390 else
14391   : ${with_no_leaks:=no}
14392 fi;
14393 echo "$as_me:14393: result: $with_no_leaks" >&5
14394 echo "${ECHO_T}$with_no_leaks" >&6
14395
14396 if test "$with_no_leaks" = yes ; then
14397
14398 cat >>confdefs.h <<\EOF
14399 #define NO_LEAKS 1
14400 EOF
14401
14402 cat >>confdefs.h <<\EOF
14403 #define YY_NO_LEAKS 1
14404 EOF
14405
14406 fi
14407
14408 cat >>confdefs.h <<\EOF
14409 #define HAVE_NC_ALLOC_H 1
14410 EOF
14411
14412 ###     use option --enable-expanded to generate certain macros as functions
14413
14414 # Check whether --enable-expanded or --disable-expanded was given.
14415 if test "${enable_expanded+set}" = set; then
14416   enableval="$enable_expanded"
14417   test "x$enableval" = xyes &&
14418 cat >>confdefs.h <<\EOF
14419 #define NCURSES_EXPANDED 1
14420 EOF
14421
14422 fi;
14423
14424 ###     use option --disable-macros to suppress macros in favor of functions
14425
14426 # Check whether --enable-macros or --disable-macros was given.
14427 if test "${enable_macros+set}" = set; then
14428   enableval="$enable_macros"
14429   test "$enableval" = no &&
14430 cat >>confdefs.h <<\EOF
14431 #define NCURSES_NOMACROS 1
14432 EOF
14433
14434 fi;
14435
14436 # Normally we only add trace() to the debug-library.  Allow this to be
14437 # extended to all models of the ncurses library:
14438 cf_all_traces=no
14439 case "$CFLAGS $CPPFLAGS" in
14440 (*-DTRACE*)
14441         cf_all_traces=yes
14442         ;;
14443 esac
14444
14445 echo "$as_me:14445: checking whether to add trace feature to all models" >&5
14446 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14447
14448 # Check whether --with-trace or --without-trace was given.
14449 if test "${with_trace+set}" = set; then
14450   withval="$with_trace"
14451   cf_with_trace=$withval
14452 else
14453   cf_with_trace=$cf_all_traces
14454 fi;
14455 echo "$as_me:14455: result: $cf_with_trace" >&5
14456 echo "${ECHO_T}$cf_with_trace" >&6
14457
14458 if test "x$cf_with_trace" = xyes ; then
14459         LIB_TRACING=all
14460         ADA_TRACE=TRUE
14461
14462 cf_fix_cppflags=no
14463 cf_new_cflags=
14464 cf_new_cppflags=
14465 cf_new_extra_cppflags=
14466
14467 for cf_add_cflags in -DTRACE
14468 do
14469 case $cf_fix_cppflags in
14470 (no)
14471         case $cf_add_cflags in
14472         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14473                 case $cf_add_cflags in
14474                 (-D*)
14475                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14476
14477                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14478                                 && test -z "${cf_tst_cflags}" \
14479                                 && cf_fix_cppflags=yes
14480
14481                         if test $cf_fix_cppflags = yes ; then
14482                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14483                                 continue
14484                         elif test "${cf_tst_cflags}" = "\"'" ; then
14485                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14486                                 continue
14487                         fi
14488                         ;;
14489                 esac
14490                 case "$CPPFLAGS" in
14491                 (*$cf_add_cflags)
14492                         ;;
14493                 (*)
14494                         case $cf_add_cflags in
14495                         (-D*)
14496                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14497
14498 CPPFLAGS=`echo "$CPPFLAGS" | \
14499         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14500                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14501
14502                                 ;;
14503                         esac
14504                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14505                         ;;
14506                 esac
14507                 ;;
14508         (*)
14509                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14510                 ;;
14511         esac
14512         ;;
14513 (yes)
14514         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14515
14516         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14517
14518         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14519                 && test -z "${cf_tst_cflags}" \
14520                 && cf_fix_cppflags=no
14521         ;;
14522 esac
14523 done
14524
14525 if test -n "$cf_new_cflags" ; then
14526
14527         CFLAGS="$CFLAGS $cf_new_cflags"
14528 fi
14529
14530 if test -n "$cf_new_cppflags" ; then
14531
14532         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14533 fi
14534
14535 if test -n "$cf_new_extra_cppflags" ; then
14536
14537         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14538 fi
14539
14540 else
14541         LIB_TRACING=DEBUG
14542         ADA_TRACE=FALSE
14543 fi
14544
14545 echo "$as_me:14545: checking if we want to use GNAT projects" >&5
14546 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14547
14548 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14549 if test "${enable_gnat_projects+set}" = set; then
14550   enableval="$enable_gnat_projects"
14551   test "$enableval" != no && enableval=yes
14552         if test "$enableval" != "yes" ; then
14553     enable_gnat_projects=no
14554         else
14555                 enable_gnat_projects=yes
14556         fi
14557 else
14558   enableval=yes
14559         enable_gnat_projects=yes
14560
14561 fi;
14562 echo "$as_me:14562: result: $enable_gnat_projects" >&5
14563 echo "${ECHO_T}$enable_gnat_projects" >&6
14564
14565 ###     Checks for libraries.
14566 case $cf_cv_system_name in
14567 (*mingw32*|*mingw64*)
14568         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
14569         LIBS=" -lpsapi $LIBS"
14570         ;;
14571 (*)
14572 echo "$as_me:14572: checking for gettimeofday" >&5
14573 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14574 if test "${ac_cv_func_gettimeofday+set}" = set; then
14575   echo $ECHO_N "(cached) $ECHO_C" >&6
14576 else
14577   cat >conftest.$ac_ext <<_ACEOF
14578 #line 14578 "configure"
14579 #include "confdefs.h"
14580 /* System header to define __stub macros and hopefully few prototypes,
14581     which can conflict with char gettimeofday (); below.  */
14582 #include <assert.h>
14583 /* Override any gcc2 internal prototype to avoid an error.  */
14584 #ifdef __cplusplus
14585 extern "C"
14586 #endif
14587 /* We use char because int might match the return type of a gcc2
14588    builtin and then its argument prototype would still apply.  */
14589 char gettimeofday ();
14590 char (*f) ();
14591
14592 int
14593 main ()
14594 {
14595 /* The GNU C library defines this for functions which it implements
14596     to always fail with ENOSYS.  Some functions are actually named
14597     something starting with __ and the normal name is an alias.  */
14598 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14599 choke me
14600 #else
14601 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14602 #endif
14603
14604   ;
14605   return 0;
14606 }
14607 _ACEOF
14608 rm -f conftest.$ac_objext conftest$ac_exeext
14609 if { (eval echo "$as_me:14609: \"$ac_link\"") >&5
14610   (eval $ac_link) 2>&5
14611   ac_status=$?
14612   echo "$as_me:14612: \$? = $ac_status" >&5
14613   (exit $ac_status); } &&
14614          { ac_try='test -s conftest$ac_exeext'
14615   { (eval echo "$as_me:14615: \"$ac_try\"") >&5
14616   (eval $ac_try) 2>&5
14617   ac_status=$?
14618   echo "$as_me:14618: \$? = $ac_status" >&5
14619   (exit $ac_status); }; }; then
14620   ac_cv_func_gettimeofday=yes
14621 else
14622   echo "$as_me: failed program was:" >&5
14623 cat conftest.$ac_ext >&5
14624 ac_cv_func_gettimeofday=no
14625 fi
14626 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14627 fi
14628 echo "$as_me:14628: result: $ac_cv_func_gettimeofday" >&5
14629 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14630 if test $ac_cv_func_gettimeofday = yes; then
14631
14632 cat >>confdefs.h <<\EOF
14633 #define HAVE_GETTIMEOFDAY 1
14634 EOF
14635
14636 else
14637
14638 echo "$as_me:14638: checking for gettimeofday in -lbsd" >&5
14639 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14640 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14641   echo $ECHO_N "(cached) $ECHO_C" >&6
14642 else
14643   ac_check_lib_save_LIBS=$LIBS
14644 LIBS="-lbsd  $LIBS"
14645 cat >conftest.$ac_ext <<_ACEOF
14646 #line 14646 "configure"
14647 #include "confdefs.h"
14648
14649 /* Override any gcc2 internal prototype to avoid an error.  */
14650 #ifdef __cplusplus
14651 extern "C"
14652 #endif
14653 /* We use char because int might match the return type of a gcc2
14654    builtin and then its argument prototype would still apply.  */
14655 char gettimeofday ();
14656 int
14657 main ()
14658 {
14659 gettimeofday ();
14660   ;
14661   return 0;
14662 }
14663 _ACEOF
14664 rm -f conftest.$ac_objext conftest$ac_exeext
14665 if { (eval echo "$as_me:14665: \"$ac_link\"") >&5
14666   (eval $ac_link) 2>&5
14667   ac_status=$?
14668   echo "$as_me:14668: \$? = $ac_status" >&5
14669   (exit $ac_status); } &&
14670          { ac_try='test -s conftest$ac_exeext'
14671   { (eval echo "$as_me:14671: \"$ac_try\"") >&5
14672   (eval $ac_try) 2>&5
14673   ac_status=$?
14674   echo "$as_me:14674: \$? = $ac_status" >&5
14675   (exit $ac_status); }; }; then
14676   ac_cv_lib_bsd_gettimeofday=yes
14677 else
14678   echo "$as_me: failed program was:" >&5
14679 cat conftest.$ac_ext >&5
14680 ac_cv_lib_bsd_gettimeofday=no
14681 fi
14682 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14683 LIBS=$ac_check_lib_save_LIBS
14684 fi
14685 echo "$as_me:14685: result: $ac_cv_lib_bsd_gettimeofday" >&5
14686 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14687 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14688
14689 cat >>confdefs.h <<\EOF
14690 #define HAVE_GETTIMEOFDAY 1
14691 EOF
14692
14693 cf_add_libs="-lbsd"
14694 # Filter out duplicates - this happens with badly-designed ".pc" files...
14695 for cf_add_1lib in $LIBS
14696 do
14697         for cf_add_2lib in $cf_add_libs
14698         do
14699                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14700                 then
14701                         cf_add_1lib=
14702                         break
14703                 fi
14704         done
14705         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14706 done
14707 LIBS="$cf_add_libs"
14708
14709 fi
14710
14711 fi
14712         ;;
14713 esac
14714
14715 echo "$as_me:14715: checking if -lm needed for math functions" >&5
14716 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14717 if test "${cf_cv_need_libm+set}" = set; then
14718   echo $ECHO_N "(cached) $ECHO_C" >&6
14719 else
14720
14721         cat >conftest.$ac_ext <<_ACEOF
14722 #line 14722 "configure"
14723 #include "confdefs.h"
14724
14725         #include <stdio.h>
14726         #include <math.h>
14727
14728 int
14729 main ()
14730 {
14731 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14732   ;
14733   return 0;
14734 }
14735 _ACEOF
14736 rm -f conftest.$ac_objext conftest$ac_exeext
14737 if { (eval echo "$as_me:14737: \"$ac_link\"") >&5
14738   (eval $ac_link) 2>&5
14739   ac_status=$?
14740   echo "$as_me:14740: \$? = $ac_status" >&5
14741   (exit $ac_status); } &&
14742          { ac_try='test -s conftest$ac_exeext'
14743   { (eval echo "$as_me:14743: \"$ac_try\"") >&5
14744   (eval $ac_try) 2>&5
14745   ac_status=$?
14746   echo "$as_me:14746: \$? = $ac_status" >&5
14747   (exit $ac_status); }; }; then
14748   cf_cv_need_libm=no
14749 else
14750   echo "$as_me: failed program was:" >&5
14751 cat conftest.$ac_ext >&5
14752 cf_cv_need_libm=yes
14753 fi
14754 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14755 fi
14756 echo "$as_me:14756: result: $cf_cv_need_libm" >&5
14757 echo "${ECHO_T}$cf_cv_need_libm" >&6
14758 if test "$cf_cv_need_libm" = yes
14759 then
14760 MATH_LIB=-lm
14761 fi
14762
14763 ###     Checks for header files.
14764 echo "$as_me:14764: checking for ANSI C header files" >&5
14765 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14766 if test "${ac_cv_header_stdc+set}" = set; then
14767   echo $ECHO_N "(cached) $ECHO_C" >&6
14768 else
14769   cat >conftest.$ac_ext <<_ACEOF
14770 #line 14770 "configure"
14771 #include "confdefs.h"
14772 #include <stdlib.h>
14773 #include <stdarg.h>
14774 #include <string.h>
14775 #include <float.h>
14776
14777 _ACEOF
14778 if { (eval echo "$as_me:14778: \"$ac_cpp conftest.$ac_ext\"") >&5
14779   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14780   ac_status=$?
14781   egrep -v '^ *\+' conftest.er1 >conftest.err
14782   rm -f conftest.er1
14783   cat conftest.err >&5
14784   echo "$as_me:14784: \$? = $ac_status" >&5
14785   (exit $ac_status); } >/dev/null; then
14786   if test -s conftest.err; then
14787     ac_cpp_err=$ac_c_preproc_warn_flag
14788   else
14789     ac_cpp_err=
14790   fi
14791 else
14792   ac_cpp_err=yes
14793 fi
14794 if test -z "$ac_cpp_err"; then
14795   ac_cv_header_stdc=yes
14796 else
14797   echo "$as_me: failed program was:" >&5
14798   cat conftest.$ac_ext >&5
14799   ac_cv_header_stdc=no
14800 fi
14801 rm -f conftest.err conftest.$ac_ext
14802
14803 if test $ac_cv_header_stdc = yes; then
14804   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14805   cat >conftest.$ac_ext <<_ACEOF
14806 #line 14806 "configure"
14807 #include "confdefs.h"
14808 #include <string.h>
14809
14810 _ACEOF
14811 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14812   egrep "memchr" >/dev/null 2>&1; then
14813   :
14814 else
14815   ac_cv_header_stdc=no
14816 fi
14817 rm -rf conftest*
14818
14819 fi
14820
14821 if test $ac_cv_header_stdc = yes; then
14822   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14823   cat >conftest.$ac_ext <<_ACEOF
14824 #line 14824 "configure"
14825 #include "confdefs.h"
14826 #include <stdlib.h>
14827
14828 _ACEOF
14829 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14830   egrep "free" >/dev/null 2>&1; then
14831   :
14832 else
14833   ac_cv_header_stdc=no
14834 fi
14835 rm -rf conftest*
14836
14837 fi
14838
14839 if test $ac_cv_header_stdc = yes; then
14840   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14841   if test "$cross_compiling" = yes; then
14842   :
14843 else
14844   cat >conftest.$ac_ext <<_ACEOF
14845 #line 14845 "configure"
14846 #include "confdefs.h"
14847 #include <ctype.h>
14848 #if ((' ' & 0x0FF) == 0x020)
14849 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14850 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14851 #else
14852 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14853                      || ('j' <= (c) && (c) <= 'r') \
14854                      || ('s' <= (c) && (c) <= 'z'))
14855 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14856 #endif
14857
14858 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14859 int
14860 main ()
14861 {
14862   int i;
14863   for (i = 0; i < 256; i++)
14864     if (XOR (islower (i), ISLOWER (i))
14865         || toupper (i) != TOUPPER (i))
14866       $ac_main_return(2);
14867   $ac_main_return (0);
14868 }
14869 _ACEOF
14870 rm -f conftest$ac_exeext
14871 if { (eval echo "$as_me:14871: \"$ac_link\"") >&5
14872   (eval $ac_link) 2>&5
14873   ac_status=$?
14874   echo "$as_me:14874: \$? = $ac_status" >&5
14875   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14876   { (eval echo "$as_me:14876: \"$ac_try\"") >&5
14877   (eval $ac_try) 2>&5
14878   ac_status=$?
14879   echo "$as_me:14879: \$? = $ac_status" >&5
14880   (exit $ac_status); }; }; then
14881   :
14882 else
14883   echo "$as_me: program exited with status $ac_status" >&5
14884 echo "$as_me: failed program was:" >&5
14885 cat conftest.$ac_ext >&5
14886 ac_cv_header_stdc=no
14887 fi
14888 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14889 fi
14890 fi
14891 fi
14892 echo "$as_me:14892: result: $ac_cv_header_stdc" >&5
14893 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14894 if test $ac_cv_header_stdc = yes; then
14895
14896 cat >>confdefs.h <<\EOF
14897 #define STDC_HEADERS 1
14898 EOF
14899
14900 fi
14901
14902 ac_header_dirent=no
14903 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14904   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14905 echo "$as_me:14905: checking for $ac_hdr that defines DIR" >&5
14906 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14907 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14908   echo $ECHO_N "(cached) $ECHO_C" >&6
14909 else
14910   cat >conftest.$ac_ext <<_ACEOF
14911 #line 14911 "configure"
14912 #include "confdefs.h"
14913 #include <sys/types.h>
14914 #include <$ac_hdr>
14915
14916 int
14917 main ()
14918 {
14919 if ((DIR *) 0)
14920 return 0;
14921   ;
14922   return 0;
14923 }
14924 _ACEOF
14925 rm -f conftest.$ac_objext
14926 if { (eval echo "$as_me:14926: \"$ac_compile\"") >&5
14927   (eval $ac_compile) 2>&5
14928   ac_status=$?
14929   echo "$as_me:14929: \$? = $ac_status" >&5
14930   (exit $ac_status); } &&
14931          { ac_try='test -s conftest.$ac_objext'
14932   { (eval echo "$as_me:14932: \"$ac_try\"") >&5
14933   (eval $ac_try) 2>&5
14934   ac_status=$?
14935   echo "$as_me:14935: \$? = $ac_status" >&5
14936   (exit $ac_status); }; }; then
14937   eval "$as_ac_Header=yes"
14938 else
14939   echo "$as_me: failed program was:" >&5
14940 cat conftest.$ac_ext >&5
14941 eval "$as_ac_Header=no"
14942 fi
14943 rm -f conftest.$ac_objext conftest.$ac_ext
14944 fi
14945 echo "$as_me:14945: result: `eval echo '${'$as_ac_Header'}'`" >&5
14946 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14947 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14948   cat >>confdefs.h <<EOF
14949 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14950 EOF
14951
14952 ac_header_dirent=$ac_hdr; break
14953 fi
14954
14955 done
14956 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14957 if test $ac_header_dirent = dirent.h; then
14958   echo "$as_me:14958: checking for opendir in -ldir" >&5
14959 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14960 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14961   echo $ECHO_N "(cached) $ECHO_C" >&6
14962 else
14963   ac_check_lib_save_LIBS=$LIBS
14964 LIBS="-ldir  $LIBS"
14965 cat >conftest.$ac_ext <<_ACEOF
14966 #line 14966 "configure"
14967 #include "confdefs.h"
14968
14969 /* Override any gcc2 internal prototype to avoid an error.  */
14970 #ifdef __cplusplus
14971 extern "C"
14972 #endif
14973 /* We use char because int might match the return type of a gcc2
14974    builtin and then its argument prototype would still apply.  */
14975 char opendir ();
14976 int
14977 main ()
14978 {
14979 opendir ();
14980   ;
14981   return 0;
14982 }
14983 _ACEOF
14984 rm -f conftest.$ac_objext conftest$ac_exeext
14985 if { (eval echo "$as_me:14985: \"$ac_link\"") >&5
14986   (eval $ac_link) 2>&5
14987   ac_status=$?
14988   echo "$as_me:14988: \$? = $ac_status" >&5
14989   (exit $ac_status); } &&
14990          { ac_try='test -s conftest$ac_exeext'
14991   { (eval echo "$as_me:14991: \"$ac_try\"") >&5
14992   (eval $ac_try) 2>&5
14993   ac_status=$?
14994   echo "$as_me:14994: \$? = $ac_status" >&5
14995   (exit $ac_status); }; }; then
14996   ac_cv_lib_dir_opendir=yes
14997 else
14998   echo "$as_me: failed program was:" >&5
14999 cat conftest.$ac_ext >&5
15000 ac_cv_lib_dir_opendir=no
15001 fi
15002 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15003 LIBS=$ac_check_lib_save_LIBS
15004 fi
15005 echo "$as_me:15005: result: $ac_cv_lib_dir_opendir" >&5
15006 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
15007 if test $ac_cv_lib_dir_opendir = yes; then
15008   LIBS="$LIBS -ldir"
15009 fi
15010
15011 else
15012   echo "$as_me:15012: checking for opendir in -lx" >&5
15013 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
15014 if test "${ac_cv_lib_x_opendir+set}" = set; then
15015   echo $ECHO_N "(cached) $ECHO_C" >&6
15016 else
15017   ac_check_lib_save_LIBS=$LIBS
15018 LIBS="-lx  $LIBS"
15019 cat >conftest.$ac_ext <<_ACEOF
15020 #line 15020 "configure"
15021 #include "confdefs.h"
15022
15023 /* Override any gcc2 internal prototype to avoid an error.  */
15024 #ifdef __cplusplus
15025 extern "C"
15026 #endif
15027 /* We use char because int might match the return type of a gcc2
15028    builtin and then its argument prototype would still apply.  */
15029 char opendir ();
15030 int
15031 main ()
15032 {
15033 opendir ();
15034   ;
15035   return 0;
15036 }
15037 _ACEOF
15038 rm -f conftest.$ac_objext conftest$ac_exeext
15039 if { (eval echo "$as_me:15039: \"$ac_link\"") >&5
15040   (eval $ac_link) 2>&5
15041   ac_status=$?
15042   echo "$as_me:15042: \$? = $ac_status" >&5
15043   (exit $ac_status); } &&
15044          { ac_try='test -s conftest$ac_exeext'
15045   { (eval echo "$as_me:15045: \"$ac_try\"") >&5
15046   (eval $ac_try) 2>&5
15047   ac_status=$?
15048   echo "$as_me:15048: \$? = $ac_status" >&5
15049   (exit $ac_status); }; }; then
15050   ac_cv_lib_x_opendir=yes
15051 else
15052   echo "$as_me: failed program was:" >&5
15053 cat conftest.$ac_ext >&5
15054 ac_cv_lib_x_opendir=no
15055 fi
15056 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15057 LIBS=$ac_check_lib_save_LIBS
15058 fi
15059 echo "$as_me:15059: result: $ac_cv_lib_x_opendir" >&5
15060 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
15061 if test $ac_cv_lib_x_opendir = yes; then
15062   LIBS="$LIBS -lx"
15063 fi
15064
15065 fi
15066
15067 echo "$as_me:15067: checking whether time.h and sys/time.h may both be included" >&5
15068 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15069 if test "${ac_cv_header_time+set}" = set; then
15070   echo $ECHO_N "(cached) $ECHO_C" >&6
15071 else
15072   cat >conftest.$ac_ext <<_ACEOF
15073 #line 15073 "configure"
15074 #include "confdefs.h"
15075 #include <sys/types.h>
15076 #include <sys/time.h>
15077 #include <time.h>
15078
15079 int
15080 main ()
15081 {
15082 if ((struct tm *) 0)
15083 return 0;
15084   ;
15085   return 0;
15086 }
15087 _ACEOF
15088 rm -f conftest.$ac_objext
15089 if { (eval echo "$as_me:15089: \"$ac_compile\"") >&5
15090   (eval $ac_compile) 2>&5
15091   ac_status=$?
15092   echo "$as_me:15092: \$? = $ac_status" >&5
15093   (exit $ac_status); } &&
15094          { ac_try='test -s conftest.$ac_objext'
15095   { (eval echo "$as_me:15095: \"$ac_try\"") >&5
15096   (eval $ac_try) 2>&5
15097   ac_status=$?
15098   echo "$as_me:15098: \$? = $ac_status" >&5
15099   (exit $ac_status); }; }; then
15100   ac_cv_header_time=yes
15101 else
15102   echo "$as_me: failed program was:" >&5
15103 cat conftest.$ac_ext >&5
15104 ac_cv_header_time=no
15105 fi
15106 rm -f conftest.$ac_objext conftest.$ac_ext
15107 fi
15108 echo "$as_me:15108: result: $ac_cv_header_time" >&5
15109 echo "${ECHO_T}$ac_cv_header_time" >&6
15110 if test $ac_cv_header_time = yes; then
15111
15112 cat >>confdefs.h <<\EOF
15113 #define TIME_WITH_SYS_TIME 1
15114 EOF
15115
15116 fi
15117
15118 cf_regex_func=no
15119
15120 cf_regex_libs="regex re"
15121 case $host_os in
15122 (mingw*)
15123         cf_regex_libs="gnurx $cf_regex_libs"
15124         ;;
15125 esac
15126
15127 echo "$as_me:15127: checking for regcomp" >&5
15128 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
15129 if test "${ac_cv_func_regcomp+set}" = set; then
15130   echo $ECHO_N "(cached) $ECHO_C" >&6
15131 else
15132   cat >conftest.$ac_ext <<_ACEOF
15133 #line 15133 "configure"
15134 #include "confdefs.h"
15135 /* System header to define __stub macros and hopefully few prototypes,
15136     which can conflict with char regcomp (); below.  */
15137 #include <assert.h>
15138 /* Override any gcc2 internal prototype to avoid an error.  */
15139 #ifdef __cplusplus
15140 extern "C"
15141 #endif
15142 /* We use char because int might match the return type of a gcc2
15143    builtin and then its argument prototype would still apply.  */
15144 char regcomp ();
15145 char (*f) ();
15146
15147 int
15148 main ()
15149 {
15150 /* The GNU C library defines this for functions which it implements
15151     to always fail with ENOSYS.  Some functions are actually named
15152     something starting with __ and the normal name is an alias.  */
15153 #if defined (__stub_regcomp) || defined (__stub___regcomp)
15154 choke me
15155 #else
15156 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15157 #endif
15158
15159   ;
15160   return 0;
15161 }
15162 _ACEOF
15163 rm -f conftest.$ac_objext conftest$ac_exeext
15164 if { (eval echo "$as_me:15164: \"$ac_link\"") >&5
15165   (eval $ac_link) 2>&5
15166   ac_status=$?
15167   echo "$as_me:15167: \$? = $ac_status" >&5
15168   (exit $ac_status); } &&
15169          { ac_try='test -s conftest$ac_exeext'
15170   { (eval echo "$as_me:15170: \"$ac_try\"") >&5
15171   (eval $ac_try) 2>&5
15172   ac_status=$?
15173   echo "$as_me:15173: \$? = $ac_status" >&5
15174   (exit $ac_status); }; }; then
15175   ac_cv_func_regcomp=yes
15176 else
15177   echo "$as_me: failed program was:" >&5
15178 cat conftest.$ac_ext >&5
15179 ac_cv_func_regcomp=no
15180 fi
15181 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15182 fi
15183 echo "$as_me:15183: result: $ac_cv_func_regcomp" >&5
15184 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
15185 if test $ac_cv_func_regcomp = yes; then
15186   cf_regex_func=regcomp
15187 else
15188
15189         for cf_regex_lib in $cf_regex_libs
15190         do
15191                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
15192 echo "$as_me:15192: checking for regcomp in -l$cf_regex_lib" >&5
15193 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
15194 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15195   echo $ECHO_N "(cached) $ECHO_C" >&6
15196 else
15197   ac_check_lib_save_LIBS=$LIBS
15198 LIBS="-l$cf_regex_lib  $LIBS"
15199 cat >conftest.$ac_ext <<_ACEOF
15200 #line 15200 "configure"
15201 #include "confdefs.h"
15202
15203 /* Override any gcc2 internal prototype to avoid an error.  */
15204 #ifdef __cplusplus
15205 extern "C"
15206 #endif
15207 /* We use char because int might match the return type of a gcc2
15208    builtin and then its argument prototype would still apply.  */
15209 char regcomp ();
15210 int
15211 main ()
15212 {
15213 regcomp ();
15214   ;
15215   return 0;
15216 }
15217 _ACEOF
15218 rm -f conftest.$ac_objext conftest$ac_exeext
15219 if { (eval echo "$as_me:15219: \"$ac_link\"") >&5
15220   (eval $ac_link) 2>&5
15221   ac_status=$?
15222   echo "$as_me:15222: \$? = $ac_status" >&5
15223   (exit $ac_status); } &&
15224          { ac_try='test -s conftest$ac_exeext'
15225   { (eval echo "$as_me:15225: \"$ac_try\"") >&5
15226   (eval $ac_try) 2>&5
15227   ac_status=$?
15228   echo "$as_me:15228: \$? = $ac_status" >&5
15229   (exit $ac_status); }; }; then
15230   eval "$as_ac_Lib=yes"
15231 else
15232   echo "$as_me: failed program was:" >&5
15233 cat conftest.$ac_ext >&5
15234 eval "$as_ac_Lib=no"
15235 fi
15236 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15237 LIBS=$ac_check_lib_save_LIBS
15238 fi
15239 echo "$as_me:15239: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15240 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15241 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15242
15243 cf_add_libs="-l$cf_regex_lib"
15244 # Filter out duplicates - this happens with badly-designed ".pc" files...
15245 for cf_add_1lib in $LIBS
15246 do
15247         for cf_add_2lib in $cf_add_libs
15248         do
15249                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15250                 then
15251                         cf_add_1lib=
15252                         break
15253                 fi
15254         done
15255         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15256 done
15257 LIBS="$cf_add_libs"
15258
15259                                 cf_regex_func=regcomp
15260                                 break
15261 fi
15262
15263         done
15264
15265 fi
15266
15267 if test "$cf_regex_func" = no ; then
15268         echo "$as_me:15268: checking for compile" >&5
15269 echo $ECHO_N "checking for compile... $ECHO_C" >&6
15270 if test "${ac_cv_func_compile+set}" = set; then
15271   echo $ECHO_N "(cached) $ECHO_C" >&6
15272 else
15273   cat >conftest.$ac_ext <<_ACEOF
15274 #line 15274 "configure"
15275 #include "confdefs.h"
15276 /* System header to define __stub macros and hopefully few prototypes,
15277     which can conflict with char compile (); below.  */
15278 #include <assert.h>
15279 /* Override any gcc2 internal prototype to avoid an error.  */
15280 #ifdef __cplusplus
15281 extern "C"
15282 #endif
15283 /* We use char because int might match the return type of a gcc2
15284    builtin and then its argument prototype would still apply.  */
15285 char compile ();
15286 char (*f) ();
15287
15288 int
15289 main ()
15290 {
15291 /* The GNU C library defines this for functions which it implements
15292     to always fail with ENOSYS.  Some functions are actually named
15293     something starting with __ and the normal name is an alias.  */
15294 #if defined (__stub_compile) || defined (__stub___compile)
15295 choke me
15296 #else
15297 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15298 #endif
15299
15300   ;
15301   return 0;
15302 }
15303 _ACEOF
15304 rm -f conftest.$ac_objext conftest$ac_exeext
15305 if { (eval echo "$as_me:15305: \"$ac_link\"") >&5
15306   (eval $ac_link) 2>&5
15307   ac_status=$?
15308   echo "$as_me:15308: \$? = $ac_status" >&5
15309   (exit $ac_status); } &&
15310          { ac_try='test -s conftest$ac_exeext'
15311   { (eval echo "$as_me:15311: \"$ac_try\"") >&5
15312   (eval $ac_try) 2>&5
15313   ac_status=$?
15314   echo "$as_me:15314: \$? = $ac_status" >&5
15315   (exit $ac_status); }; }; then
15316   ac_cv_func_compile=yes
15317 else
15318   echo "$as_me: failed program was:" >&5
15319 cat conftest.$ac_ext >&5
15320 ac_cv_func_compile=no
15321 fi
15322 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15323 fi
15324 echo "$as_me:15324: result: $ac_cv_func_compile" >&5
15325 echo "${ECHO_T}$ac_cv_func_compile" >&6
15326 if test $ac_cv_func_compile = yes; then
15327   cf_regex_func=compile
15328 else
15329
15330                 echo "$as_me:15330: checking for compile in -lgen" >&5
15331 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15332 if test "${ac_cv_lib_gen_compile+set}" = set; then
15333   echo $ECHO_N "(cached) $ECHO_C" >&6
15334 else
15335   ac_check_lib_save_LIBS=$LIBS
15336 LIBS="-lgen  $LIBS"
15337 cat >conftest.$ac_ext <<_ACEOF
15338 #line 15338 "configure"
15339 #include "confdefs.h"
15340
15341 /* Override any gcc2 internal prototype to avoid an error.  */
15342 #ifdef __cplusplus
15343 extern "C"
15344 #endif
15345 /* We use char because int might match the return type of a gcc2
15346    builtin and then its argument prototype would still apply.  */
15347 char compile ();
15348 int
15349 main ()
15350 {
15351 compile ();
15352   ;
15353   return 0;
15354 }
15355 _ACEOF
15356 rm -f conftest.$ac_objext conftest$ac_exeext
15357 if { (eval echo "$as_me:15357: \"$ac_link\"") >&5
15358   (eval $ac_link) 2>&5
15359   ac_status=$?
15360   echo "$as_me:15360: \$? = $ac_status" >&5
15361   (exit $ac_status); } &&
15362          { ac_try='test -s conftest$ac_exeext'
15363   { (eval echo "$as_me:15363: \"$ac_try\"") >&5
15364   (eval $ac_try) 2>&5
15365   ac_status=$?
15366   echo "$as_me:15366: \$? = $ac_status" >&5
15367   (exit $ac_status); }; }; then
15368   ac_cv_lib_gen_compile=yes
15369 else
15370   echo "$as_me: failed program was:" >&5
15371 cat conftest.$ac_ext >&5
15372 ac_cv_lib_gen_compile=no
15373 fi
15374 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15375 LIBS=$ac_check_lib_save_LIBS
15376 fi
15377 echo "$as_me:15377: result: $ac_cv_lib_gen_compile" >&5
15378 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15379 if test $ac_cv_lib_gen_compile = yes; then
15380
15381 cf_add_libs="-lgen"
15382 # Filter out duplicates - this happens with badly-designed ".pc" files...
15383 for cf_add_1lib in $LIBS
15384 do
15385         for cf_add_2lib in $cf_add_libs
15386         do
15387                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15388                 then
15389                         cf_add_1lib=
15390                         break
15391                 fi
15392         done
15393         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15394 done
15395 LIBS="$cf_add_libs"
15396
15397                                 cf_regex_func=compile
15398 fi
15399
15400 fi
15401
15402 fi
15403
15404 if test "$cf_regex_func" = no ; then
15405         { echo "$as_me:15405: WARNING: cannot find regular expression library" >&5
15406 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15407 fi
15408
15409 echo "$as_me:15409: checking for regular-expression headers" >&5
15410 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15411 if test "${cf_cv_regex_hdrs+set}" = set; then
15412   echo $ECHO_N "(cached) $ECHO_C" >&6
15413 else
15414
15415 cf_cv_regex_hdrs=no
15416 case $cf_regex_func in
15417 (compile)
15418         for cf_regex_hdr in regexp.h regexpr.h
15419         do
15420                 cat >conftest.$ac_ext <<_ACEOF
15421 #line 15421 "configure"
15422 #include "confdefs.h"
15423 #include <$cf_regex_hdr>
15424 int
15425 main ()
15426 {
15427
15428                         char *p = compile("", "", "", 0);
15429                         int x = step("", "");
15430
15431   ;
15432   return 0;
15433 }
15434 _ACEOF
15435 rm -f conftest.$ac_objext conftest$ac_exeext
15436 if { (eval echo "$as_me:15436: \"$ac_link\"") >&5
15437   (eval $ac_link) 2>&5
15438   ac_status=$?
15439   echo "$as_me:15439: \$? = $ac_status" >&5
15440   (exit $ac_status); } &&
15441          { ac_try='test -s conftest$ac_exeext'
15442   { (eval echo "$as_me:15442: \"$ac_try\"") >&5
15443   (eval $ac_try) 2>&5
15444   ac_status=$?
15445   echo "$as_me:15445: \$? = $ac_status" >&5
15446   (exit $ac_status); }; }; then
15447
15448                         cf_cv_regex_hdrs=$cf_regex_hdr
15449                         break
15450
15451 else
15452   echo "$as_me: failed program was:" >&5
15453 cat conftest.$ac_ext >&5
15454 fi
15455 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15456         done
15457         ;;
15458 (*)
15459         for cf_regex_hdr in regex.h
15460         do
15461                 cat >conftest.$ac_ext <<_ACEOF
15462 #line 15462 "configure"
15463 #include "confdefs.h"
15464 #include <sys/types.h>
15465 #include <$cf_regex_hdr>
15466 int
15467 main ()
15468 {
15469
15470                         regex_t *p;
15471                         int x = regcomp(p, "", 0);
15472                         int y = regexec(p, "", 0, 0, 0);
15473                         regfree(p);
15474
15475   ;
15476   return 0;
15477 }
15478 _ACEOF
15479 rm -f conftest.$ac_objext conftest$ac_exeext
15480 if { (eval echo "$as_me:15480: \"$ac_link\"") >&5
15481   (eval $ac_link) 2>&5
15482   ac_status=$?
15483   echo "$as_me:15483: \$? = $ac_status" >&5
15484   (exit $ac_status); } &&
15485          { ac_try='test -s conftest$ac_exeext'
15486   { (eval echo "$as_me:15486: \"$ac_try\"") >&5
15487   (eval $ac_try) 2>&5
15488   ac_status=$?
15489   echo "$as_me:15489: \$? = $ac_status" >&5
15490   (exit $ac_status); }; }; then
15491
15492                         cf_cv_regex_hdrs=$cf_regex_hdr
15493                         break
15494
15495 else
15496   echo "$as_me: failed program was:" >&5
15497 cat conftest.$ac_ext >&5
15498 fi
15499 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15500         done
15501         ;;
15502 esac
15503
15504 fi
15505 echo "$as_me:15505: result: $cf_cv_regex_hdrs" >&5
15506 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15507
15508 case $cf_cv_regex_hdrs in
15509         (no)            { echo "$as_me:15509: WARNING: no regular expression header found" >&5
15510 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
15511         (regex.h)
15512 cat >>confdefs.h <<\EOF
15513 #define HAVE_REGEX_H_FUNCS 1
15514 EOF
15515  ;;
15516         (regexp.h)
15517 cat >>confdefs.h <<\EOF
15518 #define HAVE_REGEXP_H_FUNCS 1
15519 EOF
15520  ;;
15521         (regexpr.h)
15522 cat >>confdefs.h <<\EOF
15523 #define HAVE_REGEXPR_H_FUNCS 1
15524 EOF
15525  ;;
15526 esac
15527
15528 for ac_header in \
15529 fcntl.h \
15530 getopt.h \
15531 limits.h \
15532 locale.h \
15533 math.h \
15534 poll.h \
15535 sys/bsdtypes.h \
15536 sys/ioctl.h \
15537 sys/param.h \
15538 sys/poll.h \
15539 sys/select.h \
15540 sys/time.h \
15541 sys/times.h \
15542 ttyent.h \
15543 unistd.h \
15544 wctype.h \
15545
15546 do
15547 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15548 echo "$as_me:15548: checking for $ac_header" >&5
15549 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15550 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15551   echo $ECHO_N "(cached) $ECHO_C" >&6
15552 else
15553   cat >conftest.$ac_ext <<_ACEOF
15554 #line 15554 "configure"
15555 #include "confdefs.h"
15556 #include <$ac_header>
15557 _ACEOF
15558 if { (eval echo "$as_me:15558: \"$ac_cpp conftest.$ac_ext\"") >&5
15559   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15560   ac_status=$?
15561   egrep -v '^ *\+' conftest.er1 >conftest.err
15562   rm -f conftest.er1
15563   cat conftest.err >&5
15564   echo "$as_me:15564: \$? = $ac_status" >&5
15565   (exit $ac_status); } >/dev/null; then
15566   if test -s conftest.err; then
15567     ac_cpp_err=$ac_c_preproc_warn_flag
15568   else
15569     ac_cpp_err=
15570   fi
15571 else
15572   ac_cpp_err=yes
15573 fi
15574 if test -z "$ac_cpp_err"; then
15575   eval "$as_ac_Header=yes"
15576 else
15577   echo "$as_me: failed program was:" >&5
15578   cat conftest.$ac_ext >&5
15579   eval "$as_ac_Header=no"
15580 fi
15581 rm -f conftest.err conftest.$ac_ext
15582 fi
15583 echo "$as_me:15583: result: `eval echo '${'$as_ac_Header'}'`" >&5
15584 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15585 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15586   cat >>confdefs.h <<EOF
15587 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15588 EOF
15589
15590 fi
15591 done
15592
15593 for ac_header in unistd.h getopt.h
15594 do
15595 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15596 echo "$as_me:15596: checking for $ac_header" >&5
15597 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15598 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15599   echo $ECHO_N "(cached) $ECHO_C" >&6
15600 else
15601   cat >conftest.$ac_ext <<_ACEOF
15602 #line 15602 "configure"
15603 #include "confdefs.h"
15604 #include <$ac_header>
15605 _ACEOF
15606 if { (eval echo "$as_me:15606: \"$ac_cpp conftest.$ac_ext\"") >&5
15607   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15608   ac_status=$?
15609   egrep -v '^ *\+' conftest.er1 >conftest.err
15610   rm -f conftest.er1
15611   cat conftest.err >&5
15612   echo "$as_me:15612: \$? = $ac_status" >&5
15613   (exit $ac_status); } >/dev/null; then
15614   if test -s conftest.err; then
15615     ac_cpp_err=$ac_c_preproc_warn_flag
15616   else
15617     ac_cpp_err=
15618   fi
15619 else
15620   ac_cpp_err=yes
15621 fi
15622 if test -z "$ac_cpp_err"; then
15623   eval "$as_ac_Header=yes"
15624 else
15625   echo "$as_me: failed program was:" >&5
15626   cat conftest.$ac_ext >&5
15627   eval "$as_ac_Header=no"
15628 fi
15629 rm -f conftest.err conftest.$ac_ext
15630 fi
15631 echo "$as_me:15631: result: `eval echo '${'$as_ac_Header'}'`" >&5
15632 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15633 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15634   cat >>confdefs.h <<EOF
15635 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15636 EOF
15637
15638 fi
15639 done
15640
15641 echo "$as_me:15641: checking for header declaring getopt variables" >&5
15642 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15643 if test "${cf_cv_getopt_header+set}" = set; then
15644   echo $ECHO_N "(cached) $ECHO_C" >&6
15645 else
15646
15647 cf_cv_getopt_header=none
15648 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15649 do
15650 cat >conftest.$ac_ext <<_ACEOF
15651 #line 15651 "configure"
15652 #include "confdefs.h"
15653
15654 #include <$cf_header>
15655 int
15656 main ()
15657 {
15658 int x = optind; char *y = optarg
15659   ;
15660   return 0;
15661 }
15662 _ACEOF
15663 rm -f conftest.$ac_objext
15664 if { (eval echo "$as_me:15664: \"$ac_compile\"") >&5
15665   (eval $ac_compile) 2>&5
15666   ac_status=$?
15667   echo "$as_me:15667: \$? = $ac_status" >&5
15668   (exit $ac_status); } &&
15669          { ac_try='test -s conftest.$ac_objext'
15670   { (eval echo "$as_me:15670: \"$ac_try\"") >&5
15671   (eval $ac_try) 2>&5
15672   ac_status=$?
15673   echo "$as_me:15673: \$? = $ac_status" >&5
15674   (exit $ac_status); }; }; then
15675   cf_cv_getopt_header=$cf_header
15676  break
15677 else
15678   echo "$as_me: failed program was:" >&5
15679 cat conftest.$ac_ext >&5
15680 fi
15681 rm -f conftest.$ac_objext conftest.$ac_ext
15682 done
15683
15684 fi
15685 echo "$as_me:15685: result: $cf_cv_getopt_header" >&5
15686 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15687 if test $cf_cv_getopt_header != none ; then
15688
15689 cat >>confdefs.h <<\EOF
15690 #define HAVE_GETOPT_HEADER 1
15691 EOF
15692
15693 fi
15694 if test $cf_cv_getopt_header = getopt.h ; then
15695
15696 cat >>confdefs.h <<\EOF
15697 #define NEED_GETOPT_H 1
15698 EOF
15699
15700 fi
15701
15702 # check for ISC (this may also define _POSIX_SOURCE)
15703 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15704 if test "x$ISC" = xyes ; then
15705
15706 echo "$as_me:15706: checking for main in -lcposix" >&5
15707 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15708 if test "${ac_cv_lib_cposix_main+set}" = set; then
15709   echo $ECHO_N "(cached) $ECHO_C" >&6
15710 else
15711   ac_check_lib_save_LIBS=$LIBS
15712 LIBS="-lcposix  $LIBS"
15713 cat >conftest.$ac_ext <<_ACEOF
15714 #line 15714 "configure"
15715 #include "confdefs.h"
15716
15717 int
15718 main ()
15719 {
15720 main ();
15721   ;
15722   return 0;
15723 }
15724 _ACEOF
15725 rm -f conftest.$ac_objext conftest$ac_exeext
15726 if { (eval echo "$as_me:15726: \"$ac_link\"") >&5
15727   (eval $ac_link) 2>&5
15728   ac_status=$?
15729   echo "$as_me:15729: \$? = $ac_status" >&5
15730   (exit $ac_status); } &&
15731          { ac_try='test -s conftest$ac_exeext'
15732   { (eval echo "$as_me:15732: \"$ac_try\"") >&5
15733   (eval $ac_try) 2>&5
15734   ac_status=$?
15735   echo "$as_me:15735: \$? = $ac_status" >&5
15736   (exit $ac_status); }; }; then
15737   ac_cv_lib_cposix_main=yes
15738 else
15739   echo "$as_me: failed program was:" >&5
15740 cat conftest.$ac_ext >&5
15741 ac_cv_lib_cposix_main=no
15742 fi
15743 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15744 LIBS=$ac_check_lib_save_LIBS
15745 fi
15746 echo "$as_me:15746: result: $ac_cv_lib_cposix_main" >&5
15747 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15748 if test $ac_cv_lib_cposix_main = yes; then
15749   cat >>confdefs.h <<EOF
15750 #define HAVE_LIBCPOSIX 1
15751 EOF
15752
15753   LIBS="-lcposix $LIBS"
15754
15755 fi
15756
15757         echo "$as_me:15757: checking for bzero in -linet" >&5
15758 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15759 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15760   echo $ECHO_N "(cached) $ECHO_C" >&6
15761 else
15762   ac_check_lib_save_LIBS=$LIBS
15763 LIBS="-linet  $LIBS"
15764 cat >conftest.$ac_ext <<_ACEOF
15765 #line 15765 "configure"
15766 #include "confdefs.h"
15767
15768 /* Override any gcc2 internal prototype to avoid an error.  */
15769 #ifdef __cplusplus
15770 extern "C"
15771 #endif
15772 /* We use char because int might match the return type of a gcc2
15773    builtin and then its argument prototype would still apply.  */
15774 char bzero ();
15775 int
15776 main ()
15777 {
15778 bzero ();
15779   ;
15780   return 0;
15781 }
15782 _ACEOF
15783 rm -f conftest.$ac_objext conftest$ac_exeext
15784 if { (eval echo "$as_me:15784: \"$ac_link\"") >&5
15785   (eval $ac_link) 2>&5
15786   ac_status=$?
15787   echo "$as_me:15787: \$? = $ac_status" >&5
15788   (exit $ac_status); } &&
15789          { ac_try='test -s conftest$ac_exeext'
15790   { (eval echo "$as_me:15790: \"$ac_try\"") >&5
15791   (eval $ac_try) 2>&5
15792   ac_status=$?
15793   echo "$as_me:15793: \$? = $ac_status" >&5
15794   (exit $ac_status); }; }; then
15795   ac_cv_lib_inet_bzero=yes
15796 else
15797   echo "$as_me: failed program was:" >&5
15798 cat conftest.$ac_ext >&5
15799 ac_cv_lib_inet_bzero=no
15800 fi
15801 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15802 LIBS=$ac_check_lib_save_LIBS
15803 fi
15804 echo "$as_me:15804: result: $ac_cv_lib_inet_bzero" >&5
15805 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15806 if test $ac_cv_lib_inet_bzero = yes; then
15807
15808 cf_add_libs="-linet"
15809 # Filter out duplicates - this happens with badly-designed ".pc" files...
15810 for cf_add_1lib in $LIBS
15811 do
15812         for cf_add_2lib in $cf_add_libs
15813         do
15814                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15815                 then
15816                         cf_add_1lib=
15817                         break
15818                 fi
15819         done
15820         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15821 done
15822 LIBS="$cf_add_libs"
15823
15824 fi
15825 fi
15826
15827 echo "$as_me:15827: checking if sys/time.h works with sys/select.h" >&5
15828 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15829 if test "${cf_cv_sys_time_select+set}" = set; then
15830   echo $ECHO_N "(cached) $ECHO_C" >&6
15831 else
15832
15833 cat >conftest.$ac_ext <<_ACEOF
15834 #line 15834 "configure"
15835 #include "confdefs.h"
15836
15837 #include <sys/types.h>
15838 #ifdef HAVE_SYS_TIME_H
15839 #include <sys/time.h>
15840 #endif
15841 #ifdef HAVE_SYS_SELECT_H
15842 #include <sys/select.h>
15843 #endif
15844
15845 int
15846 main ()
15847 {
15848
15849   ;
15850   return 0;
15851 }
15852 _ACEOF
15853 rm -f conftest.$ac_objext
15854 if { (eval echo "$as_me:15854: \"$ac_compile\"") >&5
15855   (eval $ac_compile) 2>&5
15856   ac_status=$?
15857   echo "$as_me:15857: \$? = $ac_status" >&5
15858   (exit $ac_status); } &&
15859          { ac_try='test -s conftest.$ac_objext'
15860   { (eval echo "$as_me:15860: \"$ac_try\"") >&5
15861   (eval $ac_try) 2>&5
15862   ac_status=$?
15863   echo "$as_me:15863: \$? = $ac_status" >&5
15864   (exit $ac_status); }; }; then
15865   cf_cv_sys_time_select=yes
15866 else
15867   echo "$as_me: failed program was:" >&5
15868 cat conftest.$ac_ext >&5
15869 cf_cv_sys_time_select=no
15870 fi
15871 rm -f conftest.$ac_objext conftest.$ac_ext
15872
15873 fi
15874
15875 echo "$as_me:15875: result: $cf_cv_sys_time_select" >&5
15876 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15877 test "$cf_cv_sys_time_select" = yes &&
15878 cat >>confdefs.h <<\EOF
15879 #define HAVE_SYS_TIME_SELECT 1
15880 EOF
15881
15882 ###     checks for compiler characteristics
15883 ac_ext=c
15884 ac_cpp='$CPP $CPPFLAGS'
15885 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15886 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15887 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15888 ac_main_return=return
15889
15890 echo "$as_me:15890: checking for an ANSI C-conforming const" >&5
15891 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15892 if test "${ac_cv_c_const+set}" = set; then
15893   echo $ECHO_N "(cached) $ECHO_C" >&6
15894 else
15895   cat >conftest.$ac_ext <<_ACEOF
15896 #line 15896 "configure"
15897 #include "confdefs.h"
15898
15899 int
15900 main ()
15901 {
15902 /* FIXME: Include the comments suggested by Paul. */
15903 #ifndef __cplusplus
15904   /* Ultrix mips cc rejects this.  */
15905   typedef int charset[2];
15906   const charset x;
15907   /* SunOS 4.1.1 cc rejects this.  */
15908   char const *const *ccp;
15909   char **p;
15910   /* NEC SVR4.0.2 mips cc rejects this.  */
15911   struct point {int x, y;};
15912   static struct point const zero = {0,0};
15913   /* AIX XL C 1.02.0.0 rejects this.
15914      It does not let you subtract one const X* pointer from another in
15915      an arm of an if-expression whose if-part is not a constant
15916      expression */
15917   const char *g = "string";
15918   ccp = &g + (g ? g-g : 0);
15919   /* HPUX 7.0 cc rejects these. */
15920   ++ccp;
15921   p = (char**) ccp;
15922   ccp = (char const *const *) p;
15923   { /* SCO 3.2v4 cc rejects this.  */
15924     char *t;
15925     char const *s = 0 ? (char *) 0 : (char const *) 0;
15926
15927     *t++ = 0;
15928   }
15929   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15930     int x[] = {25, 17};
15931     const int *foo = &x[0];
15932     ++foo;
15933   }
15934   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15935     typedef const int *iptr;
15936     iptr p = 0;
15937     ++p;
15938   }
15939   { /* AIX XL C 1.02.0.0 rejects this saying
15940        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15941     struct s { int j; const int *ap[3]; };
15942     struct s *b; b->j = 5;
15943   }
15944   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15945     const int foo = 10;
15946   }
15947 #endif
15948
15949   ;
15950   return 0;
15951 }
15952 _ACEOF
15953 rm -f conftest.$ac_objext
15954 if { (eval echo "$as_me:15954: \"$ac_compile\"") >&5
15955   (eval $ac_compile) 2>&5
15956   ac_status=$?
15957   echo "$as_me:15957: \$? = $ac_status" >&5
15958   (exit $ac_status); } &&
15959          { ac_try='test -s conftest.$ac_objext'
15960   { (eval echo "$as_me:15960: \"$ac_try\"") >&5
15961   (eval $ac_try) 2>&5
15962   ac_status=$?
15963   echo "$as_me:15963: \$? = $ac_status" >&5
15964   (exit $ac_status); }; }; then
15965   ac_cv_c_const=yes
15966 else
15967   echo "$as_me: failed program was:" >&5
15968 cat conftest.$ac_ext >&5
15969 ac_cv_c_const=no
15970 fi
15971 rm -f conftest.$ac_objext conftest.$ac_ext
15972 fi
15973 echo "$as_me:15973: result: $ac_cv_c_const" >&5
15974 echo "${ECHO_T}$ac_cv_c_const" >&6
15975 if test $ac_cv_c_const = no; then
15976
15977 cat >>confdefs.h <<\EOF
15978 #define const
15979 EOF
15980
15981 fi
15982
15983 echo "$as_me:15983: checking for inline" >&5
15984 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15985 if test "${ac_cv_c_inline+set}" = set; then
15986   echo $ECHO_N "(cached) $ECHO_C" >&6
15987 else
15988   ac_cv_c_inline=no
15989 for ac_kw in inline __inline__ __inline; do
15990   cat >conftest.$ac_ext <<_ACEOF
15991 #line 15991 "configure"
15992 #include "confdefs.h"
15993 #ifndef __cplusplus
15994 static $ac_kw int static_foo () {return 0; }
15995 $ac_kw int foo () {return 0; }
15996 #endif
15997
15998 _ACEOF
15999 rm -f conftest.$ac_objext
16000 if { (eval echo "$as_me:16000: \"$ac_compile\"") >&5
16001   (eval $ac_compile) 2>&5
16002   ac_status=$?
16003   echo "$as_me:16003: \$? = $ac_status" >&5
16004   (exit $ac_status); } &&
16005          { ac_try='test -s conftest.$ac_objext'
16006   { (eval echo "$as_me:16006: \"$ac_try\"") >&5
16007   (eval $ac_try) 2>&5
16008   ac_status=$?
16009   echo "$as_me:16009: \$? = $ac_status" >&5
16010   (exit $ac_status); }; }; then
16011   ac_cv_c_inline=$ac_kw; break
16012 else
16013   echo "$as_me: failed program was:" >&5
16014 cat conftest.$ac_ext >&5
16015 fi
16016 rm -f conftest.$ac_objext conftest.$ac_ext
16017 done
16018
16019 fi
16020 echo "$as_me:16020: result: $ac_cv_c_inline" >&5
16021 echo "${ECHO_T}$ac_cv_c_inline" >&6
16022 case $ac_cv_c_inline in
16023   inline | yes) ;;
16024   no)
16025 cat >>confdefs.h <<\EOF
16026 #define inline
16027 EOF
16028  ;;
16029   *)  cat >>confdefs.h <<EOF
16030 #define inline $ac_cv_c_inline
16031 EOF
16032  ;;
16033 esac
16034
16035 NCURSES_INLINE=
16036 if test "$ac_cv_c_inline" != no ; then
16037         NCURSES_INLINE=inline
16038         if test "$INTEL_COMPILER" = yes
16039         then
16040                 :
16041         elif test "$CLANG_COMPILER" = yes
16042         then
16043                 :
16044         elif test "$GCC" = yes
16045         then
16046                 echo "$as_me:16046: checking if $CC supports options to tune inlining" >&5
16047 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
16048 if test "${cf_cv_gcc_inline+set}" = set; then
16049   echo $ECHO_N "(cached) $ECHO_C" >&6
16050 else
16051
16052                 cf_save_CFLAGS=$CFLAGS
16053                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
16054                 cat >conftest.$ac_ext <<_ACEOF
16055 #line 16055 "configure"
16056 #include "confdefs.h"
16057 inline int foo(void) { return 1; }
16058 int
16059 main ()
16060 {
16061 ${cf_cv_main_return:-return} foo()
16062   ;
16063   return 0;
16064 }
16065 _ACEOF
16066 rm -f conftest.$ac_objext
16067 if { (eval echo "$as_me:16067: \"$ac_compile\"") >&5
16068   (eval $ac_compile) 2>&5
16069   ac_status=$?
16070   echo "$as_me:16070: \$? = $ac_status" >&5
16071   (exit $ac_status); } &&
16072          { ac_try='test -s conftest.$ac_objext'
16073   { (eval echo "$as_me:16073: \"$ac_try\"") >&5
16074   (eval $ac_try) 2>&5
16075   ac_status=$?
16076   echo "$as_me:16076: \$? = $ac_status" >&5
16077   (exit $ac_status); }; }; then
16078   cf_cv_gcc_inline=yes
16079 else
16080   echo "$as_me: failed program was:" >&5
16081 cat conftest.$ac_ext >&5
16082 cf_cv_gcc_inline=no
16083 fi
16084 rm -f conftest.$ac_objext conftest.$ac_ext
16085                 CFLAGS=$cf_save_CFLAGS
16086
16087 fi
16088 echo "$as_me:16088: result: $cf_cv_gcc_inline" >&5
16089 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
16090                 if test "$cf_cv_gcc_inline" = yes ; then
16091
16092 cf_fix_cppflags=no
16093 cf_new_cflags=
16094 cf_new_cppflags=
16095 cf_new_extra_cppflags=
16096
16097 for cf_add_cflags in --param max-inline-insns-single=1200
16098 do
16099 case $cf_fix_cppflags in
16100 (no)
16101         case $cf_add_cflags in
16102         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16103                 case $cf_add_cflags in
16104                 (-D*)
16105                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16106
16107                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16108                                 && test -z "${cf_tst_cflags}" \
16109                                 && cf_fix_cppflags=yes
16110
16111                         if test $cf_fix_cppflags = yes ; then
16112                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16113                                 continue
16114                         elif test "${cf_tst_cflags}" = "\"'" ; then
16115                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16116                                 continue
16117                         fi
16118                         ;;
16119                 esac
16120                 case "$CPPFLAGS" in
16121                 (*$cf_add_cflags)
16122                         ;;
16123                 (*)
16124                         case $cf_add_cflags in
16125                         (-D*)
16126                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16127
16128 CPPFLAGS=`echo "$CPPFLAGS" | \
16129         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16130                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16131
16132                                 ;;
16133                         esac
16134                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16135                         ;;
16136                 esac
16137                 ;;
16138         (*)
16139                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16140                 ;;
16141         esac
16142         ;;
16143 (yes)
16144         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16145
16146         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16147
16148         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16149                 && test -z "${cf_tst_cflags}" \
16150                 && cf_fix_cppflags=no
16151         ;;
16152 esac
16153 done
16154
16155 if test -n "$cf_new_cflags" ; then
16156
16157         CFLAGS="$CFLAGS $cf_new_cflags"
16158 fi
16159
16160 if test -n "$cf_new_cppflags" ; then
16161
16162         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16163 fi
16164
16165 if test -n "$cf_new_extra_cppflags" ; then
16166
16167         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16168 fi
16169
16170                 fi
16171         fi
16172 fi
16173
16174 echo "$as_me:16174: checking for signal global datatype" >&5
16175 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
16176 if test "${cf_cv_sig_atomic_t+set}" = set; then
16177   echo $ECHO_N "(cached) $ECHO_C" >&6
16178 else
16179
16180         for cf_type in \
16181                 "volatile sig_atomic_t" \
16182                 "sig_atomic_t" \
16183                 "int"
16184         do
16185         cat >conftest.$ac_ext <<_ACEOF
16186 #line 16186 "configure"
16187 #include "confdefs.h"
16188
16189 #include <sys/types.h>
16190 #include <signal.h>
16191 #include <stdio.h>
16192
16193 extern $cf_type x;
16194 $cf_type x;
16195 static void handler(int sig)
16196 {
16197         x = 5;
16198 }
16199 int
16200 main ()
16201 {
16202 signal(SIGINT, handler);
16203                  x = 1
16204   ;
16205   return 0;
16206 }
16207 _ACEOF
16208 rm -f conftest.$ac_objext
16209 if { (eval echo "$as_me:16209: \"$ac_compile\"") >&5
16210   (eval $ac_compile) 2>&5
16211   ac_status=$?
16212   echo "$as_me:16212: \$? = $ac_status" >&5
16213   (exit $ac_status); } &&
16214          { ac_try='test -s conftest.$ac_objext'
16215   { (eval echo "$as_me:16215: \"$ac_try\"") >&5
16216   (eval $ac_try) 2>&5
16217   ac_status=$?
16218   echo "$as_me:16218: \$? = $ac_status" >&5
16219   (exit $ac_status); }; }; then
16220   cf_cv_sig_atomic_t=$cf_type
16221 else
16222   echo "$as_me: failed program was:" >&5
16223 cat conftest.$ac_ext >&5
16224 cf_cv_sig_atomic_t=no
16225 fi
16226 rm -f conftest.$ac_objext conftest.$ac_ext
16227                 test "$cf_cv_sig_atomic_t" != no && break
16228         done
16229
16230 fi
16231
16232 echo "$as_me:16232: result: $cf_cv_sig_atomic_t" >&5
16233 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
16234 test "$cf_cv_sig_atomic_t" != no &&
16235 cat >>confdefs.h <<EOF
16236 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
16237 EOF
16238
16239 if test $NCURSES_CHTYPE = auto ; then
16240
16241 echo "$as_me:16241: checking for type of chtype" >&5
16242 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
16243 if test "${cf_cv_typeof_chtype+set}" = set; then
16244   echo $ECHO_N "(cached) $ECHO_C" >&6
16245 else
16246
16247                 if test "$cross_compiling" = yes; then
16248   cf_cv_typeof_chtype=long
16249 else
16250   cat >conftest.$ac_ext <<_ACEOF
16251 #line 16251 "configure"
16252 #include "confdefs.h"
16253
16254 #define WANT_BITS 31
16255 #include <stdio.h>
16256 int main()
16257 {
16258         FILE *fp = fopen("cf_test.out", "w");
16259         if (fp != 0) {
16260                 char *result = "long";
16261                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
16262                         int n;
16263                         unsigned int x, y;
16264                         for (n = 0; n < WANT_BITS; n++) {
16265                                 x = (1 << n);
16266                                 y = (x >> n);
16267                                 if (y != 1 || x == 0) {
16268                                         x = 0;
16269                                         break;
16270                                 }
16271                         }
16272                         /*
16273                          * If x is nonzero, an int is big enough for the bits
16274                          * that we want.
16275                          */
16276                         result = (x != 0) ? "int" : "long";
16277                 }
16278                 fputs(result, fp);
16279                 fclose(fp);
16280         }
16281         ${cf_cv_main_return:-return}(0);
16282 }
16283
16284 _ACEOF
16285 rm -f conftest$ac_exeext
16286 if { (eval echo "$as_me:16286: \"$ac_link\"") >&5
16287   (eval $ac_link) 2>&5
16288   ac_status=$?
16289   echo "$as_me:16289: \$? = $ac_status" >&5
16290   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16291   { (eval echo "$as_me:16291: \"$ac_try\"") >&5
16292   (eval $ac_try) 2>&5
16293   ac_status=$?
16294   echo "$as_me:16294: \$? = $ac_status" >&5
16295   (exit $ac_status); }; }; then
16296   cf_cv_typeof_chtype=`cat cf_test.out`
16297 else
16298   echo "$as_me: program exited with status $ac_status" >&5
16299 echo "$as_me: failed program was:" >&5
16300 cat conftest.$ac_ext >&5
16301 cf_cv_typeof_chtype=long
16302 fi
16303 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16304 fi
16305                 rm -f cf_test.out
16306
16307 fi
16308
16309 echo "$as_me:16309: result: $cf_cv_typeof_chtype" >&5
16310 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
16311
16312 cat >>confdefs.h <<EOF
16313 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
16314 EOF
16315
16316 else
16317         cf_cv_typeof_chtype=$NCURSES_CHTYPE
16318 fi
16319 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
16320
16321 echo "$as_me:16321: checking if unsigned literals are legal" >&5
16322 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
16323 if test "${cf_cv_unsigned_literals+set}" = set; then
16324   echo $ECHO_N "(cached) $ECHO_C" >&6
16325 else
16326
16327         cat >conftest.$ac_ext <<_ACEOF
16328 #line 16328 "configure"
16329 #include "confdefs.h"
16330
16331 int
16332 main ()
16333 {
16334 long x = 1L + 1UL + 1U + 1
16335   ;
16336   return 0;
16337 }
16338 _ACEOF
16339 rm -f conftest.$ac_objext
16340 if { (eval echo "$as_me:16340: \"$ac_compile\"") >&5
16341   (eval $ac_compile) 2>&5
16342   ac_status=$?
16343   echo "$as_me:16343: \$? = $ac_status" >&5
16344   (exit $ac_status); } &&
16345          { ac_try='test -s conftest.$ac_objext'
16346   { (eval echo "$as_me:16346: \"$ac_try\"") >&5
16347   (eval $ac_try) 2>&5
16348   ac_status=$?
16349   echo "$as_me:16349: \$? = $ac_status" >&5
16350   (exit $ac_status); }; }; then
16351   cf_cv_unsigned_literals=yes
16352 else
16353   echo "$as_me: failed program was:" >&5
16354 cat conftest.$ac_ext >&5
16355 cf_cv_unsigned_literals=no
16356 fi
16357 rm -f conftest.$ac_objext conftest.$ac_ext
16358
16359 fi
16360
16361 echo "$as_me:16361: result: $cf_cv_unsigned_literals" >&5
16362 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16363
16364 cf_cv_1UL="1"
16365 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16366 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
16367
16368 if test $NCURSES_MMASK_T = auto ; then
16369         cf_cv_typeof_mmask_t=long
16370 else
16371         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16372 fi
16373 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16374
16375 ###     Checks for external-data
16376
16377 echo "$as_me:16377: checking if external errno is declared" >&5
16378 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16379 if test "${cf_cv_dcl_errno+set}" = set; then
16380   echo $ECHO_N "(cached) $ECHO_C" >&6
16381 else
16382
16383         cat >conftest.$ac_ext <<_ACEOF
16384 #line 16384 "configure"
16385 #include "confdefs.h"
16386
16387 #ifdef HAVE_STDLIB_H
16388 #include <stdlib.h>
16389 #endif
16390 #include <stdio.h>
16391 #include <sys/types.h>
16392 #include <errno.h>
16393 int
16394 main ()
16395 {
16396 int x = (int) errno
16397   ;
16398   return 0;
16399 }
16400 _ACEOF
16401 rm -f conftest.$ac_objext
16402 if { (eval echo "$as_me:16402: \"$ac_compile\"") >&5
16403   (eval $ac_compile) 2>&5
16404   ac_status=$?
16405   echo "$as_me:16405: \$? = $ac_status" >&5
16406   (exit $ac_status); } &&
16407          { ac_try='test -s conftest.$ac_objext'
16408   { (eval echo "$as_me:16408: \"$ac_try\"") >&5
16409   (eval $ac_try) 2>&5
16410   ac_status=$?
16411   echo "$as_me:16411: \$? = $ac_status" >&5
16412   (exit $ac_status); }; }; then
16413   cf_cv_dcl_errno=yes
16414 else
16415   echo "$as_me: failed program was:" >&5
16416 cat conftest.$ac_ext >&5
16417 cf_cv_dcl_errno=no
16418 fi
16419 rm -f conftest.$ac_objext conftest.$ac_ext
16420
16421 fi
16422 echo "$as_me:16422: result: $cf_cv_dcl_errno" >&5
16423 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16424
16425 if test "$cf_cv_dcl_errno" = no ; then
16426
16427 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16428
16429         cat >>confdefs.h <<EOF
16430 #define $cf_result 1
16431 EOF
16432
16433 fi
16434
16435 # It's possible (for near-UNIX clones) that the data doesn't exist
16436
16437 echo "$as_me:16437: checking if external errno exists" >&5
16438 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16439 if test "${cf_cv_have_errno+set}" = set; then
16440   echo $ECHO_N "(cached) $ECHO_C" >&6
16441 else
16442
16443         cat >conftest.$ac_ext <<_ACEOF
16444 #line 16444 "configure"
16445 #include "confdefs.h"
16446
16447 #undef errno
16448 extern int errno;
16449
16450 int
16451 main ()
16452 {
16453 errno = 2
16454   ;
16455   return 0;
16456 }
16457 _ACEOF
16458 rm -f conftest.$ac_objext conftest$ac_exeext
16459 if { (eval echo "$as_me:16459: \"$ac_link\"") >&5
16460   (eval $ac_link) 2>&5
16461   ac_status=$?
16462   echo "$as_me:16462: \$? = $ac_status" >&5
16463   (exit $ac_status); } &&
16464          { ac_try='test -s conftest$ac_exeext'
16465   { (eval echo "$as_me:16465: \"$ac_try\"") >&5
16466   (eval $ac_try) 2>&5
16467   ac_status=$?
16468   echo "$as_me:16468: \$? = $ac_status" >&5
16469   (exit $ac_status); }; }; then
16470   cf_cv_have_errno=yes
16471 else
16472   echo "$as_me: failed program was:" >&5
16473 cat conftest.$ac_ext >&5
16474 cf_cv_have_errno=no
16475 fi
16476 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16477
16478 fi
16479 echo "$as_me:16479: result: $cf_cv_have_errno" >&5
16480 echo "${ECHO_T}$cf_cv_have_errno" >&6
16481
16482 if test "$cf_cv_have_errno" = yes ; then
16483
16484 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16485
16486         cat >>confdefs.h <<EOF
16487 #define $cf_result 1
16488 EOF
16489
16490 fi
16491
16492 echo "$as_me:16492: checking if data-only library module links" >&5
16493 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16494 if test "${cf_cv_link_dataonly+set}" = set; then
16495   echo $ECHO_N "(cached) $ECHO_C" >&6
16496 else
16497
16498         rm -f conftest.a
16499         cat >conftest.$ac_ext <<EOF
16500 #line 16500 "configure"
16501 int     testdata[3] = { 123, 456, 789 };
16502 EOF
16503         if { (eval echo "$as_me:16503: \"$ac_compile\"") >&5
16504   (eval $ac_compile) 2>&5
16505   ac_status=$?
16506   echo "$as_me:16506: \$? = $ac_status" >&5
16507   (exit $ac_status); } ; then
16508                 mv conftest.o data.o && \
16509                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16510         fi
16511         rm -f conftest.$ac_ext data.o
16512         cat >conftest.$ac_ext <<EOF
16513 #line 16513 "configure"
16514 int     testfunc()
16515 {
16516 #if defined(NeXT)
16517         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16518 #else
16519         extern int testdata[3];
16520         return testdata[0] == 123
16521            &&  testdata[1] == 456
16522            &&  testdata[2] == 789;
16523 #endif
16524 }
16525 EOF
16526         if { (eval echo "$as_me:16526: \"$ac_compile\"") >&5
16527   (eval $ac_compile) 2>&5
16528   ac_status=$?
16529   echo "$as_me:16529: \$? = $ac_status" >&5
16530   (exit $ac_status); }; then
16531                 mv conftest.o func.o && \
16532                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16533         fi
16534         rm -f conftest.$ac_ext func.o
16535         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16536         cf_saveLIBS="$LIBS"
16537         LIBS="conftest.a $LIBS"
16538         if test "$cross_compiling" = yes; then
16539   cf_cv_link_dataonly=unknown
16540 else
16541   cat >conftest.$ac_ext <<_ACEOF
16542 #line 16542 "configure"
16543 #include "confdefs.h"
16544
16545         int main()
16546         {
16547                 extern int testfunc();
16548                 ${cf_cv_main_return:-return} (!testfunc());
16549         }
16550
16551 _ACEOF
16552 rm -f conftest$ac_exeext
16553 if { (eval echo "$as_me:16553: \"$ac_link\"") >&5
16554   (eval $ac_link) 2>&5
16555   ac_status=$?
16556   echo "$as_me:16556: \$? = $ac_status" >&5
16557   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16558   { (eval echo "$as_me:16558: \"$ac_try\"") >&5
16559   (eval $ac_try) 2>&5
16560   ac_status=$?
16561   echo "$as_me:16561: \$? = $ac_status" >&5
16562   (exit $ac_status); }; }; then
16563   cf_cv_link_dataonly=yes
16564 else
16565   echo "$as_me: program exited with status $ac_status" >&5
16566 echo "$as_me: failed program was:" >&5
16567 cat conftest.$ac_ext >&5
16568 cf_cv_link_dataonly=no
16569 fi
16570 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16571 fi
16572         LIBS="$cf_saveLIBS"
16573
16574 fi
16575
16576 echo "$as_me:16576: result: $cf_cv_link_dataonly" >&5
16577 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16578
16579 if test "$cf_cv_link_dataonly" = no ; then
16580
16581 cat >>confdefs.h <<\EOF
16582 #define BROKEN_LINKER 1
16583 EOF
16584
16585         BROKEN_LINKER=1
16586 fi
16587
16588 ###     Checks for library functions.
16589
16590 for ac_func in \
16591 getcwd \
16592 getegid \
16593 geteuid \
16594 getopt \
16595 getttynam \
16596 issetugid \
16597 poll \
16598 putenv \
16599 remove \
16600 select \
16601 setbuf \
16602 setbuffer \
16603 setenv \
16604 setvbuf \
16605 sigaction \
16606 sigvec \
16607 strdup \
16608 strstr \
16609 tcgetpgrp \
16610 times \
16611 vsnprintf \
16612
16613 do
16614 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16615 echo "$as_me:16615: checking for $ac_func" >&5
16616 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16617 if eval "test \"\${$as_ac_var+set}\" = set"; then
16618   echo $ECHO_N "(cached) $ECHO_C" >&6
16619 else
16620   cat >conftest.$ac_ext <<_ACEOF
16621 #line 16621 "configure"
16622 #include "confdefs.h"
16623 /* System header to define __stub macros and hopefully few prototypes,
16624     which can conflict with char $ac_func (); below.  */
16625 #include <assert.h>
16626 /* Override any gcc2 internal prototype to avoid an error.  */
16627 #ifdef __cplusplus
16628 extern "C"
16629 #endif
16630 /* We use char because int might match the return type of a gcc2
16631    builtin and then its argument prototype would still apply.  */
16632 char $ac_func ();
16633 char (*f) ();
16634
16635 int
16636 main ()
16637 {
16638 /* The GNU C library defines this for functions which it implements
16639     to always fail with ENOSYS.  Some functions are actually named
16640     something starting with __ and the normal name is an alias.  */
16641 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16642 choke me
16643 #else
16644 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16645 #endif
16646
16647   ;
16648   return 0;
16649 }
16650 _ACEOF
16651 rm -f conftest.$ac_objext conftest$ac_exeext
16652 if { (eval echo "$as_me:16652: \"$ac_link\"") >&5
16653   (eval $ac_link) 2>&5
16654   ac_status=$?
16655   echo "$as_me:16655: \$? = $ac_status" >&5
16656   (exit $ac_status); } &&
16657          { ac_try='test -s conftest$ac_exeext'
16658   { (eval echo "$as_me:16658: \"$ac_try\"") >&5
16659   (eval $ac_try) 2>&5
16660   ac_status=$?
16661   echo "$as_me:16661: \$? = $ac_status" >&5
16662   (exit $ac_status); }; }; then
16663   eval "$as_ac_var=yes"
16664 else
16665   echo "$as_me: failed program was:" >&5
16666 cat conftest.$ac_ext >&5
16667 eval "$as_ac_var=no"
16668 fi
16669 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16670 fi
16671 echo "$as_me:16671: result: `eval echo '${'$as_ac_var'}'`" >&5
16672 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16673 if test `eval echo '${'$as_ac_var'}'` = yes; then
16674   cat >>confdefs.h <<EOF
16675 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16676 EOF
16677
16678 fi
16679 done
16680
16681 if test "x$ac_cv_func_getopt" = xno &&
16682    test "x$cf_with_progs$cf_with_tests" != xnono; then
16683         { { echo "$as_me:16683: error: getopt is required for building programs" >&5
16684 echo "$as_me: error: getopt is required for building programs" >&2;}
16685    { (exit 1); exit 1; }; }
16686 fi
16687
16688 if test "x$with_getcap" = "xyes" ; then
16689
16690 echo "$as_me:16690: checking for terminal-capability database functions" >&5
16691 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16692 if test "${cf_cv_cgetent+set}" = set; then
16693   echo $ECHO_N "(cached) $ECHO_C" >&6
16694 else
16695
16696 cat >conftest.$ac_ext <<_ACEOF
16697 #line 16697 "configure"
16698 #include "confdefs.h"
16699
16700 #include <stdlib.h>
16701 int
16702 main ()
16703 {
16704
16705         char temp[128];
16706         char *buf = temp;
16707         char *db_array = temp;
16708         cgetent(&buf, &db_array, "vt100");
16709         cgetcap(buf, "tc", '=');
16710         cgetmatch(buf, "tc");
16711
16712   ;
16713   return 0;
16714 }
16715 _ACEOF
16716 rm -f conftest.$ac_objext conftest$ac_exeext
16717 if { (eval echo "$as_me:16717: \"$ac_link\"") >&5
16718   (eval $ac_link) 2>&5
16719   ac_status=$?
16720   echo "$as_me:16720: \$? = $ac_status" >&5
16721   (exit $ac_status); } &&
16722          { ac_try='test -s conftest$ac_exeext'
16723   { (eval echo "$as_me:16723: \"$ac_try\"") >&5
16724   (eval $ac_try) 2>&5
16725   ac_status=$?
16726   echo "$as_me:16726: \$? = $ac_status" >&5
16727   (exit $ac_status); }; }; then
16728   cf_cv_cgetent=yes
16729 else
16730   echo "$as_me: failed program was:" >&5
16731 cat conftest.$ac_ext >&5
16732 cf_cv_cgetent=no
16733 fi
16734 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16735
16736 fi
16737 echo "$as_me:16737: result: $cf_cv_cgetent" >&5
16738 echo "${ECHO_T}$cf_cv_cgetent" >&6
16739
16740 if test "$cf_cv_cgetent" = yes
16741 then
16742
16743 cat >>confdefs.h <<\EOF
16744 #define HAVE_BSD_CGETENT 1
16745 EOF
16746
16747 echo "$as_me:16747: checking if cgetent uses const parameter" >&5
16748 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16749 if test "${cf_cv_cgetent_const+set}" = set; then
16750   echo $ECHO_N "(cached) $ECHO_C" >&6
16751 else
16752
16753 cat >conftest.$ac_ext <<_ACEOF
16754 #line 16754 "configure"
16755 #include "confdefs.h"
16756
16757 #include <stdlib.h>
16758 int
16759 main ()
16760 {
16761
16762         char temp[128];
16763         char *buf = temp;
16764 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16765         const char *db_array = temp;
16766         cgetent(&buf, &db_array, "vt100");
16767 #endif
16768         cgetcap(buf, "tc", '=');
16769         cgetmatch(buf, "tc");
16770
16771   ;
16772   return 0;
16773 }
16774 _ACEOF
16775 rm -f conftest.$ac_objext conftest$ac_exeext
16776 if { (eval echo "$as_me:16776: \"$ac_link\"") >&5
16777   (eval $ac_link) 2>&5
16778   ac_status=$?
16779   echo "$as_me:16779: \$? = $ac_status" >&5
16780   (exit $ac_status); } &&
16781          { ac_try='test -s conftest$ac_exeext'
16782   { (eval echo "$as_me:16782: \"$ac_try\"") >&5
16783   (eval $ac_try) 2>&5
16784   ac_status=$?
16785   echo "$as_me:16785: \$? = $ac_status" >&5
16786   (exit $ac_status); }; }; then
16787   cf_cv_cgetent_const=yes
16788 else
16789   echo "$as_me: failed program was:" >&5
16790 cat conftest.$ac_ext >&5
16791 cf_cv_cgetent_const=no
16792 fi
16793 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16794
16795 fi
16796 echo "$as_me:16796: result: $cf_cv_cgetent_const" >&5
16797 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16798         if test "$cf_cv_cgetent_const" = yes
16799         then
16800
16801 cat >>confdefs.h <<EOF
16802 #define CGETENT_CONST const
16803 EOF
16804
16805         fi
16806 fi
16807
16808 fi
16809
16810 echo "$as_me:16810: checking for isascii" >&5
16811 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16812 if test "${cf_cv_have_isascii+set}" = set; then
16813   echo $ECHO_N "(cached) $ECHO_C" >&6
16814 else
16815
16816         cat >conftest.$ac_ext <<_ACEOF
16817 #line 16817 "configure"
16818 #include "confdefs.h"
16819 #include <ctype.h>
16820 int
16821 main ()
16822 {
16823 int x = isascii(' ')
16824   ;
16825   return 0;
16826 }
16827 _ACEOF
16828 rm -f conftest.$ac_objext conftest$ac_exeext
16829 if { (eval echo "$as_me:16829: \"$ac_link\"") >&5
16830   (eval $ac_link) 2>&5
16831   ac_status=$?
16832   echo "$as_me:16832: \$? = $ac_status" >&5
16833   (exit $ac_status); } &&
16834          { ac_try='test -s conftest$ac_exeext'
16835   { (eval echo "$as_me:16835: \"$ac_try\"") >&5
16836   (eval $ac_try) 2>&5
16837   ac_status=$?
16838   echo "$as_me:16838: \$? = $ac_status" >&5
16839   (exit $ac_status); }; }; then
16840   cf_cv_have_isascii=yes
16841 else
16842   echo "$as_me: failed program was:" >&5
16843 cat conftest.$ac_ext >&5
16844 cf_cv_have_isascii=no
16845 fi
16846 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16847
16848 fi
16849 echo "$as_me:16849: result: $cf_cv_have_isascii" >&5
16850 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16851 test "$cf_cv_have_isascii" = yes &&
16852 cat >>confdefs.h <<\EOF
16853 #define HAVE_ISASCII 1
16854 EOF
16855
16856 if test "$ac_cv_func_sigaction" = yes; then
16857 echo "$as_me:16857: checking whether sigaction needs _POSIX_SOURCE" >&5
16858 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16859 cat >conftest.$ac_ext <<_ACEOF
16860 #line 16860 "configure"
16861 #include "confdefs.h"
16862
16863 #include <sys/types.h>
16864 #include <signal.h>
16865 int
16866 main ()
16867 {
16868 struct sigaction act
16869   ;
16870   return 0;
16871 }
16872 _ACEOF
16873 rm -f conftest.$ac_objext
16874 if { (eval echo "$as_me:16874: \"$ac_compile\"") >&5
16875   (eval $ac_compile) 2>&5
16876   ac_status=$?
16877   echo "$as_me:16877: \$? = $ac_status" >&5
16878   (exit $ac_status); } &&
16879          { ac_try='test -s conftest.$ac_objext'
16880   { (eval echo "$as_me:16880: \"$ac_try\"") >&5
16881   (eval $ac_try) 2>&5
16882   ac_status=$?
16883   echo "$as_me:16883: \$? = $ac_status" >&5
16884   (exit $ac_status); }; }; then
16885   sigact_bad=no
16886 else
16887   echo "$as_me: failed program was:" >&5
16888 cat conftest.$ac_ext >&5
16889
16890 cat >conftest.$ac_ext <<_ACEOF
16891 #line 16891 "configure"
16892 #include "confdefs.h"
16893
16894 #define _POSIX_SOURCE
16895 #include <sys/types.h>
16896 #include <signal.h>
16897 int
16898 main ()
16899 {
16900 struct sigaction act
16901   ;
16902   return 0;
16903 }
16904 _ACEOF
16905 rm -f conftest.$ac_objext
16906 if { (eval echo "$as_me:16906: \"$ac_compile\"") >&5
16907   (eval $ac_compile) 2>&5
16908   ac_status=$?
16909   echo "$as_me:16909: \$? = $ac_status" >&5
16910   (exit $ac_status); } &&
16911          { ac_try='test -s conftest.$ac_objext'
16912   { (eval echo "$as_me:16912: \"$ac_try\"") >&5
16913   (eval $ac_try) 2>&5
16914   ac_status=$?
16915   echo "$as_me:16915: \$? = $ac_status" >&5
16916   (exit $ac_status); }; }; then
16917   sigact_bad=yes
16918
16919 cat >>confdefs.h <<\EOF
16920 #define _POSIX_SOURCE 1
16921 EOF
16922
16923 else
16924   echo "$as_me: failed program was:" >&5
16925 cat conftest.$ac_ext >&5
16926 sigact_bad=unknown
16927 fi
16928 rm -f conftest.$ac_objext conftest.$ac_ext
16929 fi
16930 rm -f conftest.$ac_objext conftest.$ac_ext
16931 echo "$as_me:16931: result: $sigact_bad" >&5
16932 echo "${ECHO_T}$sigact_bad" >&6
16933 fi
16934
16935 echo "$as_me:16935: checking if nanosleep really works" >&5
16936 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16937 if test "${cf_cv_func_nanosleep+set}" = set; then
16938   echo $ECHO_N "(cached) $ECHO_C" >&6
16939 else
16940
16941 if test "$cross_compiling" = yes; then
16942   cf_cv_func_nanosleep=unknown
16943 else
16944   cat >conftest.$ac_ext <<_ACEOF
16945 #line 16945 "configure"
16946 #include "confdefs.h"
16947
16948 #include <stdio.h>
16949 #include <errno.h>
16950 #include <time.h>
16951
16952 #ifdef HAVE_SYS_TIME_H
16953 #include <sys/time.h>
16954 #endif
16955
16956 int main() {
16957         struct timespec ts1, ts2;
16958         int code;
16959         ts1.tv_sec  = 0;
16960         ts1.tv_nsec = 750000000;
16961         ts2.tv_sec  = 0;
16962         ts2.tv_nsec = 0;
16963         errno = 0;
16964         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16965         ${cf_cv_main_return:-return}(code != 0);
16966 }
16967
16968 _ACEOF
16969 rm -f conftest$ac_exeext
16970 if { (eval echo "$as_me:16970: \"$ac_link\"") >&5
16971   (eval $ac_link) 2>&5
16972   ac_status=$?
16973   echo "$as_me:16973: \$? = $ac_status" >&5
16974   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16975   { (eval echo "$as_me:16975: \"$ac_try\"") >&5
16976   (eval $ac_try) 2>&5
16977   ac_status=$?
16978   echo "$as_me:16978: \$? = $ac_status" >&5
16979   (exit $ac_status); }; }; then
16980   cf_cv_func_nanosleep=yes
16981 else
16982   echo "$as_me: program exited with status $ac_status" >&5
16983 echo "$as_me: failed program was:" >&5
16984 cat conftest.$ac_ext >&5
16985 cf_cv_func_nanosleep=no
16986 fi
16987 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16988 fi
16989 fi
16990 echo "$as_me:16990: result: $cf_cv_func_nanosleep" >&5
16991 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16992
16993 test "$cf_cv_func_nanosleep" = "yes" &&
16994 cat >>confdefs.h <<\EOF
16995 #define HAVE_NANOSLEEP 1
16996 EOF
16997
16998 for ac_header in \
16999 termio.h \
17000 termios.h \
17001 unistd.h \
17002
17003 do
17004 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17005 echo "$as_me:17005: checking for $ac_header" >&5
17006 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17007 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17008   echo $ECHO_N "(cached) $ECHO_C" >&6
17009 else
17010   cat >conftest.$ac_ext <<_ACEOF
17011 #line 17011 "configure"
17012 #include "confdefs.h"
17013 #include <$ac_header>
17014 _ACEOF
17015 if { (eval echo "$as_me:17015: \"$ac_cpp conftest.$ac_ext\"") >&5
17016   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17017   ac_status=$?
17018   egrep -v '^ *\+' conftest.er1 >conftest.err
17019   rm -f conftest.er1
17020   cat conftest.err >&5
17021   echo "$as_me:17021: \$? = $ac_status" >&5
17022   (exit $ac_status); } >/dev/null; then
17023   if test -s conftest.err; then
17024     ac_cpp_err=$ac_c_preproc_warn_flag
17025   else
17026     ac_cpp_err=
17027   fi
17028 else
17029   ac_cpp_err=yes
17030 fi
17031 if test -z "$ac_cpp_err"; then
17032   eval "$as_ac_Header=yes"
17033 else
17034   echo "$as_me: failed program was:" >&5
17035   cat conftest.$ac_ext >&5
17036   eval "$as_ac_Header=no"
17037 fi
17038 rm -f conftest.err conftest.$ac_ext
17039 fi
17040 echo "$as_me:17040: result: `eval echo '${'$as_ac_Header'}'`" >&5
17041 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17042 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17043   cat >>confdefs.h <<EOF
17044 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17045 EOF
17046
17047 fi
17048 done
17049
17050 if test "$ISC" = yes ; then
17051
17052 for ac_header in sys/termio.h
17053 do
17054 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17055 echo "$as_me:17055: checking for $ac_header" >&5
17056 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17057 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17058   echo $ECHO_N "(cached) $ECHO_C" >&6
17059 else
17060   cat >conftest.$ac_ext <<_ACEOF
17061 #line 17061 "configure"
17062 #include "confdefs.h"
17063 #include <$ac_header>
17064 _ACEOF
17065 if { (eval echo "$as_me:17065: \"$ac_cpp conftest.$ac_ext\"") >&5
17066   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17067   ac_status=$?
17068   egrep -v '^ *\+' conftest.er1 >conftest.err
17069   rm -f conftest.er1
17070   cat conftest.err >&5
17071   echo "$as_me:17071: \$? = $ac_status" >&5
17072   (exit $ac_status); } >/dev/null; then
17073   if test -s conftest.err; then
17074     ac_cpp_err=$ac_c_preproc_warn_flag
17075   else
17076     ac_cpp_err=
17077   fi
17078 else
17079   ac_cpp_err=yes
17080 fi
17081 if test -z "$ac_cpp_err"; then
17082   eval "$as_ac_Header=yes"
17083 else
17084   echo "$as_me: failed program was:" >&5
17085   cat conftest.$ac_ext >&5
17086   eval "$as_ac_Header=no"
17087 fi
17088 rm -f conftest.err conftest.$ac_ext
17089 fi
17090 echo "$as_me:17090: result: `eval echo '${'$as_ac_Header'}'`" >&5
17091 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17092 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17093   cat >>confdefs.h <<EOF
17094 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17095 EOF
17096
17097 fi
17098 done
17099
17100 fi
17101 if test "$ac_cv_header_termios_h" = yes ; then
17102         case "$CFLAGS $CPPFLAGS" in
17103         (*-D_POSIX_SOURCE*)
17104                 termios_bad=dunno ;;
17105         (*)     termios_bad=maybe ;;
17106         esac
17107         if test "$termios_bad" = maybe ; then
17108         echo "$as_me:17108: checking whether termios.h needs _POSIX_SOURCE" >&5
17109 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
17110         cat >conftest.$ac_ext <<_ACEOF
17111 #line 17111 "configure"
17112 #include "confdefs.h"
17113 #include <termios.h>
17114 int
17115 main ()
17116 {
17117 struct termios foo; int x = foo.c_iflag
17118   ;
17119   return 0;
17120 }
17121 _ACEOF
17122 rm -f conftest.$ac_objext
17123 if { (eval echo "$as_me:17123: \"$ac_compile\"") >&5
17124   (eval $ac_compile) 2>&5
17125   ac_status=$?
17126   echo "$as_me:17126: \$? = $ac_status" >&5
17127   (exit $ac_status); } &&
17128          { ac_try='test -s conftest.$ac_objext'
17129   { (eval echo "$as_me:17129: \"$ac_try\"") >&5
17130   (eval $ac_try) 2>&5
17131   ac_status=$?
17132   echo "$as_me:17132: \$? = $ac_status" >&5
17133   (exit $ac_status); }; }; then
17134   termios_bad=no
17135 else
17136   echo "$as_me: failed program was:" >&5
17137 cat conftest.$ac_ext >&5
17138
17139                 cat >conftest.$ac_ext <<_ACEOF
17140 #line 17140 "configure"
17141 #include "confdefs.h"
17142
17143 #define _POSIX_SOURCE
17144 #include <termios.h>
17145 int
17146 main ()
17147 {
17148 struct termios foo; int x = foo.c_iflag
17149   ;
17150   return 0;
17151 }
17152 _ACEOF
17153 rm -f conftest.$ac_objext
17154 if { (eval echo "$as_me:17154: \"$ac_compile\"") >&5
17155   (eval $ac_compile) 2>&5
17156   ac_status=$?
17157   echo "$as_me:17157: \$? = $ac_status" >&5
17158   (exit $ac_status); } &&
17159          { ac_try='test -s conftest.$ac_objext'
17160   { (eval echo "$as_me:17160: \"$ac_try\"") >&5
17161   (eval $ac_try) 2>&5
17162   ac_status=$?
17163   echo "$as_me:17163: \$? = $ac_status" >&5
17164   (exit $ac_status); }; }; then
17165   termios_bad=unknown
17166 else
17167   echo "$as_me: failed program was:" >&5
17168 cat conftest.$ac_ext >&5
17169 termios_bad=yes
17170 cat >>confdefs.h <<\EOF
17171 #define _POSIX_SOURCE 1
17172 EOF
17173
17174 fi
17175 rm -f conftest.$ac_objext conftest.$ac_ext
17176
17177 fi
17178 rm -f conftest.$ac_objext conftest.$ac_ext
17179         echo "$as_me:17179: result: $termios_bad" >&5
17180 echo "${ECHO_T}$termios_bad" >&6
17181         fi
17182 fi
17183
17184 echo "$as_me:17184: checking for tcgetattr" >&5
17185 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
17186 if test "${cf_cv_have_tcgetattr+set}" = set; then
17187   echo $ECHO_N "(cached) $ECHO_C" >&6
17188 else
17189
17190 cat >conftest.$ac_ext <<_ACEOF
17191 #line 17191 "configure"
17192 #include "confdefs.h"
17193
17194 #include <sys/types.h>
17195 #ifdef HAVE_UNISTD_H
17196 #include <unistd.h>
17197 #endif
17198 #ifdef HAVE_TERMIOS_H
17199 #include <termios.h>
17200 #define TTY struct termios
17201 #else
17202 #ifdef HAVE_TERMIO_H
17203 #include <termio.h>
17204 #define TTY struct termio
17205 #endif
17206 #endif
17207
17208 int
17209 main ()
17210 {
17211
17212 TTY foo;
17213 tcgetattr(1, &foo);
17214   ;
17215   return 0;
17216 }
17217 _ACEOF
17218 rm -f conftest.$ac_objext conftest$ac_exeext
17219 if { (eval echo "$as_me:17219: \"$ac_link\"") >&5
17220   (eval $ac_link) 2>&5
17221   ac_status=$?
17222   echo "$as_me:17222: \$? = $ac_status" >&5
17223   (exit $ac_status); } &&
17224          { ac_try='test -s conftest$ac_exeext'
17225   { (eval echo "$as_me:17225: \"$ac_try\"") >&5
17226   (eval $ac_try) 2>&5
17227   ac_status=$?
17228   echo "$as_me:17228: \$? = $ac_status" >&5
17229   (exit $ac_status); }; }; then
17230   cf_cv_have_tcgetattr=yes
17231 else
17232   echo "$as_me: failed program was:" >&5
17233 cat conftest.$ac_ext >&5
17234 cf_cv_have_tcgetattr=no
17235 fi
17236 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17237 fi
17238 echo "$as_me:17238: result: $cf_cv_have_tcgetattr" >&5
17239 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
17240 test "$cf_cv_have_tcgetattr" = yes &&
17241 cat >>confdefs.h <<\EOF
17242 #define HAVE_TCGETATTR 1
17243 EOF
17244
17245 echo "$as_me:17245: checking for vsscanf function or workaround" >&5
17246 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
17247 if test "${cf_cv_func_vsscanf+set}" = set; then
17248   echo $ECHO_N "(cached) $ECHO_C" >&6
17249 else
17250
17251 cat >conftest.$ac_ext <<_ACEOF
17252 #line 17252 "configure"
17253 #include "confdefs.h"
17254
17255 #include <stdarg.h>
17256 #include <stdio.h>
17257 int
17258 main ()
17259 {
17260
17261         va_list ap;
17262         vsscanf("from", "%d", ap)
17263   ;
17264   return 0;
17265 }
17266 _ACEOF
17267 rm -f conftest.$ac_objext conftest$ac_exeext
17268 if { (eval echo "$as_me:17268: \"$ac_link\"") >&5
17269   (eval $ac_link) 2>&5
17270   ac_status=$?
17271   echo "$as_me:17271: \$? = $ac_status" >&5
17272   (exit $ac_status); } &&
17273          { ac_try='test -s conftest$ac_exeext'
17274   { (eval echo "$as_me:17274: \"$ac_try\"") >&5
17275   (eval $ac_try) 2>&5
17276   ac_status=$?
17277   echo "$as_me:17277: \$? = $ac_status" >&5
17278   (exit $ac_status); }; }; then
17279   cf_cv_func_vsscanf=vsscanf
17280 else
17281   echo "$as_me: failed program was:" >&5
17282 cat conftest.$ac_ext >&5
17283
17284 cat >conftest.$ac_ext <<_ACEOF
17285 #line 17285 "configure"
17286 #include "confdefs.h"
17287
17288 #include <stdarg.h>
17289 #include <stdio.h>
17290 int
17291 main ()
17292 {
17293
17294         FILE strbuf;
17295         char *str = "from";
17296
17297         strbuf._flag = _IOREAD;
17298         strbuf._ptr = strbuf._base = (unsigned char *) str;
17299         strbuf._cnt = strlen(str);
17300         strbuf._file = _NFILE;
17301         return (vfscanf(&strbuf, "%d", ap))
17302   ;
17303   return 0;
17304 }
17305 _ACEOF
17306 rm -f conftest.$ac_objext conftest$ac_exeext
17307 if { (eval echo "$as_me:17307: \"$ac_link\"") >&5
17308   (eval $ac_link) 2>&5
17309   ac_status=$?
17310   echo "$as_me:17310: \$? = $ac_status" >&5
17311   (exit $ac_status); } &&
17312          { ac_try='test -s conftest$ac_exeext'
17313   { (eval echo "$as_me:17313: \"$ac_try\"") >&5
17314   (eval $ac_try) 2>&5
17315   ac_status=$?
17316   echo "$as_me:17316: \$? = $ac_status" >&5
17317   (exit $ac_status); }; }; then
17318   cf_cv_func_vsscanf=vfscanf
17319 else
17320   echo "$as_me: failed program was:" >&5
17321 cat conftest.$ac_ext >&5
17322
17323 cat >conftest.$ac_ext <<_ACEOF
17324 #line 17324 "configure"
17325 #include "confdefs.h"
17326
17327 #include <stdarg.h>
17328 #include <stdio.h>
17329 int
17330 main ()
17331 {
17332
17333         FILE strbuf;
17334         char *str = "from";
17335
17336         strbuf._flag = _IOREAD;
17337         strbuf._ptr = strbuf._base = (unsigned char *) str;
17338         strbuf._cnt = strlen(str);
17339         strbuf._file = _NFILE;
17340         return (_doscan(&strbuf, "%d", ap))
17341   ;
17342   return 0;
17343 }
17344 _ACEOF
17345 rm -f conftest.$ac_objext conftest$ac_exeext
17346 if { (eval echo "$as_me:17346: \"$ac_link\"") >&5
17347   (eval $ac_link) 2>&5
17348   ac_status=$?
17349   echo "$as_me:17349: \$? = $ac_status" >&5
17350   (exit $ac_status); } &&
17351          { ac_try='test -s conftest$ac_exeext'
17352   { (eval echo "$as_me:17352: \"$ac_try\"") >&5
17353   (eval $ac_try) 2>&5
17354   ac_status=$?
17355   echo "$as_me:17355: \$? = $ac_status" >&5
17356   (exit $ac_status); }; }; then
17357   cf_cv_func_vsscanf=_doscan
17358 else
17359   echo "$as_me: failed program was:" >&5
17360 cat conftest.$ac_ext >&5
17361
17362 cf_cv_func_vsscanf=no
17363 fi
17364 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17365 fi
17366 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17367 fi
17368 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17369 fi
17370 echo "$as_me:17370: result: $cf_cv_func_vsscanf" >&5
17371 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17372
17373 case $cf_cv_func_vsscanf in
17374 (vsscanf)
17375 cat >>confdefs.h <<\EOF
17376 #define HAVE_VSSCANF 1
17377 EOF
17378 ;;
17379 (vfscanf)
17380 cat >>confdefs.h <<\EOF
17381 #define HAVE_VFSCANF 1
17382 EOF
17383 ;;
17384 (_doscan)
17385 cat >>confdefs.h <<\EOF
17386 #define HAVE__DOSCAN 1
17387 EOF
17388 ;;
17389 esac
17390
17391 echo "$as_me:17391: checking for working mkstemp" >&5
17392 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17393 if test "${cf_cv_func_mkstemp+set}" = set; then
17394   echo $ECHO_N "(cached) $ECHO_C" >&6
17395 else
17396
17397 rm -rf conftest*
17398 if test "$cross_compiling" = yes; then
17399   cf_cv_func_mkstemp=maybe
17400 else
17401   cat >conftest.$ac_ext <<_ACEOF
17402 #line 17402 "configure"
17403 #include "confdefs.h"
17404
17405 #include <sys/types.h>
17406 #include <stdlib.h>
17407 #include <stdio.h>
17408 #include <string.h>
17409 #include <sys/stat.h>
17410 int main()
17411 {
17412         char *tmpl = "conftestXXXXXX";
17413         char name[2][80];
17414         int n;
17415         int result = 0;
17416         int fd;
17417         struct stat sb;
17418
17419         umask(077);
17420         for (n = 0; n < 2; ++n) {
17421                 strcpy(name[n], tmpl);
17422                 if ((fd = mkstemp(name[n])) >= 0) {
17423                         if (!strcmp(name[n], tmpl)
17424                          || stat(name[n], &sb) != 0
17425                          || (sb.st_mode & S_IFMT) != S_IFREG
17426                          || (sb.st_mode & 077) != 0) {
17427                                 result = 1;
17428                         }
17429                         close(fd);
17430                 }
17431         }
17432         if (result == 0
17433          && !strcmp(name[0], name[1]))
17434                 result = 1;
17435         ${cf_cv_main_return:-return}(result);
17436 }
17437
17438 _ACEOF
17439 rm -f conftest$ac_exeext
17440 if { (eval echo "$as_me:17440: \"$ac_link\"") >&5
17441   (eval $ac_link) 2>&5
17442   ac_status=$?
17443   echo "$as_me:17443: \$? = $ac_status" >&5
17444   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17445   { (eval echo "$as_me:17445: \"$ac_try\"") >&5
17446   (eval $ac_try) 2>&5
17447   ac_status=$?
17448   echo "$as_me:17448: \$? = $ac_status" >&5
17449   (exit $ac_status); }; }; then
17450   cf_cv_func_mkstemp=yes
17451
17452 else
17453   echo "$as_me: program exited with status $ac_status" >&5
17454 echo "$as_me: failed program was:" >&5
17455 cat conftest.$ac_ext >&5
17456 cf_cv_func_mkstemp=no
17457
17458 fi
17459 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17460 fi
17461
17462 fi
17463 echo "$as_me:17463: result: $cf_cv_func_mkstemp" >&5
17464 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17465 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17466         echo "$as_me:17466: checking for mkstemp" >&5
17467 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17468 if test "${ac_cv_func_mkstemp+set}" = set; then
17469   echo $ECHO_N "(cached) $ECHO_C" >&6
17470 else
17471   cat >conftest.$ac_ext <<_ACEOF
17472 #line 17472 "configure"
17473 #include "confdefs.h"
17474 /* System header to define __stub macros and hopefully few prototypes,
17475     which can conflict with char mkstemp (); below.  */
17476 #include <assert.h>
17477 /* Override any gcc2 internal prototype to avoid an error.  */
17478 #ifdef __cplusplus
17479 extern "C"
17480 #endif
17481 /* We use char because int might match the return type of a gcc2
17482    builtin and then its argument prototype would still apply.  */
17483 char mkstemp ();
17484 char (*f) ();
17485
17486 int
17487 main ()
17488 {
17489 /* The GNU C library defines this for functions which it implements
17490     to always fail with ENOSYS.  Some functions are actually named
17491     something starting with __ and the normal name is an alias.  */
17492 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17493 choke me
17494 #else
17495 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17496 #endif
17497
17498   ;
17499   return 0;
17500 }
17501 _ACEOF
17502 rm -f conftest.$ac_objext conftest$ac_exeext
17503 if { (eval echo "$as_me:17503: \"$ac_link\"") >&5
17504   (eval $ac_link) 2>&5
17505   ac_status=$?
17506   echo "$as_me:17506: \$? = $ac_status" >&5
17507   (exit $ac_status); } &&
17508          { ac_try='test -s conftest$ac_exeext'
17509   { (eval echo "$as_me:17509: \"$ac_try\"") >&5
17510   (eval $ac_try) 2>&5
17511   ac_status=$?
17512   echo "$as_me:17512: \$? = $ac_status" >&5
17513   (exit $ac_status); }; }; then
17514   ac_cv_func_mkstemp=yes
17515 else
17516   echo "$as_me: failed program was:" >&5
17517 cat conftest.$ac_ext >&5
17518 ac_cv_func_mkstemp=no
17519 fi
17520 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17521 fi
17522 echo "$as_me:17522: result: $ac_cv_func_mkstemp" >&5
17523 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17524
17525 fi
17526 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17527
17528 cat >>confdefs.h <<\EOF
17529 #define HAVE_MKSTEMP 1
17530 EOF
17531
17532 fi
17533
17534 # setup for prototype of fallback for vsscanf()
17535
17536 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17537         HAVE_VSSCANF=1
17538 else
17539         HAVE_VSSCANF=0
17540 fi
17541
17542 if test "x$cross_compiling" = xyes ; then
17543         { echo "$as_me:17543: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17544 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17545 else
17546         echo "$as_me:17546: checking whether setvbuf arguments are reversed" >&5
17547 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17548 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17549   echo $ECHO_N "(cached) $ECHO_C" >&6
17550 else
17551   if test "$cross_compiling" = yes; then
17552   { { echo "$as_me:17552: error: cannot run test program while cross compiling" >&5
17553 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17554    { (exit 1); exit 1; }; }
17555 else
17556   cat >conftest.$ac_ext <<_ACEOF
17557 #line 17557 "configure"
17558 #include "confdefs.h"
17559 #include <stdio.h>
17560 /* If setvbuf has the reversed format, exit 0. */
17561 int
17562 main ()
17563 {
17564   /* This call has the arguments reversed.
17565      A reversed system may check and see that the address of main
17566      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17567   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17568     $ac_main_return(1);
17569   putc('\r', stdout);
17570   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17571 }
17572 _ACEOF
17573 rm -f conftest$ac_exeext
17574 if { (eval echo "$as_me:17574: \"$ac_link\"") >&5
17575   (eval $ac_link) 2>&5
17576   ac_status=$?
17577   echo "$as_me:17577: \$? = $ac_status" >&5
17578   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17579   { (eval echo "$as_me:17579: \"$ac_try\"") >&5
17580   (eval $ac_try) 2>&5
17581   ac_status=$?
17582   echo "$as_me:17582: \$? = $ac_status" >&5
17583   (exit $ac_status); }; }; then
17584   ac_cv_func_setvbuf_reversed=yes
17585 else
17586   echo "$as_me: program exited with status $ac_status" >&5
17587 echo "$as_me: failed program was:" >&5
17588 cat conftest.$ac_ext >&5
17589 ac_cv_func_setvbuf_reversed=no
17590 fi
17591 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17592 fi
17593 rm -f core core.* *.core
17594 fi
17595 echo "$as_me:17595: result: $ac_cv_func_setvbuf_reversed" >&5
17596 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17597 if test $ac_cv_func_setvbuf_reversed = yes; then
17598
17599 cat >>confdefs.h <<\EOF
17600 #define SETVBUF_REVERSED 1
17601 EOF
17602
17603 fi
17604
17605 fi
17606 echo "$as_me:17606: checking for intptr_t" >&5
17607 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17608 if test "${ac_cv_type_intptr_t+set}" = set; then
17609   echo $ECHO_N "(cached) $ECHO_C" >&6
17610 else
17611   cat >conftest.$ac_ext <<_ACEOF
17612 #line 17612 "configure"
17613 #include "confdefs.h"
17614 $ac_includes_default
17615 int
17616 main ()
17617 {
17618 if ((intptr_t *) 0)
17619   return 0;
17620 if (sizeof (intptr_t))
17621   return 0;
17622   ;
17623   return 0;
17624 }
17625 _ACEOF
17626 rm -f conftest.$ac_objext
17627 if { (eval echo "$as_me:17627: \"$ac_compile\"") >&5
17628   (eval $ac_compile) 2>&5
17629   ac_status=$?
17630   echo "$as_me:17630: \$? = $ac_status" >&5
17631   (exit $ac_status); } &&
17632          { ac_try='test -s conftest.$ac_objext'
17633   { (eval echo "$as_me:17633: \"$ac_try\"") >&5
17634   (eval $ac_try) 2>&5
17635   ac_status=$?
17636   echo "$as_me:17636: \$? = $ac_status" >&5
17637   (exit $ac_status); }; }; then
17638   ac_cv_type_intptr_t=yes
17639 else
17640   echo "$as_me: failed program was:" >&5
17641 cat conftest.$ac_ext >&5
17642 ac_cv_type_intptr_t=no
17643 fi
17644 rm -f conftest.$ac_objext conftest.$ac_ext
17645 fi
17646 echo "$as_me:17646: result: $ac_cv_type_intptr_t" >&5
17647 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17648 if test $ac_cv_type_intptr_t = yes; then
17649   :
17650 else
17651
17652 cat >>confdefs.h <<EOF
17653 #define intptr_t long
17654 EOF
17655
17656 fi
17657
17658 echo "$as_me:17658: checking for ssize_t" >&5
17659 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17660 if test "${ac_cv_type_ssize_t+set}" = set; then
17661   echo $ECHO_N "(cached) $ECHO_C" >&6
17662 else
17663   cat >conftest.$ac_ext <<_ACEOF
17664 #line 17664 "configure"
17665 #include "confdefs.h"
17666 $ac_includes_default
17667 int
17668 main ()
17669 {
17670 if ((ssize_t *) 0)
17671   return 0;
17672 if (sizeof (ssize_t))
17673   return 0;
17674   ;
17675   return 0;
17676 }
17677 _ACEOF
17678 rm -f conftest.$ac_objext
17679 if { (eval echo "$as_me:17679: \"$ac_compile\"") >&5
17680   (eval $ac_compile) 2>&5
17681   ac_status=$?
17682   echo "$as_me:17682: \$? = $ac_status" >&5
17683   (exit $ac_status); } &&
17684          { ac_try='test -s conftest.$ac_objext'
17685   { (eval echo "$as_me:17685: \"$ac_try\"") >&5
17686   (eval $ac_try) 2>&5
17687   ac_status=$?
17688   echo "$as_me:17688: \$? = $ac_status" >&5
17689   (exit $ac_status); }; }; then
17690   ac_cv_type_ssize_t=yes
17691 else
17692   echo "$as_me: failed program was:" >&5
17693 cat conftest.$ac_ext >&5
17694 ac_cv_type_ssize_t=no
17695 fi
17696 rm -f conftest.$ac_objext conftest.$ac_ext
17697 fi
17698 echo "$as_me:17698: result: $ac_cv_type_ssize_t" >&5
17699 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17700 if test $ac_cv_type_ssize_t = yes; then
17701   :
17702 else
17703
17704 cat >>confdefs.h <<EOF
17705 #define ssize_t int
17706 EOF
17707
17708 fi
17709
17710 echo "$as_me:17710: checking for type sigaction_t" >&5
17711 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17712 if test "${cf_cv_type_sigaction+set}" = set; then
17713   echo $ECHO_N "(cached) $ECHO_C" >&6
17714 else
17715
17716         cat >conftest.$ac_ext <<_ACEOF
17717 #line 17717 "configure"
17718 #include "confdefs.h"
17719
17720 #include <signal.h>
17721 int
17722 main ()
17723 {
17724 sigaction_t x
17725   ;
17726   return 0;
17727 }
17728 _ACEOF
17729 rm -f conftest.$ac_objext
17730 if { (eval echo "$as_me:17730: \"$ac_compile\"") >&5
17731   (eval $ac_compile) 2>&5
17732   ac_status=$?
17733   echo "$as_me:17733: \$? = $ac_status" >&5
17734   (exit $ac_status); } &&
17735          { ac_try='test -s conftest.$ac_objext'
17736   { (eval echo "$as_me:17736: \"$ac_try\"") >&5
17737   (eval $ac_try) 2>&5
17738   ac_status=$?
17739   echo "$as_me:17739: \$? = $ac_status" >&5
17740   (exit $ac_status); }; }; then
17741   cf_cv_type_sigaction=yes
17742 else
17743   echo "$as_me: failed program was:" >&5
17744 cat conftest.$ac_ext >&5
17745 cf_cv_type_sigaction=no
17746 fi
17747 rm -f conftest.$ac_objext conftest.$ac_ext
17748 fi
17749
17750 echo "$as_me:17750: result: $cf_cv_type_sigaction" >&5
17751 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17752 test "$cf_cv_type_sigaction" = yes &&
17753 cat >>confdefs.h <<\EOF
17754 #define HAVE_TYPE_SIGACTION 1
17755 EOF
17756
17757 echo "$as_me:17757: checking declaration of size-change" >&5
17758 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17759 if test "${cf_cv_sizechange+set}" = set; then
17760   echo $ECHO_N "(cached) $ECHO_C" >&6
17761 else
17762
17763         cf_cv_sizechange=unknown
17764         cf_save_CPPFLAGS="$CPPFLAGS"
17765
17766 for cf_opts in "" "NEED_PTEM_H"
17767 do
17768
17769         CPPFLAGS="$cf_save_CPPFLAGS"
17770         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17771         cat >conftest.$ac_ext <<_ACEOF
17772 #line 17772 "configure"
17773 #include "confdefs.h"
17774 #include <sys/types.h>
17775 #ifdef HAVE_TERMIOS_H
17776 #include <termios.h>
17777 #else
17778 #ifdef HAVE_TERMIO_H
17779 #include <termio.h>
17780 #endif
17781 #endif
17782 #ifdef NEED_PTEM_H
17783 /* This is a workaround for SCO:  they neglected to define struct winsize in
17784  * termios.h -- it's only in termio.h and ptem.h
17785  */
17786 #include        <sys/stream.h>
17787 #include        <sys/ptem.h>
17788 #endif
17789 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17790 #include <sys/ioctl.h>
17791 #endif
17792
17793 int
17794 main ()
17795 {
17796
17797 #ifdef TIOCGSIZE
17798         struct ttysize win;     /* FIXME: what system is this? */
17799         int y = win.ts_lines;
17800         int x = win.ts_cols;
17801 #else
17802 #ifdef TIOCGWINSZ
17803         struct winsize win;
17804         int y = win.ws_row;
17805         int x = win.ws_col;
17806 #else
17807         no TIOCGSIZE or TIOCGWINSZ
17808 #endif /* TIOCGWINSZ */
17809 #endif /* TIOCGSIZE */
17810
17811   ;
17812   return 0;
17813 }
17814 _ACEOF
17815 rm -f conftest.$ac_objext
17816 if { (eval echo "$as_me:17816: \"$ac_compile\"") >&5
17817   (eval $ac_compile) 2>&5
17818   ac_status=$?
17819   echo "$as_me:17819: \$? = $ac_status" >&5
17820   (exit $ac_status); } &&
17821          { ac_try='test -s conftest.$ac_objext'
17822   { (eval echo "$as_me:17822: \"$ac_try\"") >&5
17823   (eval $ac_try) 2>&5
17824   ac_status=$?
17825   echo "$as_me:17825: \$? = $ac_status" >&5
17826   (exit $ac_status); }; }; then
17827   cf_cv_sizechange=yes
17828 else
17829   echo "$as_me: failed program was:" >&5
17830 cat conftest.$ac_ext >&5
17831 cf_cv_sizechange=no
17832 fi
17833 rm -f conftest.$ac_objext conftest.$ac_ext
17834
17835         CPPFLAGS="$cf_save_CPPFLAGS"
17836         if test "$cf_cv_sizechange" = yes ; then
17837                 echo "size-change succeeded ($cf_opts)" >&5
17838                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17839                 break
17840         fi
17841 done
17842
17843 fi
17844 echo "$as_me:17844: result: $cf_cv_sizechange" >&5
17845 echo "${ECHO_T}$cf_cv_sizechange" >&6
17846 if test "$cf_cv_sizechange" != no ; then
17847
17848 cat >>confdefs.h <<\EOF
17849 #define HAVE_SIZECHANGE 1
17850 EOF
17851
17852         case $cf_cv_sizechange in
17853         (NEED*)
17854                 cat >>confdefs.h <<EOF
17855 #define $cf_cv_sizechange  1
17856 EOF
17857
17858                 ;;
17859         esac
17860 fi
17861
17862 echo "$as_me:17862: checking for memmove" >&5
17863 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17864 if test "${ac_cv_func_memmove+set}" = set; then
17865   echo $ECHO_N "(cached) $ECHO_C" >&6
17866 else
17867   cat >conftest.$ac_ext <<_ACEOF
17868 #line 17868 "configure"
17869 #include "confdefs.h"
17870 /* System header to define __stub macros and hopefully few prototypes,
17871     which can conflict with char memmove (); below.  */
17872 #include <assert.h>
17873 /* Override any gcc2 internal prototype to avoid an error.  */
17874 #ifdef __cplusplus
17875 extern "C"
17876 #endif
17877 /* We use char because int might match the return type of a gcc2
17878    builtin and then its argument prototype would still apply.  */
17879 char memmove ();
17880 char (*f) ();
17881
17882 int
17883 main ()
17884 {
17885 /* The GNU C library defines this for functions which it implements
17886     to always fail with ENOSYS.  Some functions are actually named
17887     something starting with __ and the normal name is an alias.  */
17888 #if defined (__stub_memmove) || defined (__stub___memmove)
17889 choke me
17890 #else
17891 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17892 #endif
17893
17894   ;
17895   return 0;
17896 }
17897 _ACEOF
17898 rm -f conftest.$ac_objext conftest$ac_exeext
17899 if { (eval echo "$as_me:17899: \"$ac_link\"") >&5
17900   (eval $ac_link) 2>&5
17901   ac_status=$?
17902   echo "$as_me:17902: \$? = $ac_status" >&5
17903   (exit $ac_status); } &&
17904          { ac_try='test -s conftest$ac_exeext'
17905   { (eval echo "$as_me:17905: \"$ac_try\"") >&5
17906   (eval $ac_try) 2>&5
17907   ac_status=$?
17908   echo "$as_me:17908: \$? = $ac_status" >&5
17909   (exit $ac_status); }; }; then
17910   ac_cv_func_memmove=yes
17911 else
17912   echo "$as_me: failed program was:" >&5
17913 cat conftest.$ac_ext >&5
17914 ac_cv_func_memmove=no
17915 fi
17916 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17917 fi
17918 echo "$as_me:17918: result: $ac_cv_func_memmove" >&5
17919 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17920 if test $ac_cv_func_memmove = yes; then
17921   :
17922 else
17923
17924 echo "$as_me:17924: checking for bcopy" >&5
17925 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17926 if test "${ac_cv_func_bcopy+set}" = set; then
17927   echo $ECHO_N "(cached) $ECHO_C" >&6
17928 else
17929   cat >conftest.$ac_ext <<_ACEOF
17930 #line 17930 "configure"
17931 #include "confdefs.h"
17932 /* System header to define __stub macros and hopefully few prototypes,
17933     which can conflict with char bcopy (); below.  */
17934 #include <assert.h>
17935 /* Override any gcc2 internal prototype to avoid an error.  */
17936 #ifdef __cplusplus
17937 extern "C"
17938 #endif
17939 /* We use char because int might match the return type of a gcc2
17940    builtin and then its argument prototype would still apply.  */
17941 char bcopy ();
17942 char (*f) ();
17943
17944 int
17945 main ()
17946 {
17947 /* The GNU C library defines this for functions which it implements
17948     to always fail with ENOSYS.  Some functions are actually named
17949     something starting with __ and the normal name is an alias.  */
17950 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17951 choke me
17952 #else
17953 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17954 #endif
17955
17956   ;
17957   return 0;
17958 }
17959 _ACEOF
17960 rm -f conftest.$ac_objext conftest$ac_exeext
17961 if { (eval echo "$as_me:17961: \"$ac_link\"") >&5
17962   (eval $ac_link) 2>&5
17963   ac_status=$?
17964   echo "$as_me:17964: \$? = $ac_status" >&5
17965   (exit $ac_status); } &&
17966          { ac_try='test -s conftest$ac_exeext'
17967   { (eval echo "$as_me:17967: \"$ac_try\"") >&5
17968   (eval $ac_try) 2>&5
17969   ac_status=$?
17970   echo "$as_me:17970: \$? = $ac_status" >&5
17971   (exit $ac_status); }; }; then
17972   ac_cv_func_bcopy=yes
17973 else
17974   echo "$as_me: failed program was:" >&5
17975 cat conftest.$ac_ext >&5
17976 ac_cv_func_bcopy=no
17977 fi
17978 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17979 fi
17980 echo "$as_me:17980: result: $ac_cv_func_bcopy" >&5
17981 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17982 if test $ac_cv_func_bcopy = yes; then
17983
17984         echo "$as_me:17984: checking if bcopy does overlapping moves" >&5
17985 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17986 if test "${cf_cv_good_bcopy+set}" = set; then
17987   echo $ECHO_N "(cached) $ECHO_C" >&6
17988 else
17989
17990                 if test "$cross_compiling" = yes; then
17991   cf_cv_good_bcopy=unknown
17992 else
17993   cat >conftest.$ac_ext <<_ACEOF
17994 #line 17994 "configure"
17995 #include "confdefs.h"
17996
17997 int main() {
17998         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17999         char temp[40];
18000         bcopy(data, temp, sizeof(data));
18001         bcopy(temp+10, temp, 15);
18002         bcopy(temp+5, temp+15, 10);
18003         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
18004 }
18005
18006 _ACEOF
18007 rm -f conftest$ac_exeext
18008 if { (eval echo "$as_me:18008: \"$ac_link\"") >&5
18009   (eval $ac_link) 2>&5
18010   ac_status=$?
18011   echo "$as_me:18011: \$? = $ac_status" >&5
18012   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18013   { (eval echo "$as_me:18013: \"$ac_try\"") >&5
18014   (eval $ac_try) 2>&5
18015   ac_status=$?
18016   echo "$as_me:18016: \$? = $ac_status" >&5
18017   (exit $ac_status); }; }; then
18018   cf_cv_good_bcopy=yes
18019 else
18020   echo "$as_me: program exited with status $ac_status" >&5
18021 echo "$as_me: failed program was:" >&5
18022 cat conftest.$ac_ext >&5
18023 cf_cv_good_bcopy=no
18024 fi
18025 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18026 fi
18027
18028 fi
18029 echo "$as_me:18029: result: $cf_cv_good_bcopy" >&5
18030 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
18031
18032 else
18033   cf_cv_good_bcopy=no
18034 fi
18035
18036         if test "$cf_cv_good_bcopy" = yes ; then
18037
18038 cat >>confdefs.h <<\EOF
18039 #define USE_OK_BCOPY 1
18040 EOF
18041
18042         else
18043
18044 cat >>confdefs.h <<\EOF
18045 #define USE_MY_MEMMOVE 1
18046 EOF
18047
18048         fi
18049
18050 fi
18051
18052 tty 2>&1 >/dev/null || {
18053 for ac_func in posix_openpt
18054 do
18055 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18056 echo "$as_me:18056: checking for $ac_func" >&5
18057 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18058 if eval "test \"\${$as_ac_var+set}\" = set"; then
18059   echo $ECHO_N "(cached) $ECHO_C" >&6
18060 else
18061   cat >conftest.$ac_ext <<_ACEOF
18062 #line 18062 "configure"
18063 #include "confdefs.h"
18064 /* System header to define __stub macros and hopefully few prototypes,
18065     which can conflict with char $ac_func (); below.  */
18066 #include <assert.h>
18067 /* Override any gcc2 internal prototype to avoid an error.  */
18068 #ifdef __cplusplus
18069 extern "C"
18070 #endif
18071 /* We use char because int might match the return type of a gcc2
18072    builtin and then its argument prototype would still apply.  */
18073 char $ac_func ();
18074 char (*f) ();
18075
18076 int
18077 main ()
18078 {
18079 /* The GNU C library defines this for functions which it implements
18080     to always fail with ENOSYS.  Some functions are actually named
18081     something starting with __ and the normal name is an alias.  */
18082 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18083 choke me
18084 #else
18085 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18086 #endif
18087
18088   ;
18089   return 0;
18090 }
18091 _ACEOF
18092 rm -f conftest.$ac_objext conftest$ac_exeext
18093 if { (eval echo "$as_me:18093: \"$ac_link\"") >&5
18094   (eval $ac_link) 2>&5
18095   ac_status=$?
18096   echo "$as_me:18096: \$? = $ac_status" >&5
18097   (exit $ac_status); } &&
18098          { ac_try='test -s conftest$ac_exeext'
18099   { (eval echo "$as_me:18099: \"$ac_try\"") >&5
18100   (eval $ac_try) 2>&5
18101   ac_status=$?
18102   echo "$as_me:18102: \$? = $ac_status" >&5
18103   (exit $ac_status); }; }; then
18104   eval "$as_ac_var=yes"
18105 else
18106   echo "$as_me: failed program was:" >&5
18107 cat conftest.$ac_ext >&5
18108 eval "$as_ac_var=no"
18109 fi
18110 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18111 fi
18112 echo "$as_me:18112: result: `eval echo '${'$as_ac_var'}'`" >&5
18113 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18114 if test `eval echo '${'$as_ac_var'}'` = yes; then
18115   cat >>confdefs.h <<EOF
18116 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18117 EOF
18118
18119 fi
18120 done
18121  }
18122 echo "$as_me:18122: checking if poll really works" >&5
18123 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
18124 if test "${cf_cv_working_poll+set}" = set; then
18125   echo $ECHO_N "(cached) $ECHO_C" >&6
18126 else
18127
18128 if test "$cross_compiling" = yes; then
18129   cf_cv_working_poll=unknown
18130 else
18131   cat >conftest.$ac_ext <<_ACEOF
18132 #line 18132 "configure"
18133 #include "confdefs.h"
18134
18135 #include <stdlib.h>
18136 #include <stdio.h>
18137 #include <unistd.h>
18138 #include <fcntl.h>
18139 #ifdef HAVE_POLL_H
18140 #include <poll.h>
18141 #else
18142 #include <sys/poll.h>
18143 #endif
18144 int main(void) {
18145         struct pollfd myfds;
18146         int ret;
18147
18148         /* check for Darwin bug with respect to "devices" */
18149         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
18150         if (myfds.fd < 0)
18151                 myfds.fd = 0;
18152         myfds.events = POLLIN;
18153         myfds.revents = 0;
18154
18155         ret = poll(&myfds, 1, 100);
18156
18157         if (ret < 0 || (myfds.revents & POLLNVAL)) {
18158                 ret = -1;
18159         } else {
18160                 int fd = 0;
18161                 if (!isatty(fd)) {
18162                         fd = open("/dev/tty", 2);       /* O_RDWR */
18163                 }
18164 #ifdef HAVE_POSIX_OPENPT
18165                 if (fd < 0) {
18166                         fd = posix_openpt(O_RDWR);
18167                 }
18168 #endif
18169
18170                 if (fd >= 0) {
18171                         /* also check with standard input */
18172                         myfds.fd = fd;
18173                         myfds.events = POLLIN;
18174                         myfds.revents = 0;
18175                         ret = poll(&myfds, 1, 100);
18176                 } else {
18177                         ret = -1;
18178                 }
18179         }
18180         ${cf_cv_main_return:-return}(ret < 0);
18181 }
18182 _ACEOF
18183 rm -f conftest$ac_exeext
18184 if { (eval echo "$as_me:18184: \"$ac_link\"") >&5
18185   (eval $ac_link) 2>&5
18186   ac_status=$?
18187   echo "$as_me:18187: \$? = $ac_status" >&5
18188   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18189   { (eval echo "$as_me:18189: \"$ac_try\"") >&5
18190   (eval $ac_try) 2>&5
18191   ac_status=$?
18192   echo "$as_me:18192: \$? = $ac_status" >&5
18193   (exit $ac_status); }; }; then
18194   cf_cv_working_poll=yes
18195 else
18196   echo "$as_me: program exited with status $ac_status" >&5
18197 echo "$as_me: failed program was:" >&5
18198 cat conftest.$ac_ext >&5
18199 cf_cv_working_poll=no
18200 fi
18201 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18202 fi
18203 fi
18204 echo "$as_me:18204: result: $cf_cv_working_poll" >&5
18205 echo "${ECHO_T}$cf_cv_working_poll" >&6
18206 test "$cf_cv_working_poll" = "yes" &&
18207 cat >>confdefs.h <<\EOF
18208 #define HAVE_WORKING_POLL 1
18209 EOF
18210
18211 echo "$as_me:18211: checking for va_copy" >&5
18212 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
18213 if test "${cf_cv_have_va_copy+set}" = set; then
18214   echo $ECHO_N "(cached) $ECHO_C" >&6
18215 else
18216
18217 cat >conftest.$ac_ext <<_ACEOF
18218 #line 18218 "configure"
18219 #include "confdefs.h"
18220
18221 #include <stdarg.h>
18222
18223 int
18224 main ()
18225 {
18226
18227         static va_list dst;
18228         static va_list src;
18229         va_copy(dst, src)
18230   ;
18231   return 0;
18232 }
18233 _ACEOF
18234 rm -f conftest.$ac_objext conftest$ac_exeext
18235 if { (eval echo "$as_me:18235: \"$ac_link\"") >&5
18236   (eval $ac_link) 2>&5
18237   ac_status=$?
18238   echo "$as_me:18238: \$? = $ac_status" >&5
18239   (exit $ac_status); } &&
18240          { ac_try='test -s conftest$ac_exeext'
18241   { (eval echo "$as_me:18241: \"$ac_try\"") >&5
18242   (eval $ac_try) 2>&5
18243   ac_status=$?
18244   echo "$as_me:18244: \$? = $ac_status" >&5
18245   (exit $ac_status); }; }; then
18246   cf_cv_have_va_copy=yes
18247 else
18248   echo "$as_me: failed program was:" >&5
18249 cat conftest.$ac_ext >&5
18250 cf_cv_have_va_copy=no
18251 fi
18252 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18253 fi
18254 echo "$as_me:18254: result: $cf_cv_have_va_copy" >&5
18255 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
18256
18257 test "$cf_cv_have_va_copy" = yes &&
18258 cat >>confdefs.h <<\EOF
18259 #define HAVE_VA_COPY 1
18260 EOF
18261
18262 echo "$as_me:18262: checking for __va_copy" >&5
18263 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
18264 if test "${cf_cv_have___va_copy+set}" = set; then
18265   echo $ECHO_N "(cached) $ECHO_C" >&6
18266 else
18267
18268 cat >conftest.$ac_ext <<_ACEOF
18269 #line 18269 "configure"
18270 #include "confdefs.h"
18271
18272 #include <stdarg.h>
18273
18274 int
18275 main ()
18276 {
18277
18278         static va_list dst;
18279         static va_list src;
18280         __va_copy(dst, src)
18281   ;
18282   return 0;
18283 }
18284 _ACEOF
18285 rm -f conftest.$ac_objext conftest$ac_exeext
18286 if { (eval echo "$as_me:18286: \"$ac_link\"") >&5
18287   (eval $ac_link) 2>&5
18288   ac_status=$?
18289   echo "$as_me:18289: \$? = $ac_status" >&5
18290   (exit $ac_status); } &&
18291          { ac_try='test -s conftest$ac_exeext'
18292   { (eval echo "$as_me:18292: \"$ac_try\"") >&5
18293   (eval $ac_try) 2>&5
18294   ac_status=$?
18295   echo "$as_me:18295: \$? = $ac_status" >&5
18296   (exit $ac_status); }; }; then
18297   cf_cv_have___va_copy=yes
18298 else
18299   echo "$as_me: failed program was:" >&5
18300 cat conftest.$ac_ext >&5
18301 cf_cv_have___va_copy=no
18302 fi
18303 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18304 fi
18305 echo "$as_me:18305: result: $cf_cv_have___va_copy" >&5
18306 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
18307
18308 test "$cf_cv_have___va_copy" = yes &&
18309 cat >>confdefs.h <<\EOF
18310 #define HAVE___VA_COPY 1
18311 EOF
18312
18313 echo "$as_me:18313: checking for pid_t" >&5
18314 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
18315 if test "${ac_cv_type_pid_t+set}" = set; then
18316   echo $ECHO_N "(cached) $ECHO_C" >&6
18317 else
18318   cat >conftest.$ac_ext <<_ACEOF
18319 #line 18319 "configure"
18320 #include "confdefs.h"
18321 $ac_includes_default
18322 int
18323 main ()
18324 {
18325 if ((pid_t *) 0)
18326   return 0;
18327 if (sizeof (pid_t))
18328   return 0;
18329   ;
18330   return 0;
18331 }
18332 _ACEOF
18333 rm -f conftest.$ac_objext
18334 if { (eval echo "$as_me:18334: \"$ac_compile\"") >&5
18335   (eval $ac_compile) 2>&5
18336   ac_status=$?
18337   echo "$as_me:18337: \$? = $ac_status" >&5
18338   (exit $ac_status); } &&
18339          { ac_try='test -s conftest.$ac_objext'
18340   { (eval echo "$as_me:18340: \"$ac_try\"") >&5
18341   (eval $ac_try) 2>&5
18342   ac_status=$?
18343   echo "$as_me:18343: \$? = $ac_status" >&5
18344   (exit $ac_status); }; }; then
18345   ac_cv_type_pid_t=yes
18346 else
18347   echo "$as_me: failed program was:" >&5
18348 cat conftest.$ac_ext >&5
18349 ac_cv_type_pid_t=no
18350 fi
18351 rm -f conftest.$ac_objext conftest.$ac_ext
18352 fi
18353 echo "$as_me:18353: result: $ac_cv_type_pid_t" >&5
18354 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
18355 if test $ac_cv_type_pid_t = yes; then
18356   :
18357 else
18358
18359 cat >>confdefs.h <<EOF
18360 #define pid_t int
18361 EOF
18362
18363 fi
18364
18365 for ac_header in unistd.h vfork.h
18366 do
18367 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18368 echo "$as_me:18368: checking for $ac_header" >&5
18369 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18370 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18371   echo $ECHO_N "(cached) $ECHO_C" >&6
18372 else
18373   cat >conftest.$ac_ext <<_ACEOF
18374 #line 18374 "configure"
18375 #include "confdefs.h"
18376 #include <$ac_header>
18377 _ACEOF
18378 if { (eval echo "$as_me:18378: \"$ac_cpp conftest.$ac_ext\"") >&5
18379   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18380   ac_status=$?
18381   egrep -v '^ *\+' conftest.er1 >conftest.err
18382   rm -f conftest.er1
18383   cat conftest.err >&5
18384   echo "$as_me:18384: \$? = $ac_status" >&5
18385   (exit $ac_status); } >/dev/null; then
18386   if test -s conftest.err; then
18387     ac_cpp_err=$ac_c_preproc_warn_flag
18388   else
18389     ac_cpp_err=
18390   fi
18391 else
18392   ac_cpp_err=yes
18393 fi
18394 if test -z "$ac_cpp_err"; then
18395   eval "$as_ac_Header=yes"
18396 else
18397   echo "$as_me: failed program was:" >&5
18398   cat conftest.$ac_ext >&5
18399   eval "$as_ac_Header=no"
18400 fi
18401 rm -f conftest.err conftest.$ac_ext
18402 fi
18403 echo "$as_me:18403: result: `eval echo '${'$as_ac_Header'}'`" >&5
18404 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18405 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18406   cat >>confdefs.h <<EOF
18407 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18408 EOF
18409
18410 fi
18411 done
18412
18413 for ac_func in fork vfork
18414 do
18415 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18416 echo "$as_me:18416: checking for $ac_func" >&5
18417 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18418 if eval "test \"\${$as_ac_var+set}\" = set"; then
18419   echo $ECHO_N "(cached) $ECHO_C" >&6
18420 else
18421   cat >conftest.$ac_ext <<_ACEOF
18422 #line 18422 "configure"
18423 #include "confdefs.h"
18424 /* System header to define __stub macros and hopefully few prototypes,
18425     which can conflict with char $ac_func (); below.  */
18426 #include <assert.h>
18427 /* Override any gcc2 internal prototype to avoid an error.  */
18428 #ifdef __cplusplus
18429 extern "C"
18430 #endif
18431 /* We use char because int might match the return type of a gcc2
18432    builtin and then its argument prototype would still apply.  */
18433 char $ac_func ();
18434 char (*f) ();
18435
18436 int
18437 main ()
18438 {
18439 /* The GNU C library defines this for functions which it implements
18440     to always fail with ENOSYS.  Some functions are actually named
18441     something starting with __ and the normal name is an alias.  */
18442 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18443 choke me
18444 #else
18445 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18446 #endif
18447
18448   ;
18449   return 0;
18450 }
18451 _ACEOF
18452 rm -f conftest.$ac_objext conftest$ac_exeext
18453 if { (eval echo "$as_me:18453: \"$ac_link\"") >&5
18454   (eval $ac_link) 2>&5
18455   ac_status=$?
18456   echo "$as_me:18456: \$? = $ac_status" >&5
18457   (exit $ac_status); } &&
18458          { ac_try='test -s conftest$ac_exeext'
18459   { (eval echo "$as_me:18459: \"$ac_try\"") >&5
18460   (eval $ac_try) 2>&5
18461   ac_status=$?
18462   echo "$as_me:18462: \$? = $ac_status" >&5
18463   (exit $ac_status); }; }; then
18464   eval "$as_ac_var=yes"
18465 else
18466   echo "$as_me: failed program was:" >&5
18467 cat conftest.$ac_ext >&5
18468 eval "$as_ac_var=no"
18469 fi
18470 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18471 fi
18472 echo "$as_me:18472: result: `eval echo '${'$as_ac_var'}'`" >&5
18473 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18474 if test `eval echo '${'$as_ac_var'}'` = yes; then
18475   cat >>confdefs.h <<EOF
18476 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18477 EOF
18478
18479 fi
18480 done
18481
18482 ac_cv_func_fork_works=$ac_cv_func_fork
18483 if test "x$ac_cv_func_fork" = xyes; then
18484   echo "$as_me:18484: checking for working fork" >&5
18485 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18486 if test "${ac_cv_func_fork_works+set}" = set; then
18487   echo $ECHO_N "(cached) $ECHO_C" >&6
18488 else
18489   if test "$cross_compiling" = yes; then
18490   ac_cv_func_fork_works=cross
18491 else
18492   cat >conftest.$ac_ext <<_ACEOF
18493 /* By Rüdiger Kuhlmann. */
18494       #include <sys/types.h>
18495       #if HAVE_UNISTD_H
18496       # include <unistd.h>
18497       #endif
18498       /* Some systems only have a dummy stub for fork() */
18499       int main ()
18500       {
18501         if (fork() < 0)
18502           $ac_main_return (1);
18503         $ac_main_return (0);
18504       }
18505 _ACEOF
18506 rm -f conftest$ac_exeext
18507 if { (eval echo "$as_me:18507: \"$ac_link\"") >&5
18508   (eval $ac_link) 2>&5
18509   ac_status=$?
18510   echo "$as_me:18510: \$? = $ac_status" >&5
18511   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18512   { (eval echo "$as_me:18512: \"$ac_try\"") >&5
18513   (eval $ac_try) 2>&5
18514   ac_status=$?
18515   echo "$as_me:18515: \$? = $ac_status" >&5
18516   (exit $ac_status); }; }; then
18517   ac_cv_func_fork_works=yes
18518 else
18519   echo "$as_me: program exited with status $ac_status" >&5
18520 echo "$as_me: failed program was:" >&5
18521 cat conftest.$ac_ext >&5
18522 ac_cv_func_fork_works=no
18523 fi
18524 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18525 fi
18526 fi
18527 echo "$as_me:18527: result: $ac_cv_func_fork_works" >&5
18528 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18529
18530 fi
18531 if test "x$ac_cv_func_fork_works" = xcross; then
18532   case $host in
18533     *-*-amigaos* | *-*-msdosdjgpp*)
18534       # Override, as these systems have only a dummy fork() stub
18535       ac_cv_func_fork_works=no
18536       ;;
18537     *)
18538       ac_cv_func_fork_works=yes
18539       ;;
18540   esac
18541   { echo "$as_me:18541: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18542 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18543 fi
18544 ac_cv_func_vfork_works=$ac_cv_func_vfork
18545 if test "x$ac_cv_func_vfork" = xyes; then
18546   echo "$as_me:18546: checking for working vfork" >&5
18547 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18548 if test "${ac_cv_func_vfork_works+set}" = set; then
18549   echo $ECHO_N "(cached) $ECHO_C" >&6
18550 else
18551   if test "$cross_compiling" = yes; then
18552   ac_cv_func_vfork_works=cross
18553 else
18554   cat >conftest.$ac_ext <<_ACEOF
18555 #line 18555 "configure"
18556 #include "confdefs.h"
18557 /* Thanks to Paul Eggert for this test.  */
18558 #include <stdio.h>
18559 #include <sys/types.h>
18560 #include <sys/stat.h>
18561 #if HAVE_UNISTD_H
18562 # include <unistd.h>
18563 #endif
18564 #if HAVE_VFORK_H
18565 # include <vfork.h>
18566 #endif
18567 /* On some sparc systems, changes by the child to local and incoming
18568    argument registers are propagated back to the parent.  The compiler
18569    is told about this with #include <vfork.h>, but some compilers
18570    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18571    static variable whose address is put into a register that is
18572    clobbered by the vfork.  */
18573 static
18574 #ifdef __cplusplus
18575 sparc_address_test (int arg)
18576 # else
18577 sparc_address_test (arg) int arg;
18578 #endif
18579 {
18580   static pid_t child;
18581   if (!child) {
18582     child = vfork ();
18583     if (child < 0) {
18584       perror ("vfork");
18585       _exit(2);
18586     }
18587     if (!child) {
18588       arg = getpid();
18589       write(-1, "", 0);
18590       _exit (arg);
18591     }
18592   }
18593 }
18594
18595 int
18596 main ()
18597 {
18598   pid_t parent = getpid ();
18599   pid_t child;
18600
18601   sparc_address_test ();
18602
18603   child = vfork ();
18604
18605   if (child == 0) {
18606     /* Here is another test for sparc vfork register problems.  This
18607        test uses lots of local variables, at least as many local
18608        variables as main has allocated so far including compiler
18609        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18610        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18611        reuse the register of parent for one of the local variables,
18612        since it will think that parent can't possibly be used any more
18613        in this routine.  Assigning to the local variable will thus
18614        munge parent in the parent process.  */
18615     pid_t
18616       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18617       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18618     /* Convince the compiler that p..p7 are live; otherwise, it might
18619        use the same hardware register for all 8 local variables.  */
18620     if (p != p1 || p != p2 || p != p3 || p != p4
18621         || p != p5 || p != p6 || p != p7)
18622       _exit(1);
18623
18624     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18625        from child file descriptors.  If the child closes a descriptor
18626        before it execs or exits, this munges the parent's descriptor
18627        as well.  Test for this by closing stdout in the child.  */
18628     _exit(close(fileno(stdout)) != 0);
18629   } else {
18630     int status;
18631     struct stat st;
18632
18633     while (wait(&status) != child)
18634       ;
18635     $ac_main_return(
18636          /* Was there some problem with vforking?  */
18637          child < 0
18638
18639          /* Did the child fail?  (This shouldn't happen.)  */
18640          || status
18641
18642          /* Did the vfork/compiler bug occur?  */
18643          || parent != getpid()
18644
18645          /* Did the file descriptor bug occur?  */
18646          || fstat(fileno(stdout), &st) != 0
18647          );
18648   }
18649 }
18650 _ACEOF
18651 rm -f conftest$ac_exeext
18652 if { (eval echo "$as_me:18652: \"$ac_link\"") >&5
18653   (eval $ac_link) 2>&5
18654   ac_status=$?
18655   echo "$as_me:18655: \$? = $ac_status" >&5
18656   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18657   { (eval echo "$as_me:18657: \"$ac_try\"") >&5
18658   (eval $ac_try) 2>&5
18659   ac_status=$?
18660   echo "$as_me:18660: \$? = $ac_status" >&5
18661   (exit $ac_status); }; }; then
18662   ac_cv_func_vfork_works=yes
18663 else
18664   echo "$as_me: program exited with status $ac_status" >&5
18665 echo "$as_me: failed program was:" >&5
18666 cat conftest.$ac_ext >&5
18667 ac_cv_func_vfork_works=no
18668 fi
18669 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18670 fi
18671 fi
18672 echo "$as_me:18672: result: $ac_cv_func_vfork_works" >&5
18673 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18674
18675 fi;
18676 if test "x$ac_cv_func_fork_works" = xcross; then
18677   ac_cv_func_vfork_works=ac_cv_func_vfork
18678   { echo "$as_me:18678: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18679 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18680 fi
18681
18682 if test "x$ac_cv_func_vfork_works" = xyes; then
18683
18684 cat >>confdefs.h <<\EOF
18685 #define HAVE_WORKING_VFORK 1
18686 EOF
18687
18688 else
18689
18690 cat >>confdefs.h <<\EOF
18691 #define vfork fork
18692 EOF
18693
18694 fi
18695 if test "x$ac_cv_func_fork_works" = xyes; then
18696
18697 cat >>confdefs.h <<\EOF
18698 #define HAVE_WORKING_FORK 1
18699 EOF
18700
18701 fi
18702
18703 # special check for test/ditto.c
18704
18705 echo "$as_me:18705: checking for openpty in -lutil" >&5
18706 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18707 if test "${ac_cv_lib_util_openpty+set}" = set; then
18708   echo $ECHO_N "(cached) $ECHO_C" >&6
18709 else
18710   ac_check_lib_save_LIBS=$LIBS
18711 LIBS="-lutil  $LIBS"
18712 cat >conftest.$ac_ext <<_ACEOF
18713 #line 18713 "configure"
18714 #include "confdefs.h"
18715
18716 /* Override any gcc2 internal prototype to avoid an error.  */
18717 #ifdef __cplusplus
18718 extern "C"
18719 #endif
18720 /* We use char because int might match the return type of a gcc2
18721    builtin and then its argument prototype would still apply.  */
18722 char openpty ();
18723 int
18724 main ()
18725 {
18726 openpty ();
18727   ;
18728   return 0;
18729 }
18730 _ACEOF
18731 rm -f conftest.$ac_objext conftest$ac_exeext
18732 if { (eval echo "$as_me:18732: \"$ac_link\"") >&5
18733   (eval $ac_link) 2>&5
18734   ac_status=$?
18735   echo "$as_me:18735: \$? = $ac_status" >&5
18736   (exit $ac_status); } &&
18737          { ac_try='test -s conftest$ac_exeext'
18738   { (eval echo "$as_me:18738: \"$ac_try\"") >&5
18739   (eval $ac_try) 2>&5
18740   ac_status=$?
18741   echo "$as_me:18741: \$? = $ac_status" >&5
18742   (exit $ac_status); }; }; then
18743   ac_cv_lib_util_openpty=yes
18744 else
18745   echo "$as_me: failed program was:" >&5
18746 cat conftest.$ac_ext >&5
18747 ac_cv_lib_util_openpty=no
18748 fi
18749 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18750 LIBS=$ac_check_lib_save_LIBS
18751 fi
18752 echo "$as_me:18752: result: $ac_cv_lib_util_openpty" >&5
18753 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18754 if test $ac_cv_lib_util_openpty = yes; then
18755   cf_cv_lib_util=yes
18756 else
18757   cf_cv_lib_util=no
18758 fi
18759
18760 echo "$as_me:18760: checking for openpty header" >&5
18761 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18762 if test "${cf_cv_func_openpty+set}" = set; then
18763   echo $ECHO_N "(cached) $ECHO_C" >&6
18764 else
18765
18766         cf_save_LIBS="$LIBS"
18767         test $cf_cv_lib_util = yes && {
18768 cf_add_libs="-lutil"
18769 # Filter out duplicates - this happens with badly-designed ".pc" files...
18770 for cf_add_1lib in $LIBS
18771 do
18772         for cf_add_2lib in $cf_add_libs
18773         do
18774                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18775                 then
18776                         cf_add_1lib=
18777                         break
18778                 fi
18779         done
18780         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18781 done
18782 LIBS="$cf_add_libs"
18783  }
18784         for cf_header in pty.h libutil.h util.h
18785         do
18786         cat >conftest.$ac_ext <<_ACEOF
18787 #line 18787 "configure"
18788 #include "confdefs.h"
18789
18790 #include <$cf_header>
18791
18792 int
18793 main ()
18794 {
18795
18796         int x = openpty((int *)0, (int *)0, (char *)0,
18797                                    (struct termios *)0, (struct winsize *)0);
18798
18799   ;
18800   return 0;
18801 }
18802 _ACEOF
18803 rm -f conftest.$ac_objext conftest$ac_exeext
18804 if { (eval echo "$as_me:18804: \"$ac_link\"") >&5
18805   (eval $ac_link) 2>&5
18806   ac_status=$?
18807   echo "$as_me:18807: \$? = $ac_status" >&5
18808   (exit $ac_status); } &&
18809          { ac_try='test -s conftest$ac_exeext'
18810   { (eval echo "$as_me:18810: \"$ac_try\"") >&5
18811   (eval $ac_try) 2>&5
18812   ac_status=$?
18813   echo "$as_me:18813: \$? = $ac_status" >&5
18814   (exit $ac_status); }; }; then
18815
18816                 cf_cv_func_openpty=$cf_header
18817                 break
18818
18819 else
18820   echo "$as_me: failed program was:" >&5
18821 cat conftest.$ac_ext >&5
18822
18823                 cf_cv_func_openpty=no
18824
18825 fi
18826 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18827         done
18828         LIBS="$cf_save_LIBS"
18829
18830 fi
18831 echo "$as_me:18831: result: $cf_cv_func_openpty" >&5
18832 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18833
18834 if test "$cf_cv_func_openpty" != no ; then
18835
18836 cat >>confdefs.h <<EOF
18837 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18838 EOF
18839
18840 cat >>confdefs.h <<\EOF
18841 #define USE_XTERM_PTY 1
18842 EOF
18843
18844         if test "x$cf_cv_lib_util" = xyes ; then
18845
18846 cf_add_libs="-lutil"
18847 # Filter out duplicates - this happens with badly-designed ".pc" files...
18848 for cf_add_1lib in $TEST_LIBS
18849 do
18850         for cf_add_2lib in $cf_add_libs
18851         do
18852                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18853                 then
18854                         cf_add_1lib=
18855                         break
18856                 fi
18857         done
18858         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18859 done
18860 TEST_LIBS="$cf_add_libs"
18861
18862         fi
18863 fi
18864
18865 if test "$with_hashed_db" != no ; then
18866
18867 cat >>confdefs.h <<\EOF
18868 #define USE_HASHED_DB 1
18869 EOF
18870
18871 case $with_hashed_db in
18872 (yes|*able*)
18873         ;;
18874 (*)
18875         if test -d "$with_hashed_db" ; then
18876
18877 if test -n "$with_hashed_db/include" ; then
18878   for cf_add_incdir in $with_hashed_db/include
18879   do
18880         while test $cf_add_incdir != /usr/include
18881         do
18882           if test -d $cf_add_incdir
18883           then
18884                 cf_have_incdir=no
18885                 if test -n "$CFLAGS$CPPFLAGS" ; then
18886                   # a loop is needed to ensure we can add subdirs of existing dirs
18887                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18888                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18889                           cf_have_incdir=yes; break
18890                         fi
18891                   done
18892                 fi
18893
18894                 if test "$cf_have_incdir" = no ; then
18895                   if test "$cf_add_incdir" = /usr/local/include ; then
18896                         if test "$GCC" = yes
18897                         then
18898                           cf_save_CPPFLAGS=$CPPFLAGS
18899                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18900                           cat >conftest.$ac_ext <<_ACEOF
18901 #line 18901 "configure"
18902 #include "confdefs.h"
18903 #include <stdio.h>
18904 int
18905 main ()
18906 {
18907 printf("Hello")
18908   ;
18909   return 0;
18910 }
18911 _ACEOF
18912 rm -f conftest.$ac_objext
18913 if { (eval echo "$as_me:18913: \"$ac_compile\"") >&5
18914   (eval $ac_compile) 2>&5
18915   ac_status=$?
18916   echo "$as_me:18916: \$? = $ac_status" >&5
18917   (exit $ac_status); } &&
18918          { ac_try='test -s conftest.$ac_objext'
18919   { (eval echo "$as_me:18919: \"$ac_try\"") >&5
18920   (eval $ac_try) 2>&5
18921   ac_status=$?
18922   echo "$as_me:18922: \$? = $ac_status" >&5
18923   (exit $ac_status); }; }; then
18924   :
18925 else
18926   echo "$as_me: failed program was:" >&5
18927 cat conftest.$ac_ext >&5
18928 cf_have_incdir=yes
18929 fi
18930 rm -f conftest.$ac_objext conftest.$ac_ext
18931                           CPPFLAGS=$cf_save_CPPFLAGS
18932                         fi
18933                   fi
18934                 fi
18935
18936                 if test "$cf_have_incdir" = no ; then
18937                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18938
18939 echo "${as_me:-configure}:18939: testing adding $cf_add_incdir to include-path ..." 1>&5
18940
18941                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18942
18943                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18944                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18945                   cf_add_incdir="$cf_top_incdir"
18946                 else
18947                   break
18948                 fi
18949           else
18950                 break
18951           fi
18952         done
18953   done
18954 fi
18955
18956 if test -n "$with_hashed_db/lib" ; then
18957         for cf_add_libdir in $with_hashed_db/lib
18958         do
18959                 if test $cf_add_libdir = /usr/lib ; then
18960                         :
18961                 elif test -d $cf_add_libdir
18962                 then
18963                         cf_have_libdir=no
18964                         if test -n "$LDFLAGS$LIBS" ; then
18965                                 # a loop is needed to ensure we can add subdirs of existing dirs
18966                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
18967                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18968                                                 cf_have_libdir=yes; break
18969                                         fi
18970                                 done
18971                         fi
18972                         if test "$cf_have_libdir" = no ; then
18973                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18974
18975 echo "${as_me:-configure}:18975: testing adding $cf_add_libdir to library-path ..." 1>&5
18976
18977                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18978                         fi
18979                 fi
18980         done
18981 fi
18982
18983         else
18984                 case "$with_hashed_db" in
18985                 (./*|../*|/*)
18986                         { echo "$as_me:18986: WARNING: no such directory $with_hashed_db" >&5
18987 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18988                         ;;
18989                 (*)
18990
18991 cf_search=
18992
18993 test "x$prefix" != "xNONE" && \
18994 test -d "$prefix" && \
18995  {
18996         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18997         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18998         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18999         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
19000         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
19001         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
19002 }
19003
19004 for cf_subdir_prefix in \
19005         /usr \
19006         /usr/local \
19007         /usr/pkg \
19008         /opt \
19009         /opt/local \
19010         $HOME
19011 do
19012
19013 test "x$cf_subdir_prefix" != "x$prefix" && \
19014 test -d "$cf_subdir_prefix" && \
19015 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19016         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
19017         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
19018         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
19019         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
19020         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
19021         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"
19022 }
19023
19024 done
19025
19026         for cf_item in $cf_search
19027         do
19028                 case $cf_item in
19029                 (*/$with_hashed_db)
19030
19031 if test -n "$cf_item" ; then
19032   for cf_add_incdir in $cf_item
19033   do
19034         while test $cf_add_incdir != /usr/include
19035         do
19036           if test -d $cf_add_incdir
19037           then
19038                 cf_have_incdir=no
19039                 if test -n "$CFLAGS$CPPFLAGS" ; then
19040                   # a loop is needed to ensure we can add subdirs of existing dirs
19041                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19042                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19043                           cf_have_incdir=yes; break
19044                         fi
19045                   done
19046                 fi
19047
19048                 if test "$cf_have_incdir" = no ; then
19049                   if test "$cf_add_incdir" = /usr/local/include ; then
19050                         if test "$GCC" = yes
19051                         then
19052                           cf_save_CPPFLAGS=$CPPFLAGS
19053                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19054                           cat >conftest.$ac_ext <<_ACEOF
19055 #line 19055 "configure"
19056 #include "confdefs.h"
19057 #include <stdio.h>
19058 int
19059 main ()
19060 {
19061 printf("Hello")
19062   ;
19063   return 0;
19064 }
19065 _ACEOF
19066 rm -f conftest.$ac_objext
19067 if { (eval echo "$as_me:19067: \"$ac_compile\"") >&5
19068   (eval $ac_compile) 2>&5
19069   ac_status=$?
19070   echo "$as_me:19070: \$? = $ac_status" >&5
19071   (exit $ac_status); } &&
19072          { ac_try='test -s conftest.$ac_objext'
19073   { (eval echo "$as_me:19073: \"$ac_try\"") >&5
19074   (eval $ac_try) 2>&5
19075   ac_status=$?
19076   echo "$as_me:19076: \$? = $ac_status" >&5
19077   (exit $ac_status); }; }; then
19078   :
19079 else
19080   echo "$as_me: failed program was:" >&5
19081 cat conftest.$ac_ext >&5
19082 cf_have_incdir=yes
19083 fi
19084 rm -f conftest.$ac_objext conftest.$ac_ext
19085                           CPPFLAGS=$cf_save_CPPFLAGS
19086                         fi
19087                   fi
19088                 fi
19089
19090                 if test "$cf_have_incdir" = no ; then
19091                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19092
19093 echo "${as_me:-configure}:19093: testing adding $cf_add_incdir to include-path ..." 1>&5
19094
19095                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19096
19097                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19098                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19099                   cf_add_incdir="$cf_top_incdir"
19100                 else
19101                   break
19102                 fi
19103           else
19104                 break
19105           fi
19106         done
19107   done
19108 fi
19109
19110                         ;;
19111                 esac
19112         done
19113
19114 cf_search=
19115
19116 test "x$prefix" != "xNONE" && \
19117 test -d "$prefix" && \
19118  {
19119         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
19120         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
19121         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
19122         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
19123         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
19124         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
19125 }
19126
19127 for cf_subdir_prefix in \
19128         /usr \
19129         /usr/local \
19130         /usr/pkg \
19131         /opt \
19132         /opt/local \
19133         $HOME
19134 do
19135
19136 test "x$cf_subdir_prefix" != "x$prefix" && \
19137 test -d "$cf_subdir_prefix" && \
19138 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19139         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
19140         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
19141         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
19142         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
19143         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
19144         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"
19145 }
19146
19147 done
19148
19149         for cf_item in $cf_search
19150         do
19151                 case $cf_item in
19152                 (*/$with_hashed_db)
19153
19154 if test -n "$cf_item" ; then
19155         for cf_add_libdir in $cf_item
19156         do
19157                 if test $cf_add_libdir = /usr/lib ; then
19158                         :
19159                 elif test -d $cf_add_libdir
19160                 then
19161                         cf_have_libdir=no
19162                         if test -n "$LDFLAGS$LIBS" ; then
19163                                 # a loop is needed to ensure we can add subdirs of existing dirs
19164                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19165                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19166                                                 cf_have_libdir=yes; break
19167                                         fi
19168                                 done
19169                         fi
19170                         if test "$cf_have_libdir" = no ; then
19171                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19172
19173 echo "${as_me:-configure}:19173: testing adding $cf_add_libdir to library-path ..." 1>&5
19174
19175                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19176                         fi
19177                 fi
19178         done
19179 fi
19180
19181                         ;;
19182                 esac
19183         done
19184
19185                         ;;
19186                 esac
19187         fi
19188 esac
19189
19190 echo "$as_me:19190: checking for db.h" >&5
19191 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
19192 if test "${ac_cv_header_db_h+set}" = set; then
19193   echo $ECHO_N "(cached) $ECHO_C" >&6
19194 else
19195   cat >conftest.$ac_ext <<_ACEOF
19196 #line 19196 "configure"
19197 #include "confdefs.h"
19198 #include <db.h>
19199 _ACEOF
19200 if { (eval echo "$as_me:19200: \"$ac_cpp conftest.$ac_ext\"") >&5
19201   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19202   ac_status=$?
19203   egrep -v '^ *\+' conftest.er1 >conftest.err
19204   rm -f conftest.er1
19205   cat conftest.err >&5
19206   echo "$as_me:19206: \$? = $ac_status" >&5
19207   (exit $ac_status); } >/dev/null; then
19208   if test -s conftest.err; then
19209     ac_cpp_err=$ac_c_preproc_warn_flag
19210   else
19211     ac_cpp_err=
19212   fi
19213 else
19214   ac_cpp_err=yes
19215 fi
19216 if test -z "$ac_cpp_err"; then
19217   ac_cv_header_db_h=yes
19218 else
19219   echo "$as_me: failed program was:" >&5
19220   cat conftest.$ac_ext >&5
19221   ac_cv_header_db_h=no
19222 fi
19223 rm -f conftest.err conftest.$ac_ext
19224 fi
19225 echo "$as_me:19225: result: $ac_cv_header_db_h" >&5
19226 echo "${ECHO_T}$ac_cv_header_db_h" >&6
19227 if test $ac_cv_header_db_h = yes; then
19228
19229 echo "$as_me:19229: checking for version of db" >&5
19230 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
19231 if test "${cf_cv_hashed_db_version+set}" = set; then
19232   echo $ECHO_N "(cached) $ECHO_C" >&6
19233 else
19234
19235 cf_cv_hashed_db_version=unknown
19236
19237 for cf_db_version in 1 2 3 4 5 6
19238 do
19239
19240 echo "${as_me:-configure}:19240: testing checking for db version $cf_db_version ..." 1>&5
19241
19242         cat >conftest.$ac_ext <<_ACEOF
19243 #line 19243 "configure"
19244 #include "confdefs.h"
19245
19246 $ac_includes_default
19247 #include <db.h>
19248
19249 #ifdef DB_VERSION_MAJOR
19250         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
19251 #if $cf_db_version == DB_VERSION_MAJOR
19252         /* ok */
19253 #else
19254         make an error
19255 #endif
19256 #else
19257 #if $cf_db_version == 1
19258         /* ok: assuming this is DB 1.8.5 */
19259 #else
19260         make an error
19261 #endif
19262 #endif
19263
19264 int
19265 main ()
19266 {
19267 DBT *foo = 0
19268   ;
19269   return 0;
19270 }
19271 _ACEOF
19272 rm -f conftest.$ac_objext
19273 if { (eval echo "$as_me:19273: \"$ac_compile\"") >&5
19274   (eval $ac_compile) 2>&5
19275   ac_status=$?
19276   echo "$as_me:19276: \$? = $ac_status" >&5
19277   (exit $ac_status); } &&
19278          { ac_try='test -s conftest.$ac_objext'
19279   { (eval echo "$as_me:19279: \"$ac_try\"") >&5
19280   (eval $ac_try) 2>&5
19281   ac_status=$?
19282   echo "$as_me:19282: \$? = $ac_status" >&5
19283   (exit $ac_status); }; }; then
19284
19285         cf_cv_hashed_db_version=$cf_db_version
19286         break
19287
19288 else
19289   echo "$as_me: failed program was:" >&5
19290 cat conftest.$ac_ext >&5
19291 fi
19292 rm -f conftest.$ac_objext conftest.$ac_ext
19293 done
19294
19295 fi
19296 echo "$as_me:19296: result: $cf_cv_hashed_db_version" >&5
19297 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
19298
19299 if test "$cf_cv_hashed_db_version" = unknown ; then
19300         { { echo "$as_me:19300: error: Cannot determine version of db" >&5
19301 echo "$as_me: error: Cannot determine version of db" >&2;}
19302    { (exit 1); exit 1; }; }
19303 else
19304
19305 echo "$as_me:19305: checking for db libraries" >&5
19306 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
19307 if test "${cf_cv_hashed_db_libs+set}" = set; then
19308   echo $ECHO_N "(cached) $ECHO_C" >&6
19309 else
19310
19311 cf_cv_hashed_db_libs=unknown
19312 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
19313 do
19314         cf_save_libs="$LIBS"
19315         if test -n "$cf_db_libs"; then
19316
19317 cf_add_libs="-l$cf_db_libs"
19318 # Filter out duplicates - this happens with badly-designed ".pc" files...
19319 for cf_add_1lib in $LIBS
19320 do
19321         for cf_add_2lib in $cf_add_libs
19322         do
19323                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19324                 then
19325                         cf_add_1lib=
19326                         break
19327                 fi
19328         done
19329         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19330 done
19331 LIBS="$cf_add_libs"
19332
19333         fi
19334
19335 echo "${as_me:-configure}:19335: testing checking for library "$cf_db_libs" ..." 1>&5
19336
19337         cat >conftest.$ac_ext <<_ACEOF
19338 #line 19338 "configure"
19339 #include "confdefs.h"
19340
19341 $ac_includes_default
19342 #include <db.h>
19343
19344 int
19345 main ()
19346 {
19347
19348         char *path = "/tmp/foo";
19349 #ifdef DB_VERSION_MAJOR
19350 #if DB_VERSION_MAJOR >= 4
19351         DB *result = 0;
19352         db_create(&result, NULL, 0);
19353         result->open(result,
19354                 NULL,
19355                 path,
19356                 path,
19357                 DB_HASH,
19358                 DB_CREATE,
19359                 0644);
19360 #elif DB_VERSION_MAJOR >= 3
19361         DB *result = 0;
19362         db_create(&result, NULL, 0);
19363         result->open(result,
19364                 path,
19365                 path,
19366                 DB_HASH,
19367                 DB_CREATE,
19368                 0644);
19369 #elif DB_VERSION_MAJOR >= 2
19370         DB *result = 0;
19371         db_open(path,
19372                 DB_HASH,
19373                 DB_CREATE,
19374                 0644,
19375                 (DB_ENV *) 0,
19376                 (DB_INFO *) 0,
19377                 &result);
19378 #endif /* DB_VERSION_MAJOR */
19379 #else
19380         DB *result = dbopen(path,
19381                      2,
19382                      0644,
19383                      DB_HASH,
19384                      0);
19385 #endif
19386         ${cf_cv_main_return:-return}(result != 0)
19387
19388   ;
19389   return 0;
19390 }
19391 _ACEOF
19392 rm -f conftest.$ac_objext conftest$ac_exeext
19393 if { (eval echo "$as_me:19393: \"$ac_link\"") >&5
19394   (eval $ac_link) 2>&5
19395   ac_status=$?
19396   echo "$as_me:19396: \$? = $ac_status" >&5
19397   (exit $ac_status); } &&
19398          { ac_try='test -s conftest$ac_exeext'
19399   { (eval echo "$as_me:19399: \"$ac_try\"") >&5
19400   (eval $ac_try) 2>&5
19401   ac_status=$?
19402   echo "$as_me:19402: \$? = $ac_status" >&5
19403   (exit $ac_status); }; }; then
19404
19405         if test -n "$cf_db_libs" ; then
19406                 cf_cv_hashed_db_libs=$cf_db_libs
19407         else
19408                 cf_cv_hashed_db_libs=default
19409         fi
19410         LIBS="$cf_save_libs"
19411         break
19412
19413 else
19414   echo "$as_me: failed program was:" >&5
19415 cat conftest.$ac_ext >&5
19416 fi
19417 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19418         LIBS="$cf_save_libs"
19419 done
19420
19421 fi
19422 echo "$as_me:19422: result: $cf_cv_hashed_db_libs" >&5
19423 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19424
19425         if test "$cf_cv_hashed_db_libs" = unknown ; then
19426                 { { echo "$as_me:19426: error: Cannot determine library for db" >&5
19427 echo "$as_me: error: Cannot determine library for db" >&2;}
19428    { (exit 1); exit 1; }; }
19429         elif test "$cf_cv_hashed_db_libs" != default ; then
19430
19431 cf_add_libs="-l$cf_cv_hashed_db_libs"
19432 # Filter out duplicates - this happens with badly-designed ".pc" files...
19433 for cf_add_1lib in $LIBS
19434 do
19435         for cf_add_2lib in $cf_add_libs
19436         do
19437                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19438                 then
19439                         cf_add_1lib=
19440                         break
19441                 fi
19442         done
19443         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19444 done
19445 LIBS="$cf_add_libs"
19446
19447         fi
19448 fi
19449
19450 else
19451
19452         { { echo "$as_me:19452: error: Cannot find db.h" >&5
19453 echo "$as_me: error: Cannot find db.h" >&2;}
19454    { (exit 1); exit 1; }; }
19455
19456 fi
19457
19458 fi
19459
19460 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19461         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19462         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19463 fi
19464
19465 # Just in case, check if the C compiler has a bool type.
19466
19467 echo "$as_me:19467: checking if we should include stdbool.h" >&5
19468 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19469
19470 if test "${cf_cv_header_stdbool_h+set}" = set; then
19471   echo $ECHO_N "(cached) $ECHO_C" >&6
19472 else
19473
19474         cat >conftest.$ac_ext <<_ACEOF
19475 #line 19475 "configure"
19476 #include "confdefs.h"
19477
19478 int
19479 main ()
19480 {
19481 bool foo = false
19482   ;
19483   return 0;
19484 }
19485 _ACEOF
19486 rm -f conftest.$ac_objext
19487 if { (eval echo "$as_me:19487: \"$ac_compile\"") >&5
19488   (eval $ac_compile) 2>&5
19489   ac_status=$?
19490   echo "$as_me:19490: \$? = $ac_status" >&5
19491   (exit $ac_status); } &&
19492          { ac_try='test -s conftest.$ac_objext'
19493   { (eval echo "$as_me:19493: \"$ac_try\"") >&5
19494   (eval $ac_try) 2>&5
19495   ac_status=$?
19496   echo "$as_me:19496: \$? = $ac_status" >&5
19497   (exit $ac_status); }; }; then
19498   cf_cv_header_stdbool_h=0
19499 else
19500   echo "$as_me: failed program was:" >&5
19501 cat conftest.$ac_ext >&5
19502 cat >conftest.$ac_ext <<_ACEOF
19503 #line 19503 "configure"
19504 #include "confdefs.h"
19505
19506 #ifndef __BEOS__
19507 #include <stdbool.h>
19508 #endif
19509
19510 int
19511 main ()
19512 {
19513 bool foo = false
19514   ;
19515   return 0;
19516 }
19517 _ACEOF
19518 rm -f conftest.$ac_objext
19519 if { (eval echo "$as_me:19519: \"$ac_compile\"") >&5
19520   (eval $ac_compile) 2>&5
19521   ac_status=$?
19522   echo "$as_me:19522: \$? = $ac_status" >&5
19523   (exit $ac_status); } &&
19524          { ac_try='test -s conftest.$ac_objext'
19525   { (eval echo "$as_me:19525: \"$ac_try\"") >&5
19526   (eval $ac_try) 2>&5
19527   ac_status=$?
19528   echo "$as_me:19528: \$? = $ac_status" >&5
19529   (exit $ac_status); }; }; then
19530   cf_cv_header_stdbool_h=1
19531 else
19532   echo "$as_me: failed program was:" >&5
19533 cat conftest.$ac_ext >&5
19534 cf_cv_header_stdbool_h=0
19535 fi
19536 rm -f conftest.$ac_objext conftest.$ac_ext
19537 fi
19538 rm -f conftest.$ac_objext conftest.$ac_ext
19539 fi
19540
19541 if test "$cf_cv_header_stdbool_h" = 1
19542 then    echo "$as_me:19542: result: yes" >&5
19543 echo "${ECHO_T}yes" >&6
19544 else    echo "$as_me:19544: result: no" >&5
19545 echo "${ECHO_T}no" >&6
19546 fi
19547
19548 echo "$as_me:19548: checking for builtin bool type" >&5
19549 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19550
19551 if test "${cf_cv_cc_bool_type+set}" = set; then
19552   echo $ECHO_N "(cached) $ECHO_C" >&6
19553 else
19554
19555         cat >conftest.$ac_ext <<_ACEOF
19556 #line 19556 "configure"
19557 #include "confdefs.h"
19558
19559 #include <stdio.h>
19560 #include <sys/types.h>
19561
19562 int
19563 main ()
19564 {
19565 bool x = false
19566   ;
19567   return 0;
19568 }
19569 _ACEOF
19570 rm -f conftest.$ac_objext
19571 if { (eval echo "$as_me:19571: \"$ac_compile\"") >&5
19572   (eval $ac_compile) 2>&5
19573   ac_status=$?
19574   echo "$as_me:19574: \$? = $ac_status" >&5
19575   (exit $ac_status); } &&
19576          { ac_try='test -s conftest.$ac_objext'
19577   { (eval echo "$as_me:19577: \"$ac_try\"") >&5
19578   (eval $ac_try) 2>&5
19579   ac_status=$?
19580   echo "$as_me:19580: \$? = $ac_status" >&5
19581   (exit $ac_status); }; }; then
19582   cf_cv_cc_bool_type=1
19583 else
19584   echo "$as_me: failed program was:" >&5
19585 cat conftest.$ac_ext >&5
19586 cf_cv_cc_bool_type=0
19587 fi
19588 rm -f conftest.$ac_objext conftest.$ac_ext
19589
19590 fi
19591
19592 if test "$cf_cv_cc_bool_type" = 1
19593 then    echo "$as_me:19593: result: yes" >&5
19594 echo "${ECHO_T}yes" >&6
19595 else    echo "$as_me:19595: result: no" >&5
19596 echo "${ECHO_T}no" >&6
19597 fi
19598
19599 # Check for C++ compiler characteristics (and ensure that it's there!)
19600 if test -n "$CXX" ; then
19601         ac_ext=cc
19602 ac_cpp='$CXXCPP $CPPFLAGS'
19603 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19604 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19605 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19606 ac_main_return=return
19607
19608 if test -n "$GXX" ; then
19609
19610         cf_save="$LIBS"
19611         LIBS="$LIBS $CXXLIBS"
19612         echo "$as_me:19612: checking if we already have C++ library" >&5
19613 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
19614         cat >conftest.$ac_ext <<_ACEOF
19615 #line 19615 "configure"
19616 #include "confdefs.h"
19617
19618                         #include <iostream>
19619 int
19620 main ()
19621 {
19622
19623                         std::cout << "Hello World!" << std::endl;
19624   ;
19625   return 0;
19626 }
19627 _ACEOF
19628 rm -f conftest.$ac_objext conftest$ac_exeext
19629 if { (eval echo "$as_me:19629: \"$ac_link\"") >&5
19630   (eval $ac_link) 2>&5
19631   ac_status=$?
19632   echo "$as_me:19632: \$? = $ac_status" >&5
19633   (exit $ac_status); } &&
19634          { ac_try='test -s conftest$ac_exeext'
19635   { (eval echo "$as_me:19635: \"$ac_try\"") >&5
19636   (eval $ac_try) 2>&5
19637   ac_status=$?
19638   echo "$as_me:19638: \$? = $ac_status" >&5
19639   (exit $ac_status); }; }; then
19640   cf_have_libstdcpp=yes
19641 else
19642   echo "$as_me: failed program was:" >&5
19643 cat conftest.$ac_ext >&5
19644 cf_have_libstdcpp=no
19645 fi
19646 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19647         echo "$as_me:19647: result: $cf_have_libstdcpp" >&5
19648 echo "${ECHO_T}$cf_have_libstdcpp" >&6
19649         LIBS="$cf_save"
19650
19651         if test $cf_have_libstdcpp != yes
19652         then
19653                 case $cf_cv_system_name in
19654                 (os2*)
19655                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
19656                                 cf_stdcpp_libname=stdcpp
19657                         else
19658                                 cf_stdcpp_libname=stdc++
19659                         fi
19660                         ;;
19661                 (*)
19662                         cf_stdcpp_libname=stdc++
19663                         ;;
19664                 esac
19665
19666                 echo "$as_me:19666: checking for library $cf_stdcpp_libname" >&5
19667 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19668 if test "${cf_cv_libstdcpp+set}" = set; then
19669   echo $ECHO_N "(cached) $ECHO_C" >&6
19670 else
19671
19672                         cf_save="$LIBS"
19673                         LIBS="$LIBS $CXXLIBS"
19674
19675 cf_add_libs="-l$cf_stdcpp_libname"
19676 # Filter out duplicates - this happens with badly-designed ".pc" files...
19677 for cf_add_1lib in $LIBS
19678 do
19679         for cf_add_2lib in $cf_add_libs
19680         do
19681                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19682                 then
19683                         cf_add_1lib=
19684                         break
19685                 fi
19686         done
19687         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19688 done
19689 LIBS="$cf_add_libs"
19690
19691                 cat >conftest.$ac_ext <<_ACEOF
19692 #line 19692 "configure"
19693 #include "confdefs.h"
19694
19695                                 #include <iostream>
19696 int
19697 main ()
19698 {
19699
19700                                 std::cout << "Hello World!" << std::endl;
19701   ;
19702   return 0;
19703 }
19704 _ACEOF
19705 rm -f conftest.$ac_objext conftest$ac_exeext
19706 if { (eval echo "$as_me:19706: \"$ac_link\"") >&5
19707   (eval $ac_link) 2>&5
19708   ac_status=$?
19709   echo "$as_me:19709: \$? = $ac_status" >&5
19710   (exit $ac_status); } &&
19711          { ac_try='test -s conftest$ac_exeext'
19712   { (eval echo "$as_me:19712: \"$ac_try\"") >&5
19713   (eval $ac_try) 2>&5
19714   ac_status=$?
19715   echo "$as_me:19715: \$? = $ac_status" >&5
19716   (exit $ac_status); }; }; then
19717   cf_cv_libstdcpp=yes
19718 else
19719   echo "$as_me: failed program was:" >&5
19720 cat conftest.$ac_ext >&5
19721 cf_cv_libstdcpp=no
19722 fi
19723 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19724                         LIBS="$cf_save"
19725
19726 fi
19727 echo "$as_me:19727: result: $cf_cv_libstdcpp" >&5
19728 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19729                 test "$cf_cv_libstdcpp" = yes && {
19730 cf_add_libs="-l$cf_stdcpp_libname"
19731 # Filter out duplicates - this happens with badly-designed ".pc" files...
19732 for cf_add_1lib in $CXXLIBS
19733 do
19734         for cf_add_2lib in $cf_add_libs
19735         do
19736                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19737                 then
19738                         cf_add_1lib=
19739                         break
19740                 fi
19741         done
19742         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19743 done
19744 CXXLIBS="$cf_add_libs"
19745  }
19746         fi
19747 fi
19748
19749         echo "$as_me:19749: checking whether $CXX understands -c and -o together" >&5
19750 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19751 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19752   echo $ECHO_N "(cached) $ECHO_C" >&6
19753 else
19754
19755 cat > conftest.$ac_ext <<CF_EOF
19756 int main()
19757 {
19758         ${cf_cv_main_return:-return}(0);
19759 }
19760 CF_EOF
19761 # We do the test twice because some compilers refuse to overwrite an
19762 # existing .o file with -o, though they will create one.
19763 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19764 if { (eval echo "$as_me:19764: \"$ac_try\"") >&5
19765   (eval $ac_try) 2>&5
19766   ac_status=$?
19767   echo "$as_me:19767: \$? = $ac_status" >&5
19768   (exit $ac_status); } &&
19769   test -f conftest2.$ac_objext && { (eval echo "$as_me:19769: \"$ac_try\"") >&5
19770   (eval $ac_try) 2>&5
19771   ac_status=$?
19772   echo "$as_me:19772: \$? = $ac_status" >&5
19773   (exit $ac_status); };
19774 then
19775   eval cf_cv_prog_CXX_c_o=yes
19776 else
19777   eval cf_cv_prog_CXX_c_o=no
19778 fi
19779 rm -rf conftest*
19780
19781 fi
19782 if test $cf_cv_prog_CXX_c_o = yes; then
19783   echo "$as_me:19783: result: yes" >&5
19784 echo "${ECHO_T}yes" >&6
19785 else
19786   echo "$as_me:19786: result: no" >&5
19787 echo "${ECHO_T}no" >&6
19788 fi
19789
19790         case $GXX_VERSION in
19791         (1*|2.0-6*)
19792                 cf_cxx_library=yes
19793                 ;;
19794         (*-2.7*|2.7*)
19795
19796 cf_cxx_library=unknown
19797 case $cf_cv_system_name in
19798 (os2*)
19799         cf_gpp_libname=gpp
19800         ;;
19801 (*)
19802         cf_gpp_libname=g++
19803         ;;
19804 esac
19805 if test "$GXX" = yes; then
19806         echo "$as_me:19806: checking for lib$cf_gpp_libname" >&5
19807 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19808         cf_save="$LIBS"
19809
19810 cf_add_libs="-l$cf_gpp_libname"
19811 # Filter out duplicates - this happens with badly-designed ".pc" files...
19812 for cf_add_1lib in $LIBS
19813 do
19814         for cf_add_2lib in $cf_add_libs
19815         do
19816                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19817                 then
19818                         cf_add_1lib=
19819                         break
19820                 fi
19821         done
19822         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19823 done
19824 LIBS="$cf_add_libs"
19825
19826         cat >conftest.$ac_ext <<_ACEOF
19827 #line 19827 "configure"
19828 #include "confdefs.h"
19829
19830 #include <$cf_gpp_libname/builtin.h>
19831
19832 int
19833 main ()
19834 {
19835 two_arg_error_handler_t foo2 = lib_error_handler
19836   ;
19837   return 0;
19838 }
19839 _ACEOF
19840 rm -f conftest.$ac_objext conftest$ac_exeext
19841 if { (eval echo "$as_me:19841: \"$ac_link\"") >&5
19842   (eval $ac_link) 2>&5
19843   ac_status=$?
19844   echo "$as_me:19844: \$? = $ac_status" >&5
19845   (exit $ac_status); } &&
19846          { ac_try='test -s conftest$ac_exeext'
19847   { (eval echo "$as_me:19847: \"$ac_try\"") >&5
19848   (eval $ac_try) 2>&5
19849   ac_status=$?
19850   echo "$as_me:19850: \$? = $ac_status" >&5
19851   (exit $ac_status); }; }; then
19852   cf_cxx_library=yes
19853
19854 cf_add_libs="-l$cf_gpp_libname"
19855 # Filter out duplicates - this happens with badly-designed ".pc" files...
19856 for cf_add_1lib in $CXXLIBS
19857 do
19858         for cf_add_2lib in $cf_add_libs
19859         do
19860                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19861                 then
19862                         cf_add_1lib=
19863                         break
19864                 fi
19865         done
19866         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19867 done
19868 CXXLIBS="$cf_add_libs"
19869
19870          if test "$cf_gpp_libname" = cpp ; then
19871
19872 cat >>confdefs.h <<\EOF
19873 #define HAVE_GPP_BUILTIN_H 1
19874 EOF
19875
19876          else
19877
19878 cat >>confdefs.h <<\EOF
19879 #define HAVE_GXX_BUILTIN_H 1
19880 EOF
19881
19882          fi
19883 else
19884   echo "$as_me: failed program was:" >&5
19885 cat conftest.$ac_ext >&5
19886 cat >conftest.$ac_ext <<_ACEOF
19887 #line 19887 "configure"
19888 #include "confdefs.h"
19889
19890 #include <builtin.h>
19891
19892 int
19893 main ()
19894 {
19895 two_arg_error_handler_t foo2 = lib_error_handler
19896   ;
19897   return 0;
19898 }
19899 _ACEOF
19900 rm -f conftest.$ac_objext conftest$ac_exeext
19901 if { (eval echo "$as_me:19901: \"$ac_link\"") >&5
19902   (eval $ac_link) 2>&5
19903   ac_status=$?
19904   echo "$as_me:19904: \$? = $ac_status" >&5
19905   (exit $ac_status); } &&
19906          { ac_try='test -s conftest$ac_exeext'
19907   { (eval echo "$as_me:19907: \"$ac_try\"") >&5
19908   (eval $ac_try) 2>&5
19909   ac_status=$?
19910   echo "$as_me:19910: \$? = $ac_status" >&5
19911   (exit $ac_status); }; }; then
19912   cf_cxx_library=yes
19913
19914 cf_add_libs="-l$cf_gpp_libname"
19915 # Filter out duplicates - this happens with badly-designed ".pc" files...
19916 for cf_add_1lib in $CXXLIBS
19917 do
19918         for cf_add_2lib in $cf_add_libs
19919         do
19920                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19921                 then
19922                         cf_add_1lib=
19923                         break
19924                 fi
19925         done
19926         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19927 done
19928 CXXLIBS="$cf_add_libs"
19929
19930 cat >>confdefs.h <<\EOF
19931 #define HAVE_BUILTIN_H 1
19932 EOF
19933
19934 else
19935   echo "$as_me: failed program was:" >&5
19936 cat conftest.$ac_ext >&5
19937 cf_cxx_library=no
19938 fi
19939 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19940 fi
19941 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19942         LIBS="$cf_save"
19943         echo "$as_me:19943: result: $cf_cxx_library" >&5
19944 echo "${ECHO_T}$cf_cxx_library" >&6
19945 fi
19946
19947                 ;;
19948         (*)
19949                 cf_cxx_library=no
19950                 ;;
19951         esac
19952
19953         ac_ext=cc
19954 ac_cpp='$CXXCPP $CPPFLAGS'
19955 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19956 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19957 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19958 ac_main_return=return
19959 echo "$as_me:19959: checking how to run the C++ preprocessor" >&5
19960 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19961 if test -z "$CXXCPP"; then
19962   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19963   echo $ECHO_N "(cached) $ECHO_C" >&6
19964 else
19965       # Double quotes because CXXCPP needs to be expanded
19966     for CXXCPP in "$CXX -E" "/lib/cpp"
19967     do
19968       ac_preproc_ok=false
19969 for ac_cxx_preproc_warn_flag in '' yes
19970 do
19971   # Use a header file that comes with gcc, so configuring glibc
19972   # with a fresh cross-compiler works.
19973   # On the NeXT, cc -E runs the code through the compiler's parser,
19974   # not just through cpp. "Syntax error" is here to catch this case.
19975   cat >conftest.$ac_ext <<_ACEOF
19976 #line 19976 "configure"
19977 #include "confdefs.h"
19978 #include <assert.h>
19979                      Syntax error
19980 _ACEOF
19981 if { (eval echo "$as_me:19981: \"$ac_cpp conftest.$ac_ext\"") >&5
19982   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19983   ac_status=$?
19984   egrep -v '^ *\+' conftest.er1 >conftest.err
19985   rm -f conftest.er1
19986   cat conftest.err >&5
19987   echo "$as_me:19987: \$? = $ac_status" >&5
19988   (exit $ac_status); } >/dev/null; then
19989   if test -s conftest.err; then
19990     ac_cpp_err=$ac_cxx_preproc_warn_flag
19991   else
19992     ac_cpp_err=
19993   fi
19994 else
19995   ac_cpp_err=yes
19996 fi
19997 if test -z "$ac_cpp_err"; then
19998   :
19999 else
20000   echo "$as_me: failed program was:" >&5
20001   cat conftest.$ac_ext >&5
20002   # Broken: fails on valid input.
20003 continue
20004 fi
20005 rm -f conftest.err conftest.$ac_ext
20006
20007   # OK, works on sane cases.  Now check whether non-existent headers
20008   # can be detected and how.
20009   cat >conftest.$ac_ext <<_ACEOF
20010 #line 20010 "configure"
20011 #include "confdefs.h"
20012 #include <ac_nonexistent.h>
20013 _ACEOF
20014 if { (eval echo "$as_me:20014: \"$ac_cpp conftest.$ac_ext\"") >&5
20015   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20016   ac_status=$?
20017   egrep -v '^ *\+' conftest.er1 >conftest.err
20018   rm -f conftest.er1
20019   cat conftest.err >&5
20020   echo "$as_me:20020: \$? = $ac_status" >&5
20021   (exit $ac_status); } >/dev/null; then
20022   if test -s conftest.err; then
20023     ac_cpp_err=$ac_cxx_preproc_warn_flag
20024   else
20025     ac_cpp_err=
20026   fi
20027 else
20028   ac_cpp_err=yes
20029 fi
20030 if test -z "$ac_cpp_err"; then
20031   # Broken: success on invalid input.
20032 continue
20033 else
20034   echo "$as_me: failed program was:" >&5
20035   cat conftest.$ac_ext >&5
20036   # Passes both tests.
20037 ac_preproc_ok=:
20038 break
20039 fi
20040 rm -f conftest.err conftest.$ac_ext
20041
20042 done
20043 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20044 rm -f conftest.err conftest.$ac_ext
20045 if $ac_preproc_ok; then
20046   break
20047 fi
20048
20049     done
20050     ac_cv_prog_CXXCPP=$CXXCPP
20051
20052 fi
20053   CXXCPP=$ac_cv_prog_CXXCPP
20054 else
20055   ac_cv_prog_CXXCPP=$CXXCPP
20056 fi
20057 echo "$as_me:20057: result: $CXXCPP" >&5
20058 echo "${ECHO_T}$CXXCPP" >&6
20059 ac_preproc_ok=false
20060 for ac_cxx_preproc_warn_flag in '' yes
20061 do
20062   # Use a header file that comes with gcc, so configuring glibc
20063   # with a fresh cross-compiler works.
20064   # On the NeXT, cc -E runs the code through the compiler's parser,
20065   # not just through cpp. "Syntax error" is here to catch this case.
20066   cat >conftest.$ac_ext <<_ACEOF
20067 #line 20067 "configure"
20068 #include "confdefs.h"
20069 #include <assert.h>
20070                      Syntax error
20071 _ACEOF
20072 if { (eval echo "$as_me:20072: \"$ac_cpp conftest.$ac_ext\"") >&5
20073   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20074   ac_status=$?
20075   egrep -v '^ *\+' conftest.er1 >conftest.err
20076   rm -f conftest.er1
20077   cat conftest.err >&5
20078   echo "$as_me:20078: \$? = $ac_status" >&5
20079   (exit $ac_status); } >/dev/null; then
20080   if test -s conftest.err; then
20081     ac_cpp_err=$ac_cxx_preproc_warn_flag
20082   else
20083     ac_cpp_err=
20084   fi
20085 else
20086   ac_cpp_err=yes
20087 fi
20088 if test -z "$ac_cpp_err"; then
20089   :
20090 else
20091   echo "$as_me: failed program was:" >&5
20092   cat conftest.$ac_ext >&5
20093   # Broken: fails on valid input.
20094 continue
20095 fi
20096 rm -f conftest.err conftest.$ac_ext
20097
20098   # OK, works on sane cases.  Now check whether non-existent headers
20099   # can be detected and how.
20100   cat >conftest.$ac_ext <<_ACEOF
20101 #line 20101 "configure"
20102 #include "confdefs.h"
20103 #include <ac_nonexistent.h>
20104 _ACEOF
20105 if { (eval echo "$as_me:20105: \"$ac_cpp conftest.$ac_ext\"") >&5
20106   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20107   ac_status=$?
20108   egrep -v '^ *\+' conftest.er1 >conftest.err
20109   rm -f conftest.er1
20110   cat conftest.err >&5
20111   echo "$as_me:20111: \$? = $ac_status" >&5
20112   (exit $ac_status); } >/dev/null; then
20113   if test -s conftest.err; then
20114     ac_cpp_err=$ac_cxx_preproc_warn_flag
20115   else
20116     ac_cpp_err=
20117   fi
20118 else
20119   ac_cpp_err=yes
20120 fi
20121 if test -z "$ac_cpp_err"; then
20122   # Broken: success on invalid input.
20123 continue
20124 else
20125   echo "$as_me: failed program was:" >&5
20126   cat conftest.$ac_ext >&5
20127   # Passes both tests.
20128 ac_preproc_ok=:
20129 break
20130 fi
20131 rm -f conftest.err conftest.$ac_ext
20132
20133 done
20134 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20135 rm -f conftest.err conftest.$ac_ext
20136 if $ac_preproc_ok; then
20137   :
20138 else
20139   { { echo "$as_me:20139: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
20140 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
20141    { (exit 1); exit 1; }; }
20142 fi
20143
20144 ac_ext=cc
20145 ac_cpp='$CXXCPP $CPPFLAGS'
20146 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20147 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20148 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20149 ac_main_return=return
20150
20151 for ac_header in typeinfo
20152 do
20153 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20154 echo "$as_me:20154: checking for $ac_header" >&5
20155 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20156 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20157   echo $ECHO_N "(cached) $ECHO_C" >&6
20158 else
20159   cat >conftest.$ac_ext <<_ACEOF
20160 #line 20160 "configure"
20161 #include "confdefs.h"
20162 #include <$ac_header>
20163 _ACEOF
20164 if { (eval echo "$as_me:20164: \"$ac_cpp conftest.$ac_ext\"") >&5
20165   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20166   ac_status=$?
20167   egrep -v '^ *\+' conftest.er1 >conftest.err
20168   rm -f conftest.er1
20169   cat conftest.err >&5
20170   echo "$as_me:20170: \$? = $ac_status" >&5
20171   (exit $ac_status); } >/dev/null; then
20172   if test -s conftest.err; then
20173     ac_cpp_err=$ac_cxx_preproc_warn_flag
20174   else
20175     ac_cpp_err=
20176   fi
20177 else
20178   ac_cpp_err=yes
20179 fi
20180 if test -z "$ac_cpp_err"; then
20181   eval "$as_ac_Header=yes"
20182 else
20183   echo "$as_me: failed program was:" >&5
20184   cat conftest.$ac_ext >&5
20185   eval "$as_ac_Header=no"
20186 fi
20187 rm -f conftest.err conftest.$ac_ext
20188 fi
20189 echo "$as_me:20189: result: `eval echo '${'$as_ac_Header'}'`" >&5
20190 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20191 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20192   cat >>confdefs.h <<EOF
20193 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20194 EOF
20195
20196 fi
20197 done
20198
20199 for ac_header in iostream
20200 do
20201 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20202 echo "$as_me:20202: checking for $ac_header" >&5
20203 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20204 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20205   echo $ECHO_N "(cached) $ECHO_C" >&6
20206 else
20207   cat >conftest.$ac_ext <<_ACEOF
20208 #line 20208 "configure"
20209 #include "confdefs.h"
20210 #include <$ac_header>
20211 _ACEOF
20212 if { (eval echo "$as_me:20212: \"$ac_cpp conftest.$ac_ext\"") >&5
20213   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20214   ac_status=$?
20215   egrep -v '^ *\+' conftest.er1 >conftest.err
20216   rm -f conftest.er1
20217   cat conftest.err >&5
20218   echo "$as_me:20218: \$? = $ac_status" >&5
20219   (exit $ac_status); } >/dev/null; then
20220   if test -s conftest.err; then
20221     ac_cpp_err=$ac_cxx_preproc_warn_flag
20222   else
20223     ac_cpp_err=
20224   fi
20225 else
20226   ac_cpp_err=yes
20227 fi
20228 if test -z "$ac_cpp_err"; then
20229   eval "$as_ac_Header=yes"
20230 else
20231   echo "$as_me: failed program was:" >&5
20232   cat conftest.$ac_ext >&5
20233   eval "$as_ac_Header=no"
20234 fi
20235 rm -f conftest.err conftest.$ac_ext
20236 fi
20237 echo "$as_me:20237: result: `eval echo '${'$as_ac_Header'}'`" >&5
20238 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20239 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20240   cat >>confdefs.h <<EOF
20241 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20242 EOF
20243
20244 fi
20245 done
20246
20247 if test x"$ac_cv_header_iostream" = xyes ; then
20248         echo "$as_me:20248: checking if iostream uses std-namespace" >&5
20249 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
20250         cat >conftest.$ac_ext <<_ACEOF
20251 #line 20251 "configure"
20252 #include "confdefs.h"
20253
20254 #include <iostream>
20255 using std::endl;
20256 using std::cerr;
20257 int
20258 main ()
20259 {
20260
20261 cerr << "testing" << endl;
20262
20263   ;
20264   return 0;
20265 }
20266 _ACEOF
20267 rm -f conftest.$ac_objext
20268 if { (eval echo "$as_me:20268: \"$ac_compile\"") >&5
20269   (eval $ac_compile) 2>&5
20270   ac_status=$?
20271   echo "$as_me:20271: \$? = $ac_status" >&5
20272   (exit $ac_status); } &&
20273          { ac_try='test -s conftest.$ac_objext'
20274   { (eval echo "$as_me:20274: \"$ac_try\"") >&5
20275   (eval $ac_try) 2>&5
20276   ac_status=$?
20277   echo "$as_me:20277: \$? = $ac_status" >&5
20278   (exit $ac_status); }; }; then
20279   cf_iostream_namespace=yes
20280 else
20281   echo "$as_me: failed program was:" >&5
20282 cat conftest.$ac_ext >&5
20283 cf_iostream_namespace=no
20284 fi
20285 rm -f conftest.$ac_objext conftest.$ac_ext
20286         echo "$as_me:20286: result: $cf_iostream_namespace" >&5
20287 echo "${ECHO_T}$cf_iostream_namespace" >&6
20288         if test "$cf_iostream_namespace" = yes ; then
20289
20290 cat >>confdefs.h <<\EOF
20291 #define IOSTREAM_NAMESPACE 1
20292 EOF
20293
20294         fi
20295 fi
20296
20297 echo "$as_me:20297: checking if we should include stdbool.h" >&5
20298 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20299
20300 if test "${cf_cv_header_stdbool_h+set}" = set; then
20301   echo $ECHO_N "(cached) $ECHO_C" >&6
20302 else
20303
20304         cat >conftest.$ac_ext <<_ACEOF
20305 #line 20305 "configure"
20306 #include "confdefs.h"
20307
20308 int
20309 main ()
20310 {
20311 bool foo = false
20312   ;
20313   return 0;
20314 }
20315 _ACEOF
20316 rm -f conftest.$ac_objext
20317 if { (eval echo "$as_me:20317: \"$ac_compile\"") >&5
20318   (eval $ac_compile) 2>&5
20319   ac_status=$?
20320   echo "$as_me:20320: \$? = $ac_status" >&5
20321   (exit $ac_status); } &&
20322          { ac_try='test -s conftest.$ac_objext'
20323   { (eval echo "$as_me:20323: \"$ac_try\"") >&5
20324   (eval $ac_try) 2>&5
20325   ac_status=$?
20326   echo "$as_me:20326: \$? = $ac_status" >&5
20327   (exit $ac_status); }; }; then
20328   cf_cv_header_stdbool_h=0
20329 else
20330   echo "$as_me: failed program was:" >&5
20331 cat conftest.$ac_ext >&5
20332 cat >conftest.$ac_ext <<_ACEOF
20333 #line 20333 "configure"
20334 #include "confdefs.h"
20335
20336 #ifndef __BEOS__
20337 #include <stdbool.h>
20338 #endif
20339
20340 int
20341 main ()
20342 {
20343 bool foo = false
20344   ;
20345   return 0;
20346 }
20347 _ACEOF
20348 rm -f conftest.$ac_objext
20349 if { (eval echo "$as_me:20349: \"$ac_compile\"") >&5
20350   (eval $ac_compile) 2>&5
20351   ac_status=$?
20352   echo "$as_me:20352: \$? = $ac_status" >&5
20353   (exit $ac_status); } &&
20354          { ac_try='test -s conftest.$ac_objext'
20355   { (eval echo "$as_me:20355: \"$ac_try\"") >&5
20356   (eval $ac_try) 2>&5
20357   ac_status=$?
20358   echo "$as_me:20358: \$? = $ac_status" >&5
20359   (exit $ac_status); }; }; then
20360   cf_cv_header_stdbool_h=1
20361 else
20362   echo "$as_me: failed program was:" >&5
20363 cat conftest.$ac_ext >&5
20364 cf_cv_header_stdbool_h=0
20365 fi
20366 rm -f conftest.$ac_objext conftest.$ac_ext
20367 fi
20368 rm -f conftest.$ac_objext conftest.$ac_ext
20369 fi
20370
20371 if test "$cf_cv_header_stdbool_h" = 1
20372 then    echo "$as_me:20372: result: yes" >&5
20373 echo "${ECHO_T}yes" >&6
20374 else    echo "$as_me:20374: result: no" >&5
20375 echo "${ECHO_T}no" >&6
20376 fi
20377
20378 echo "$as_me:20378: checking for builtin bool type" >&5
20379 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20380
20381 if test "${cf_cv_builtin_bool+set}" = set; then
20382   echo $ECHO_N "(cached) $ECHO_C" >&6
20383 else
20384
20385         cat >conftest.$ac_ext <<_ACEOF
20386 #line 20386 "configure"
20387 #include "confdefs.h"
20388
20389 #include <stdio.h>
20390 #include <sys/types.h>
20391
20392 int
20393 main ()
20394 {
20395 bool x = false
20396   ;
20397   return 0;
20398 }
20399 _ACEOF
20400 rm -f conftest.$ac_objext
20401 if { (eval echo "$as_me:20401: \"$ac_compile\"") >&5
20402   (eval $ac_compile) 2>&5
20403   ac_status=$?
20404   echo "$as_me:20404: \$? = $ac_status" >&5
20405   (exit $ac_status); } &&
20406          { ac_try='test -s conftest.$ac_objext'
20407   { (eval echo "$as_me:20407: \"$ac_try\"") >&5
20408   (eval $ac_try) 2>&5
20409   ac_status=$?
20410   echo "$as_me:20410: \$? = $ac_status" >&5
20411   (exit $ac_status); }; }; then
20412   cf_cv_builtin_bool=1
20413 else
20414   echo "$as_me: failed program was:" >&5
20415 cat conftest.$ac_ext >&5
20416 cf_cv_builtin_bool=0
20417 fi
20418 rm -f conftest.$ac_objext conftest.$ac_ext
20419
20420 fi
20421
20422 if test "$cf_cv_builtin_bool" = 1
20423 then    echo "$as_me:20423: result: yes" >&5
20424 echo "${ECHO_T}yes" >&6
20425 else    echo "$as_me:20425: result: no" >&5
20426 echo "${ECHO_T}no" >&6
20427 fi
20428
20429 echo "$as_me:20429: checking for size of bool" >&5
20430 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20431 if test "${cf_cv_type_of_bool+set}" = set; then
20432   echo $ECHO_N "(cached) $ECHO_C" >&6
20433 else
20434
20435         rm -f cf_test.out
20436         if test "$cross_compiling" = yes; then
20437   cf_cv_type_of_bool=unknown
20438 else
20439   cat >conftest.$ac_ext <<_ACEOF
20440 #line 20440 "configure"
20441 #include "confdefs.h"
20442
20443 #include <stdlib.h>
20444 #include <stdio.h>
20445
20446 #if defined(__cplusplus)
20447
20448 #ifdef HAVE_GXX_BUILTIN_H
20449 #include <g++/builtin.h>
20450 #elif HAVE_GPP_BUILTIN_H
20451 #include <gpp/builtin.h>
20452 #elif HAVE_BUILTIN_H
20453 #include <builtin.h>
20454 #endif
20455
20456 #else
20457
20458 #if $cf_cv_header_stdbool_h
20459 #include <stdbool.h>
20460 #endif
20461
20462 #endif
20463
20464 int main()
20465 {
20466         FILE *fp = fopen("cf_test.out", "w");
20467         if (fp != 0) {
20468                 bool x = true;
20469                 if ((bool)(-x) >= 0)
20470                         fputs("unsigned ", fp);
20471                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20472                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20473                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20474                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20475                 fclose(fp);
20476         }
20477         ${cf_cv_main_return:-return}(0);
20478 }
20479
20480 _ACEOF
20481 rm -f conftest$ac_exeext
20482 if { (eval echo "$as_me:20482: \"$ac_link\"") >&5
20483   (eval $ac_link) 2>&5
20484   ac_status=$?
20485   echo "$as_me:20485: \$? = $ac_status" >&5
20486   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20487   { (eval echo "$as_me:20487: \"$ac_try\"") >&5
20488   (eval $ac_try) 2>&5
20489   ac_status=$?
20490   echo "$as_me:20490: \$? = $ac_status" >&5
20491   (exit $ac_status); }; }; then
20492   cf_cv_type_of_bool=`cat cf_test.out`
20493                  if test -z "$cf_cv_type_of_bool"; then
20494                    cf_cv_type_of_bool=unknown
20495                  fi
20496 else
20497   echo "$as_me: program exited with status $ac_status" >&5
20498 echo "$as_me: failed program was:" >&5
20499 cat conftest.$ac_ext >&5
20500 cf_cv_type_of_bool=unknown
20501 fi
20502 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20503 fi
20504
20505 fi
20506
20507         rm -f cf_test.out
20508 echo "$as_me:20508: result: $cf_cv_type_of_bool" >&5
20509 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20510 if test "$cf_cv_type_of_bool" = unknown ; then
20511         case .$NCURSES_BOOL in
20512         (.auto|.) NCURSES_BOOL=unsigned;;
20513         esac
20514         { echo "$as_me:20514: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20515 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20516         cf_cv_type_of_bool=$NCURSES_BOOL
20517 fi
20518
20519 echo "$as_me:20519: checking for special defines needed for etip.h" >&5
20520 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20521 cf_save_CXXFLAGS="$CXXFLAGS"
20522 cf_result="none"
20523
20524 # etip.h includes ncurses.h which includes ncurses_dll.h
20525 # But ncurses_dll.h is generated - fix here.
20526 test -d include || mkdir include
20527 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
20528
20529 for cf_math in "" MATH_H
20530 do
20531 for cf_excp in "" MATH_EXCEPTION
20532 do
20533         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
20534         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20535         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20536 cat >conftest.$ac_ext <<_ACEOF
20537 #line 20537 "configure"
20538 #include "confdefs.h"
20539
20540 #include <etip.h.in>
20541
20542 int
20543 main ()
20544 {
20545
20546   ;
20547   return 0;
20548 }
20549 _ACEOF
20550 rm -f conftest.$ac_objext
20551 if { (eval echo "$as_me:20551: \"$ac_compile\"") >&5
20552   (eval $ac_compile) 2>&5
20553   ac_status=$?
20554   echo "$as_me:20554: \$? = $ac_status" >&5
20555   (exit $ac_status); } &&
20556          { ac_try='test -s conftest.$ac_objext'
20557   { (eval echo "$as_me:20557: \"$ac_try\"") >&5
20558   (eval $ac_try) 2>&5
20559   ac_status=$?
20560   echo "$as_me:20560: \$? = $ac_status" >&5
20561   (exit $ac_status); }; }; then
20562
20563         test -n "$cf_math" && cat >>confdefs.h <<EOF
20564 #define ETIP_NEEDS_${cf_math} 1
20565 EOF
20566
20567         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20568 #define ETIP_NEEDS_${cf_excp} 1
20569 EOF
20570
20571         cf_result="$cf_math $cf_excp"
20572         break 2
20573
20574 else
20575   echo "$as_me: failed program was:" >&5
20576 cat conftest.$ac_ext >&5
20577 fi
20578 rm -f conftest.$ac_objext conftest.$ac_ext
20579 done
20580 done
20581 echo "$as_me:20581: result: $cf_result" >&5
20582 echo "${ECHO_T}$cf_result" >&6
20583 CXXFLAGS="$cf_save_CXXFLAGS"
20584
20585 if test -n "$CXX"; then
20586 echo "$as_me:20586: checking if $CXX accepts parameter initialization" >&5
20587 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20588 if test "${cf_cv_cpp_param_init+set}" = set; then
20589   echo $ECHO_N "(cached) $ECHO_C" >&6
20590 else
20591
20592         ac_ext=cc
20593 ac_cpp='$CXXCPP $CPPFLAGS'
20594 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20595 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20596 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20597 ac_main_return=return
20598
20599         if test "$cross_compiling" = yes; then
20600   cf_cv_cpp_param_init=unknown
20601 else
20602   cat >conftest.$ac_ext <<_ACEOF
20603 #line 20603 "configure"
20604 #include "confdefs.h"
20605
20606 class TEST {
20607 private:
20608         int value;
20609 public:
20610         TEST(int x = 1);
20611         ~TEST();
20612 };
20613
20614 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20615 {
20616         value = x;
20617 }
20618 int main() { }
20619
20620 _ACEOF
20621 rm -f conftest$ac_exeext
20622 if { (eval echo "$as_me:20622: \"$ac_link\"") >&5
20623   (eval $ac_link) 2>&5
20624   ac_status=$?
20625   echo "$as_me:20625: \$? = $ac_status" >&5
20626   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20627   { (eval echo "$as_me:20627: \"$ac_try\"") >&5
20628   (eval $ac_try) 2>&5
20629   ac_status=$?
20630   echo "$as_me:20630: \$? = $ac_status" >&5
20631   (exit $ac_status); }; }; then
20632   cf_cv_cpp_param_init=yes
20633 else
20634   echo "$as_me: program exited with status $ac_status" >&5
20635 echo "$as_me: failed program was:" >&5
20636 cat conftest.$ac_ext >&5
20637 cf_cv_cpp_param_init=no
20638 fi
20639 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20640 fi
20641         ac_ext=cc
20642 ac_cpp='$CXXCPP $CPPFLAGS'
20643 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20644 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20645 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20646 ac_main_return=return
20647
20648 fi
20649 echo "$as_me:20649: result: $cf_cv_cpp_param_init" >&5
20650 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20651 fi
20652 test "$cf_cv_cpp_param_init" = yes &&
20653 cat >>confdefs.h <<\EOF
20654 #define CPP_HAS_PARAM_INIT 1
20655 EOF
20656
20657 if test -n "$CXX"; then
20658
20659 echo "$as_me:20659: checking if $CXX accepts static_cast" >&5
20660 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20661 if test "${cf_cv_cpp_static_cast+set}" = set; then
20662   echo $ECHO_N "(cached) $ECHO_C" >&6
20663 else
20664
20665         ac_ext=cc
20666 ac_cpp='$CXXCPP $CPPFLAGS'
20667 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20668 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20669 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20670 ac_main_return=return
20671
20672         cat >conftest.$ac_ext <<_ACEOF
20673 #line 20673 "configure"
20674 #include "confdefs.h"
20675
20676 class NCursesPanel
20677 {
20678 public:
20679   NCursesPanel(int nlines,
20680                int ncols,
20681                int begin_y = 0,
20682                int begin_x = 0)
20683   {
20684   }
20685   NCursesPanel();
20686   ~NCursesPanel();
20687 };
20688
20689 template<class T> class NCursesUserPanel : public NCursesPanel
20690 {
20691 public:
20692   NCursesUserPanel (int nlines,
20693                     int ncols,
20694                     int begin_y = 0,
20695                     int begin_x = 0,
20696                     const T* p_UserData = static_cast<T*>(0))
20697     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20698   {
20699   };
20700   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20701   {
20702   };
20703
20704   virtual ~NCursesUserPanel() {};
20705 };
20706
20707 int
20708 main ()
20709 {
20710
20711         const char* p_UserData = static_cast<char*>(0)
20712   ;
20713   return 0;
20714 }
20715 _ACEOF
20716 rm -f conftest.$ac_objext
20717 if { (eval echo "$as_me:20717: \"$ac_compile\"") >&5
20718   (eval $ac_compile) 2>&5
20719   ac_status=$?
20720   echo "$as_me:20720: \$? = $ac_status" >&5
20721   (exit $ac_status); } &&
20722          { ac_try='test -s conftest.$ac_objext'
20723   { (eval echo "$as_me:20723: \"$ac_try\"") >&5
20724   (eval $ac_try) 2>&5
20725   ac_status=$?
20726   echo "$as_me:20726: \$? = $ac_status" >&5
20727   (exit $ac_status); }; }; then
20728   cf_cv_cpp_static_cast=yes
20729 else
20730   echo "$as_me: failed program was:" >&5
20731 cat conftest.$ac_ext >&5
20732 cf_cv_cpp_static_cast=no
20733 fi
20734 rm -f conftest.$ac_objext conftest.$ac_ext
20735
20736         ac_ext=cc
20737 ac_cpp='$CXXCPP $CPPFLAGS'
20738 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20739 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20740 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20741 ac_main_return=return
20742
20743 fi
20744 echo "$as_me:20744: result: $cf_cv_cpp_static_cast" >&5
20745 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20746
20747 fi
20748
20749 test "$cf_cv_cpp_static_cast" = yes &&
20750 cat >>confdefs.h <<\EOF
20751 #define CPP_HAS_STATIC_CAST 1
20752 EOF
20753
20754         CXX_AR='$(AR)'
20755         CXX_ARFLAGS='$(ARFLAGS)'
20756         case $cf_cv_system_name in
20757         (irix*)
20758             if test "$GXX" != yes ; then
20759                 CXX_AR='$(CXX)'
20760                 CXX_ARFLAGS='-ar -o'
20761             fi
20762             ;;
20763         (sco3.2v5*)
20764             CXXLDFLAGS="-u main"
20765             ;;
20766         (solaris2*)
20767             if test "$GXX" != yes ; then
20768                 CXX_AR='$(CXX)'
20769                 CXX_ARFLAGS='-xar -o'
20770             fi
20771             ;;
20772         esac
20773
20774 else
20775         cf_cxx_library=no
20776         cf_cv_builtin_bool=1
20777
20778         # Just because we are not configuring against C++ right now does not
20779         # mean that a user will not want to use C++.  Some distributors disable
20780         # the C++ portion of this configuration as a shortcut (or just to avoid
20781         # compiling the demo in the c++ directory).  So we need a reasonable
20782         # default for the 'bool' type.
20783         #
20784         # Caveat: since the storage of the bool type is not standardized, it
20785         # may change.
20786
20787         if test "$NCURSES_BOOL" != auto ; then
20788                 cf_cv_type_of_bool=$NCURSES_BOOL
20789                 cf_cv_header_stdbool_h=0
20790         else
20791                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20792
20793 echo "$as_me:20793: checking for size of bool" >&5
20794 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20795 if test "${cf_cv_type_of_bool+set}" = set; then
20796   echo $ECHO_N "(cached) $ECHO_C" >&6
20797 else
20798
20799         rm -f cf_test.out
20800         if test "$cross_compiling" = yes; then
20801   cf_cv_type_of_bool=unknown
20802 else
20803   cat >conftest.$ac_ext <<_ACEOF
20804 #line 20804 "configure"
20805 #include "confdefs.h"
20806
20807 #include <stdlib.h>
20808 #include <stdio.h>
20809
20810 #if defined(__cplusplus)
20811
20812 #ifdef HAVE_GXX_BUILTIN_H
20813 #include <g++/builtin.h>
20814 #elif HAVE_GPP_BUILTIN_H
20815 #include <gpp/builtin.h>
20816 #elif HAVE_BUILTIN_H
20817 #include <builtin.h>
20818 #endif
20819
20820 #else
20821
20822 #if $cf_cv_header_stdbool_h
20823 #include <stdbool.h>
20824 #endif
20825
20826 #endif
20827
20828 int main()
20829 {
20830         FILE *fp = fopen("cf_test.out", "w");
20831         if (fp != 0) {
20832                 bool x = true;
20833                 if ((bool)(-x) >= 0)
20834                         fputs("unsigned ", fp);
20835                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20836                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20837                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20838                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20839                 fclose(fp);
20840         }
20841         ${cf_cv_main_return:-return}(0);
20842 }
20843
20844 _ACEOF
20845 rm -f conftest$ac_exeext
20846 if { (eval echo "$as_me:20846: \"$ac_link\"") >&5
20847   (eval $ac_link) 2>&5
20848   ac_status=$?
20849   echo "$as_me:20849: \$? = $ac_status" >&5
20850   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20851   { (eval echo "$as_me:20851: \"$ac_try\"") >&5
20852   (eval $ac_try) 2>&5
20853   ac_status=$?
20854   echo "$as_me:20854: \$? = $ac_status" >&5
20855   (exit $ac_status); }; }; then
20856   cf_cv_type_of_bool=`cat cf_test.out`
20857                  if test -z "$cf_cv_type_of_bool"; then
20858                    cf_cv_type_of_bool=unknown
20859                  fi
20860 else
20861   echo "$as_me: program exited with status $ac_status" >&5
20862 echo "$as_me: failed program was:" >&5
20863 cat conftest.$ac_ext >&5
20864 cf_cv_type_of_bool=unknown
20865 fi
20866 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20867 fi
20868
20869 fi
20870
20871         rm -f cf_test.out
20872 echo "$as_me:20872: result: $cf_cv_type_of_bool" >&5
20873 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20874 if test "$cf_cv_type_of_bool" = unknown ; then
20875         case .$NCURSES_BOOL in
20876         (.auto|.) NCURSES_BOOL=unsigned;;
20877         esac
20878         { echo "$as_me:20878: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20879 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20880         cf_cv_type_of_bool=$NCURSES_BOOL
20881 fi
20882
20883                 else
20884                         echo "$as_me:20884: checking for fallback type of bool" >&5
20885 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20886                         case "$host_cpu" in
20887                         (i?86)  cf_cv_type_of_bool=char ;;
20888                         (*)     cf_cv_type_of_bool=int  ;;
20889                         esac
20890                         echo "$as_me:20890: result: $cf_cv_type_of_bool" >&5
20891 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20892                 fi
20893         fi
20894 fi
20895
20896 # If the C compiler did not declare bool, and we did not determine that the C++
20897 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20898 # ncurses library use the same type as C++ bool.  Note that this allows one to
20899 # specify the type of bool in a configure-script option and postpone
20900 # integration with the C++ compiler provided that the types are compatible.
20901 USE_CXX_BOOL=1
20902 if test $cf_cv_cc_bool_type = 1
20903 then
20904         # oops: C has a bool.  Unlikely, but C++ could differ.
20905         USE_CXX_BOOL=0
20906 elif test $cf_cv_builtin_bool = 0
20907 then
20908         # C++ has no bool
20909         USE_CXX_BOOL=0
20910 else
20911         # this is the normal case
20912         USE_CXX_BOOL='defined(__cplusplus)'
20913 fi
20914
20915 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20916
20917         if test "$cf_with_ada" != "no" ; then
20918                 if test "$with_libtool" != "no"; then
20919                         { echo "$as_me:20919: WARNING: libtool does not support Ada - disabling feature" >&5
20920 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20921                         cf_with_ada=no
20922                 fi
20923         fi
20924
20925         if test "$cf_with_ada" != "no" ; then
20926
20927 cf_ada_make=gnatmake
20928 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20929 set dummy $cf_ada_make; ac_word=$2
20930 echo "$as_me:20930: checking for $ac_word" >&5
20931 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20932 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20933   echo $ECHO_N "(cached) $ECHO_C" >&6
20934 else
20935   if test -n "$gnat_exists"; then
20936   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20937 else
20938   ac_save_IFS=$IFS; IFS=$ac_path_separator
20939 ac_dummy="$PATH"
20940 for ac_dir in $ac_dummy; do
20941   IFS=$ac_save_IFS
20942   test -z "$ac_dir" && ac_dir=.
20943   $as_executable_p "$ac_dir/$ac_word" || continue
20944 ac_cv_prog_gnat_exists="yes"
20945 echo "$as_me:20945: found $ac_dir/$ac_word" >&5
20946 break
20947 done
20948
20949   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20950 fi
20951 fi
20952 gnat_exists=$ac_cv_prog_gnat_exists
20953 if test -n "$gnat_exists"; then
20954   echo "$as_me:20954: result: $gnat_exists" >&5
20955 echo "${ECHO_T}$gnat_exists" >&6
20956 else
20957   echo "$as_me:20957: result: no" >&5
20958 echo "${ECHO_T}no" >&6
20959 fi
20960
20961 if test "$ac_cv_prog_gnat_exists" = no; then
20962         cf_ada_make=
20963         cf_cv_prog_gnat_correct=no
20964 else
20965
20966 echo "$as_me:20966: checking for gnat version" >&5
20967 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20968 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20969         grep '[0-9].[0-9][0-9]*' |\
20970         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20971 echo "$as_me:20971: result: $cf_gnat_version" >&5
20972 echo "${ECHO_T}$cf_gnat_version" >&6
20973
20974 case $cf_gnat_version in
20975 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
20976         cf_cv_prog_gnat_correct=yes
20977         ;;
20978 (*)
20979         { echo "$as_me:20979: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20980 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20981         cf_cv_prog_gnat_correct=no
20982         ;;
20983 esac
20984
20985         # Extract the first word of "m4", so it can be a program name with args.
20986 set dummy m4; ac_word=$2
20987 echo "$as_me:20987: checking for $ac_word" >&5
20988 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20989 if test "${ac_cv_prog_M4_exists+set}" = set; then
20990   echo $ECHO_N "(cached) $ECHO_C" >&6
20991 else
20992   if test -n "$M4_exists"; then
20993   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20994 else
20995   ac_save_IFS=$IFS; IFS=$ac_path_separator
20996 ac_dummy="$PATH"
20997 for ac_dir in $ac_dummy; do
20998   IFS=$ac_save_IFS
20999   test -z "$ac_dir" && ac_dir=.
21000   $as_executable_p "$ac_dir/$ac_word" || continue
21001 ac_cv_prog_M4_exists="yes"
21002 echo "$as_me:21002: found $ac_dir/$ac_word" >&5
21003 break
21004 done
21005
21006   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
21007 fi
21008 fi
21009 M4_exists=$ac_cv_prog_M4_exists
21010 if test -n "$M4_exists"; then
21011   echo "$as_me:21011: result: $M4_exists" >&5
21012 echo "${ECHO_T}$M4_exists" >&6
21013 else
21014   echo "$as_me:21014: result: no" >&5
21015 echo "${ECHO_T}no" >&6
21016 fi
21017
21018         if test "$ac_cv_prog_M4_exists" = no; then
21019                 cf_cv_prog_gnat_correct=no
21020                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
21021         fi
21022         if test "$cf_cv_prog_gnat_correct" = yes; then
21023                 echo "$as_me:21023: checking if GNAT works" >&5
21024 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
21025
21026 rm -rf conftest* *~conftest*
21027 cat >>conftest.ads <<CF_EOF
21028 procedure conftest;
21029 CF_EOF
21030 cat >>conftest.adb <<CF_EOF
21031 with Text_IO;
21032 with GNAT.OS_Lib;
21033 procedure conftest is
21034 begin
21035    Text_IO.Put ("Hello World");
21036    Text_IO.New_Line;
21037    GNAT.OS_Lib.OS_Exit (0);
21038 end conftest;
21039 CF_EOF
21040 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21041    if ( ./conftest 1>&5 2>&1 ) ; then
21042       cf_cv_prog_gnat_correct=yes
21043    else
21044       cf_cv_prog_gnat_correct=no
21045    fi
21046 else
21047    cf_cv_prog_gnat_correct=no
21048 fi
21049 rm -rf conftest* *~conftest*
21050
21051                 echo "$as_me:21051: result: $cf_cv_prog_gnat_correct" >&5
21052 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
21053         fi
21054 fi
21055
21056                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
21057
21058         ADAFLAGS="$ADAFLAGS -gnatpn"
21059
21060         echo "$as_me:21060: checking optimization options for ADAFLAGS" >&5
21061 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
21062         case "$CFLAGS" in
21063         (*-g*)
21064
21065         ADAFLAGS="$ADAFLAGS -g"
21066
21067                 ;;
21068         esac
21069         case "$CFLAGS" in
21070         (*-O*)
21071                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
21072
21073         ADAFLAGS="$ADAFLAGS $cf_O_flag"
21074
21075                 ;;
21076         esac
21077         echo "$as_me:21077: result: $ADAFLAGS" >&5
21078 echo "${ECHO_T}$ADAFLAGS" >&6
21079
21080 echo "$as_me:21080: checking if GNATPREP supports -T option" >&5
21081 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
21082 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
21083   echo $ECHO_N "(cached) $ECHO_C" >&6
21084 else
21085
21086 cf_cv_gnatprep_opt_t=no
21087 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
21088
21089 fi
21090 echo "$as_me:21090: result: $cf_cv_gnatprep_opt_t" >&5
21091 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
21092 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
21093
21094 echo "$as_me:21094: checking if GNAT supports generics" >&5
21095 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
21096 case $cf_gnat_version in
21097 (3.[1-9]*|[4-9].*)
21098         cf_gnat_generics=yes
21099         ;;
21100 (*)
21101         cf_gnat_generics=no
21102         ;;
21103 esac
21104 echo "$as_me:21104: result: $cf_gnat_generics" >&5
21105 echo "${ECHO_T}$cf_gnat_generics" >&6
21106
21107 if test "$cf_gnat_generics" = yes
21108 then
21109         cf_compile_generics=generics
21110         cf_generic_objects="\${GENOBJS}"
21111 else
21112         cf_compile_generics=
21113         cf_generic_objects=
21114 fi
21115
21116 echo "$as_me:21116: checking if GNAT supports SIGINT" >&5
21117 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
21118 if test "${cf_cv_gnat_sigint+set}" = set; then
21119   echo $ECHO_N "(cached) $ECHO_C" >&6
21120 else
21121
21122 rm -rf conftest* *~conftest*
21123 cat >>conftest.ads <<CF_EOF
21124 with Ada.Interrupts.Names;
21125
21126 package ConfTest is
21127
21128    pragma Warnings (Off);  --  the next pragma exists since 3.11p
21129    pragma Unreserve_All_Interrupts;
21130    pragma Warnings (On);
21131
21132    protected Process is
21133       procedure Stop;
21134       function Continue return Boolean;
21135       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
21136    private
21137       Done : Boolean := False;
21138    end Process;
21139
21140 end ConfTest;
21141 CF_EOF
21142 cat >>conftest.adb <<CF_EOF
21143 package body ConfTest is
21144    protected body Process is
21145       procedure Stop is
21146       begin
21147          Done := True;
21148       end Stop;
21149       function Continue return Boolean is
21150       begin
21151          return not Done;
21152       end Continue;
21153    end Process;
21154 end ConfTest;
21155 CF_EOF
21156 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21157       cf_cv_gnat_sigint=yes
21158 else
21159    cf_cv_gnat_sigint=no
21160 fi
21161 rm -rf conftest* *~conftest*
21162
21163 fi
21164 echo "$as_me:21164: result: $cf_cv_gnat_sigint" >&5
21165 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
21166
21167 if test $cf_cv_gnat_sigint = yes ; then
21168         USE_GNAT_SIGINT=""
21169 else
21170         USE_GNAT_SIGINT="#"
21171 fi
21172
21173 cf_gnat_libraries=no
21174 cf_gnat_projects=no
21175
21176 if test "$enable_gnat_projects" != no ; then
21177 echo "$as_me:21177: checking if GNAT supports project files" >&5
21178 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
21179 case $cf_gnat_version in
21180 (3.[0-9]*)
21181         ;;
21182 (*)
21183         case $cf_cv_system_name in
21184         (cygwin*|msys*)
21185                 ;;
21186         (*)
21187                 mkdir conftest.src conftest.bin conftest.lib
21188                 cd conftest.src
21189                 rm -rf conftest* *~conftest*
21190                 cat >>library.gpr <<CF_EOF
21191 project Library is
21192   Kind := External ("LIB_KIND");
21193   for Library_Name use "ConfTest";
21194   for Object_Dir use ".";
21195   for Library_ALI_Dir use External("LIBRARY_DIR");
21196   for Library_Version use External ("SONAME");
21197   for Library_Kind use Kind;
21198   for Library_Dir use External("BUILD_DIR");
21199   Source_Dir := External ("SOURCE_DIR");
21200   for Source_Dirs use (Source_Dir);
21201 end Library;
21202 CF_EOF
21203                 cat >>confpackage.ads <<CF_EOF
21204 package ConfPackage is
21205    procedure conftest;
21206 end ConfPackage;
21207 CF_EOF
21208                 cat >>confpackage.adb <<CF_EOF
21209 with Text_IO;
21210 package body ConfPackage is
21211    procedure conftest is
21212    begin
21213       Text_IO.Put ("Hello World");
21214       Text_IO.New_Line;
21215    end conftest;
21216 end ConfPackage;
21217 CF_EOF
21218                 if ( $cf_ada_make $ADAFLAGS \
21219                                 -Plibrary.gpr \
21220                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
21221                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
21222                                 -XSOURCE_DIR=`pwd` \
21223                                 -XSONAME=libConfTest.so.1 \
21224                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
21225                         cf_gnat_projects=yes
21226                 fi
21227                 cd ..
21228                 if test -f conftest.lib/confpackage.ali
21229                 then
21230                         cf_gnat_libraries=yes
21231                 fi
21232                 rm -rf conftest* *~conftest*
21233                 ;;
21234         esac
21235         ;;
21236 esac
21237 echo "$as_me:21237: result: $cf_gnat_projects" >&5
21238 echo "${ECHO_T}$cf_gnat_projects" >&6
21239 fi # enable_gnat_projects
21240
21241 if test $cf_gnat_projects = yes
21242 then
21243         echo "$as_me:21243: checking if GNAT supports libraries" >&5
21244 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
21245         echo "$as_me:21245: result: $cf_gnat_libraries" >&5
21246 echo "${ECHO_T}$cf_gnat_libraries" >&6
21247 fi
21248
21249 if test "$cf_gnat_projects" = yes
21250 then
21251         USE_OLD_MAKERULES="#"
21252         USE_GNAT_PROJECTS=""
21253 else
21254         USE_OLD_MAKERULES=""
21255         USE_GNAT_PROJECTS="#"
21256 fi
21257
21258 if test "$cf_gnat_libraries" = yes
21259 then
21260         USE_GNAT_LIBRARIES=""
21261 else
21262         USE_GNAT_LIBRARIES="#"
21263 fi
21264
21265 echo "$as_me:21265: checking for ada-compiler" >&5
21266 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
21267
21268 # Check whether --with-ada-compiler or --without-ada-compiler was given.
21269 if test "${with_ada_compiler+set}" = set; then
21270   withval="$with_ada_compiler"
21271   cf_ada_compiler=$withval
21272 else
21273   cf_ada_compiler=gnatmake
21274 fi;
21275
21276 echo "$as_me:21276: result: $cf_ada_compiler" >&5
21277 echo "${ECHO_T}$cf_ada_compiler" >&6
21278
21279                         cf_ada_package=terminal_interface
21280
21281 echo "$as_me:21281: checking for ada-include" >&5
21282 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
21283
21284 # Check whether --with-ada-include or --without-ada-include was given.
21285 if test "${with_ada_include+set}" = set; then
21286   withval="$with_ada_include"
21287
21288 else
21289   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
21290 fi; if test -n "$prefix/share/ada/adainclude" ; then
21291
21292 if test "x$prefix" != xNONE; then
21293         cf_path_syntax="$prefix"
21294 else
21295         cf_path_syntax="$ac_default_prefix"
21296 fi
21297
21298 case ".$withval" in
21299 (.\$\(*\)*|.\'*\'*)
21300         ;;
21301 (..|./*|.\\*)
21302         ;;
21303 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21304         ;;
21305 (.\${*prefix}*|.\${*dir}*)
21306         eval withval="$withval"
21307         case ".$withval" in
21308         (.NONE/*)
21309                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21310                 ;;
21311         esac
21312         ;;
21313 (.no|.NONE/*)
21314         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21315         ;;
21316 (*)
21317         { { echo "$as_me:21317: error: expected a pathname, not \"$withval\"" >&5
21318 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21319    { (exit 1); exit 1; }; }
21320         ;;
21321 esac
21322
21323 fi
21324 eval ADA_INCLUDE="$withval"
21325
21326 echo "$as_me:21326: result: $ADA_INCLUDE" >&5
21327 echo "${ECHO_T}$ADA_INCLUDE" >&6
21328
21329 echo "$as_me:21329: checking for ada-objects" >&5
21330 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
21331
21332 # Check whether --with-ada-objects or --without-ada-objects was given.
21333 if test "${with_ada_objects+set}" = set; then
21334   withval="$with_ada_objects"
21335
21336 else
21337   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
21338 fi; if test -n "$prefix/lib/ada/adalib" ; then
21339
21340 if test "x$prefix" != xNONE; then
21341         cf_path_syntax="$prefix"
21342 else
21343         cf_path_syntax="$ac_default_prefix"
21344 fi
21345
21346 case ".$withval" in
21347 (.\$\(*\)*|.\'*\'*)
21348         ;;
21349 (..|./*|.\\*)
21350         ;;
21351 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21352         ;;
21353 (.\${*prefix}*|.\${*dir}*)
21354         eval withval="$withval"
21355         case ".$withval" in
21356         (.NONE/*)
21357                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21358                 ;;
21359         esac
21360         ;;
21361 (.no|.NONE/*)
21362         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21363         ;;
21364 (*)
21365         { { echo "$as_me:21365: error: expected a pathname, not \"$withval\"" >&5
21366 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21367    { (exit 1); exit 1; }; }
21368         ;;
21369 esac
21370
21371 fi
21372 eval ADA_OBJECTS="$withval"
21373
21374 echo "$as_me:21374: result: $ADA_OBJECTS" >&5
21375 echo "${ECHO_T}$ADA_OBJECTS" >&6
21376
21377 echo "$as_me:21377: checking if an Ada95 shared-library should be built" >&5
21378 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
21379
21380 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
21381 if test "${with_ada_sharedlib+set}" = set; then
21382   withval="$with_ada_sharedlib"
21383   with_ada_sharedlib=$withval
21384 else
21385   with_ada_sharedlib=no
21386 fi;
21387 echo "$as_me:21387: result: $with_ada_sharedlib" >&5
21388 echo "${ECHO_T}$with_ada_sharedlib" >&6
21389
21390 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
21391 MAKE_ADA_SHAREDLIB="#"
21392
21393 if test "x$with_ada_sharedlib" != xno
21394 then
21395         MAKE_ADA_SHAREDLIB=
21396         if test "x$with_ada_sharedlib" != xyes
21397         then
21398                 ADA_SHAREDLIB="$with_ada_sharedlib"
21399         fi
21400 fi
21401
21402                 fi
21403         fi
21404 else
21405         cf_with_ada=no
21406 fi
21407
21408 # do this "late" to avoid conflict with header-checks
21409 if test "x$with_widec" = xyes ; then
21410         echo "$as_me:21410: checking for wchar_t" >&5
21411 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
21412 if test "${ac_cv_type_wchar_t+set}" = set; then
21413   echo $ECHO_N "(cached) $ECHO_C" >&6
21414 else
21415   cat >conftest.$ac_ext <<_ACEOF
21416 #line 21416 "configure"
21417 #include "confdefs.h"
21418 $ac_includes_default
21419 int
21420 main ()
21421 {
21422 if ((wchar_t *) 0)
21423   return 0;
21424 if (sizeof (wchar_t))
21425   return 0;
21426   ;
21427   return 0;
21428 }
21429 _ACEOF
21430 rm -f conftest.$ac_objext
21431 if { (eval echo "$as_me:21431: \"$ac_compile\"") >&5
21432   (eval $ac_compile) 2>&5
21433   ac_status=$?
21434   echo "$as_me:21434: \$? = $ac_status" >&5
21435   (exit $ac_status); } &&
21436          { ac_try='test -s conftest.$ac_objext'
21437   { (eval echo "$as_me:21437: \"$ac_try\"") >&5
21438   (eval $ac_try) 2>&5
21439   ac_status=$?
21440   echo "$as_me:21440: \$? = $ac_status" >&5
21441   (exit $ac_status); }; }; then
21442   ac_cv_type_wchar_t=yes
21443 else
21444   echo "$as_me: failed program was:" >&5
21445 cat conftest.$ac_ext >&5
21446 ac_cv_type_wchar_t=no
21447 fi
21448 rm -f conftest.$ac_objext conftest.$ac_ext
21449 fi
21450 echo "$as_me:21450: result: $ac_cv_type_wchar_t" >&5
21451 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
21452
21453 echo "$as_me:21453: checking size of wchar_t" >&5
21454 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21455 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21456   echo $ECHO_N "(cached) $ECHO_C" >&6
21457 else
21458   if test "$ac_cv_type_wchar_t" = yes; then
21459   if test "$cross_compiling" = yes; then
21460   # Depending upon the size, compute the lo and hi bounds.
21461 cat >conftest.$ac_ext <<_ACEOF
21462 #line 21462 "configure"
21463 #include "confdefs.h"
21464 $ac_includes_default
21465 int
21466 main ()
21467 {
21468 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21469   ;
21470   return 0;
21471 }
21472 _ACEOF
21473 rm -f conftest.$ac_objext
21474 if { (eval echo "$as_me:21474: \"$ac_compile\"") >&5
21475   (eval $ac_compile) 2>&5
21476   ac_status=$?
21477   echo "$as_me:21477: \$? = $ac_status" >&5
21478   (exit $ac_status); } &&
21479          { ac_try='test -s conftest.$ac_objext'
21480   { (eval echo "$as_me:21480: \"$ac_try\"") >&5
21481   (eval $ac_try) 2>&5
21482   ac_status=$?
21483   echo "$as_me:21483: \$? = $ac_status" >&5
21484   (exit $ac_status); }; }; then
21485   ac_lo=0 ac_mid=0
21486   while :; do
21487     cat >conftest.$ac_ext <<_ACEOF
21488 #line 21488 "configure"
21489 #include "confdefs.h"
21490 $ac_includes_default
21491 int
21492 main ()
21493 {
21494 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21495   ;
21496   return 0;
21497 }
21498 _ACEOF
21499 rm -f conftest.$ac_objext
21500 if { (eval echo "$as_me:21500: \"$ac_compile\"") >&5
21501   (eval $ac_compile) 2>&5
21502   ac_status=$?
21503   echo "$as_me:21503: \$? = $ac_status" >&5
21504   (exit $ac_status); } &&
21505          { ac_try='test -s conftest.$ac_objext'
21506   { (eval echo "$as_me:21506: \"$ac_try\"") >&5
21507   (eval $ac_try) 2>&5
21508   ac_status=$?
21509   echo "$as_me:21509: \$? = $ac_status" >&5
21510   (exit $ac_status); }; }; then
21511   ac_hi=$ac_mid; break
21512 else
21513   echo "$as_me: failed program was:" >&5
21514 cat conftest.$ac_ext >&5
21515 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21516 fi
21517 rm -f conftest.$ac_objext conftest.$ac_ext
21518   done
21519 else
21520   echo "$as_me: failed program was:" >&5
21521 cat conftest.$ac_ext >&5
21522 ac_hi=-1 ac_mid=-1
21523   while :; do
21524     cat >conftest.$ac_ext <<_ACEOF
21525 #line 21525 "configure"
21526 #include "confdefs.h"
21527 $ac_includes_default
21528 int
21529 main ()
21530 {
21531 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21532   ;
21533   return 0;
21534 }
21535 _ACEOF
21536 rm -f conftest.$ac_objext
21537 if { (eval echo "$as_me:21537: \"$ac_compile\"") >&5
21538   (eval $ac_compile) 2>&5
21539   ac_status=$?
21540   echo "$as_me:21540: \$? = $ac_status" >&5
21541   (exit $ac_status); } &&
21542          { ac_try='test -s conftest.$ac_objext'
21543   { (eval echo "$as_me:21543: \"$ac_try\"") >&5
21544   (eval $ac_try) 2>&5
21545   ac_status=$?
21546   echo "$as_me:21546: \$? = $ac_status" >&5
21547   (exit $ac_status); }; }; then
21548   ac_lo=$ac_mid; break
21549 else
21550   echo "$as_me: failed program was:" >&5
21551 cat conftest.$ac_ext >&5
21552 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21553 fi
21554 rm -f conftest.$ac_objext conftest.$ac_ext
21555   done
21556 fi
21557 rm -f conftest.$ac_objext conftest.$ac_ext
21558 # Binary search between lo and hi bounds.
21559 while test "x$ac_lo" != "x$ac_hi"; do
21560   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21561   cat >conftest.$ac_ext <<_ACEOF
21562 #line 21562 "configure"
21563 #include "confdefs.h"
21564 $ac_includes_default
21565 int
21566 main ()
21567 {
21568 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21569   ;
21570   return 0;
21571 }
21572 _ACEOF
21573 rm -f conftest.$ac_objext
21574 if { (eval echo "$as_me:21574: \"$ac_compile\"") >&5
21575   (eval $ac_compile) 2>&5
21576   ac_status=$?
21577   echo "$as_me:21577: \$? = $ac_status" >&5
21578   (exit $ac_status); } &&
21579          { ac_try='test -s conftest.$ac_objext'
21580   { (eval echo "$as_me:21580: \"$ac_try\"") >&5
21581   (eval $ac_try) 2>&5
21582   ac_status=$?
21583   echo "$as_me:21583: \$? = $ac_status" >&5
21584   (exit $ac_status); }; }; then
21585   ac_hi=$ac_mid
21586 else
21587   echo "$as_me: failed program was:" >&5
21588 cat conftest.$ac_ext >&5
21589 ac_lo=`expr $ac_mid + 1`
21590 fi
21591 rm -f conftest.$ac_objext conftest.$ac_ext
21592 done
21593 ac_cv_sizeof_wchar_t=$ac_lo
21594 else
21595   if test "$cross_compiling" = yes; then
21596   { { echo "$as_me:21596: error: cannot run test program while cross compiling" >&5
21597 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21598    { (exit 1); exit 1; }; }
21599 else
21600   cat >conftest.$ac_ext <<_ACEOF
21601 #line 21601 "configure"
21602 #include "confdefs.h"
21603 $ac_includes_default
21604 int
21605 main ()
21606 {
21607 FILE *f = fopen ("conftest.val", "w");
21608 if (!f)
21609   $ac_main_return (1);
21610 fprintf (f, "%d", (sizeof (wchar_t)));
21611 fclose (f);
21612   ;
21613   return 0;
21614 }
21615 _ACEOF
21616 rm -f conftest$ac_exeext
21617 if { (eval echo "$as_me:21617: \"$ac_link\"") >&5
21618   (eval $ac_link) 2>&5
21619   ac_status=$?
21620   echo "$as_me:21620: \$? = $ac_status" >&5
21621   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21622   { (eval echo "$as_me:21622: \"$ac_try\"") >&5
21623   (eval $ac_try) 2>&5
21624   ac_status=$?
21625   echo "$as_me:21625: \$? = $ac_status" >&5
21626   (exit $ac_status); }; }; then
21627   ac_cv_sizeof_wchar_t=`cat conftest.val`
21628 else
21629   echo "$as_me: program exited with status $ac_status" >&5
21630 echo "$as_me: failed program was:" >&5
21631 cat conftest.$ac_ext >&5
21632 fi
21633 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21634 fi
21635 fi
21636 rm -f conftest.val
21637 else
21638   ac_cv_sizeof_wchar_t=0
21639 fi
21640 fi
21641 echo "$as_me:21641: result: $ac_cv_sizeof_wchar_t" >&5
21642 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21643 cat >>confdefs.h <<EOF
21644 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21645 EOF
21646
21647 fi
21648
21649 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21650 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21651 ###
21652 ### ticlib modules may be a separate library, otherwise contained in termlib.
21653 ### termlib modules may be a separate library, otherwise contained in ncurses.
21654 ###
21655 ### The of "+" or " " between the tokens controls the way the script
21656 ### chooses to split module lists into libraries.
21657 ###
21658 ### (see CF_LIB_RULES).
21659 echo "$as_me:21659: checking for library subsets" >&5
21660 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21661 LIB_SUBSETS=
21662
21663 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21664         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21665         if test "$with_ticlib" != no ; then
21666                 LIB_SUBSETS="${LIB_SUBSETS} "
21667         else
21668                 LIB_SUBSETS="${LIB_SUBSETS}+"
21669         fi
21670 fi
21671
21672 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21673 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21674
21675 if test "$with_termlib" != no ; then
21676         LIB_SUBSETS="${LIB_SUBSETS} "
21677 else
21678         LIB_SUBSETS="${LIB_SUBSETS}+"
21679 fi
21680
21681 LIB_SUBSETS="${LIB_SUBSETS}base"
21682
21683 # Most term-driver calls are to tinfo, but some like init_pair are to the
21684 # base library (so it resides in base).
21685 if test "$with_term_driver" != no ; then
21686         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21687         case $cf_cv_system_name in
21688         (*mingw32*|*mingw64*)
21689                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21690                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21691                 ;;
21692         (*)
21693                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21694                 ;;
21695         esac
21696 fi
21697
21698 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21699 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21700
21701 echo "$as_me:21701: result: $LIB_SUBSETS" >&5
21702 echo "${ECHO_T}$LIB_SUBSETS" >&6
21703
21704 ### Construct the list of include-directories to be generated
21705
21706 if test "$srcdir" != "."; then
21707         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21708 fi
21709 CPPFLAGS="-I../include $CPPFLAGS"
21710 if test "$srcdir" != "."; then
21711         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21712 fi
21713 CPPFLAGS="-I. $CPPFLAGS"
21714
21715 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21716 if test "$srcdir" != "."; then
21717         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21718 fi
21719 if test "$GCC" != yes; then
21720         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21721 elif test "$includedir" != "/usr/include"; then
21722         if test "$includedir" = '${prefix}/include' ; then
21723                 if test x$prefix != x/usr ; then
21724                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21725                 fi
21726         else
21727                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21728         fi
21729 fi
21730
21731 ### Build up pieces for makefile rules
21732 echo "$as_me:21732: checking default library suffix" >&5
21733 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21734
21735         case $DFT_LWR_MODEL in
21736         (libtool) DFT_ARG_SUFFIX=''   ;;
21737         (normal)  DFT_ARG_SUFFIX=''   ;;
21738         (debug)   DFT_ARG_SUFFIX='_g' ;;
21739         (profile) DFT_ARG_SUFFIX='_p' ;;
21740         (shared)  DFT_ARG_SUFFIX=''   ;;
21741         esac
21742         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21743 echo "$as_me:21743: result: $DFT_ARG_SUFFIX" >&5
21744 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21745
21746 echo "$as_me:21746: checking default library-dependency suffix" >&5
21747 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21748
21749         case X$DFT_LWR_MODEL in
21750         (Xlibtool)
21751                 DFT_LIB_SUFFIX='.la'
21752                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21753                 ;;
21754         (Xdebug)
21755                 DFT_LIB_SUFFIX='_g.a'
21756                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21757                 ;;
21758         (Xprofile)
21759                 DFT_LIB_SUFFIX='_p.a'
21760                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21761                 ;;
21762         (Xshared)
21763                 case $cf_cv_system_name in
21764                 (aix[5-7]*)
21765                         DFT_LIB_SUFFIX='.so'
21766                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21767                         ;;
21768                 (cygwin*|msys*|mingw*)
21769                         DFT_LIB_SUFFIX='.dll'
21770                         DFT_DEP_SUFFIX='.dll.a'
21771                         ;;
21772                 (darwin*)
21773                         DFT_LIB_SUFFIX='.dylib'
21774                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21775                         ;;
21776                 (hpux*)
21777                         case $target in
21778                         (ia64*)
21779                                 DFT_LIB_SUFFIX='.so'
21780                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21781                                 ;;
21782                         (*)
21783                                 DFT_LIB_SUFFIX='.sl'
21784                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21785                                 ;;
21786                         esac
21787                         ;;
21788                 (*)
21789                         DFT_LIB_SUFFIX='.so'
21790                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21791                         ;;
21792                 esac
21793                 ;;
21794         (*)
21795                 DFT_LIB_SUFFIX='.a'
21796                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21797                 ;;
21798         esac
21799         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21800         then
21801                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
21802                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
21803         fi
21804 echo "$as_me:21804: result: $DFT_DEP_SUFFIX" >&5
21805 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21806
21807 echo "$as_me:21807: checking default object directory" >&5
21808 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21809
21810         case $DFT_LWR_MODEL in
21811         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21812         (normal)  DFT_OBJ_SUBDIR='objects' ;;
21813         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21814         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
21815         (shared)
21816                 case $cf_cv_system_name in
21817                 (cygwin|msys)
21818                         DFT_OBJ_SUBDIR='objects' ;;
21819                 (*)
21820                         DFT_OBJ_SUBDIR='obj_s' ;;
21821                 esac
21822         esac
21823 echo "$as_me:21823: result: $DFT_OBJ_SUBDIR" >&5
21824 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21825
21826 if test "x$cf_with_cxx" = xyes ; then
21827 echo "$as_me:21827: checking c++ library-dependency suffix" >&5
21828 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21829 if test "$with_libtool" != "no"; then
21830         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21831         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21832 elif test "$with_shared_cxx" != "no"; then
21833         # also for g++ users...
21834         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21835 else
21836         # we normally make a static library because C/C++ library rules differ
21837
21838         case Xnormal in
21839         (Xlibtool)
21840                 CXX_LIB_SUFFIX='.la'
21841                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21842                 ;;
21843         (Xdebug)
21844                 CXX_LIB_SUFFIX='_g.a'
21845                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21846                 ;;
21847         (Xprofile)
21848                 CXX_LIB_SUFFIX='_p.a'
21849                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21850                 ;;
21851         (Xshared)
21852                 case $cf_cv_system_name in
21853                 (aix[5-7]*)
21854                         CXX_LIB_SUFFIX='.so'
21855                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21856                         ;;
21857                 (cygwin*|msys*|mingw*)
21858                         CXX_LIB_SUFFIX='.dll'
21859                         CXX_DEP_SUFFIX='.dll.a'
21860                         ;;
21861                 (darwin*)
21862                         CXX_LIB_SUFFIX='.dylib'
21863                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21864                         ;;
21865                 (hpux*)
21866                         case $target in
21867                         (ia64*)
21868                                 CXX_LIB_SUFFIX='.so'
21869                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21870                                 ;;
21871                         (*)
21872                                 CXX_LIB_SUFFIX='.sl'
21873                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21874                                 ;;
21875                         esac
21876                         ;;
21877                 (*)
21878                         CXX_LIB_SUFFIX='.so'
21879                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21880                         ;;
21881                 esac
21882                 ;;
21883         (*)
21884                 CXX_LIB_SUFFIX='.a'
21885                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21886                 ;;
21887         esac
21888         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21889         then
21890                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
21891                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
21892         fi
21893
21894 fi
21895 echo "$as_me:21895: result: $CXX_LIB_SUFFIX" >&5
21896 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21897
21898 fi
21899
21900 # do not want -ldl in build except as needed for -lncurses dependency
21901 if test "x$with_dlsym" = xyes ; then
21902 if test $DFT_LWR_MODEL = shared || \
21903    test $DFT_LWR_MODEL = libtool ; then
21904
21905 # remove dl library from $LIBS
21906 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21907
21908 fi
21909 fi
21910 ### Set up low-level terminfo dependencies for makefiles.
21911
21912 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21913 # do not need libdl
21914 TICS_LIST=
21915 if test "x$with_dlsym" = xyes ; then
21916
21917 # remove dl library from $SHLIB_LIST
21918 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21919
21920 fi
21921
21922 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
21923 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
21924 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
21925 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
21926 then
21927         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
21928 fi
21929
21930 if test "$with_ticlib" != no ; then
21931
21932         if test "x$with_ticlib" != xyes ; then
21933                 TICS_NAME=$with_ticlib
21934                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
21935                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21936                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21937                 TICS_LIB_SUFFIX="${with_ticlib}"
21938         else
21939                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
21940                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
21941                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21942                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
21943         fi
21944         TICS_LDFLAGS="-L${LIB_DIR}"
21945         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
21946 else
21947         TICS_SUFFIX=${DFT_LIB_SUFFIX}
21948         TICS_LDFLAGS="-L${LIB_DIR}"
21949         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21950 fi
21951
21952 if test "$with_termlib" != no ; then
21953
21954         if test "x$with_termlib" != xyes ; then
21955                 TINFO_NAME=$with_termlib
21956                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
21957                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21958                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21959                 TINFO_LIB_SUFFIX="${with_termlib}"
21960         else
21961                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21962                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
21963                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21964                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
21965         fi
21966
21967         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21968         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21969         if test "$DFT_LWR_MODEL" = "libtool"; then
21970                 TEST_ARGS="${TEST_DEPS}"
21971                 TEST_ARG2="${TEST_DEP2}"
21972                 TINFO_LDFLAGS="-L${LIB_DIR}"
21973                 TINFO_LIBS="$TEST_ARGS"
21974                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21975                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21976         else
21977                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21978                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21979                 if test "x$with_term_driver" != xno ; then
21980                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21981                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
21982                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21983                 else
21984                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21985                         TINFO_LIBS="$TEST_ARGS"
21986                 fi
21987                 TINFO_LDFLAGS="-L${LIB_DIR}"
21988                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21989         fi
21990 else
21991         # the next lines are needed for linking libtic over libncurses
21992         TINFO_NAME=${LIB_NAME}
21993         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21994         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
21995         if test "x$with_tic_depends" = xyes ; then
21996                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21997         else
21998                 TICS_LIST="$SHLIB_LIST"
21999         fi
22000
22001         TINFO_LDFLAGS="-L${LIB_DIR}"
22002         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22003 fi
22004
22005 if test "$DFT_LWR_MODEL" = shared ; then
22006         case $cf_cv_system_name in
22007         (cygwin*|msys*)
22008                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
22009                 TINFO_SUFFIX=.dll
22010                 ;;
22011         esac
22012 fi
22013
22014 if test "x$with_dlsym" = xyes ; then
22015
22016 # remove dl library from $TICS_LIST
22017 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
22018
22019 fi
22020
22021 if test "$DFT_LWR_MODEL" = "libtool"; then
22022         OBJEXT=lo
22023 fi
22024
22025 # needed for Ada95
22026 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
22027
22028 case $DFT_LWR_MODEL in
22029 (normal|debug|profile)
22030
22031 if test "$GCC" = yes ; then
22032         case $cf_cv_system_name in
22033         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
22034                 LDFLAGS_STATIC=
22035                 LDFLAGS_SHARED=
22036                 ;;
22037         (*)     # normally, except when broken
22038                 LDFLAGS_STATIC=-static
22039                 LDFLAGS_SHARED=-dynamic
22040                 ;;
22041         esac
22042 else
22043         case $cf_cv_system_name in
22044         (aix[4-7]*)     # from ld manpage
22045                 LDFLAGS_STATIC=-bstatic
22046                 LDFLAGS_SHARED=-bdynamic
22047                 ;;
22048         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
22049                 # We could also use just "archive" and "shared".
22050                 LDFLAGS_STATIC=-Wl,-a,archive_shared
22051                 LDFLAGS_SHARED=-Wl,-a,shared_archive
22052                 ;;
22053         (irix*)         # from ld manpage IRIX64
22054                 LDFLAGS_STATIC=-Bstatic
22055                 LDFLAGS_SHARED=-Bdynamic
22056                 ;;
22057         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
22058                 # alternative "-oldstyle_liblookup" (not in cc manpage)
22059                 LDFLAGS_STATIC=-noso
22060                 LDFLAGS_SHARED=-so_archive
22061                 ;;
22062         (solaris2*)
22063                 LDFLAGS_STATIC=-Bstatic
22064                 LDFLAGS_SHARED=-Bdynamic
22065                 ;;
22066         esac
22067 fi
22068
22069 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
22070 then
22071         echo "$as_me:22071: checking if linker supports switching between static/dynamic" >&5
22072 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
22073
22074         rm -f libconftest.a
22075         cat >conftest.$ac_ext <<EOF
22076 #line 22076 "configure"
22077 #include <stdio.h>
22078 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
22079 EOF
22080         if { (eval echo "$as_me:22080: \"$ac_compile\"") >&5
22081   (eval $ac_compile) 2>&5
22082   ac_status=$?
22083   echo "$as_me:22083: \$? = $ac_status" >&5
22084   (exit $ac_status); } ; then
22085                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
22086                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
22087         fi
22088         rm -f conftest.*
22089
22090         cf_save_LIBS="$LIBS"
22091
22092         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
22093         cat >conftest.$ac_ext <<_ACEOF
22094 #line 22094 "configure"
22095 #include "confdefs.h"
22096
22097 #line 22097 "configure"
22098 #include <stdio.h>
22099 int cf_ldflags_static(FILE *fp);
22100
22101 int
22102 main ()
22103 {
22104
22105         return cf_ldflags_static(stdin);
22106
22107   ;
22108   return 0;
22109 }
22110 _ACEOF
22111 rm -f conftest.$ac_objext conftest$ac_exeext
22112 if { (eval echo "$as_me:22112: \"$ac_link\"") >&5
22113   (eval $ac_link) 2>&5
22114   ac_status=$?
22115   echo "$as_me:22115: \$? = $ac_status" >&5
22116   (exit $ac_status); } &&
22117          { ac_try='test -s conftest$ac_exeext'
22118   { (eval echo "$as_me:22118: \"$ac_try\"") >&5
22119   (eval $ac_try) 2>&5
22120   ac_status=$?
22121   echo "$as_me:22121: \$? = $ac_status" >&5
22122   (exit $ac_status); }; }; then
22123
22124         # some linkers simply ignore the -dynamic
22125         case x`file conftest$ac_exeext 2>/dev/null` in
22126         (*static*)
22127                 cf_ldflags_static=no
22128                 ;;
22129         (*)
22130                 cf_ldflags_static=yes
22131                 ;;
22132         esac
22133
22134 else
22135   echo "$as_me: failed program was:" >&5
22136 cat conftest.$ac_ext >&5
22137 cf_ldflags_static=no
22138 fi
22139 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22140
22141         rm -f libconftest.*
22142         LIBS="$cf_save_LIBS"
22143
22144         echo "$as_me:22144: result: $cf_ldflags_static" >&5
22145 echo "${ECHO_T}$cf_ldflags_static" >&6
22146
22147         if test $cf_ldflags_static != yes
22148         then
22149                 LDFLAGS_STATIC=
22150                 LDFLAGS_SHARED=
22151         fi
22152 else
22153         LDFLAGS_STATIC=
22154         LDFLAGS_SHARED=
22155 fi
22156
22157         ;;
22158 esac
22159
22160 echo "$as_me:22160: checking where we will install curses.h" >&5
22161 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
22162
22163 includesubdir=
22164 if test "$with_overwrite" = no && \
22165  ( test "x$includedir" = 'x${prefix}/include' || \
22166    test "x$includedir" = "x${prefix}/include" )
22167 then
22168         includesubdir="/ncurses${USE_LIB_SUFFIX}"
22169 fi
22170 echo "$as_me:22170: result: ${includedir}${includesubdir}" >&5
22171 echo "${ECHO_T}${includedir}${includesubdir}" >&6
22172
22173 ### Resolve a conflict between normal and wide-curses by forcing applications
22174 ### that will need libutf8 to add it to their configure script.
22175 if test "$with_overwrite" != no ; then
22176 if test "$NCURSES_LIBUTF8" = 1 ; then
22177         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
22178         { echo "$as_me:22178: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
22179 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
22180 fi
22181 fi
22182 WITH_OVERWRITE=$with_overwrite
22183
22184 # used to separate tack out of the tree
22185 NCURSES_TREE=
22186
22187 ### predefined stuff for the test programs
22188
22189 cat >>confdefs.h <<\EOF
22190 #define HAVE_SLK_COLOR 1
22191 EOF
22192
22193 ### Construct the list of subdirectories for which we'll customize makefiles
22194 ### with the appropriate compile-rules.
22195
22196 echo "$as_me:22196: checking for src modules" >&5
22197 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
22198
22199 # dependencies and linker-arguments for test-programs
22200 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
22201 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
22202 if test "$DFT_LWR_MODEL" = "libtool"; then
22203         TEST_ARGS="${TEST_DEPS}"
22204         TEST_ARG2="${TEST_DEP2}"
22205 else
22206         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22207         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
22208 fi
22209
22210 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
22211 cf_cv_src_modules=
22212 for cf_dir in $modules_to_build
22213 do
22214         if test -f $srcdir/$cf_dir/modules; then
22215
22216                 # We may/may not have tack in the distribution, though the
22217                 # makefile is.
22218                 if test $cf_dir = tack ; then
22219                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
22220                                 continue
22221                         fi
22222                 fi
22223
22224                 if test -z "$cf_cv_src_modules"; then
22225                         cf_cv_src_modules=$cf_dir
22226                 else
22227                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
22228                 fi
22229
22230                 # Make the ncurses_cfg.h file record the library interface files as
22231                 # well.  These are header files that are the same name as their
22232                 # directory.  Ncurses is the only library that does not follow
22233                 # that pattern.
22234                 if test $cf_dir = tack ; then
22235                         continue
22236                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
22237
22238 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22239
22240                         cat >>confdefs.h <<EOF
22241 #define HAVE_${cf_have_include}_H 1
22242 EOF
22243
22244                         cat >>confdefs.h <<EOF
22245 #define HAVE_LIB${cf_have_include} 1
22246 EOF
22247
22248                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
22249                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
22250                         if test "$DFT_LWR_MODEL" = "libtool"; then
22251                                 TEST_ARGS="${TEST_DEPS}"
22252                                 TEST_ARG2="${TEST_DEP2}"
22253                         else
22254                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
22255                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
22256                         fi
22257                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
22258                 fi
22259         fi
22260 done
22261 echo "$as_me:22261: result: $cf_cv_src_modules" >&5
22262 echo "${ECHO_T}$cf_cv_src_modules" >&6
22263
22264 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
22265 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
22266
22267 SRC_SUBDIRS=
22268 if test "x$cf_with_manpages" != xno ; then
22269         SRC_SUBDIRS="$SRC_SUBDIRS man"
22270 fi
22271 SRC_SUBDIRS="$SRC_SUBDIRS include"
22272 for cf_dir in $cf_cv_src_modules
22273 do
22274         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
22275 done
22276 if test "x$cf_with_tests" != "xno" ; then
22277         SRC_SUBDIRS="$SRC_SUBDIRS test"
22278 fi
22279 # always make this, to install the ncurses-config script
22280 SRC_SUBDIRS="$SRC_SUBDIRS misc"
22281 if test "$cf_with_cxx_binding" != no; then
22282         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
22283         SRC_SUBDIRS="$SRC_SUBDIRS c++"
22284 fi
22285
22286 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
22287 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
22288
22289 ADA_SUBDIRS=
22290 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
22291         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
22292         ADA_SUBDIRS="gen src"
22293         if test "x$cf_with_tests" != "xno" ; then
22294                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
22295         fi
22296 fi
22297
22298 SUB_MAKEFILES=
22299 for cf_dir in $SRC_SUBDIRS
22300 do
22301         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
22302 done
22303
22304 if test -n "$ADA_SUBDIRS"; then
22305         for cf_dir in $ADA_SUBDIRS
22306         do
22307                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
22308         done
22309
22310 fi
22311
22312 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22313    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
22314    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
22315 fi
22316
22317 DIRS_TO_MAKE="lib"
22318 for cf_item in $cf_list_models
22319 do
22320
22321         case $cf_item in
22322         (libtool) cf_subdir='obj_lo'  ;;
22323         (normal)  cf_subdir='objects' ;;
22324         (debug)   cf_subdir='obj_g' ;;
22325         (profile) cf_subdir='obj_p' ;;
22326         (shared)
22327                 case $cf_cv_system_name in
22328                 (cygwin|msys)
22329                         cf_subdir='objects' ;;
22330                 (*)
22331                         cf_subdir='obj_s' ;;
22332                 esac
22333         esac
22334
22335         for cf_item2 in $DIRS_TO_MAKE
22336         do
22337                 test $cf_item2 = $cf_subdir && break
22338         done
22339         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
22340 done
22341 for cf_dir in $DIRS_TO_MAKE
22342 do
22343         test ! -d $cf_dir && mkdir $cf_dir
22344 done
22345
22346 # symbols that differ when compiling Ada95 by itself.
22347 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
22348
22349 # values to use as strings
22350
22351 cat >>confdefs.h <<EOF
22352 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
22353 EOF
22354
22355 cat >>confdefs.h <<EOF
22356 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
22357 EOF
22358
22359 ### Now that we're done running tests, add the compiler-warnings, if any
22360
22361 cf_fix_cppflags=no
22362 cf_new_cflags=
22363 cf_new_cppflags=
22364 cf_new_extra_cppflags=
22365
22366 for cf_add_cflags in $EXTRA_CFLAGS
22367 do
22368 case $cf_fix_cppflags in
22369 (no)
22370         case $cf_add_cflags in
22371         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22372                 case $cf_add_cflags in
22373                 (-D*)
22374                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22375
22376                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22377                                 && test -z "${cf_tst_cflags}" \
22378                                 && cf_fix_cppflags=yes
22379
22380                         if test $cf_fix_cppflags = yes ; then
22381                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22382                                 continue
22383                         elif test "${cf_tst_cflags}" = "\"'" ; then
22384                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22385                                 continue
22386                         fi
22387                         ;;
22388                 esac
22389                 case "$CPPFLAGS" in
22390                 (*$cf_add_cflags)
22391                         ;;
22392                 (*)
22393                         case $cf_add_cflags in
22394                         (-D*)
22395                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22396
22397 CPPFLAGS=`echo "$CPPFLAGS" | \
22398         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
22399                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
22400
22401                                 ;;
22402                         esac
22403                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
22404                         ;;
22405                 esac
22406                 ;;
22407         (*)
22408                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
22409                 ;;
22410         esac
22411         ;;
22412 (yes)
22413         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22414
22415         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22416
22417         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22418                 && test -z "${cf_tst_cflags}" \
22419                 && cf_fix_cppflags=no
22420         ;;
22421 esac
22422 done
22423
22424 if test -n "$cf_new_cflags" ; then
22425
22426         CFLAGS="$CFLAGS $cf_new_cflags"
22427 fi
22428
22429 if test -n "$cf_new_cppflags" ; then
22430
22431         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
22432 fi
22433
22434 if test -n "$cf_new_extra_cppflags" ; then
22435
22436         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
22437 fi
22438
22439 ### Define substitutions for header files to avoid name-pollution
22440
22441 if test "x$cf_cv_have_tcgetattr" = xyes ; then
22442         HAVE_TCGETATTR=1
22443 else
22444         HAVE_TCGETATTR=0
22445 fi
22446
22447 if test "x$ac_cv_header_stdint_h" = xyes ; then
22448         HAVE_STDINT_H=1
22449 else
22450         HAVE_STDINT_H=0
22451 fi
22452
22453 if test "x$ac_cv_header_termio_h" = xyes ; then
22454         HAVE_TERMIO_H=1
22455 else
22456         HAVE_TERMIO_H=0
22457 fi
22458
22459 if test "x$ac_cv_header_termios_h" = xyes ; then
22460         HAVE_TERMIOS_H=1
22461 else
22462         HAVE_TERMIOS_H=0
22463 fi
22464
22465 ################################################################################
22466 test "x$use_database" = xyes && \
22467 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
22468
22469 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
22470 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
22471
22472 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
22473 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22474 fi
22475
22476 # Extract the first word of "tic", so it can be a program name with args.
22477 set dummy tic; ac_word=$2
22478 echo "$as_me:22478: checking for $ac_word" >&5
22479 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22480 if test "${ac_cv_path_TIC_PATH+set}" = set; then
22481   echo $ECHO_N "(cached) $ECHO_C" >&6
22482 else
22483   case $TIC_PATH in
22484   [\\/]* | ?:[\\/]*)
22485   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22486   ;;
22487   *)
22488   ac_save_IFS=$IFS; IFS=$ac_path_separator
22489 ac_dummy="$PATH:/usr/local/ncurses/bin"
22490 for ac_dir in $ac_dummy; do
22491   IFS=$ac_save_IFS
22492   test -z "$ac_dir" && ac_dir=.
22493   if $as_executable_p "$ac_dir/$ac_word"; then
22494    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
22495    echo "$as_me:22495: found $ac_dir/$ac_word" >&5
22496    break
22497 fi
22498 done
22499
22500   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22501   ;;
22502 esac
22503 fi
22504 TIC_PATH=$ac_cv_path_TIC_PATH
22505
22506 if test -n "$TIC_PATH"; then
22507   echo "$as_me:22507: result: $TIC_PATH" >&5
22508 echo "${ECHO_T}$TIC_PATH" >&6
22509 else
22510   echo "$as_me:22510: result: no" >&5
22511 echo "${ECHO_T}no" >&6
22512 fi
22513
22514 if test -n "$FALLBACK_LIST"
22515 then
22516         if test "$TIC_PATH" = unknown
22517         then
22518                 { echo "$as_me:22518: WARNING: no tic program found for fallbacks" >&5
22519 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22520         fi
22521 fi
22522
22523 if test "x$cf_with_tests" != xno ; then
22524         MAKE_TESTS=
22525 else
22526         MAKE_TESTS="#"
22527 fi
22528
22529 ADAHTML_DIR=../../doc/html/ada
22530
22531 # these could be configurable, but are not currently
22532 PANEL_NAME=panel
22533 MENU_NAME=menu
22534 FORM_NAME=form
22535 CXX_NAME=ncurses++
22536
22537 # workaround for OS/2 (20151017)
22538 case $cf_cv_system_name in
22539 (os2*)
22540         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
22541         ;;
22542 (*)
22543         LIBTOOL_OPTS_CXX=
22544         ;;
22545 esac
22546
22547 # workaround for g++ versus Solaris (20131116)
22548 case $cf_cv_system_name in
22549 (solaris2*)
22550         case "x$CPPFLAGS" in
22551         (*-D_XOPEN_SOURCE_EXTENDED*)
22552                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
22553
22554 echo "${as_me:-configure}:22554: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22555
22556                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22557                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22558                 ;;
22559         esac
22560         ;;
22561 esac
22562
22563 # Help to automatically enable the extended curses features when using either
22564 # the *-config or the ".pc" files by adding defines.
22565 echo "$as_me:22565: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
22566 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
22567 PKG_CFLAGS=
22568 for cf_loop1 in $CPPFLAGS_after_XOPEN
22569 do
22570         cf_found=no
22571         for cf_loop2 in $CPPFLAGS_before_XOPEN
22572         do
22573                 if test "x$cf_loop1" = "x$cf_loop2"
22574                 then
22575                         cf_found=yes
22576                         break
22577                 fi
22578         done
22579         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
22580 done
22581 echo "$as_me:22581: result: $PKG_CFLAGS" >&5
22582 echo "${ECHO_T}$PKG_CFLAGS" >&6
22583
22584 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
22585 case "x$NCURSES_OSPEED" in
22586 (*short*)
22587         cf_compatible=1
22588         ;;
22589 (*)
22590         cf_compatible=0
22591         ;;
22592 esac
22593
22594 cat >>confdefs.h <<EOF
22595 #define NCURSES_OSPEED_COMPAT $cf_compatible
22596 EOF
22597
22598 case "x$cf_cv_typeof_chtype" in
22599 (xshort|xint|xlong)
22600         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22601         ;;
22602 esac
22603
22604 case "x$cf_cv_typeof_mmask_t" in
22605 (xshort|xint|xlong)
22606         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22607         ;;
22608 esac
22609
22610 # substitute into misc/Makefile to suppress
22611 # (un)install.data from the
22612 # (un)install rules.
22613 if test "x$cf_with_db_install" = "xno"; then
22614         MISC_INSTALL_DATA=
22615         MISC_UNINSTALL_DATA=
22616 else
22617         MISC_INSTALL_DATA=install.data
22618         MISC_UNINSTALL_DATA=uninstall.data
22619 fi
22620
22621 SUB_SCRIPTS=
22622
22623 if test -n "$PACKAGE"
22624 then
22625         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22626         export PACKAGE
22627         echo "package: $PACKAGE"
22628 fi
22629
22630 UNALTERED_SYMS=
22631 cf_filter_syms=no
22632
22633 if test -n "$RESULTING_SYMS"
22634 then
22635         cf_filter_syms=$cf_dft_filter_syms
22636         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
22637
22638 echo "${as_me:-configure}:22638: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22639
22640 fi
22641
22642 if test "x$WILDCARD_SYMS" = xno
22643 then
22644         cf_filter_syms=yes
22645 fi
22646
22647 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
22648
22649 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22650 if test $cf_filter_syms = yes
22651 then
22652         RESULTING_SYMS=resulting.map
22653 fi
22654
22655 if test "x$cross_compiling" = xyes ; then
22656         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
22657 else
22658         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
22659 fi
22660
22661 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"
22662 ac_config_commands="$ac_config_commands default"
22663 cat >confcache <<\_ACEOF
22664 # This file is a shell script that caches the results of configure
22665 # tests run on this system so they can be shared between configure
22666 # scripts and configure runs, see configure's option --config-cache.
22667 # It is not useful on other systems.  If it contains results you don't
22668 # want to keep, you may remove or edit it.
22669 #
22670 # config.status only pays attention to the cache file if you give it
22671 # the --recheck option to rerun configure.
22672 #
22673 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22674 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22675 # following values.
22676
22677 _ACEOF
22678
22679 # The following way of writing the cache mishandles newlines in values,
22680 # but we know of no workaround that is simple, portable, and efficient.
22681 # So, don't put newlines in cache variables' values.
22682 # Ultrix sh set writes to stderr and can't be redirected directly,
22683 # and sets the high bit in the cache file unless we assign to the vars.
22684 {
22685   (set) 2>&1 |
22686     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22687     *ac_space=\ *)
22688       # `set' does not quote correctly, so add quotes (double-quote
22689       # substitution turns \\\\ into \\, and sed turns \\ into \).
22690       sed -n \
22691         "s/'/'\\\\''/g;
22692           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22693       ;;
22694     *)
22695       # `set' quotes correctly as required by POSIX, so do not add quotes.
22696       sed -n \
22697         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22698       ;;
22699     esac;
22700 } |
22701   sed '
22702      t clear
22703      : clear
22704      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22705      t end
22706      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22707      : end' >>confcache
22708 if cmp -s $cache_file confcache; then :; else
22709   if test -w $cache_file; then
22710     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22711     cat confcache >$cache_file
22712   else
22713     echo "not updating unwritable cache $cache_file"
22714   fi
22715 fi
22716 rm -f confcache
22717
22718 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22719 # Let make expand exec_prefix.
22720 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22721
22722 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22723 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22724 # trailing colons and then remove the whole line if VPATH becomes empty
22725 # (actually we leave an empty line to preserve line numbers).
22726 if test "x$srcdir" = x.; then
22727   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22728 s/:*\$(srcdir):*/:/;
22729 s/:*\${srcdir}:*/:/;
22730 s/:*@srcdir@:*/:/;
22731 s/^\([^=]*=[    ]*\):*/\1/;
22732 s/:*$//;
22733 s/^[^=]*=[      ]*$//;
22734 }'
22735 fi
22736
22737 DEFS=-DHAVE_CONFIG_H
22738
22739 : ${CONFIG_STATUS=./config.status}
22740 ac_clean_files_save=$ac_clean_files
22741 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22742 { echo "$as_me:22742: creating $CONFIG_STATUS" >&5
22743 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22744 cat >$CONFIG_STATUS <<_ACEOF
22745 #! $SHELL
22746 # Generated automatically by configure.
22747 # Run this file to recreate the current configuration.
22748 # Compiler output produced by configure, useful for debugging
22749 # configure, is in config.log if it exists.
22750
22751 debug=false
22752 SHELL=\${CONFIG_SHELL-$SHELL}
22753 ac_cs_invocation="\$0 \$@"
22754
22755 _ACEOF
22756
22757 cat >>$CONFIG_STATUS <<\_ACEOF
22758 # Be Bourne compatible
22759 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22760   emulate sh
22761   NULLCMD=:
22762 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22763   set -o posix
22764 fi
22765
22766 # Name of the executable.
22767 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22768
22769 if expr a : '\(a\)' >/dev/null 2>&1; then
22770   as_expr=expr
22771 else
22772   as_expr=false
22773 fi
22774
22775 rm -f conf$$ conf$$.exe conf$$.file
22776 echo >conf$$.file
22777 if ln -s conf$$.file conf$$ 2>/dev/null; then
22778   # We could just check for DJGPP; but this test a) works b) is more generic
22779   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22780   if test -f conf$$.exe; then
22781     # Don't use ln at all; we don't have any links
22782     as_ln_s='cp -p'
22783   else
22784     as_ln_s='ln -s'
22785   fi
22786 elif ln conf$$.file conf$$ 2>/dev/null; then
22787   as_ln_s=ln
22788 else
22789   as_ln_s='cp -p'
22790 fi
22791 rm -f conf$$ conf$$.exe conf$$.file
22792
22793 as_executable_p="test -f"
22794
22795 # Support unset when possible.
22796 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22797   as_unset=unset
22798 else
22799   as_unset=false
22800 fi
22801
22802 # NLS nuisances.
22803 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22804 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22805 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22806 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22807 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22808 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22809 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22810 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22811
22812 # IFS
22813 # We need space, tab and new line, in precisely that order.
22814 as_nl='
22815 '
22816 IFS="   $as_nl"
22817
22818 # CDPATH.
22819 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22820
22821 exec 6>&1
22822
22823 _ACEOF
22824
22825 # Files that config.status was made for.
22826 if test -n "$ac_config_files"; then
22827   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22828 fi
22829
22830 if test -n "$ac_config_headers"; then
22831   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22832 fi
22833
22834 if test -n "$ac_config_links"; then
22835   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22836 fi
22837
22838 if test -n "$ac_config_commands"; then
22839   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22840 fi
22841
22842 cat >>$CONFIG_STATUS <<\EOF
22843
22844 ac_cs_usage="\
22845 \`$as_me' instantiates files from templates according to the
22846 current configuration.
22847
22848 Usage: $0 [OPTIONS] [FILE]...
22849
22850   -h, --help       print this help, then exit
22851   -V, --version    print version number, then exit
22852   -d, --debug      don't remove temporary files
22853       --recheck    update $as_me by reconfiguring in the same conditions
22854   --file=FILE[:TEMPLATE]
22855                    instantiate the configuration file FILE
22856   --header=FILE[:TEMPLATE]
22857                    instantiate the configuration header FILE
22858
22859 Configuration files:
22860 $config_files
22861
22862 Configuration headers:
22863 $config_headers
22864
22865 Configuration commands:
22866 $config_commands
22867
22868 Report bugs to <dickey@invisible-island.net>."
22869 EOF
22870
22871 cat >>$CONFIG_STATUS <<EOF
22872 ac_cs_version="\\
22873 config.status
22874 configured by $0, generated by GNU Autoconf 2.52.20150926,
22875   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22876
22877 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22878 Free Software Foundation, Inc.
22879 This config.status script is free software; the Free Software Foundation
22880 gives unlimited permission to copy, distribute and modify it."
22881 srcdir=$srcdir
22882 INSTALL="$INSTALL"
22883 EOF
22884
22885 cat >>$CONFIG_STATUS <<\EOF
22886 # If no file are specified by the user, then we need to provide default
22887 # value.  By we need to know if files were specified by the user.
22888 ac_need_defaults=:
22889 while test $# != 0
22890 do
22891   case $1 in
22892   --*=*)
22893     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22894     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22895     shift
22896     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22897     shift
22898     ;;
22899   -*);;
22900   *) # This is not an option, so the user has probably given explicit
22901      # arguments.
22902      ac_need_defaults=false;;
22903   esac
22904
22905   case $1 in
22906   # Handling of the options.
22907 EOF
22908 cat >>$CONFIG_STATUS <<EOF
22909   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22910     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22911     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22912 EOF
22913 cat >>$CONFIG_STATUS <<\EOF
22914   --version | --vers* | -V )
22915     echo "$ac_cs_version"; exit 0 ;;
22916   --he | --h)
22917     # Conflict between --help and --header
22918     { { echo "$as_me:22918: error: ambiguous option: $1
22919 Try \`$0 --help' for more information." >&5
22920 echo "$as_me: error: ambiguous option: $1
22921 Try \`$0 --help' for more information." >&2;}
22922    { (exit 1); exit 1; }; };;
22923   --help | --hel | -h )
22924     echo "$ac_cs_usage"; exit 0 ;;
22925   --debug | --d* | -d )
22926     debug=: ;;
22927   --file | --fil | --fi | --f )
22928     shift
22929     CONFIG_FILES="$CONFIG_FILES $1"
22930     ac_need_defaults=false;;
22931   --header | --heade | --head | --hea )
22932     shift
22933     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22934     ac_need_defaults=false;;
22935
22936   # This is an error.
22937   -*) { { echo "$as_me:22937: error: unrecognized option: $1
22938 Try \`$0 --help' for more information." >&5
22939 echo "$as_me: error: unrecognized option: $1
22940 Try \`$0 --help' for more information." >&2;}
22941    { (exit 1); exit 1; }; } ;;
22942
22943   *) ac_config_targets="$ac_config_targets $1" ;;
22944
22945   esac
22946   shift
22947 done
22948
22949 exec 5>>config.log
22950 cat >&5 << _ACEOF
22951
22952 ## ----------------------- ##
22953 ## Running config.status.  ##
22954 ## ----------------------- ##
22955
22956 This file was extended by $as_me 2.52.20150926, executed with
22957   CONFIG_FILES    = $CONFIG_FILES
22958   CONFIG_HEADERS  = $CONFIG_HEADERS
22959   CONFIG_LINKS    = $CONFIG_LINKS
22960   CONFIG_COMMANDS = $CONFIG_COMMANDS
22961   > $ac_cs_invocation
22962 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22963
22964 _ACEOF
22965 EOF
22966
22967 cat >>$CONFIG_STATUS <<EOF
22968 #
22969 # INIT-COMMANDS section.
22970 #
22971
22972 ### Special initialization commands, used to pass information from the
22973 ### configuration-run into config.status
22974
22975 AWK="$AWK"
22976 ALTERNATE_SYMS="$ALTERNATE_SYMS"
22977 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22978 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22979 ECHO_LD="$ECHO_LD"
22980 EXTRA_SUFFIX="$EXTRA_SUFFIX"
22981 LDCONFIG="$LDCONFIG"
22982 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22983 LIB_NAME="$LIB_NAME"
22984 LIB_PREFIX="$LIB_PREFIX"
22985 LIB_SUBSETS="$LIB_SUBSETS"
22986 LIB_SUFFIX="$LIB_SUFFIX"
22987 LIB_TRACING="$LIB_TRACING"
22988 LN_S="$LN_S"
22989 MAKE_TERMINFO="$MAKE_TERMINFO"
22990 NCURSES_MAJOR="$NCURSES_MAJOR"
22991 NCURSES_MINOR="$NCURSES_MINOR"
22992 NCURSES_OSPEED="$NCURSES_OSPEED"
22993 NCURSES_PATCH="$NCURSES_PATCH"
22994 SRC_SUBDIRS="$SRC_SUBDIRS"
22995 TERMINFO="$TERMINFO"
22996 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22997 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22998 TICS_NAME="$TICS_NAME"
22999 TICS_SUFFIX="$TICS_SUFFIX"
23000 TIC_PATH="$TIC_PATH"
23001 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
23002 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
23003 TINFO_NAME="$TINFO_NAME"
23004 TINFO_SUFFIX="$TINFO_SUFFIX"
23005 UNALTERED_SYMS="$UNALTERED_SYMS"
23006 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
23007 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
23008 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
23009 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
23010 WILDCARD_SYMS="$WILDCARD_SYMS"
23011 WITH_CURSES_H="$with_curses_h"
23012 WITH_ECHO="${enable_echo:=yes}"
23013 WITH_OVERWRITE="$with_overwrite"
23014 cf_LIST_MODELS="$cf_list_models"
23015 cf_cv_abi_version="$cf_cv_abi_version"
23016 cf_cv_do_relink="$cf_cv_do_relink"
23017 cf_cv_do_symlinks="$cf_cv_do_symlinks"
23018 cf_cv_enable_lp64="$cf_cv_enable_lp64"
23019 cf_cv_enable_opaque="$cf_cv_enable_opaque"
23020 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
23021 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
23022 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
23023 cf_cv_rel_version="$cf_cv_rel_version"
23024 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
23025 cf_cv_shared_soname='$cf_cv_shared_soname'
23026 cf_cv_shlib_version="$cf_cv_shlib_version"
23027 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
23028 cf_cv_system_name="$cf_cv_system_name"
23029 cf_cv_term_driver="$with_term_driver"
23030 cf_with_ada="$cf_with_ada"
23031 cf_with_cxx_binding="$cf_with_cxx_binding"
23032 cf_with_db_install="$cf_with_db_install"
23033 cf_with_manpages="$cf_with_manpages"
23034 cf_with_tests="$cf_with_tests"
23035 host="$host"
23036 target="$target"
23037 with_shared_cxx="$with_shared_cxx"
23038
23039 EOF
23040
23041 cat >>$CONFIG_STATUS <<\EOF
23042 for ac_config_target in $ac_config_targets
23043 do
23044   case "$ac_config_target" in
23045   # Handling of arguments.
23046   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
23047   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
23048   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
23049   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
23050   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
23051   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
23052   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
23053   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23054   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23055   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
23056   *) { { echo "$as_me:23056: error: invalid argument: $ac_config_target" >&5
23057 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23058    { (exit 1); exit 1; }; };;
23059   esac
23060 done
23061
23062 # If the user did not use the arguments to specify the items to instantiate,
23063 # then the envvar interface is used.  Set only those that are not.
23064 # We use the long form for the default assignment because of an extremely
23065 # bizarre bug on SunOS 4.1.3.
23066 if $ac_need_defaults; then
23067   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23068   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23069   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23070 fi
23071
23072 # Create a temporary directory, and hook for its removal unless debugging.
23073 $debug ||
23074 {
23075   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23076   trap '{ (exit 1); exit 1; }' 1 2 13 15
23077 }
23078
23079 # Create a (secure) tmp directory for tmp files.
23080 : ${TMPDIR=/tmp}
23081 {
23082   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23083   test -n "$tmp" && test -d "$tmp"
23084 }  ||
23085 {
23086   tmp=$TMPDIR/cs$$-$RANDOM
23087   (umask 077 && mkdir $tmp)
23088 } ||
23089 {
23090    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23091    { (exit 1); exit 1; }
23092 }
23093
23094 EOF
23095
23096 cat >>$CONFIG_STATUS <<EOF
23097
23098 #
23099 # CONFIG_FILES section.
23100 #
23101
23102 # No need to generate the scripts if there are no CONFIG_FILES.
23103 # This happens for instance when ./config.status config.h
23104 if test -n "\$CONFIG_FILES"; then
23105   # Protect against being on the right side of a sed subst in config.status.
23106   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23107    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23108 s,@SHELL@,$SHELL,;t t
23109 s,@exec_prefix@,$exec_prefix,;t t
23110 s,@prefix@,$prefix,;t t
23111 s,@program_transform_name@,$program_transform_name,;t t
23112 s,@bindir@,$bindir,;t t
23113 s,@sbindir@,$sbindir,;t t
23114 s,@libexecdir@,$libexecdir,;t t
23115 s,@datarootdir@,$datarootdir,;t t
23116 s,@datadir@,$datadir,;t t
23117 s,@sysconfdir@,$sysconfdir,;t t
23118 s,@sharedstatedir@,$sharedstatedir,;t t
23119 s,@localstatedir@,$localstatedir,;t t
23120 s,@libdir@,$libdir,;t t
23121 s,@includedir@,$includedir,;t t
23122 s,@oldincludedir@,$oldincludedir,;t t
23123 s,@infodir@,$infodir,;t t
23124 s,@mandir@,$mandir,;t t
23125 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23126 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23127 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23128 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23129 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23130 s,@build_alias@,$build_alias,;t t
23131 s,@host_alias@,$host_alias,;t t
23132 s,@target_alias@,$target_alias,;t t
23133 s,@ECHO_C@,$ECHO_C,;t t
23134 s,@ECHO_N@,$ECHO_N,;t t
23135 s,@ECHO_T@,$ECHO_T,;t t
23136 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23137 s,@DEFS@,$DEFS,;t t
23138 s,@LIBS@,$LIBS,;t t
23139 s,@top_builddir@,$top_builddir,;t t
23140 s,@EGREP@,$EGREP,;t t
23141 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
23142 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
23143 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
23144 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23145 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23146 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
23147 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
23148 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
23149 s,@VERSION@,$VERSION,;t t
23150 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
23151 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
23152 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
23153 s,@PACKAGE@,$PACKAGE,;t t
23154 s,@build@,$build,;t t
23155 s,@build_cpu@,$build_cpu,;t t
23156 s,@build_vendor@,$build_vendor,;t t
23157 s,@build_os@,$build_os,;t t
23158 s,@host@,$host,;t t
23159 s,@host_cpu@,$host_cpu,;t t
23160 s,@host_vendor@,$host_vendor,;t t
23161 s,@host_os@,$host_os,;t t
23162 s,@target@,$target,;t t
23163 s,@target_cpu@,$target_cpu,;t t
23164 s,@target_vendor@,$target_vendor,;t t
23165 s,@target_os@,$target_os,;t t
23166 s,@CC@,$CC,;t t
23167 s,@CFLAGS@,$CFLAGS,;t t
23168 s,@LDFLAGS@,$LDFLAGS,;t t
23169 s,@CPPFLAGS@,$CPPFLAGS,;t t
23170 s,@ac_ct_CC@,$ac_ct_CC,;t t
23171 s,@EXEEXT@,$EXEEXT,;t t
23172 s,@OBJEXT@,$OBJEXT,;t t
23173 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23174 s,@CPP@,$CPP,;t t
23175 s,@LDCONFIG@,$LDCONFIG,;t t
23176 s,@CXX@,$CXX,;t t
23177 s,@CXXFLAGS@,$CXXFLAGS,;t t
23178 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
23179 s,@AWK@,$AWK,;t t
23180 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23181 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23182 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23183 s,@LINT@,$LINT,;t t
23184 s,@LINT_OPTS@,$LINT_OPTS,;t t
23185 s,@LN_S@,$LN_S,;t t
23186 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23187 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
23188 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
23189 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
23190 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
23191 s,@SET_MAKE@,$SET_MAKE,;t t
23192 s,@CTAGS@,$CTAGS,;t t
23193 s,@ETAGS@,$ETAGS,;t t
23194 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23195 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23196 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
23197 s,@RANLIB@,$RANLIB,;t t
23198 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23199 s,@LD@,$LD,;t t
23200 s,@ac_ct_LD@,$ac_ct_LD,;t t
23201 s,@AR@,$AR,;t t
23202 s,@ac_ct_AR@,$ac_ct_AR,;t t
23203 s,@NM@,$NM,;t t
23204 s,@ac_ct_NM@,$ac_ct_NM,;t t
23205 s,@ARFLAGS@,$ARFLAGS,;t t
23206 s,@DESTDIR@,$DESTDIR,;t t
23207 s,@BUILD_CC@,$BUILD_CC,;t t
23208 s,@BUILD_CPP@,$BUILD_CPP,;t t
23209 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
23210 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
23211 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
23212 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
23213 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
23214 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
23215 s,@cf_list_models@,$cf_list_models,;t t
23216 s,@ABI_VERSION@,$ABI_VERSION,;t t
23217 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
23218 s,@LIBTOOL@,$LIBTOOL,;t t
23219 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
23220 s,@LT_UNDEF@,$LT_UNDEF,;t t
23221 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
23222 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23223 s,@LIB_CREATE@,$LIB_CREATE,;t t
23224 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
23225 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
23226 s,@LIB_PREP@,$LIB_PREP,;t t
23227 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23228 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23229 s,@LIB_LINK@,$LIB_LINK,;t t
23230 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
23231 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
23232 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
23233 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23234 s,@TICS_NAME@,$TICS_NAME,;t t
23235 s,@TINFO_NAME@,$TINFO_NAME,;t t
23236 s,@LIB_NAME@,$LIB_NAME,;t t
23237 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
23238 s,@CC_G_OPT@,$CC_G_OPT,;t t
23239 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
23240 s,@LD_MODEL@,$LD_MODEL,;t t
23241 s,@shlibdir@,$shlibdir,;t t
23242 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
23243 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23244 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
23245 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23246 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
23247 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
23248 s,@LINK_PROGS@,$LINK_PROGS,;t t
23249 s,@LINK_TESTS@,$LINK_TESTS,;t t
23250 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
23251 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23252 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
23253 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
23254 s,@RPATH_LIST@,$RPATH_LIST,;t t
23255 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
23256 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
23257 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
23258 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
23259 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
23260 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
23261 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
23262 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
23263 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
23264 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
23265 s,@XTERM_KBS@,$XTERM_KBS,;t t
23266 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
23267 s,@TERMINFO@,$TERMINFO,;t t
23268 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
23269 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
23270 s,@TERMPATH@,$TERMPATH,;t t
23271 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
23272 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
23273 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
23274 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
23275 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
23276 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
23277 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
23278 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
23279 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
23280 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
23281 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
23282 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
23283 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
23284 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
23285 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
23286 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
23287 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
23288 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
23289 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
23290 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
23291 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
23292 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
23293 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
23294 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
23295 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
23296 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
23297 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
23298 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
23299 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
23300 s,@PTHREAD@,$PTHREAD,;t t
23301 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
23302 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
23303 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
23304 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
23305 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23306 s,@ECHO_LT@,$ECHO_LT,;t t
23307 s,@ECHO_LD@,$ECHO_LD,;t t
23308 s,@RULE_CC@,$RULE_CC,;t t
23309 s,@SHOW_CC@,$SHOW_CC,;t t
23310 s,@ECHO_CC@,$ECHO_CC,;t t
23311 s,@ECHO_LINK@,$ECHO_LINK,;t t
23312 s,@ADAFLAGS@,$ADAFLAGS,;t t
23313 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23314 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
23315 s,@ADA_TRACE@,$ADA_TRACE,;t t
23316 s,@MATH_LIB@,$MATH_LIB,;t t
23317 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
23318 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
23319 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
23320 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
23321 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
23322 s,@TEST_LIBS@,$TEST_LIBS,;t t
23323 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
23324 s,@CXXCPP@,$CXXCPP,;t t
23325 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
23326 s,@CXX_AR@,$CXX_AR,;t t
23327 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
23328 s,@CXXLIBS@,$CXXLIBS,;t t
23329 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
23330 s,@gnat_exists@,$gnat_exists,;t t
23331 s,@M4_exists@,$M4_exists,;t t
23332 s,@cf_ada_make@,$cf_ada_make,;t t
23333 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
23334 s,@cf_compile_generics@,$cf_compile_generics,;t t
23335 s,@cf_generic_objects@,$cf_generic_objects,;t t
23336 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
23337 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
23338 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
23339 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
23340 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
23341 s,@cf_ada_package@,$cf_ada_package,;t t
23342 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
23343 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
23344 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
23345 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
23346 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
23347 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
23348 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23349 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23350 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
23351 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
23352 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
23353 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
23354 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
23355 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
23356 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
23357 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
23358 s,@TICS_LIBS@,$TICS_LIBS,;t t
23359 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
23360 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
23361 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
23362 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23363 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23364 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
23365 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23366 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23367 s,@includesubdir@,$includesubdir,;t t
23368 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
23369 s,@TICS_LIST@,$TICS_LIST,;t t
23370 s,@TINFO_LIST@,$TINFO_LIST,;t t
23371 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
23372 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
23373 s,@TEST_ARGS@,$TEST_ARGS,;t t
23374 s,@TEST_DEPS@,$TEST_DEPS,;t t
23375 s,@TEST_ARG2@,$TEST_ARG2,;t t
23376 s,@TEST_DEP2@,$TEST_DEP2,;t t
23377 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
23378 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
23379 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
23380 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
23381 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
23382 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
23383 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
23384 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
23385 s,@cross_compiling@,$cross_compiling,;t t
23386 s,@TIC_PATH@,$TIC_PATH,;t t
23387 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
23388 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
23389 s,@PANEL_NAME@,$PANEL_NAME,;t t
23390 s,@MENU_NAME@,$MENU_NAME,;t t
23391 s,@FORM_NAME@,$FORM_NAME,;t t
23392 s,@CXX_NAME@,$CXX_NAME,;t t
23393 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
23394 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
23395 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
23396 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
23397 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
23398 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
23399 CEOF
23400
23401 EOF
23402
23403   cat >>$CONFIG_STATUS <<\EOF
23404   # Split the substitutions into bite-sized pieces for seds with
23405   # small command number limits, like on Digital OSF/1 and HP-UX.
23406   ac_max_sed_lines=48
23407   ac_sed_frag=1 # Number of current file.
23408   ac_beg=1 # First line for current file.
23409   ac_end=$ac_max_sed_lines # Line after last line for current file.
23410   ac_more_lines=:
23411   ac_sed_cmds=
23412   while $ac_more_lines; do
23413     if test $ac_beg -gt 1; then
23414       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23415     else
23416       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23417     fi
23418     if test ! -s $tmp/subs.frag; then
23419       ac_more_lines=false
23420     else
23421       # The purpose of the label and of the branching condition is to
23422       # speed up the sed processing (if there are no `@' at all, there
23423       # is no need to browse any of the substitutions).
23424       # These are the two extra sed commands mentioned above.
23425       (echo ':t
23426   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23427       # It is possible to make a multiline substitution using escaped newlines.
23428       # Ensure that we do not split the substitution between script fragments.
23429       ac_BEG=$ac_end
23430       ac_END=`expr $ac_end + $ac_max_sed_lines`
23431       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
23432       if test -s $tmp/subs.next; then
23433         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
23434         if test ! -s $tmp/subs.edit; then
23435           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
23436           if test ! -s $tmp/subs.edit; then
23437             if test $ac_beg -gt 1; then
23438               ac_end=`expr $ac_end - 1`
23439               continue
23440             fi
23441           fi
23442         fi
23443       fi
23444
23445       if test -z "$ac_sed_cmds"; then
23446         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23447       else
23448         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23449       fi
23450       ac_sed_frag=`expr $ac_sed_frag + 1`
23451       ac_beg=$ac_end
23452       ac_end=`expr $ac_end + $ac_max_sed_lines`
23453     fi
23454   done
23455   if test -z "$ac_sed_cmds"; then
23456     ac_sed_cmds=cat
23457   fi
23458 fi # test -n "$CONFIG_FILES"
23459
23460 EOF
23461 cat >>$CONFIG_STATUS <<\EOF
23462 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23463   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23464   case $ac_file in
23465   - | *:- | *:-:* ) # input from stdin
23466         cat >$tmp/stdin
23467         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23468         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23469   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23470         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23471   * )   ac_file_in=$ac_file.in ;;
23472   esac
23473
23474   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23475   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23476          X"$ac_file" : 'X\(//\)[^/]' \| \
23477          X"$ac_file" : 'X\(//\)$' \| \
23478          X"$ac_file" : 'X\(/\)' \| \
23479          .     : '\(.\)' 2>/dev/null ||
23480 echo X"$ac_file" |
23481     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23482           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23483           /^X\(\/\/\)$/{ s//\1/; q; }
23484           /^X\(\/\).*/{ s//\1/; q; }
23485           s/.*/./; q'`
23486   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23487     { case "$ac_dir" in
23488   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23489   *)                      as_incr_dir=.;;
23490 esac
23491 as_dummy="$ac_dir"
23492 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23493   case $as_mkdir_dir in
23494     # Skip DOS drivespec
23495     ?:) as_incr_dir=$as_mkdir_dir ;;
23496     *)
23497       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23498       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23499     ;;
23500   esac
23501 done; }
23502
23503     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23504     # A "../" for each directory in $ac_dir_suffix.
23505     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23506   else
23507     ac_dir_suffix= ac_dots=
23508   fi
23509
23510   case $srcdir in
23511   .)  ac_srcdir=.
23512       if test -z "$ac_dots"; then
23513          ac_top_srcdir=.
23514       else
23515          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23516       fi ;;
23517   [\\/]* | ?:[\\/]* )
23518       ac_srcdir=$srcdir$ac_dir_suffix;
23519       ac_top_srcdir=$srcdir ;;
23520   *) # Relative path.
23521     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23522     ac_top_srcdir=$ac_dots$srcdir ;;
23523   esac
23524
23525   case $INSTALL in
23526   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23527   *) ac_INSTALL=$ac_dots$INSTALL ;;
23528   esac
23529
23530   if test x"$ac_file" != x-; then
23531     { echo "$as_me:23531: creating $ac_file" >&5
23532 echo "$as_me: creating $ac_file" >&6;}
23533     rm -f "$ac_file"
23534   fi
23535   # Let's still pretend it is `configure' which instantiates (i.e., don't
23536   # use $as_me), people would be surprised to read:
23537   #    /* config.h.  Generated automatically by config.status.  */
23538   configure_input="Generated automatically from `echo $ac_file_in |
23539                                                  sed 's,.*/,,'` by configure."
23540
23541   # First look for the input files in the build tree, otherwise in the
23542   # src tree.
23543   ac_file_inputs=`IFS=:
23544     for f in $ac_file_in; do
23545       case $f in
23546       -) echo $tmp/stdin ;;
23547       [\\/$]*)
23548          # Absolute (can't be DOS-style, as IFS=:)
23549          test -f "$f" || { { echo "$as_me:23549: error: cannot find input file: $f" >&5
23550 echo "$as_me: error: cannot find input file: $f" >&2;}
23551    { (exit 1); exit 1; }; }
23552          echo $f;;
23553       *) # Relative
23554          if test -f "$f"; then
23555            # Build tree
23556            echo $f
23557          elif test -f "$srcdir/$f"; then
23558            # Source tree
23559            echo $srcdir/$f
23560          else
23561            # /dev/null tree
23562            { { echo "$as_me:23562: error: cannot find input file: $f" >&5
23563 echo "$as_me: error: cannot find input file: $f" >&2;}
23564    { (exit 1); exit 1; }; }
23565          fi;;
23566       esac
23567     done` || { (exit 1); exit 1; }
23568 EOF
23569 cat >>$CONFIG_STATUS <<\EOF
23570   ac_warn_datarootdir=no
23571   if test x"$ac_file" != x-; then
23572     for ac_item in $ac_file_inputs
23573     do
23574       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23575       if test -n "$ac_seen"; then
23576         ac_used=`grep '@datarootdir@' $ac_item`
23577         if test -z "$ac_used"; then
23578           { echo "$as_me:23578: WARNING: datarootdir was used implicitly but not set:
23579 $ac_seen" >&5
23580 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23581 $ac_seen" >&2;}
23582           ac_warn_datarootdir=yes
23583         fi
23584       fi
23585       ac_seen=`grep '${datarootdir}' $ac_item`
23586       if test -n "$ac_seen"; then
23587         { echo "$as_me:23587: WARNING: datarootdir was used explicitly but not set:
23588 $ac_seen" >&5
23589 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23590 $ac_seen" >&2;}
23591         ac_warn_datarootdir=yes
23592       fi
23593     done
23594   fi
23595
23596 if test "x$ac_warn_datarootdir" = xyes; then
23597   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23598 fi
23599
23600 EOF
23601 cat >>$CONFIG_STATUS <<EOF
23602   sed "$ac_vpsub
23603 $extrasub
23604 EOF
23605 cat >>$CONFIG_STATUS <<\EOF
23606 :t
23607 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23608 s,@configure_input@,$configure_input,;t t
23609 s,@srcdir@,$ac_srcdir,;t t
23610 s,@top_srcdir@,$ac_top_srcdir,;t t
23611 s,@INSTALL@,$ac_INSTALL,;t t
23612 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23613   rm -f $tmp/stdin
23614   if test x"$ac_file" != x-; then
23615     cp $tmp/out $ac_file
23616
23617     for ac_name in prefix exec_prefix datarootdir
23618     do
23619         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23620         if test -n "$ac_seen"; then
23621             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
23622             if test -z "$ac_init"; then
23623               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23624               { echo "$as_me:23624: WARNING: Variable $ac_name is used but was not set:
23625 $ac_seen" >&5
23626 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23627 $ac_seen" >&2;}
23628             fi
23629         fi
23630     done
23631     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23632     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23633     if test -s $tmp/out; then
23634       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23635       { echo "$as_me:23635: WARNING: Some variables may not be substituted:
23636 $ac_seen" >&5
23637 echo "$as_me: WARNING: Some variables may not be substituted:
23638 $ac_seen" >&2;}
23639     fi
23640   else
23641     cat $tmp/out
23642   fi
23643   rm -f $tmp/out
23644
23645 done
23646 EOF
23647 cat >>$CONFIG_STATUS <<\EOF
23648
23649 #
23650 # CONFIG_HEADER section.
23651 #
23652
23653 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23654 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23655 #
23656 # ac_d sets the value in "#define NAME VALUE" lines.
23657 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23658 ac_dB='[        ].*$,\1#\2'
23659 ac_dC=' '
23660 ac_dD=',;t'
23661 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23662 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23663 ac_iB='\([      ]\),\1#\2define\3'
23664 ac_iC=' '
23665 ac_iD='\4,;t'
23666 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23667 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23668 ac_uB='$,\1#\2define\3'
23669 ac_uC=' '
23670 ac_uD=',;t'
23671
23672 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23673   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23674   case $ac_file in
23675   - | *:- | *:-:* ) # input from stdin
23676         cat >$tmp/stdin
23677         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23678         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23679   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23680         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23681   * )   ac_file_in=$ac_file.in ;;
23682   esac
23683
23684   test x"$ac_file" != x- && { echo "$as_me:23684: creating $ac_file" >&5
23685 echo "$as_me: creating $ac_file" >&6;}
23686
23687   # First look for the input files in the build tree, otherwise in the
23688   # src tree.
23689   ac_file_inputs=`IFS=:
23690     for f in $ac_file_in; do
23691       case $f in
23692       -) echo $tmp/stdin ;;
23693       [\\/$]*)
23694          # Absolute (can't be DOS-style, as IFS=:)
23695          test -f "$f" || { { echo "$as_me:23695: error: cannot find input file: $f" >&5
23696 echo "$as_me: error: cannot find input file: $f" >&2;}
23697    { (exit 1); exit 1; }; }
23698          echo $f;;
23699       *) # Relative
23700          if test -f "$f"; then
23701            # Build tree
23702            echo $f
23703          elif test -f "$srcdir/$f"; then
23704            # Source tree
23705            echo $srcdir/$f
23706          else
23707            # /dev/null tree
23708            { { echo "$as_me:23708: error: cannot find input file: $f" >&5
23709 echo "$as_me: error: cannot find input file: $f" >&2;}
23710    { (exit 1); exit 1; }; }
23711          fi;;
23712       esac
23713     done` || { (exit 1); exit 1; }
23714   # Remove the trailing spaces.
23715   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23716
23717 EOF
23718
23719 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23720 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23721 # be either 'cat' or 'sort'.
23722 cat confdefs.h | uniq >conftest.vals
23723
23724 # Break up conftest.vals because some shells have a limit on
23725 # the size of here documents, and old seds have small limits too.
23726
23727 rm -f conftest.tail
23728 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23729 while grep . conftest.vals >/dev/null
23730 do
23731   # Write chunks of a limited-size here document to conftest.frag.
23732   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23733   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23734   echo 'CEOF' >> $CONFIG_STATUS
23735   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23736   rm -f conftest.vals
23737   mv conftest.tail conftest.vals
23738 done
23739 rm -f conftest.vals
23740
23741 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23742 # marker @DEFS@.
23743 echo '  cat >> conftest.edit <<CEOF
23744 /@DEFS@/r conftest.frag
23745 /@DEFS@/d
23746 CEOF
23747 sed -f conftest.edit $tmp/in > $tmp/out
23748 rm -f $tmp/in
23749 mv $tmp/out $tmp/in
23750 rm -f conftest.edit conftest.frag
23751 ' >> $CONFIG_STATUS
23752
23753 cat >>$CONFIG_STATUS <<\EOF
23754   # Let's still pretend it is `configure' which instantiates (i.e., don't
23755   # use $as_me), people would be surprised to read:
23756   #    /* config.h.  Generated automatically by config.status.  */
23757   if test x"$ac_file" = x-; then
23758     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23759   else
23760     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23761   fi
23762   cat $tmp/in >>$tmp/config.h
23763   rm -f $tmp/in
23764   if test x"$ac_file" != x-; then
23765     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23766       { echo "$as_me:23766: $ac_file is unchanged" >&5
23767 echo "$as_me: $ac_file is unchanged" >&6;}
23768     else
23769       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23770          X"$ac_file" : 'X\(//\)[^/]' \| \
23771          X"$ac_file" : 'X\(//\)$' \| \
23772          X"$ac_file" : 'X\(/\)' \| \
23773          .     : '\(.\)' 2>/dev/null ||
23774 echo X"$ac_file" |
23775     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23776           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23777           /^X\(\/\/\)$/{ s//\1/; q; }
23778           /^X\(\/\).*/{ s//\1/; q; }
23779           s/.*/./; q'`
23780       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23781         { case "$ac_dir" in
23782   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23783   *)                      as_incr_dir=.;;
23784 esac
23785 as_dummy="$ac_dir"
23786 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23787   case $as_mkdir_dir in
23788     # Skip DOS drivespec
23789     ?:) as_incr_dir=$as_mkdir_dir ;;
23790     *)
23791       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23792       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23793     ;;
23794   esac
23795 done; }
23796
23797       fi
23798       rm -f $ac_file
23799       mv $tmp/config.h $ac_file
23800     fi
23801   else
23802     cat $tmp/config.h
23803     rm -f $tmp/config.h
23804   fi
23805 done
23806 EOF
23807 cat >>$CONFIG_STATUS <<\EOF
23808 #
23809 # CONFIG_COMMANDS section.
23810 #
23811 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23812   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23813   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23814
23815   case $ac_dest in
23816     default )
23817 if test "x$cf_with_tests" != xno ; then
23818
23819 for cf_dir in test
23820 do
23821         if test ! -d $srcdir/$cf_dir; then
23822                 continue
23823         elif test -f $srcdir/$cf_dir/programs; then
23824                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23825         fi
23826 done
23827
23828 fi
23829
23830 cf_prefix=$LIB_PREFIX
23831
23832 case $cf_cv_shlib_version in
23833 (cygdll|msysdll|mingw)
23834         TINFO_NAME=$TINFO_ARG_SUFFIX
23835         TINFO_SUFFIX=.dll
23836         ;;
23837 esac
23838
23839 if test -n "$TINFO_SUFFIX" ; then
23840         case $TINFO_SUFFIX in
23841         (tw*)
23842                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
23843                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
23844                 ;;
23845         (t*)
23846                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
23847                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
23848                 ;;
23849         (w*)
23850                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
23851                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
23852                 ;;
23853         esac
23854 fi
23855
23856 for cf_dir in $SRC_SUBDIRS
23857 do
23858         if test ! -d $srcdir/$cf_dir ; then
23859                 continue
23860         elif test -f $srcdir/$cf_dir/modules; then
23861
23862                 SHARED_LIB=
23863                 Libs_To_Make=
23864                 cf_awk_program=
23865                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23866                 then
23867                         cf_awk_program="$cf_awk_program\
23868 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
23869 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
23870 "
23871                 fi
23872
23873                 if test "x$WILDCARD_SYMS" = xno
23874                 then
23875                         cf_awk_program="$cf_awk_program\
23876 /[      ]_\\*;/ { skip=1; next; }\
23877 "
23878                 fi
23879
23880                 if test "x$cf_awk_program" != "x"
23881                 then
23882                         cat >>$cf_dir/Makefile <<CF_EOF
23883
23884 # Generated by CF_LIB_RULES
23885 resulting.map: $UNALTERED_SYMS
23886         $AWK 'BEGIN { skip = 1; last=""; } \
23887 $cf_awk_program \
23888 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
23889  skip = 0; last = \$\$0; } \
23890 END { print last; }' < $UNALTERED_SYMS >\$@
23891
23892 distclean::
23893         rm -f resulting.map
23894 CF_EOF
23895                 fi
23896
23897                 for cf_item in $cf_LIST_MODELS
23898                 do
23899
23900         case X$cf_item in
23901         (Xlibtool)
23902                 cf_suffix='.la'
23903                 cf_depsuf=$cf_suffix
23904                 ;;
23905         (Xdebug)
23906                 cf_suffix='_g.a'
23907                 cf_depsuf=$cf_suffix
23908                 ;;
23909         (Xprofile)
23910                 cf_suffix='_p.a'
23911                 cf_depsuf=$cf_suffix
23912                 ;;
23913         (Xshared)
23914                 case $cf_cv_system_name in
23915                 (aix[5-7]*)
23916                         cf_suffix='.so'
23917                         cf_depsuf=$cf_suffix
23918                         ;;
23919                 (cygwin*|msys*|mingw*)
23920                         cf_suffix='.dll'
23921                         cf_depsuf='.dll.a'
23922                         ;;
23923                 (darwin*)
23924                         cf_suffix='.dylib'
23925                         cf_depsuf=$cf_suffix
23926                         ;;
23927                 (hpux*)
23928                         case $target in
23929                         (ia64*)
23930                                 cf_suffix='.so'
23931                                 cf_depsuf=$cf_suffix
23932                                 ;;
23933                         (*)
23934                                 cf_suffix='.sl'
23935                                 cf_depsuf=$cf_suffix
23936                                 ;;
23937                         esac
23938                         ;;
23939                 (*)
23940                         cf_suffix='.so'
23941                         cf_depsuf=$cf_suffix
23942                         ;;
23943                 esac
23944                 ;;
23945         (*)
23946                 cf_suffix='.a'
23947                 cf_depsuf=$cf_suffix
23948                 ;;
23949         esac
23950         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23951         then
23952                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23953                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23954         fi
23955
23956                         cf_libname=$cf_dir
23957                         test "$cf_dir" = c++ && cf_libname=ncurses++
23958                         if test $cf_item = shared ; then
23959                                 if test -n "${LIB_SUFFIX}"
23960                                 then
23961                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23962                                 else
23963                                         cf_shared_suffix="$cf_suffix"
23964                                 fi
23965                                 if test "$cf_cv_do_symlinks" = yes ; then
23966                                         cf_version_name=
23967
23968                                         case "$cf_cv_shlib_version" in
23969                                         (rel)
23970                                                 cf_version_name=REL_VERSION
23971                                                 ;;
23972                                         (abi)
23973                                                 cf_version_name=ABI_VERSION
23974                                                 ;;
23975                                         esac
23976
23977                                         if test -n "$cf_version_name"
23978                                         then
23979                                                 case "$cf_cv_system_name" in
23980                                                 (darwin*)
23981                                                         # "w", etc?
23982                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23983                                                         ;;
23984                                                 (*)
23985                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23986                                                         ;;
23987                                                 esac
23988                                         fi
23989                                         if test -n "${USE_LIB_SUFFIX}"
23990                                         then
23991                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23992                                         else
23993                                                 cf_shared_suffix="$cf_suffix"
23994                                         fi
23995                                 fi
23996                                 # cygwin needs import library, and has unique naming convention
23997                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23998                                 # use 'cyg' prefix for shared lib.
23999                                 case $cf_cv_shlib_version in
24000                                 (cygdll)
24001                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24002                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
24003                                         ;;
24004                                 (msysdll)
24005                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24006                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
24007                                         ;;
24008                                 (mingw)
24009                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24010                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
24011                                         ;;
24012                                 (*)
24013                                         cf_add_lib=
24014                                         ;;
24015                                 esac
24016                                 if test -n "$cf_add_lib"
24017                                 then
24018                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24019                                         continue
24020                                 fi
24021                         fi
24022                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
24023                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24024                 done
24025
24026                 if test $cf_dir = ncurses ; then
24027                         cf_subsets="$LIB_SUBSETS"
24028                         cf_r_parts="$cf_subsets"
24029                         cf_liblist="$Libs_To_Make"
24030
24031                         while test -n "$cf_r_parts"
24032                         do
24033                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
24034                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
24035                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
24036                                         cf_add_lib=
24037                                         case $cf_l_parts in
24038                                         (*termlib*)
24039                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
24040                                                 ;;
24041                                         (*ticlib*)
24042                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
24043                                                 ;;
24044                                         (*)
24045                                                 break
24046                                                 ;;
24047                                         esac
24048                                         if test -n "$cf_add_lib"; then
24049                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
24050                                         fi
24051                                 else
24052                                         break
24053                                 fi
24054                         done
24055                 else
24056                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
24057                 fi
24058
24059                 if test $cf_dir = c++; then
24060                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
24061                                 cf_list=
24062                                 for cf_item in $Libs_To_Make
24063                                 do
24064                                         case $cf_item in
24065                                         (*.a)
24066                                                 ;;
24067                                         (*)
24068                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
24069                                                 ;;
24070                                         esac
24071                                         for cf_test in $cf_list
24072                                         do
24073                                                 if test "$cf_test" = "$cf_item"
24074                                                 then
24075                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
24076                                                         cf_item=
24077                                                         break
24078                                                 fi
24079                                         done
24080                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
24081                                 done
24082                                 Libs_To_Make="$cf_list"
24083                         fi
24084                 fi
24085
24086                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
24087                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
24088                         $cf_dir/Makefile >$cf_dir/Makefile.out
24089                 mv $cf_dir/Makefile.out $cf_dir/Makefile
24090
24091                 $AWK -f $srcdir/mk-0th.awk \
24092                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
24093                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24094
24095                 for cf_subset in $cf_subsets
24096                 do
24097                         cf_subdirs=
24098                         for cf_item in $cf_LIST_MODELS
24099                         do
24100
24101                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
24102
24103 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24104
24105                         CXX_MODEL=$cf_ITEM
24106                         if test "$CXX_MODEL" = SHARED; then
24107                                 case $cf_cv_shlib_version in
24108                                 (cygdll|msysdll|mingw)
24109                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
24110
24111 echo "${as_me:-configure}:24111: testing overriding CXX_MODEL to SHARED ..." 1>&5
24112
24113                                         with_shared_cxx=yes
24114                                         ;;
24115                                 (*)
24116                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
24117                                         ;;
24118                                 esac
24119                         fi
24120
24121         case X$cf_item in
24122         (Xlibtool)
24123                 cf_suffix='.la'
24124                 cf_depsuf=$cf_suffix
24125                 ;;
24126         (Xdebug)
24127                 cf_suffix='_g.a'
24128                 cf_depsuf=$cf_suffix
24129                 ;;
24130         (Xprofile)
24131                 cf_suffix='_p.a'
24132                 cf_depsuf=$cf_suffix
24133                 ;;
24134         (Xshared)
24135                 case $cf_cv_system_name in
24136                 (aix[5-7]*)
24137                         cf_suffix='.so'
24138                         cf_depsuf=$cf_suffix
24139                         ;;
24140                 (cygwin*|msys*|mingw*)
24141                         cf_suffix='.dll'
24142                         cf_depsuf='.dll.a'
24143                         ;;
24144                 (darwin*)
24145                         cf_suffix='.dylib'
24146                         cf_depsuf=$cf_suffix
24147                         ;;
24148                 (hpux*)
24149                         case $target in
24150                         (ia64*)
24151                                 cf_suffix='.so'
24152                                 cf_depsuf=$cf_suffix
24153                                 ;;
24154                         (*)
24155                                 cf_suffix='.sl'
24156                                 cf_depsuf=$cf_suffix
24157                                 ;;
24158                         esac
24159                         ;;
24160                 (*)
24161                         cf_suffix='.so'
24162                         cf_depsuf=$cf_suffix
24163                         ;;
24164                 esac
24165                 ;;
24166         (*)
24167                 cf_suffix='.a'
24168                 cf_depsuf=$cf_suffix
24169                 ;;
24170         esac
24171         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24172         then
24173                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24174                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24175         fi
24176
24177         case $cf_item in
24178         (libtool) cf_subdir='obj_lo'  ;;
24179         (normal)  cf_subdir='objects' ;;
24180         (debug)   cf_subdir='obj_g' ;;
24181         (profile) cf_subdir='obj_p' ;;
24182         (shared)
24183                 case $cf_cv_system_name in
24184                 (cygwin|msys)
24185                         cf_subdir='objects' ;;
24186                 (*)
24187                         cf_subdir='obj_s' ;;
24188                 esac
24189         esac
24190
24191                         # Test for case where we build libtinfo with a different name.
24192                         cf_libname=$cf_dir
24193                         if test $cf_dir = ncurses ; then
24194                                 case $cf_subset in
24195                                 (*base*)
24196                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
24197                                         ;;
24198                                 (*termlib*)
24199                                         cf_libname=$TINFO_LIB_SUFFIX
24200                                         ;;
24201                                 (ticlib*)
24202                                         cf_libname=$TICS_LIB_SUFFIX
24203                                         ;;
24204                                 esac
24205                         elif test $cf_dir = c++ ; then
24206                                 cf_libname=ncurses++$USE_LIB_SUFFIX
24207                         else
24208                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
24209                         fi
24210                         if test -n "${USE_ARG_SUFFIX}" ; then
24211                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
24212                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
24213                         fi
24214
24215                         # These dependencies really are for development, not
24216                         # builds, but they are useful in porting, too.
24217                         cf_depend="../include/ncurses_cfg.h"
24218                         if test "$srcdir" = "."; then
24219                                 cf_reldir="."
24220                         else
24221                                 cf_reldir="\${srcdir}"
24222                         fi
24223
24224                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
24225                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
24226                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
24227                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
24228                         fi
24229
24230                         cf_dir_suffix=
24231                         old_cf_suffix="$cf_suffix"
24232                         if test "$cf_cv_shlib_version_infix" = yes ; then
24233                         if test -n "$USE_LIB_SUFFIX" ; then
24234                                 case $USE_LIB_SUFFIX in
24235                                 (tw*)
24236                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
24237                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
24238                                         cf_dir_suffix=tw$EXTRA_SUFFIX
24239                                         ;;
24240                                 (t*)
24241                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
24242                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
24243                                         cf_dir_suffix=t$EXTRA_SUFFIX
24244                                         ;;
24245                                 (w*)
24246                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
24247                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
24248                                         cf_dir_suffix=w$EXTRA_SUFFIX
24249                                         ;;
24250                                 (*)
24251                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
24252                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
24253                                         cf_dir_suffix=$EXTRA_SUFFIX
24254                                         ;;
24255                                 esac
24256                         fi
24257                         fi
24258
24259                         $AWK -f $srcdir/mk-1st.awk \
24260                                 name=${cf_libname}${cf_dir_suffix} \
24261                                 traces=$LIB_TRACING \
24262                                 MODEL=$cf_ITEM \
24263                                 CXX_MODEL=$CXX_MODEL \
24264                                 model=$cf_subdir \
24265                                 prefix=$cf_prefix \
24266                                 suffix=$cf_suffix \
24267                                 subset=$cf_subset \
24268                                 driver=$cf_cv_term_driver \
24269                                 SymLink="$LN_S" \
24270                                 TermlibRoot=$TINFO_NAME \
24271                                 TermlibSuffix=$TINFO_SUFFIX \
24272                                 ShlibVer=$cf_cv_shlib_version \
24273                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
24274                                 ReLink=${cf_cv_do_relink:-no} \
24275                                 DoLinks=$cf_cv_do_symlinks \
24276                                 rmSoLocs=$cf_cv_rm_so_locs \
24277                                 ldconfig="$LDCONFIG" \
24278                                 overwrite=$WITH_OVERWRITE \
24279                                 depend="$cf_depend" \
24280                                 host="$host" \
24281                                 libtool_version="$LIBTOOL_VERSION" \
24282                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24283
24284                         cf_suffix="$old_cf_suffix"
24285
24286                         for cf_subdir2 in $cf_subdirs lib
24287                         do
24288                                 test $cf_subdir = $cf_subdir2 && break
24289                         done
24290                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
24291                         $AWK -f $srcdir/mk-2nd.awk \
24292                                 name=$cf_dir \
24293                                 traces=$LIB_TRACING \
24294                                 MODEL=$cf_ITEM \
24295                                 model=$cf_subdir \
24296                                 subset=$cf_subset \
24297                                 srcdir=$srcdir \
24298                                 echo=$WITH_ECHO \
24299                                 crenames=$cf_cv_prog_CC_c_o \
24300                                 cxxrenames=$cf_cv_prog_CXX_c_o \
24301                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24302                         cf_subdirs="$cf_subdirs $cf_subdir"
24303                         done
24304                 done
24305         fi
24306
24307         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
24308 done
24309
24310 for cf_dir in $SRC_SUBDIRS
24311 do
24312         if test ! -d $srcdir/$cf_dir ; then
24313                 continue
24314         fi
24315
24316         if test -f $cf_dir/Makefile ; then
24317                 case "$cf_dir" in
24318                 (Ada95)
24319                         echo 'libs \' >> Makefile
24320                         echo 'install.libs \' >> Makefile
24321                         echo 'uninstall.libs ::' >> Makefile
24322                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
24323                         ;;
24324                 esac
24325         fi
24326
24327         if test -f $srcdir/$cf_dir/modules; then
24328                 echo >> Makefile
24329                 if test -f $srcdir/$cf_dir/headers; then
24330 cat >> Makefile <<CF_EOF
24331 install.includes \\
24332 uninstall.includes \\
24333 CF_EOF
24334                 fi
24335 if test "$cf_dir" != "c++" ; then
24336 echo 'lint \' >> Makefile
24337 fi
24338 cat >> Makefile <<CF_EOF
24339 libs \\
24340 lintlib \\
24341 install.libs \\
24342 uninstall.libs \\
24343 install.$cf_dir \\
24344 uninstall.$cf_dir ::
24345         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24346 CF_EOF
24347         elif test -f $srcdir/$cf_dir/headers; then
24348 cat >> Makefile <<CF_EOF
24349
24350 libs \\
24351 install.libs \\
24352 uninstall.libs \\
24353 install.includes \\
24354 uninstall.includes ::
24355         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24356 CF_EOF
24357 fi
24358 done
24359
24360 if test "x$cf_with_db_install" = xyes; then
24361 cat >> Makefile <<CF_EOF
24362
24363 install.libs uninstall.libs \\
24364 install.data uninstall.data ::
24365 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24366 CF_EOF
24367 else
24368 cat >> Makefile <<CF_EOF
24369
24370 install.libs uninstall.libs ::
24371         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24372 CF_EOF
24373 fi
24374
24375 if test "x$cf_with_manpages" = xyes; then
24376 cat >> Makefile <<CF_EOF
24377
24378 install.man \\
24379 uninstall.man ::
24380         cd man && \${MAKE} \${TOP_MFLAGS} \$@
24381 CF_EOF
24382 fi
24383
24384 cat >> Makefile <<CF_EOF
24385
24386 distclean ::
24387         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
24388         rm -f headers.sh headers.sed mk_shared_lib.sh
24389         rm -f edit_man.* man_alias.*
24390         rm -rf \${DIRS_TO_MAKE}
24391 CF_EOF
24392
24393 # Special case: tack's manpage lives in its own directory.
24394 if test "x$cf_with_manpages" = xyes; then
24395 if test -d tack ; then
24396 if test -f $srcdir/$tack.h; then
24397 cat >> Makefile <<CF_EOF
24398
24399 install.man \\
24400 uninstall.man ::
24401         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
24402 CF_EOF
24403 fi
24404 fi
24405 fi
24406
24407 rm -f headers.sed headers.sh
24408
24409 echo creating headers.sh
24410 cat >headers.sh <<CF_EOF
24411 #! $SHELL
24412 # This shell script is generated by the 'configure' script.  It is invoked in a
24413 # subdirectory of the build tree.  It generates a sed-script in the parent
24414 # directory that is used to adjust includes for header files that reside in a
24415 # subdirectory of /usr/include, etc.
24416 PRG=""
24417 while test \$# != 3
24418 do
24419 PRG="\$PRG \$1"; shift
24420 done
24421 DST=\$1
24422 REF=\$2
24423 SRC=\$3
24424 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
24425 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
24426 echo installing \$SRC in \$DST
24427 CF_EOF
24428
24429 if test $WITH_CURSES_H = yes; then
24430         cat >>headers.sh <<CF_EOF
24431 case \$DST in
24432 (/*/include/*)
24433         END=\`basename \$DST\`
24434         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24435         do
24436                 NAME=\`basename \$i\`
24437                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24438         done
24439         ;;
24440 (*)
24441         echo "" >> \$TMPSED
24442         ;;
24443 esac
24444 CF_EOF
24445
24446 else
24447         cat >>headers.sh <<CF_EOF
24448 case \$DST in
24449 (/*/include/*)
24450         END=\`basename \$DST\`
24451         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24452         do
24453                 NAME=\`basename \$i\`
24454                 if test "\$NAME" = "curses.h"
24455                 then
24456                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24457                         NAME=ncurses.h
24458                 fi
24459                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24460         done
24461         ;;
24462 (*)
24463         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24464         ;;
24465 esac
24466 CF_EOF
24467 fi
24468 cat >>headers.sh <<CF_EOF
24469 rm -f \$TMPSRC
24470 sed -f \$TMPSED \$SRC > \$TMPSRC
24471 NAME=\`basename \$SRC\`
24472 CF_EOF
24473 if test $WITH_CURSES_H != yes; then
24474         cat >>headers.sh <<CF_EOF
24475 test "\$NAME" = "curses.h" && NAME=ncurses.h
24476 CF_EOF
24477 fi
24478 cat >>headers.sh <<CF_EOF
24479 # Just in case someone gzip'd manpages, remove the conflicting copy.
24480 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
24481
24482 eval \$PRG \$TMPSRC \$DST/\$NAME
24483 rm -f \$TMPSRC \$TMPSED
24484 CF_EOF
24485
24486 chmod 0755 headers.sh
24487
24488 for cf_dir in $SRC_SUBDIRS
24489 do
24490         if test ! -d $srcdir/$cf_dir ; then
24491                 continue
24492         fi
24493
24494         if test -f $srcdir/$cf_dir/headers; then
24495                 $AWK -f $srcdir/mk-hdr.awk \
24496                         subset="$LIB_SUBSETS" \
24497                         compat="$WITH_CURSES_H" \
24498                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
24499         fi
24500
24501         if test -f $srcdir/$cf_dir/modules; then
24502                 if test "$cf_dir" != "c++" ; then
24503                         cat >>$cf_dir/Makefile <<"CF_EOF"
24504 depend : ${AUTO_SRC}
24505         makedepend -- ${CPPFLAGS} -- ${C_SRC}
24506
24507 # DO NOT DELETE THIS LINE -- make depend depends on it.
24508 CF_EOF
24509                 fi
24510         fi
24511 done
24512
24513 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24514 if test -z "$USE_OLD_MAKERULES" ; then
24515         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
24516 fi
24517 fi
24518  ;;
24519   esac
24520 done
24521 EOF
24522
24523 cat >>$CONFIG_STATUS <<\EOF
24524
24525 { (exit 0); exit 0; }
24526 EOF
24527 chmod +x $CONFIG_STATUS
24528 ac_clean_files=$ac_clean_files_save
24529
24530 # configure is writing to config.log, and then calls config.status.
24531 # config.status does its own redirection, appending to config.log.
24532 # Unfortunately, on DOS this fails, as config.log is still kept open
24533 # by configure, so config.status won't be able to write to it; its
24534 # output is simply discarded.  So we exec the FD to /dev/null,
24535 # effectively closing config.log, so it can be properly (re)opened and
24536 # appended to by config.status.  When coming back to configure, we
24537 # need to make the FD available again.
24538 if test "$no_create" != yes; then
24539   ac_cs_success=:
24540   exec 5>/dev/null
24541   $SHELL $CONFIG_STATUS || ac_cs_success=false
24542   exec 5>>config.log
24543   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24544   # would make configure fail if this is the last instruction.
24545   $ac_cs_success || { (exit 1); exit 1; }
24546 fi
24547 ${MAKE:-make} preinstall