]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.0 - patch 20170128
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.633 .
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   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
777   --with-bool=TYPE        override fallback type of bool variable
778   --with-caps=alt         compile with alternate Caps file
779   --with-chtype=TYPE      override type of chtype
780   --with-ospeed=TYPE      override type of ospeed variable
781   --with-mmask-t=TYPE     override type of mmask_t
782   --with-ccharw-max=XXX   override size CCHARW_MAX
783   --with-tparm-arg=TYPE   override parameter type of tparm
784   --with-rcs-ids          compile-in RCS identifiers
785 Options to Specify How Manpages are Installed:
786   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
787                           optionally formatted/catonly, e.g., gzip,formatted
788   --with-manpage-renames  specify manpage-renaming
789   --with-manpage-aliases  specify manpage-aliases using .so
790   --with-manpage-symlinks specify manpage-aliases using symlinks
791   --with-manpage-tbl      specify manpage processing with tbl
792 Extensions:
793   --disable-ext-funcs     disable function-extensions
794   --enable-sp-funcs       enable SCREEN-extensions
795   --enable-term-driver    enable terminal-driver
796   --enable-const          compile with extra/non-standard const
797   --enable-ext-colors     compile for 256-color support
798   --enable-ext-mouse      compile for extended mouse-encoding
799   --enable-ext-putwin     compile with extended putwin/screendump
800   --enable-no-padding     compile with $NCURSES_NO_PADDING code
801   --enable-signed-char    compile using signed Boolean's in term.h
802   --enable-sigwinch       compile with SIGWINCH handler
803   --enable-tcap-names     compile with user-definable terminal capabilities
804 Development Code:
805   --without-develop       disable development options
806   --enable-hard-tabs      compile with hard-tabs code
807   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
808 Experimental Code:
809   --disable-assumed-color do not assume anything about default-colors
810   --disable-hashmap       compile without hashmap scrolling-optimization
811   --enable-colorfgbg      compile-in experimental $COLORFGBG code
812   --enable-interop        compile-in interop bindings
813   --with-pthread          use POSIX thread library
814   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
815   --enable-weak-symbols   enable weak-symbols for pthreads
816   --enable-reentrant      compile with reentrant code
817   --with-wrap-prefix=XXX  override prefix used for public variables
818   --enable-safe-sprintf   compile with experimental safe-sprintf code
819   --disable-scroll-hints  compile without scroll-hints code
820   --enable-wgetch-events  compile with wgetch-events code
821 Testing/development Options:
822   --disable-echo          do not display "compiling" commands
823   --enable-warnings       build: turn on GCC compiler warnings
824   --enable-string-hacks   work around bogus compiler/loader warnings
825   --enable-assertions     test: turn on generation of assertion code
826   --with-dmalloc          test: use Gray Watson's dmalloc library
827   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
828   --with-valgrind         test: use valgrind
829   --disable-leaks         test: free permanent memory, analyze leaks
830   --enable-expanded       test: generate functions for certain macros
831   --disable-macros        test: use functions rather than macros
832   --with-trace            test: add trace() function to all models of ncurses
833   --disable-gnat-projects test: disable GNAT projects even if usable
834 Ada95 Binding Options:
835   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
836   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
837   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
838   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
839
840 Some influential environment variables:
841   CC          C compiler command
842   CFLAGS      C compiler flags
843   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
844               nonstandard directory <lib dir>
845   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
846               headers in a nonstandard directory <include dir>
847   CPP         C preprocessor
848   CXX         C++ compiler command
849   CXXFLAGS    C++ compiler flags
850   CXXCPP      C++ preprocessor
851
852 Use these variables to override the choices made by `configure' or to help
853 it to find libraries and programs with nonstandard names/locations.
854
855 EOF
856 fi
857
858 if test "$ac_init_help" = "recursive"; then
859   # If there are subdirs, report their specific --help.
860   ac_popdir=`pwd`
861   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
862     cd $ac_subdir
863     # A "../" for each directory in /$ac_subdir.
864     ac_dots=`echo $ac_subdir |
865              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
866
867     case $srcdir in
868     .) # No --srcdir option.  We are building in place.
869       ac_sub_srcdir=$srcdir ;;
870     [\\/]* | ?:[\\/]* ) # Absolute path.
871       ac_sub_srcdir=$srcdir/$ac_subdir ;;
872     *) # Relative path.
873       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
874     esac
875
876     # Check for guested configure; otherwise get Cygnus style configure.
877     if test -f $ac_sub_srcdir/configure.gnu; then
878       echo
879       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
880     elif test -f $ac_sub_srcdir/configure; then
881       echo
882       $SHELL $ac_sub_srcdir/configure  --help=recursive
883     elif test -f $ac_sub_srcdir/configure.ac ||
884            test -f $ac_sub_srcdir/configure.in; then
885       echo
886       $ac_configure --help
887     else
888       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
889     fi
890     cd $ac_popdir
891   done
892 fi
893
894 test -n "$ac_init_help" && exit 0
895 if $ac_init_version; then
896   cat <<\EOF
897
898 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
899 Free Software Foundation, Inc.
900 This configure script is free software; the Free Software Foundation
901 gives unlimited permission to copy, distribute and modify it.
902 EOF
903   exit 0
904 fi
905 exec 5>config.log
906 cat >&5 <<EOF
907 This file contains any messages produced by compilers while
908 running configure, to aid debugging if configure makes a mistake.
909
910 It was created by $as_me, which was
911 generated by GNU Autoconf 2.52.20150926.  Invocation command line was
912
913   $ $0 $@
914
915 EOF
916 {
917 cat <<_ASUNAME
918 ## ---------- ##
919 ## Platform.  ##
920 ## ---------- ##
921
922 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
923 uname -m = `(uname -m) 2>/dev/null || echo unknown`
924 uname -r = `(uname -r) 2>/dev/null || echo unknown`
925 uname -s = `(uname -s) 2>/dev/null || echo unknown`
926 uname -v = `(uname -v) 2>/dev/null || echo unknown`
927
928 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
929 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
930
931 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
932 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
933 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
934 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
935 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
936 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
937 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
938
939 PATH = $PATH
940
941 _ASUNAME
942 } >&5
943
944 cat >&5 <<EOF
945 ## ------------ ##
946 ## Core tests.  ##
947 ## ------------ ##
948
949 EOF
950
951 # Keep a trace of the command line.
952 # Strip out --no-create and --no-recursion so they do not pile up.
953 # Also quote any args containing shell meta-characters.
954 ac_configure_args=
955 ac_sep=
956 for ac_arg
957 do
958   case $ac_arg in
959   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
960   | --no-cr | --no-c) ;;
961   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
962   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
963   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
964     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
965     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
966     ac_sep=" " ;;
967   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
968      ac_sep=" " ;;
969   esac
970   # Get rid of the leading space.
971 done
972
973 # When interrupted or exit'd, cleanup temporary files, and complete
974 # config.log.  We remove comments because anyway the quotes in there
975 # would cause problems or look ugly.
976 trap 'exit_status=$?
977   # Save into config.log some information that might help in debugging.
978   echo >&5
979   echo "## ----------------- ##" >&5
980   echo "## Cache variables.  ##" >&5
981   echo "## ----------------- ##" >&5
982   echo >&5
983   # The following way of writing the cache mishandles newlines in values,
984 {
985   (set) 2>&1 |
986     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
987     *ac_space=\ *)
988       sed -n \
989         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
990           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
991       ;;
992     *)
993       sed -n \
994         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
995       ;;
996     esac;
997 } >&5
998   sed "/^$/d" confdefs.h >conftest.log
999   if test -s conftest.log; then
1000     echo >&5
1001     echo "## ------------ ##" >&5
1002     echo "## confdefs.h.  ##" >&5
1003     echo "## ------------ ##" >&5
1004     echo >&5
1005     cat conftest.log >&5
1006   fi
1007   (echo; echo) >&5
1008   test "$ac_signal" != 0 &&
1009     echo "$as_me: caught signal $ac_signal" >&5
1010   echo "$as_me: exit $exit_status" >&5
1011   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1012     exit $exit_status
1013      ' 0
1014 for ac_signal in 1 2 13 15; do
1015   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1016 done
1017 ac_signal=0
1018
1019 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1020 rm -rf conftest* confdefs.h
1021 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1022 echo >confdefs.h
1023
1024 # Let the site file select an alternate cache file if it wants to.
1025 # Prefer explicitly selected file to automatically selected ones.
1026 if test -z "$CONFIG_SITE"; then
1027   if test "x$prefix" != xNONE; then
1028     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1029   else
1030     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1031   fi
1032 fi
1033 for ac_site_file in $CONFIG_SITE; do
1034   if test -r "$ac_site_file"; then
1035     { echo "$as_me:1035: loading site script $ac_site_file" >&5
1036 echo "$as_me: loading site script $ac_site_file" >&6;}
1037     cat "$ac_site_file" >&5
1038     . "$ac_site_file"
1039   fi
1040 done
1041
1042 if test -r "$cache_file"; then
1043   # Some versions of bash will fail to source /dev/null (special
1044   # files actually), so we avoid doing that.
1045   if test -f "$cache_file"; then
1046     { echo "$as_me:1046: loading cache $cache_file" >&5
1047 echo "$as_me: loading cache $cache_file" >&6;}
1048     case $cache_file in
1049       [\\/]* | ?:[\\/]* ) . $cache_file;;
1050       *)                      . ./$cache_file;;
1051     esac
1052   fi
1053 else
1054   { echo "$as_me:1054: creating cache $cache_file" >&5
1055 echo "$as_me: creating cache $cache_file" >&6;}
1056   >$cache_file
1057 fi
1058
1059 # Check that the precious variables saved in the cache have kept the same
1060 # value.
1061 ac_cache_corrupted=false
1062 for ac_var in `(set) 2>&1 |
1063                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1064   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1065   eval ac_new_set=\$ac_env_${ac_var}_set
1066   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1067   eval ac_new_val="\$ac_env_${ac_var}_value"
1068   case $ac_old_set,$ac_new_set in
1069     set,)
1070       { echo "$as_me:1070: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1071 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1072       ac_cache_corrupted=: ;;
1073     ,set)
1074       { echo "$as_me:1074: error: \`$ac_var' was not set in the previous run" >&5
1075 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1076       ac_cache_corrupted=: ;;
1077     ,);;
1078     *)
1079       if test "x$ac_old_val" != "x$ac_new_val"; then
1080         { echo "$as_me:1080: error: \`$ac_var' has changed since the previous run:" >&5
1081 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1082         { echo "$as_me:1082:   former value:  $ac_old_val" >&5
1083 echo "$as_me:   former value:  $ac_old_val" >&2;}
1084         { echo "$as_me:1084:   current value: $ac_new_val" >&5
1085 echo "$as_me:   current value: $ac_new_val" >&2;}
1086         ac_cache_corrupted=:
1087       fi;;
1088   esac
1089   # Pass precious variables to config.status.  It doesn't matter if
1090   # we pass some twice (in addition to the command line arguments).
1091   if test "$ac_new_set" = set; then
1092     case $ac_new_val in
1093     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1094       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1095       ac_configure_args="$ac_configure_args '$ac_arg'"
1096       ;;
1097     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1098        ;;
1099     esac
1100   fi
1101 done
1102 if $ac_cache_corrupted; then
1103   { echo "$as_me:1103: error: changes in the environment can compromise the build" >&5
1104 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1105   { { echo "$as_me:1105: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1106 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1107    { (exit 1); exit 1; }; }
1108 fi
1109
1110 ac_ext=c
1111 ac_cpp='$CPP $CPPFLAGS'
1112 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1113 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1114 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1115 ac_main_return=return
1116
1117 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1118   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1119                    ECHO_T='     ' ;;
1120   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1121   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1122 esac
1123 echo "#! $SHELL" >conftest.sh
1124 echo  "exit 0"   >>conftest.sh
1125 chmod +x conftest.sh
1126 if { (echo "$as_me:1126: PATH=\".;.\"; conftest.sh") >&5
1127   (PATH=".;."; conftest.sh) 2>&5
1128   ac_status=$?
1129   echo "$as_me:1129: \$? = $ac_status" >&5
1130   (exit $ac_status); }; then
1131   ac_path_separator=';'
1132 else
1133   ac_path_separator=:
1134 fi
1135 PATH_SEPARATOR="$ac_path_separator"
1136 rm -f conftest.sh
1137
1138 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1139
1140 top_builddir=`pwd`
1141
1142 echo "$as_me:1142: checking for egrep" >&5
1143 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1144 if test "${ac_cv_prog_egrep+set}" = set; then
1145   echo $ECHO_N "(cached) $ECHO_C" >&6
1146 else
1147   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1148                 then ac_cv_prog_egrep='grep -E'
1149                 else ac_cv_prog_egrep='egrep'
1150         fi
1151 fi
1152 echo "$as_me:1152: result: $ac_cv_prog_egrep" >&5
1153 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1154         EGREP=$ac_cv_prog_egrep
1155
1156         test -z "$EGREP" && { { echo "$as_me:1156: error: No egrep program found" >&5
1157 echo "$as_me: error: No egrep program found" >&2;}
1158    { (exit 1); exit 1; }; }
1159
1160 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1161 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1162 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1163 cf_cv_abi_version=${NCURSES_MAJOR}
1164 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1165 cf_cv_timestamp=`date`
1166 echo "$as_me:1166: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1167 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1168
1169 if test -f $srcdir/VERSION ; then
1170         echo "$as_me:1170: checking for package version" >&5
1171 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1172
1173         # if there are not enough fields, cut returns the last one...
1174         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1175         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1176         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1177
1178         # this is how CF_BUNDLED_INTL uses $VERSION:
1179         VERSION="$cf_field1"
1180
1181         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1182         test -z "$VERSION_MAJOR" && { { echo "$as_me:1182: error: missing major-version" >&5
1183 echo "$as_me: error: missing major-version" >&2;}
1184    { (exit 1); exit 1; }; }
1185
1186         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1187         test -z "$VERSION_MINOR" && { { echo "$as_me:1187: error: missing minor-version" >&5
1188 echo "$as_me: error: missing minor-version" >&2;}
1189    { (exit 1); exit 1; }; }
1190
1191         echo "$as_me:1191: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1192 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1193
1194         echo "$as_me:1194: checking for package patch date" >&5
1195 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1196         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1197         case .$VERSION_PATCH in
1198         (.)
1199                 { { echo "$as_me:1199: error: missing patch-date $VERSION_PATCH" >&5
1200 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1201    { (exit 1); exit 1; }; }
1202                 ;;
1203         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1204                 ;;
1205         (*)
1206                 { { echo "$as_me:1206: error: illegal patch-date $VERSION_PATCH" >&5
1207 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1208    { (exit 1); exit 1; }; }
1209                 ;;
1210         esac
1211         echo "$as_me:1211: result: $VERSION_PATCH" >&5
1212 echo "${ECHO_T}$VERSION_PATCH" >&6
1213 else
1214         { { echo "$as_me:1214: error: did not find $srcdir/VERSION" >&5
1215 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1216    { (exit 1); exit 1; }; }
1217 fi
1218
1219 # show the actual data that we have for versions:
1220 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1221
1222 echo "${as_me:-configure}:1222: testing ABI VERSION $VERSION ..." 1>&5
1223
1224 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1225
1226 echo "${as_me:-configure}:1226: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1227
1228 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1229
1230 echo "${as_me:-configure}:1230: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1231
1232 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1233
1234 echo "${as_me:-configure}:1234: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1235
1236         cf_PACKAGE=NCURSES
1237         PACKAGE=ncurses
1238
1239 cat >>confdefs.h <<EOF
1240 #define PACKAGE "$PACKAGE"
1241 EOF
1242
1243 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1244
1245         cat >>confdefs.h <<EOF
1246 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1247 EOF
1248
1249         cat >>confdefs.h <<EOF
1250 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1251 EOF
1252
1253 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1254
1255 # Check whether --with-rel-version or --without-rel-version was given.
1256 if test "${with_rel_version+set}" = set; then
1257   withval="$with_rel_version"
1258   { echo "$as_me:1258: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1259 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1260  cf_cv_rel_version=$withval
1261 fi;
1262
1263  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1264  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1265
1266 if test -n "$NCURSES_MAJOR" ; then
1267   case $NCURSES_MAJOR in
1268   ([0-9]*)
1269         ;;
1270   (*)
1271         { { echo "$as_me:1271: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1272 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1273    { (exit 1); exit 1; }; }
1274         ;;
1275   esac
1276 else
1277   { { echo "$as_me:1277: error: Release major-version value is empty" >&5
1278 echo "$as_me: error: Release major-version value is empty" >&2;}
1279    { (exit 1); exit 1; }; }
1280 fi
1281
1282 if test -n "$NCURSES_MINOR" ; then
1283   case $NCURSES_MINOR in
1284   ([0-9]*)
1285         ;;
1286   (*)
1287         { { echo "$as_me:1287: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1288 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1289    { (exit 1); exit 1; }; }
1290         ;;
1291   esac
1292 else
1293   { { echo "$as_me:1293: error: Release minor-version value is empty" >&5
1294 echo "$as_me: error: Release minor-version value is empty" >&2;}
1295    { (exit 1); exit 1; }; }
1296 fi
1297
1298 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1299
1300 # Check whether --with-abi-version or --without-abi-version was given.
1301 if test "${with_abi_version+set}" = set; then
1302   withval="$with_abi_version"
1303
1304         if test "x$cf_cv_abi_version" != "x$withval"
1305         then
1306                 { echo "$as_me:1306: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1307 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1308                 case $cf_cv_rel_version in
1309                 (5.*)
1310                         cf_cv_rel_version=$withval.0
1311                         ;;
1312                 (6.*)
1313                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1314                         ;;
1315                 esac
1316         fi
1317         cf_cv_abi_version=$withval
1318 fi;
1319
1320 if test -n "$cf_cv_abi_version" ; then
1321   case $cf_cv_abi_version in
1322   ([0-9]*)
1323         ;;
1324   (*)
1325         { { echo "$as_me:1325: error: ABI version is not a number: $cf_cv_abi_version" >&5
1326 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1327    { (exit 1); exit 1; }; }
1328         ;;
1329   esac
1330 else
1331   { { echo "$as_me:1331: error: ABI version value is empty" >&5
1332 echo "$as_me: error: ABI version value is empty" >&2;}
1333    { (exit 1); exit 1; }; }
1334 fi
1335
1336 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1337 then
1338         case $cf_cv_rel_version in
1339         (5.*)
1340                 cf_cv_rel_version=$with_abi_version.0
1341                 ;;
1342         esac
1343 fi
1344
1345 ac_aux_dir=
1346 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1347   if test -f $ac_dir/install-sh; then
1348     ac_aux_dir=$ac_dir
1349     ac_install_sh="$ac_aux_dir/install-sh -c"
1350     break
1351   elif test -f $ac_dir/install.sh; then
1352     ac_aux_dir=$ac_dir
1353     ac_install_sh="$ac_aux_dir/install.sh -c"
1354     break
1355   elif test -f $ac_dir/shtool; then
1356     ac_aux_dir=$ac_dir
1357     ac_install_sh="$ac_aux_dir/shtool install -c"
1358     break
1359   fi
1360 done
1361 if test -z "$ac_aux_dir"; then
1362   { { echo "$as_me:1362: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1363 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1364    { (exit 1); exit 1; }; }
1365 fi
1366 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1367 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1368 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1369
1370 # Make sure we can run config.sub.
1371 $ac_config_sub sun4 >/dev/null 2>&1 ||
1372   { { echo "$as_me:1372: error: cannot run $ac_config_sub" >&5
1373 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1374    { (exit 1); exit 1; }; }
1375
1376 echo "$as_me:1376: checking build system type" >&5
1377 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1378 if test "${ac_cv_build+set}" = set; then
1379   echo $ECHO_N "(cached) $ECHO_C" >&6
1380 else
1381   ac_cv_build_alias=$build_alias
1382 test -z "$ac_cv_build_alias" &&
1383   ac_cv_build_alias=`$ac_config_guess`
1384 test -z "$ac_cv_build_alias" &&
1385   { { echo "$as_me:1385: error: cannot guess build type; you must specify one" >&5
1386 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1387    { (exit 1); exit 1; }; }
1388 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1389   { { echo "$as_me:1389: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1390 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1391    { (exit 1); exit 1; }; }
1392
1393 fi
1394 echo "$as_me:1394: result: $ac_cv_build" >&5
1395 echo "${ECHO_T}$ac_cv_build" >&6
1396 build=$ac_cv_build
1397 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1398 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1399 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1400
1401 echo "$as_me:1401: checking host system type" >&5
1402 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1403 if test "${ac_cv_host+set}" = set; then
1404   echo $ECHO_N "(cached) $ECHO_C" >&6
1405 else
1406   ac_cv_host_alias=$host_alias
1407 test -z "$ac_cv_host_alias" &&
1408   ac_cv_host_alias=$ac_cv_build_alias
1409 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1410   { { echo "$as_me:1410: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1411 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1412    { (exit 1); exit 1; }; }
1413
1414 fi
1415 echo "$as_me:1415: result: $ac_cv_host" >&5
1416 echo "${ECHO_T}$ac_cv_host" >&6
1417 host=$ac_cv_host
1418 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1419 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1420 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1421
1422 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1423         echo "$as_me:1423: checking target system type" >&5
1424 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1425 if test "${ac_cv_target+set}" = set; then
1426   echo $ECHO_N "(cached) $ECHO_C" >&6
1427 else
1428   ac_cv_target_alias=$target_alias
1429 test "x$ac_cv_target_alias" = "x" &&
1430   ac_cv_target_alias=$ac_cv_host_alias
1431 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1432   { { echo "$as_me:1432: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1433 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1434    { (exit 1); exit 1; }; }
1435
1436 fi
1437 echo "$as_me:1437: result: $ac_cv_target" >&5
1438 echo "${ECHO_T}$ac_cv_target" >&6
1439 target=$ac_cv_target
1440 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1441 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1442 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1443
1444 # The aliases save the names the user supplied, while $host etc.
1445 # will get canonicalized.
1446 test -n "$target_alias" &&
1447   test "$program_prefix$program_suffix$program_transform_name" = \
1448     NONENONEs,x,x, &&
1449   program_prefix=${target_alias}-
1450         system_name="$host_os"
1451 else
1452         system_name="`(uname -s -r) 2>/dev/null`"
1453         if test -z "$system_name" ; then
1454                 system_name="`(hostname) 2>/dev/null`"
1455         fi
1456 fi
1457 test -n "$system_name" &&
1458 cat >>confdefs.h <<EOF
1459 #define SYSTEM_NAME "$system_name"
1460 EOF
1461
1462 if test "${cf_cv_system_name+set}" = set; then
1463   echo $ECHO_N "(cached) $ECHO_C" >&6
1464 else
1465   cf_cv_system_name="$system_name"
1466 fi
1467
1468 test -z "$system_name" && system_name="$cf_cv_system_name"
1469 test -n "$cf_cv_system_name" && echo "$as_me:1469: result: Configuring for $cf_cv_system_name" >&5
1470 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1471
1472 if test ".$system_name" != ".$cf_cv_system_name" ; then
1473         echo "$as_me:1473: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1474 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1475         { { echo "$as_me:1475: error: \"Please remove config.cache and try again.\"" >&5
1476 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1477    { (exit 1); exit 1; }; }
1478 fi
1479
1480 # Check whether --with-system-type or --without-system-type was given.
1481 if test "${with_system_type+set}" = set; then
1482   withval="$with_system_type"
1483   { echo "$as_me:1483: WARNING: overriding system type to $withval" >&5
1484 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1485         cf_cv_system_name=$withval
1486         host_os=$withval
1487
1488 fi;
1489
1490 ###     Save the given $CFLAGS to allow user-override.
1491 cf_user_CFLAGS="$CFLAGS"
1492
1493 ###     Default install-location
1494
1495 echo "$as_me:1495: checking for prefix" >&5
1496 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1497 if test "x$prefix" = "xNONE" ; then
1498         case "$cf_cv_system_name" in
1499                 # non-vendor systems don't have a conflict
1500         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1501                 prefix=/usr
1502                 ;;
1503         (*)     prefix=$ac_default_prefix
1504                 ;;
1505         esac
1506 fi
1507 echo "$as_me:1507: result: $prefix" >&5
1508 echo "${ECHO_T}$prefix" >&6
1509
1510 if test "x$prefix" = "xNONE" ; then
1511 echo "$as_me:1511: checking for default include-directory" >&5
1512 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1513 test -n "$verbose" && echo 1>&6
1514 for cf_symbol in \
1515         $includedir \
1516         $includedir/ncurses \
1517         $prefix/include \
1518         $prefix/include/ncurses \
1519         /usr/local/include \
1520         /usr/local/include/ncurses \
1521         /usr/include \
1522         /usr/include/ncurses
1523 do
1524         cf_dir=`eval echo $cf_symbol`
1525         if test -f $cf_dir/curses.h ; then
1526         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1527                 includedir="$cf_symbol"
1528                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1529                 break
1530         fi
1531         fi
1532         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1533 done
1534 echo "$as_me:1534: result: $includedir" >&5
1535 echo "${ECHO_T}$includedir" >&6
1536 fi
1537
1538 ### Defaults for ncurses ABI
1539
1540 case x$cf_cv_abi_version in
1541 (x[6789])
1542         cf_dft_ext_colors=yes
1543         cf_dft_ext_const=yes
1544         cf_dft_ext_mouse=yes
1545         cf_dft_ext_putwin=yes
1546         cf_dft_ext_spfuncs=yes
1547         cf_dft_filter_syms=yes
1548         cf_dft_chtype=uint32_t
1549         cf_dft_mmask_t=uint32_t
1550         cf_dft_interop=yes
1551         cf_dft_tparm_arg=intptr_t
1552         cf_dft_with_lp64=yes
1553         ;;
1554 (*)
1555         cf_dft_ext_colors=no
1556         cf_dft_ext_const=no
1557         cf_dft_ext_mouse=no
1558         cf_dft_ext_putwin=no
1559         cf_dft_ext_spfuncs=no
1560         cf_dft_filter_syms=no
1561         cf_dft_chtype=auto
1562         cf_dft_mmask_t=auto
1563         cf_dft_interop=no
1564         cf_dft_tparm_arg=long
1565         cf_dft_with_lp64=no
1566         ;;
1567 esac
1568
1569 ###     Checks for programs.
1570
1571 # Check whether --with-ada or --without-ada was given.
1572 if test "${with_ada+set}" = set; then
1573   withval="$with_ada"
1574   cf_with_ada=$withval
1575 else
1576   cf_with_ada=yes
1577 fi;
1578 if test "x$cf_with_ada" = xyes
1579 then
1580         cf_PROG_CC="gnatgcc gcc cc"
1581 else
1582         cf_PROG_CC="gcc cc"
1583 fi
1584
1585 ac_ext=c
1586 ac_cpp='$CPP $CPPFLAGS'
1587 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1588 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1589 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1590 ac_main_return=return
1591 if test -n "$ac_tool_prefix"; then
1592   for ac_prog in $cf_PROG_CC
1593   do
1594     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1595 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1596 echo "$as_me:1596: checking for $ac_word" >&5
1597 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1598 if test "${ac_cv_prog_CC+set}" = set; then
1599   echo $ECHO_N "(cached) $ECHO_C" >&6
1600 else
1601   if test -n "$CC"; then
1602   ac_cv_prog_CC="$CC" # Let the user override the test.
1603 else
1604   ac_save_IFS=$IFS; IFS=$ac_path_separator
1605 ac_dummy="$PATH"
1606 for ac_dir in $ac_dummy; do
1607   IFS=$ac_save_IFS
1608   test -z "$ac_dir" && ac_dir=.
1609   $as_executable_p "$ac_dir/$ac_word" || continue
1610 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1611 echo "$as_me:1611: found $ac_dir/$ac_word" >&5
1612 break
1613 done
1614
1615 fi
1616 fi
1617 CC=$ac_cv_prog_CC
1618 if test -n "$CC"; then
1619   echo "$as_me:1619: result: $CC" >&5
1620 echo "${ECHO_T}$CC" >&6
1621 else
1622   echo "$as_me:1622: result: no" >&5
1623 echo "${ECHO_T}no" >&6
1624 fi
1625
1626     test -n "$CC" && break
1627   done
1628 fi
1629 if test -z "$CC"; then
1630   ac_ct_CC=$CC
1631   for ac_prog in $cf_PROG_CC
1632 do
1633   # Extract the first word of "$ac_prog", so it can be a program name with args.
1634 set dummy $ac_prog; ac_word=$2
1635 echo "$as_me:1635: checking for $ac_word" >&5
1636 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1637 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1638   echo $ECHO_N "(cached) $ECHO_C" >&6
1639 else
1640   if test -n "$ac_ct_CC"; then
1641   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1642 else
1643   ac_save_IFS=$IFS; IFS=$ac_path_separator
1644 ac_dummy="$PATH"
1645 for ac_dir in $ac_dummy; do
1646   IFS=$ac_save_IFS
1647   test -z "$ac_dir" && ac_dir=.
1648   $as_executable_p "$ac_dir/$ac_word" || continue
1649 ac_cv_prog_ac_ct_CC="$ac_prog"
1650 echo "$as_me:1650: found $ac_dir/$ac_word" >&5
1651 break
1652 done
1653
1654 fi
1655 fi
1656 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1657 if test -n "$ac_ct_CC"; then
1658   echo "$as_me:1658: result: $ac_ct_CC" >&5
1659 echo "${ECHO_T}$ac_ct_CC" >&6
1660 else
1661   echo "$as_me:1661: result: no" >&5
1662 echo "${ECHO_T}no" >&6
1663 fi
1664
1665   test -n "$ac_ct_CC" && break
1666 done
1667
1668   CC=$ac_ct_CC
1669 fi
1670
1671 test -z "$CC" && { { echo "$as_me:1671: error: no acceptable cc found in \$PATH" >&5
1672 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1673    { (exit 1); exit 1; }; }
1674
1675 # Provide some information about the compiler.
1676 echo "$as_me:1676:" \
1677      "checking for C compiler version" >&5
1678 ac_compiler=`set X $ac_compile; echo $2`
1679 { (eval echo "$as_me:1679: \"$ac_compiler --version </dev/null >&5\"") >&5
1680   (eval $ac_compiler --version </dev/null >&5) 2>&5
1681   ac_status=$?
1682   echo "$as_me:1682: \$? = $ac_status" >&5
1683   (exit $ac_status); }
1684 { (eval echo "$as_me:1684: \"$ac_compiler -v </dev/null >&5\"") >&5
1685   (eval $ac_compiler -v </dev/null >&5) 2>&5
1686   ac_status=$?
1687   echo "$as_me:1687: \$? = $ac_status" >&5
1688   (exit $ac_status); }
1689 { (eval echo "$as_me:1689: \"$ac_compiler -V </dev/null >&5\"") >&5
1690   (eval $ac_compiler -V </dev/null >&5) 2>&5
1691   ac_status=$?
1692   echo "$as_me:1692: \$? = $ac_status" >&5
1693   (exit $ac_status); }
1694
1695 cat >conftest.$ac_ext <<_ACEOF
1696 #line 1696 "configure"
1697 #include "confdefs.h"
1698
1699 int
1700 main ()
1701 {
1702
1703   ;
1704   return 0;
1705 }
1706 _ACEOF
1707 ac_clean_files_save=$ac_clean_files
1708 ac_clean_files="$ac_clean_files a.out a.exe"
1709 # Try to create an executable without -o first, disregard a.out.
1710 # It will help us diagnose broken compilers, and finding out an intuition
1711 # of exeext.
1712 echo "$as_me:1712: checking for C compiler default output" >&5
1713 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1714 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1715 if { (eval echo "$as_me:1715: \"$ac_link_default\"") >&5
1716   (eval $ac_link_default) 2>&5
1717   ac_status=$?
1718   echo "$as_me:1718: \$? = $ac_status" >&5
1719   (exit $ac_status); }; then
1720   # Find the output, starting from the most likely.  This scheme is
1721 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1722 # resort.
1723 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1724                 ls a.out conftest 2>/dev/null;
1725                 ls a.* conftest.* 2>/dev/null`; do
1726   case $ac_file in
1727     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1728     a.out ) # We found the default executable, but exeext='' is most
1729             # certainly right.
1730             break;;
1731     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1732           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1733           export ac_cv_exeext
1734           break;;
1735     * ) break;;
1736   esac
1737 done
1738 else
1739   echo "$as_me: failed program was:" >&5
1740 cat conftest.$ac_ext >&5
1741 { { echo "$as_me:1741: error: C compiler cannot create executables" >&5
1742 echo "$as_me: error: C compiler cannot create executables" >&2;}
1743    { (exit 77); exit 77; }; }
1744 fi
1745
1746 ac_exeext=$ac_cv_exeext
1747 echo "$as_me:1747: result: $ac_file" >&5
1748 echo "${ECHO_T}$ac_file" >&6
1749
1750 # Check the compiler produces executables we can run.  If not, either
1751 # the compiler is broken, or we cross compile.
1752 echo "$as_me:1752: checking whether the C compiler works" >&5
1753 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1754 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1755 # If not cross compiling, check that we can run a simple program.
1756 if test "$cross_compiling" != yes; then
1757   if { ac_try='./$ac_file'
1758   { (eval echo "$as_me:1758: \"$ac_try\"") >&5
1759   (eval $ac_try) 2>&5
1760   ac_status=$?
1761   echo "$as_me:1761: \$? = $ac_status" >&5
1762   (exit $ac_status); }; }; then
1763     cross_compiling=no
1764   else
1765     if test "$cross_compiling" = maybe; then
1766         cross_compiling=yes
1767     else
1768         { { echo "$as_me:1768: error: cannot run C compiled programs.
1769 If you meant to cross compile, use \`--host'." >&5
1770 echo "$as_me: error: cannot run C compiled programs.
1771 If you meant to cross compile, use \`--host'." >&2;}
1772    { (exit 1); exit 1; }; }
1773     fi
1774   fi
1775 fi
1776 echo "$as_me:1776: result: yes" >&5
1777 echo "${ECHO_T}yes" >&6
1778
1779 rm -f a.out a.exe conftest$ac_cv_exeext
1780 ac_clean_files=$ac_clean_files_save
1781 # Check the compiler produces executables we can run.  If not, either
1782 # the compiler is broken, or we cross compile.
1783 echo "$as_me:1783: checking whether we are cross compiling" >&5
1784 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1785 echo "$as_me:1785: result: $cross_compiling" >&5
1786 echo "${ECHO_T}$cross_compiling" >&6
1787
1788 echo "$as_me:1788: checking for executable suffix" >&5
1789 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1790 if { (eval echo "$as_me:1790: \"$ac_link\"") >&5
1791   (eval $ac_link) 2>&5
1792   ac_status=$?
1793   echo "$as_me:1793: \$? = $ac_status" >&5
1794   (exit $ac_status); }; then
1795   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1796 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1797 # work properly (i.e., refer to `conftest.exe'), while it won't with
1798 # `rm'.
1799 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1800   case $ac_file in
1801     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1802     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1803           export ac_cv_exeext
1804           break;;
1805     * ) break;;
1806   esac
1807 done
1808 else
1809   { { echo "$as_me:1809: error: cannot compute EXEEXT: cannot compile and link" >&5
1810 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1811    { (exit 1); exit 1; }; }
1812 fi
1813
1814 rm -f conftest$ac_cv_exeext
1815 echo "$as_me:1815: result: $ac_cv_exeext" >&5
1816 echo "${ECHO_T}$ac_cv_exeext" >&6
1817
1818 rm -f conftest.$ac_ext
1819 EXEEXT=$ac_cv_exeext
1820 ac_exeext=$EXEEXT
1821 echo "$as_me:1821: checking for object suffix" >&5
1822 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1823 if test "${ac_cv_objext+set}" = set; then
1824   echo $ECHO_N "(cached) $ECHO_C" >&6
1825 else
1826   cat >conftest.$ac_ext <<_ACEOF
1827 #line 1827 "configure"
1828 #include "confdefs.h"
1829
1830 int
1831 main ()
1832 {
1833
1834   ;
1835   return 0;
1836 }
1837 _ACEOF
1838 rm -f conftest.o conftest.obj
1839 if { (eval echo "$as_me:1839: \"$ac_compile\"") >&5
1840   (eval $ac_compile) 2>&5
1841   ac_status=$?
1842   echo "$as_me:1842: \$? = $ac_status" >&5
1843   (exit $ac_status); }; then
1844   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1845   case $ac_file in
1846     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1847     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1848        break;;
1849   esac
1850 done
1851 else
1852   echo "$as_me: failed program was:" >&5
1853 cat conftest.$ac_ext >&5
1854 { { echo "$as_me:1854: error: cannot compute OBJEXT: cannot compile" >&5
1855 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1856    { (exit 1); exit 1; }; }
1857 fi
1858
1859 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1860 fi
1861 echo "$as_me:1861: result: $ac_cv_objext" >&5
1862 echo "${ECHO_T}$ac_cv_objext" >&6
1863 OBJEXT=$ac_cv_objext
1864 ac_objext=$OBJEXT
1865 echo "$as_me:1865: checking whether we are using the GNU C compiler" >&5
1866 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1867 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1868   echo $ECHO_N "(cached) $ECHO_C" >&6
1869 else
1870   cat >conftest.$ac_ext <<_ACEOF
1871 #line 1871 "configure"
1872 #include "confdefs.h"
1873
1874 int
1875 main ()
1876 {
1877 #ifndef __GNUC__
1878        choke me
1879 #endif
1880
1881   ;
1882   return 0;
1883 }
1884 _ACEOF
1885 rm -f conftest.$ac_objext
1886 if { (eval echo "$as_me:1886: \"$ac_compile\"") >&5
1887   (eval $ac_compile) 2>&5
1888   ac_status=$?
1889   echo "$as_me:1889: \$? = $ac_status" >&5
1890   (exit $ac_status); } &&
1891          { ac_try='test -s conftest.$ac_objext'
1892   { (eval echo "$as_me:1892: \"$ac_try\"") >&5
1893   (eval $ac_try) 2>&5
1894   ac_status=$?
1895   echo "$as_me:1895: \$? = $ac_status" >&5
1896   (exit $ac_status); }; }; then
1897   ac_compiler_gnu=yes
1898 else
1899   echo "$as_me: failed program was:" >&5
1900 cat conftest.$ac_ext >&5
1901 ac_compiler_gnu=no
1902 fi
1903 rm -f conftest.$ac_objext conftest.$ac_ext
1904 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1905
1906 fi
1907 echo "$as_me:1907: result: $ac_cv_c_compiler_gnu" >&5
1908 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1909 GCC=`test $ac_compiler_gnu = yes && echo yes`
1910 ac_test_CFLAGS=${CFLAGS+set}
1911 ac_save_CFLAGS=$CFLAGS
1912 CFLAGS="-g"
1913 echo "$as_me:1913: checking whether $CC accepts -g" >&5
1914 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1915 if test "${ac_cv_prog_cc_g+set}" = set; then
1916   echo $ECHO_N "(cached) $ECHO_C" >&6
1917 else
1918   cat >conftest.$ac_ext <<_ACEOF
1919 #line 1919 "configure"
1920 #include "confdefs.h"
1921
1922 int
1923 main ()
1924 {
1925
1926   ;
1927   return 0;
1928 }
1929 _ACEOF
1930 rm -f conftest.$ac_objext
1931 if { (eval echo "$as_me:1931: \"$ac_compile\"") >&5
1932   (eval $ac_compile) 2>&5
1933   ac_status=$?
1934   echo "$as_me:1934: \$? = $ac_status" >&5
1935   (exit $ac_status); } &&
1936          { ac_try='test -s conftest.$ac_objext'
1937   { (eval echo "$as_me:1937: \"$ac_try\"") >&5
1938   (eval $ac_try) 2>&5
1939   ac_status=$?
1940   echo "$as_me:1940: \$? = $ac_status" >&5
1941   (exit $ac_status); }; }; then
1942   ac_cv_prog_cc_g=yes
1943 else
1944   echo "$as_me: failed program was:" >&5
1945 cat conftest.$ac_ext >&5
1946 ac_cv_prog_cc_g=no
1947 fi
1948 rm -f conftest.$ac_objext conftest.$ac_ext
1949 fi
1950 echo "$as_me:1950: result: $ac_cv_prog_cc_g" >&5
1951 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1952 if test "$ac_test_CFLAGS" = set; then
1953   CFLAGS=$ac_save_CFLAGS
1954 elif test $ac_cv_prog_cc_g = yes; then
1955   if test "$GCC" = yes; then
1956     CFLAGS="-g -O2"
1957   else
1958     CFLAGS="-g"
1959   fi
1960 else
1961   if test "$GCC" = yes; then
1962     CFLAGS="-O2"
1963   else
1964     CFLAGS=
1965   fi
1966 fi
1967 # Some people use a C++ compiler to compile C.  Since we use `exit',
1968 # in C++ we need to declare it.  In case someone uses the same compiler
1969 # for both compiling C and C++ we need to have the C++ compiler decide
1970 # the declaration of exit, since it's the most demanding environment.
1971 cat >conftest.$ac_ext <<_ACEOF
1972 #ifndef __cplusplus
1973   choke me
1974 #endif
1975 _ACEOF
1976 rm -f conftest.$ac_objext
1977 if { (eval echo "$as_me:1977: \"$ac_compile\"") >&5
1978   (eval $ac_compile) 2>&5
1979   ac_status=$?
1980   echo "$as_me:1980: \$? = $ac_status" >&5
1981   (exit $ac_status); } &&
1982          { ac_try='test -s conftest.$ac_objext'
1983   { (eval echo "$as_me:1983: \"$ac_try\"") >&5
1984   (eval $ac_try) 2>&5
1985   ac_status=$?
1986   echo "$as_me:1986: \$? = $ac_status" >&5
1987   (exit $ac_status); }; }; then
1988   for ac_declaration in \
1989    ''\
1990    '#include <stdlib.h>' \
1991    'extern "C" void std::exit (int) throw (); using std::exit;' \
1992    'extern "C" void std::exit (int); using std::exit;' \
1993    'extern "C" void exit (int) throw ();' \
1994    'extern "C" void exit (int);' \
1995    'void exit (int);'
1996 do
1997   cat >conftest.$ac_ext <<_ACEOF
1998 #line 1998 "configure"
1999 #include "confdefs.h"
2000 #include <stdlib.h>
2001 $ac_declaration
2002 int
2003 main ()
2004 {
2005 exit (42);
2006   ;
2007   return 0;
2008 }
2009 _ACEOF
2010 rm -f conftest.$ac_objext
2011 if { (eval echo "$as_me:2011: \"$ac_compile\"") >&5
2012   (eval $ac_compile) 2>&5
2013   ac_status=$?
2014   echo "$as_me:2014: \$? = $ac_status" >&5
2015   (exit $ac_status); } &&
2016          { ac_try='test -s conftest.$ac_objext'
2017   { (eval echo "$as_me:2017: \"$ac_try\"") >&5
2018   (eval $ac_try) 2>&5
2019   ac_status=$?
2020   echo "$as_me:2020: \$? = $ac_status" >&5
2021   (exit $ac_status); }; }; then
2022   :
2023 else
2024   echo "$as_me: failed program was:" >&5
2025 cat conftest.$ac_ext >&5
2026 continue
2027 fi
2028 rm -f conftest.$ac_objext conftest.$ac_ext
2029   cat >conftest.$ac_ext <<_ACEOF
2030 #line 2030 "configure"
2031 #include "confdefs.h"
2032 $ac_declaration
2033 int
2034 main ()
2035 {
2036 exit (42);
2037   ;
2038   return 0;
2039 }
2040 _ACEOF
2041 rm -f conftest.$ac_objext
2042 if { (eval echo "$as_me:2042: \"$ac_compile\"") >&5
2043   (eval $ac_compile) 2>&5
2044   ac_status=$?
2045   echo "$as_me:2045: \$? = $ac_status" >&5
2046   (exit $ac_status); } &&
2047          { ac_try='test -s conftest.$ac_objext'
2048   { (eval echo "$as_me:2048: \"$ac_try\"") >&5
2049   (eval $ac_try) 2>&5
2050   ac_status=$?
2051   echo "$as_me:2051: \$? = $ac_status" >&5
2052   (exit $ac_status); }; }; then
2053   break
2054 else
2055   echo "$as_me: failed program was:" >&5
2056 cat conftest.$ac_ext >&5
2057 fi
2058 rm -f conftest.$ac_objext conftest.$ac_ext
2059 done
2060 rm -rf conftest*
2061 if test -n "$ac_declaration"; then
2062   echo '#ifdef __cplusplus' >>confdefs.h
2063   echo $ac_declaration      >>confdefs.h
2064   echo '#endif'             >>confdefs.h
2065 fi
2066
2067 else
2068   echo "$as_me: failed program was:" >&5
2069 cat conftest.$ac_ext >&5
2070 fi
2071 rm -f conftest.$ac_objext conftest.$ac_ext
2072 ac_ext=c
2073 ac_cpp='$CPP $CPPFLAGS'
2074 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2075 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2076 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2077 ac_main_return=return
2078
2079 GCC_VERSION=none
2080 if test "$GCC" = yes ; then
2081         echo "$as_me:2081: checking version of $CC" >&5
2082 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2083         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.].*//'`"
2084         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2085         echo "$as_me:2085: result: $GCC_VERSION" >&5
2086 echo "${ECHO_T}$GCC_VERSION" >&6
2087 fi
2088
2089 echo "$as_me:2089: checking for $CC option to accept ANSI C" >&5
2090 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2091 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2092   echo $ECHO_N "(cached) $ECHO_C" >&6
2093 else
2094   ac_cv_prog_cc_stdc=no
2095 ac_save_CC=$CC
2096 cat >conftest.$ac_ext <<_ACEOF
2097 #line 2097 "configure"
2098 #include "confdefs.h"
2099 #include <stdarg.h>
2100 #include <stdio.h>
2101 #include <sys/types.h>
2102 #include <sys/stat.h>
2103 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2104 struct buf { int x; };
2105 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2106 static char *e (p, i)
2107      char **p;
2108      int i;
2109 {
2110   return p[i];
2111 }
2112 static char *f (char * (*g) (char **, int), char **p, ...)
2113 {
2114   char *s;
2115   va_list v;
2116   va_start (v,p);
2117   s = g (p, va_arg (v,int));
2118   va_end (v);
2119   return s;
2120 }
2121 int test (int i, double x);
2122 struct s1 {int (*f) (int a);};
2123 struct s2 {int (*f) (double a);};
2124 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2125 int argc;
2126 char **argv;
2127 int
2128 main ()
2129 {
2130 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2131   ;
2132   return 0;
2133 }
2134 _ACEOF
2135 # Don't try gcc -ansi; that turns off useful extensions and
2136 # breaks some systems' header files.
2137 # AIX                   -qlanglvl=ansi
2138 # Ultrix and OSF/1      -std1
2139 # HP-UX 10.20 and later -Ae
2140 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2141 # SVR4                  -Xc -D__EXTENSIONS__
2142 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2143 do
2144   CC="$ac_save_CC $ac_arg"
2145   rm -f conftest.$ac_objext
2146 if { (eval echo "$as_me:2146: \"$ac_compile\"") >&5
2147   (eval $ac_compile) 2>&5
2148   ac_status=$?
2149   echo "$as_me:2149: \$? = $ac_status" >&5
2150   (exit $ac_status); } &&
2151          { ac_try='test -s conftest.$ac_objext'
2152   { (eval echo "$as_me:2152: \"$ac_try\"") >&5
2153   (eval $ac_try) 2>&5
2154   ac_status=$?
2155   echo "$as_me:2155: \$? = $ac_status" >&5
2156   (exit $ac_status); }; }; then
2157   ac_cv_prog_cc_stdc=$ac_arg
2158 break
2159 else
2160   echo "$as_me: failed program was:" >&5
2161 cat conftest.$ac_ext >&5
2162 fi
2163 rm -f conftest.$ac_objext
2164 done
2165 rm -f conftest.$ac_ext conftest.$ac_objext
2166 CC=$ac_save_CC
2167
2168 fi
2169
2170 case "x$ac_cv_prog_cc_stdc" in
2171   x|xno)
2172     echo "$as_me:2172: result: none needed" >&5
2173 echo "${ECHO_T}none needed" >&6 ;;
2174   *)
2175     echo "$as_me:2175: result: $ac_cv_prog_cc_stdc" >&5
2176 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2177     CC="$CC $ac_cv_prog_cc_stdc" ;;
2178 esac
2179
2180 # This should have been defined by AC_PROG_CC
2181 : ${CC:=cc}
2182
2183 echo "$as_me:2183: checking \$CC variable" >&5
2184 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2185 case "$CC" in
2186 (*[\ \  ]-*)
2187         echo "$as_me:2187: result: broken" >&5
2188 echo "${ECHO_T}broken" >&6
2189         { echo "$as_me:2189: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2190 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2191         # humor him...
2192         cf_flags=`echo "$CC" | sed -e 's/^.*[   ]\(-[^  ]\)/\1/'`
2193         CC=`echo "$CC " | sed -e 's/[   ]-[^    ].*$//' -e 's/[         ]*$//'`
2194         for cf_arg in $cf_flags
2195         do
2196                 case "x$cf_arg" in
2197                 (x-[IUDfgOW]*)
2198
2199 cf_fix_cppflags=no
2200 cf_new_cflags=
2201 cf_new_cppflags=
2202 cf_new_extra_cppflags=
2203
2204 for cf_add_cflags in $cf_flags
2205 do
2206 case $cf_fix_cppflags in
2207 (no)
2208         case $cf_add_cflags in
2209         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2210                 case $cf_add_cflags in
2211                 (-D*)
2212                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2213
2214                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2215                                 && test -z "${cf_tst_cflags}" \
2216                                 && cf_fix_cppflags=yes
2217
2218                         if test $cf_fix_cppflags = yes ; then
2219                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2220                                 continue
2221                         elif test "${cf_tst_cflags}" = "\"'" ; then
2222                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2223                                 continue
2224                         fi
2225                         ;;
2226                 esac
2227                 case "$CPPFLAGS" in
2228                 (*$cf_add_cflags)
2229                         ;;
2230                 (*)
2231                         case $cf_add_cflags in
2232                         (-D*)
2233                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2234
2235 CPPFLAGS=`echo "$CPPFLAGS" | \
2236         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2237                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2238
2239                                 ;;
2240                         esac
2241                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2242                         ;;
2243                 esac
2244                 ;;
2245         (*)
2246                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2247                 ;;
2248         esac
2249         ;;
2250 (yes)
2251         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2252
2253         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2254
2255         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2256                 && test -z "${cf_tst_cflags}" \
2257                 && cf_fix_cppflags=no
2258         ;;
2259 esac
2260 done
2261
2262 if test -n "$cf_new_cflags" ; then
2263
2264         CFLAGS="$CFLAGS $cf_new_cflags"
2265 fi
2266
2267 if test -n "$cf_new_cppflags" ; then
2268
2269         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2270 fi
2271
2272 if test -n "$cf_new_extra_cppflags" ; then
2273
2274         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2275 fi
2276
2277                         ;;
2278                 (*)
2279                         CC="$CC $cf_arg"
2280                         ;;
2281                 esac
2282         done
2283         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2284
2285 echo "${as_me:-configure}:2285: testing resulting CC: '$CC' ..." 1>&5
2286
2287         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2288
2289 echo "${as_me:-configure}:2289: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2290
2291         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2292
2293 echo "${as_me:-configure}:2293: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2294
2295         ;;
2296 (*)
2297         echo "$as_me:2297: result: ok" >&5
2298 echo "${ECHO_T}ok" >&6
2299         ;;
2300 esac
2301
2302 ac_ext=c
2303 ac_cpp='$CPP $CPPFLAGS'
2304 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2305 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2306 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2307 ac_main_return=return
2308 echo "$as_me:2308: checking how to run the C preprocessor" >&5
2309 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2310 # On Suns, sometimes $CPP names a directory.
2311 if test -n "$CPP" && test -d "$CPP"; then
2312   CPP=
2313 fi
2314 if test -z "$CPP"; then
2315   if test "${ac_cv_prog_CPP+set}" = set; then
2316   echo $ECHO_N "(cached) $ECHO_C" >&6
2317 else
2318       # Double quotes because CPP needs to be expanded
2319     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2320     do
2321       ac_preproc_ok=false
2322 for ac_c_preproc_warn_flag in '' yes
2323 do
2324   # Use a header file that comes with gcc, so configuring glibc
2325   # with a fresh cross-compiler works.
2326   # On the NeXT, cc -E runs the code through the compiler's parser,
2327   # not just through cpp. "Syntax error" is here to catch this case.
2328   cat >conftest.$ac_ext <<_ACEOF
2329 #line 2329 "configure"
2330 #include "confdefs.h"
2331 #include <assert.h>
2332                      Syntax error
2333 _ACEOF
2334 if { (eval echo "$as_me:2334: \"$ac_cpp conftest.$ac_ext\"") >&5
2335   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2336   ac_status=$?
2337   egrep -v '^ *\+' conftest.er1 >conftest.err
2338   rm -f conftest.er1
2339   cat conftest.err >&5
2340   echo "$as_me:2340: \$? = $ac_status" >&5
2341   (exit $ac_status); } >/dev/null; then
2342   if test -s conftest.err; then
2343     ac_cpp_err=$ac_c_preproc_warn_flag
2344   else
2345     ac_cpp_err=
2346   fi
2347 else
2348   ac_cpp_err=yes
2349 fi
2350 if test -z "$ac_cpp_err"; then
2351   :
2352 else
2353   echo "$as_me: failed program was:" >&5
2354   cat conftest.$ac_ext >&5
2355   # Broken: fails on valid input.
2356 continue
2357 fi
2358 rm -f conftest.err conftest.$ac_ext
2359
2360   # OK, works on sane cases.  Now check whether non-existent headers
2361   # can be detected and how.
2362   cat >conftest.$ac_ext <<_ACEOF
2363 #line 2363 "configure"
2364 #include "confdefs.h"
2365 #include <ac_nonexistent.h>
2366 _ACEOF
2367 if { (eval echo "$as_me:2367: \"$ac_cpp conftest.$ac_ext\"") >&5
2368   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2369   ac_status=$?
2370   egrep -v '^ *\+' conftest.er1 >conftest.err
2371   rm -f conftest.er1
2372   cat conftest.err >&5
2373   echo "$as_me:2373: \$? = $ac_status" >&5
2374   (exit $ac_status); } >/dev/null; then
2375   if test -s conftest.err; then
2376     ac_cpp_err=$ac_c_preproc_warn_flag
2377   else
2378     ac_cpp_err=
2379   fi
2380 else
2381   ac_cpp_err=yes
2382 fi
2383 if test -z "$ac_cpp_err"; then
2384   # Broken: success on invalid input.
2385 continue
2386 else
2387   echo "$as_me: failed program was:" >&5
2388   cat conftest.$ac_ext >&5
2389   # Passes both tests.
2390 ac_preproc_ok=:
2391 break
2392 fi
2393 rm -f conftest.err conftest.$ac_ext
2394
2395 done
2396 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2397 rm -f conftest.err conftest.$ac_ext
2398 if $ac_preproc_ok; then
2399   break
2400 fi
2401
2402     done
2403     ac_cv_prog_CPP=$CPP
2404
2405 fi
2406   CPP=$ac_cv_prog_CPP
2407 else
2408   ac_cv_prog_CPP=$CPP
2409 fi
2410 echo "$as_me:2410: result: $CPP" >&5
2411 echo "${ECHO_T}$CPP" >&6
2412 ac_preproc_ok=false
2413 for ac_c_preproc_warn_flag in '' yes
2414 do
2415   # Use a header file that comes with gcc, so configuring glibc
2416   # with a fresh cross-compiler works.
2417   # On the NeXT, cc -E runs the code through the compiler's parser,
2418   # not just through cpp. "Syntax error" is here to catch this case.
2419   cat >conftest.$ac_ext <<_ACEOF
2420 #line 2420 "configure"
2421 #include "confdefs.h"
2422 #include <assert.h>
2423                      Syntax error
2424 _ACEOF
2425 if { (eval echo "$as_me:2425: \"$ac_cpp conftest.$ac_ext\"") >&5
2426   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2427   ac_status=$?
2428   egrep -v '^ *\+' conftest.er1 >conftest.err
2429   rm -f conftest.er1
2430   cat conftest.err >&5
2431   echo "$as_me:2431: \$? = $ac_status" >&5
2432   (exit $ac_status); } >/dev/null; then
2433   if test -s conftest.err; then
2434     ac_cpp_err=$ac_c_preproc_warn_flag
2435   else
2436     ac_cpp_err=
2437   fi
2438 else
2439   ac_cpp_err=yes
2440 fi
2441 if test -z "$ac_cpp_err"; then
2442   :
2443 else
2444   echo "$as_me: failed program was:" >&5
2445   cat conftest.$ac_ext >&5
2446   # Broken: fails on valid input.
2447 continue
2448 fi
2449 rm -f conftest.err conftest.$ac_ext
2450
2451   # OK, works on sane cases.  Now check whether non-existent headers
2452   # can be detected and how.
2453   cat >conftest.$ac_ext <<_ACEOF
2454 #line 2454 "configure"
2455 #include "confdefs.h"
2456 #include <ac_nonexistent.h>
2457 _ACEOF
2458 if { (eval echo "$as_me:2458: \"$ac_cpp conftest.$ac_ext\"") >&5
2459   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2460   ac_status=$?
2461   egrep -v '^ *\+' conftest.er1 >conftest.err
2462   rm -f conftest.er1
2463   cat conftest.err >&5
2464   echo "$as_me:2464: \$? = $ac_status" >&5
2465   (exit $ac_status); } >/dev/null; then
2466   if test -s conftest.err; then
2467     ac_cpp_err=$ac_c_preproc_warn_flag
2468   else
2469     ac_cpp_err=
2470   fi
2471 else
2472   ac_cpp_err=yes
2473 fi
2474 if test -z "$ac_cpp_err"; then
2475   # Broken: success on invalid input.
2476 continue
2477 else
2478   echo "$as_me: failed program was:" >&5
2479   cat conftest.$ac_ext >&5
2480   # Passes both tests.
2481 ac_preproc_ok=:
2482 break
2483 fi
2484 rm -f conftest.err conftest.$ac_ext
2485
2486 done
2487 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2488 rm -f conftest.err conftest.$ac_ext
2489 if $ac_preproc_ok; then
2490   :
2491 else
2492   { { echo "$as_me:2492: error: C preprocessor \"$CPP\" fails sanity check" >&5
2493 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2494    { (exit 1); exit 1; }; }
2495 fi
2496
2497 ac_ext=c
2498 ac_cpp='$CPP $CPPFLAGS'
2499 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2500 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2501 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2502 ac_main_return=return
2503
2504 if test $ac_cv_c_compiler_gnu = yes; then
2505     echo "$as_me:2505: checking whether $CC needs -traditional" >&5
2506 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2507 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2508   echo $ECHO_N "(cached) $ECHO_C" >&6
2509 else
2510     ac_pattern="Autoconf.*'x'"
2511   cat >conftest.$ac_ext <<_ACEOF
2512 #line 2512 "configure"
2513 #include "confdefs.h"
2514 #include <sgtty.h>
2515 int Autoconf = TIOCGETP;
2516 _ACEOF
2517 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2518   egrep "$ac_pattern" >/dev/null 2>&1; then
2519   ac_cv_prog_gcc_traditional=yes
2520 else
2521   ac_cv_prog_gcc_traditional=no
2522 fi
2523 rm -rf conftest*
2524
2525   if test $ac_cv_prog_gcc_traditional = no; then
2526     cat >conftest.$ac_ext <<_ACEOF
2527 #line 2527 "configure"
2528 #include "confdefs.h"
2529 #include <termio.h>
2530 int Autoconf = TCGETA;
2531 _ACEOF
2532 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2533   egrep "$ac_pattern" >/dev/null 2>&1; then
2534   ac_cv_prog_gcc_traditional=yes
2535 fi
2536 rm -rf conftest*
2537
2538   fi
2539 fi
2540 echo "$as_me:2540: result: $ac_cv_prog_gcc_traditional" >&5
2541 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2542   if test $ac_cv_prog_gcc_traditional = yes; then
2543     CC="$CC -traditional"
2544   fi
2545 fi
2546
2547 echo "$as_me:2547: checking whether $CC understands -c and -o together" >&5
2548 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2549 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2550   echo $ECHO_N "(cached) $ECHO_C" >&6
2551 else
2552
2553 cat > conftest.$ac_ext <<CF_EOF
2554 int main(void)
2555 {
2556         ${cf_cv_main_return:-return}(0);
2557 }
2558 CF_EOF
2559 # We do the test twice because some compilers refuse to overwrite an
2560 # existing .o file with -o, though they will create one.
2561 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2562 if { (eval echo "$as_me:2562: \"$ac_try\"") >&5
2563   (eval $ac_try) 2>&5
2564   ac_status=$?
2565   echo "$as_me:2565: \$? = $ac_status" >&5
2566   (exit $ac_status); } &&
2567   test -f conftest2.$ac_objext && { (eval echo "$as_me:2567: \"$ac_try\"") >&5
2568   (eval $ac_try) 2>&5
2569   ac_status=$?
2570   echo "$as_me:2570: \$? = $ac_status" >&5
2571   (exit $ac_status); };
2572 then
2573   eval cf_cv_prog_CC_c_o=yes
2574 else
2575   eval cf_cv_prog_CC_c_o=no
2576 fi
2577 rm -rf conftest*
2578
2579 fi
2580 if test $cf_cv_prog_CC_c_o = yes; then
2581   echo "$as_me:2581: result: yes" >&5
2582 echo "${ECHO_T}yes" >&6
2583 else
2584   echo "$as_me:2584: result: no" >&5
2585 echo "${ECHO_T}no" >&6
2586 fi
2587
2588 if test "$cross_compiling" = yes ; then
2589         LDCONFIG=:
2590 else
2591         case "$cf_cv_system_name" in
2592         (dragonfly*|mirbsd*|freebsd*)
2593                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2594                 ;;
2595         (*) LDPATH=$PATH:/sbin:/usr/sbin
2596                 # Extract the first word of "ldconfig", so it can be a program name with args.
2597 set dummy ldconfig; ac_word=$2
2598 echo "$as_me:2598: checking for $ac_word" >&5
2599 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2600 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2601   echo $ECHO_N "(cached) $ECHO_C" >&6
2602 else
2603   case $LDCONFIG in
2604   [\\/]* | ?:[\\/]*)
2605   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2606   ;;
2607   *)
2608   ac_save_IFS=$IFS; IFS=$ac_path_separator
2609 ac_dummy="$LDPATH"
2610 for ac_dir in $ac_dummy; do
2611   IFS=$ac_save_IFS
2612   test -z "$ac_dir" && ac_dir=.
2613   if $as_executable_p "$ac_dir/$ac_word"; then
2614    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2615    echo "$as_me:2615: found $ac_dir/$ac_word" >&5
2616    break
2617 fi
2618 done
2619
2620   ;;
2621 esac
2622 fi
2623 LDCONFIG=$ac_cv_path_LDCONFIG
2624
2625 if test -n "$LDCONFIG"; then
2626   echo "$as_me:2626: result: $LDCONFIG" >&5
2627 echo "${ECHO_T}$LDCONFIG" >&6
2628 else
2629   echo "$as_me:2629: result: no" >&5
2630 echo "${ECHO_T}no" >&6
2631 fi
2632
2633                 ;;
2634         esac
2635 fi
2636
2637 echo "$as_me:2637: checking if you want to ensure bool is consistent with C++" >&5
2638 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2639
2640 # Check whether --with-cxx or --without-cxx was given.
2641 if test "${with_cxx+set}" = set; then
2642   withval="$with_cxx"
2643   cf_with_cxx=$withval
2644 else
2645   cf_with_cxx=yes
2646 fi;
2647 echo "$as_me:2647: result: $cf_with_cxx" >&5
2648 echo "${ECHO_T}$cf_with_cxx" >&6
2649 if test "X$cf_with_cxx" = Xno ; then
2650         CXX=""
2651         GXX=""
2652 else
2653         # with autoconf 2.13, we can change the error to a warning:
2654                 ac_ext=cc
2655 ac_cpp='$CXXCPP $CPPFLAGS'
2656 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2657 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2658 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2659 ac_main_return=return
2660 if test -n "$ac_tool_prefix"; then
2661   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2662   do
2663     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2664 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2665 echo "$as_me:2665: checking for $ac_word" >&5
2666 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2667 if test "${ac_cv_prog_CXX+set}" = set; then
2668   echo $ECHO_N "(cached) $ECHO_C" >&6
2669 else
2670   if test -n "$CXX"; then
2671   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2672 else
2673   ac_save_IFS=$IFS; IFS=$ac_path_separator
2674 ac_dummy="$PATH"
2675 for ac_dir in $ac_dummy; do
2676   IFS=$ac_save_IFS
2677   test -z "$ac_dir" && ac_dir=.
2678   $as_executable_p "$ac_dir/$ac_word" || continue
2679 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2680 echo "$as_me:2680: found $ac_dir/$ac_word" >&5
2681 break
2682 done
2683
2684 fi
2685 fi
2686 CXX=$ac_cv_prog_CXX
2687 if test -n "$CXX"; then
2688   echo "$as_me:2688: result: $CXX" >&5
2689 echo "${ECHO_T}$CXX" >&6
2690 else
2691   echo "$as_me:2691: result: no" >&5
2692 echo "${ECHO_T}no" >&6
2693 fi
2694
2695     test -n "$CXX" && break
2696   done
2697 fi
2698 if test -z "$CXX"; then
2699   ac_ct_CXX=$CXX
2700   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2701 do
2702   # Extract the first word of "$ac_prog", so it can be a program name with args.
2703 set dummy $ac_prog; ac_word=$2
2704 echo "$as_me:2704: checking for $ac_word" >&5
2705 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2706 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2707   echo $ECHO_N "(cached) $ECHO_C" >&6
2708 else
2709   if test -n "$ac_ct_CXX"; then
2710   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2711 else
2712   ac_save_IFS=$IFS; IFS=$ac_path_separator
2713 ac_dummy="$PATH"
2714 for ac_dir in $ac_dummy; do
2715   IFS=$ac_save_IFS
2716   test -z "$ac_dir" && ac_dir=.
2717   $as_executable_p "$ac_dir/$ac_word" || continue
2718 ac_cv_prog_ac_ct_CXX="$ac_prog"
2719 echo "$as_me:2719: found $ac_dir/$ac_word" >&5
2720 break
2721 done
2722
2723 fi
2724 fi
2725 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2726 if test -n "$ac_ct_CXX"; then
2727   echo "$as_me:2727: result: $ac_ct_CXX" >&5
2728 echo "${ECHO_T}$ac_ct_CXX" >&6
2729 else
2730   echo "$as_me:2730: result: no" >&5
2731 echo "${ECHO_T}no" >&6
2732 fi
2733
2734   test -n "$ac_ct_CXX" && break
2735 done
2736 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2737
2738   CXX=$ac_ct_CXX
2739 fi
2740
2741 # Provide some information about the compiler.
2742 echo "$as_me:2742:" \
2743      "checking for C++ compiler version" >&5
2744 ac_compiler=`set X $ac_compile; echo $2`
2745 { (eval echo "$as_me:2745: \"$ac_compiler --version </dev/null >&5\"") >&5
2746   (eval $ac_compiler --version </dev/null >&5) 2>&5
2747   ac_status=$?
2748   echo "$as_me:2748: \$? = $ac_status" >&5
2749   (exit $ac_status); }
2750 { (eval echo "$as_me:2750: \"$ac_compiler -v </dev/null >&5\"") >&5
2751   (eval $ac_compiler -v </dev/null >&5) 2>&5
2752   ac_status=$?
2753   echo "$as_me:2753: \$? = $ac_status" >&5
2754   (exit $ac_status); }
2755 { (eval echo "$as_me:2755: \"$ac_compiler -V </dev/null >&5\"") >&5
2756   (eval $ac_compiler -V </dev/null >&5) 2>&5
2757   ac_status=$?
2758   echo "$as_me:2758: \$? = $ac_status" >&5
2759   (exit $ac_status); }
2760
2761 echo "$as_me:2761: checking whether we are using the GNU C++ compiler" >&5
2762 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2763 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2764   echo $ECHO_N "(cached) $ECHO_C" >&6
2765 else
2766   cat >conftest.$ac_ext <<_ACEOF
2767 #line 2767 "configure"
2768 #include "confdefs.h"
2769
2770 int
2771 main ()
2772 {
2773 #ifndef __GNUC__
2774        choke me
2775 #endif
2776
2777   ;
2778   return 0;
2779 }
2780 _ACEOF
2781 rm -f conftest.$ac_objext
2782 if { (eval echo "$as_me:2782: \"$ac_compile\"") >&5
2783   (eval $ac_compile) 2>&5
2784   ac_status=$?
2785   echo "$as_me:2785: \$? = $ac_status" >&5
2786   (exit $ac_status); } &&
2787          { ac_try='test -s conftest.$ac_objext'
2788   { (eval echo "$as_me:2788: \"$ac_try\"") >&5
2789   (eval $ac_try) 2>&5
2790   ac_status=$?
2791   echo "$as_me:2791: \$? = $ac_status" >&5
2792   (exit $ac_status); }; }; then
2793   ac_compiler_gnu=yes
2794 else
2795   echo "$as_me: failed program was:" >&5
2796 cat conftest.$ac_ext >&5
2797 ac_compiler_gnu=no
2798 fi
2799 rm -f conftest.$ac_objext conftest.$ac_ext
2800 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2801
2802 fi
2803 echo "$as_me:2803: result: $ac_cv_cxx_compiler_gnu" >&5
2804 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2805 GXX=`test $ac_compiler_gnu = yes && echo yes`
2806 ac_test_CXXFLAGS=${CXXFLAGS+set}
2807 ac_save_CXXFLAGS=$CXXFLAGS
2808 CXXFLAGS="-g"
2809 echo "$as_me:2809: checking whether $CXX accepts -g" >&5
2810 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2811 if test "${ac_cv_prog_cxx_g+set}" = set; then
2812   echo $ECHO_N "(cached) $ECHO_C" >&6
2813 else
2814   cat >conftest.$ac_ext <<_ACEOF
2815 #line 2815 "configure"
2816 #include "confdefs.h"
2817
2818 int
2819 main ()
2820 {
2821
2822   ;
2823   return 0;
2824 }
2825 _ACEOF
2826 rm -f conftest.$ac_objext
2827 if { (eval echo "$as_me:2827: \"$ac_compile\"") >&5
2828   (eval $ac_compile) 2>&5
2829   ac_status=$?
2830   echo "$as_me:2830: \$? = $ac_status" >&5
2831   (exit $ac_status); } &&
2832          { ac_try='test -s conftest.$ac_objext'
2833   { (eval echo "$as_me:2833: \"$ac_try\"") >&5
2834   (eval $ac_try) 2>&5
2835   ac_status=$?
2836   echo "$as_me:2836: \$? = $ac_status" >&5
2837   (exit $ac_status); }; }; then
2838   ac_cv_prog_cxx_g=yes
2839 else
2840   echo "$as_me: failed program was:" >&5
2841 cat conftest.$ac_ext >&5
2842 ac_cv_prog_cxx_g=no
2843 fi
2844 rm -f conftest.$ac_objext conftest.$ac_ext
2845 fi
2846 echo "$as_me:2846: result: $ac_cv_prog_cxx_g" >&5
2847 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2848 if test "$ac_test_CXXFLAGS" = set; then
2849   CXXFLAGS=$ac_save_CXXFLAGS
2850 elif test $ac_cv_prog_cxx_g = yes; then
2851   if test "$GXX" = yes; then
2852     CXXFLAGS="-g -O2"
2853   else
2854     CXXFLAGS="-g"
2855   fi
2856 else
2857   if test "$GXX" = yes; then
2858     CXXFLAGS="-O2"
2859   else
2860     CXXFLAGS=
2861   fi
2862 fi
2863 for ac_declaration in \
2864    ''\
2865    '#include <stdlib.h>' \
2866    'extern "C" void std::exit (int) throw (); using std::exit;' \
2867    'extern "C" void std::exit (int); using std::exit;' \
2868    'extern "C" void exit (int) throw ();' \
2869    'extern "C" void exit (int);' \
2870    'void exit (int);'
2871 do
2872   cat >conftest.$ac_ext <<_ACEOF
2873 #line 2873 "configure"
2874 #include "confdefs.h"
2875 #include <stdlib.h>
2876 $ac_declaration
2877 int
2878 main ()
2879 {
2880 exit (42);
2881   ;
2882   return 0;
2883 }
2884 _ACEOF
2885 rm -f conftest.$ac_objext
2886 if { (eval echo "$as_me:2886: \"$ac_compile\"") >&5
2887   (eval $ac_compile) 2>&5
2888   ac_status=$?
2889   echo "$as_me:2889: \$? = $ac_status" >&5
2890   (exit $ac_status); } &&
2891          { ac_try='test -s conftest.$ac_objext'
2892   { (eval echo "$as_me:2892: \"$ac_try\"") >&5
2893   (eval $ac_try) 2>&5
2894   ac_status=$?
2895   echo "$as_me:2895: \$? = $ac_status" >&5
2896   (exit $ac_status); }; }; then
2897   :
2898 else
2899   echo "$as_me: failed program was:" >&5
2900 cat conftest.$ac_ext >&5
2901 continue
2902 fi
2903 rm -f conftest.$ac_objext conftest.$ac_ext
2904   cat >conftest.$ac_ext <<_ACEOF
2905 #line 2905 "configure"
2906 #include "confdefs.h"
2907 $ac_declaration
2908 int
2909 main ()
2910 {
2911 exit (42);
2912   ;
2913   return 0;
2914 }
2915 _ACEOF
2916 rm -f conftest.$ac_objext
2917 if { (eval echo "$as_me:2917: \"$ac_compile\"") >&5
2918   (eval $ac_compile) 2>&5
2919   ac_status=$?
2920   echo "$as_me:2920: \$? = $ac_status" >&5
2921   (exit $ac_status); } &&
2922          { ac_try='test -s conftest.$ac_objext'
2923   { (eval echo "$as_me:2923: \"$ac_try\"") >&5
2924   (eval $ac_try) 2>&5
2925   ac_status=$?
2926   echo "$as_me:2926: \$? = $ac_status" >&5
2927   (exit $ac_status); }; }; then
2928   break
2929 else
2930   echo "$as_me: failed program was:" >&5
2931 cat conftest.$ac_ext >&5
2932 fi
2933 rm -f conftest.$ac_objext conftest.$ac_ext
2934 done
2935 rm -rf conftest*
2936 if test -n "$ac_declaration"; then
2937   echo '#ifdef __cplusplus' >>confdefs.h
2938   echo $ac_declaration      >>confdefs.h
2939   echo '#endif'             >>confdefs.h
2940 fi
2941
2942 ac_ext=c
2943 ac_cpp='$CPP $CPPFLAGS'
2944 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2945 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2946 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2947 ac_main_return=return
2948
2949         ac_ext=cc
2950 ac_cpp='$CXXCPP $CPPFLAGS'
2951 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2952 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2953 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2954 ac_main_return=return
2955
2956         if test "x$cf_with_cxx" != xno
2957         then
2958                 # Several of the C++ configurations do not work, particularly when
2959                 # cross-compiling (20140913 -TD)
2960                 echo "$as_me:2960: checking if $CXX works" >&5
2961 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2962
2963                 save_CPPFLAGS="$CPPFLAGS"
2964                 eval cf_includedir=${includedir}
2965                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2966
2967 cat >conftest.$ac_ext <<_ACEOF
2968 #line 2968 "configure"
2969 #include "confdefs.h"
2970
2971 #include <stdlib.h>
2972 #include <stdio.h>
2973
2974 int
2975 main ()
2976 {
2977
2978                 printf("Hello world!\n")
2979
2980   ;
2981   return 0;
2982 }
2983 _ACEOF
2984 rm -f conftest.$ac_objext
2985 if { (eval echo "$as_me:2985: \"$ac_compile\"") >&5
2986   (eval $ac_compile) 2>&5
2987   ac_status=$?
2988   echo "$as_me:2988: \$? = $ac_status" >&5
2989   (exit $ac_status); } &&
2990          { ac_try='test -s conftest.$ac_objext'
2991   { (eval echo "$as_me:2991: \"$ac_try\"") >&5
2992   (eval $ac_try) 2>&5
2993   ac_status=$?
2994   echo "$as_me:2994: \$? = $ac_status" >&5
2995   (exit $ac_status); }; }; then
2996   cf_cxx_works=yes
2997 else
2998   echo "$as_me: failed program was:" >&5
2999 cat conftest.$ac_ext >&5
3000 cf_cxx_works=no
3001 fi
3002 rm -f conftest.$ac_objext conftest.$ac_ext
3003                 CPPFLAGS="$save_CPPFLAGS"
3004
3005                 echo "$as_me:3005: result: $cf_cxx_works" >&5
3006 echo "${ECHO_T}$cf_cxx_works" >&6
3007                 if test "x$cf_cxx_works" = xno
3008                 then
3009                         { echo "$as_me:3009: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3010 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3011                         cf_with_cxx=no; CXX=""; GXX="";
3012                 fi
3013         fi
3014         ac_ext=c
3015 ac_cpp='$CPP $CPPFLAGS'
3016 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3017 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3018 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3019 ac_main_return=return
3020
3021         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3022         if test "$CXX" = "g++" ; then
3023                 # Extract the first word of "g++", so it can be a program name with args.
3024 set dummy g++; ac_word=$2
3025 echo "$as_me:3025: checking for $ac_word" >&5
3026 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3027 if test "${ac_cv_path_CXX+set}" = set; then
3028   echo $ECHO_N "(cached) $ECHO_C" >&6
3029 else
3030   case $CXX in
3031   [\\/]* | ?:[\\/]*)
3032   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3033   ;;
3034   *)
3035   ac_save_IFS=$IFS; IFS=$ac_path_separator
3036 ac_dummy="$PATH"
3037 for ac_dir in $ac_dummy; do
3038   IFS=$ac_save_IFS
3039   test -z "$ac_dir" && ac_dir=.
3040   if $as_executable_p "$ac_dir/$ac_word"; then
3041    ac_cv_path_CXX="$ac_dir/$ac_word"
3042    echo "$as_me:3042: found $ac_dir/$ac_word" >&5
3043    break
3044 fi
3045 done
3046
3047   ;;
3048 esac
3049 fi
3050 CXX=$ac_cv_path_CXX
3051
3052 if test -n "$CXX"; then
3053   echo "$as_me:3053: result: $CXX" >&5
3054 echo "${ECHO_T}$CXX" >&6
3055 else
3056   echo "$as_me:3056: result: no" >&5
3057 echo "${ECHO_T}no" >&6
3058 fi
3059
3060         fi
3061         case "x$CXX" in
3062         (x|xg++)
3063                 { echo "$as_me:3063: WARNING: You don't have any C++ compiler, too bad" >&5
3064 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3065                 cf_with_cxx=no; CXX=""; GXX="";
3066                 ;;
3067         esac
3068 fi
3069
3070 GXX_VERSION=none
3071 if test "$GXX" = yes; then
3072         echo "$as_me:3072: checking version of ${CXX:-g++}" >&5
3073 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3074         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3075         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3076         echo "$as_me:3076: result: $GXX_VERSION" >&5
3077 echo "${ECHO_T}$GXX_VERSION" >&6
3078 fi
3079
3080 case $GXX_VERSION in
3081 (1*|2.[0-6]*)
3082         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3083         # cf_cxx_library=no
3084         { echo "$as_me:3084: WARNING: templates do not work" >&5
3085 echo "$as_me: WARNING: templates do not work" >&2;}
3086         ;;
3087 esac
3088
3089 echo "$as_me:3089: checking if you want to build C++ binding and demo" >&5
3090 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3091
3092 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3093 if test "${with_cxx_binding+set}" = set; then
3094   withval="$with_cxx_binding"
3095   cf_with_cxx_binding=$withval
3096 else
3097   cf_with_cxx_binding=$cf_with_cxx
3098 fi;
3099 echo "$as_me:3099: result: $cf_with_cxx_binding" >&5
3100 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3101
3102 echo "$as_me:3102: checking if you want to build with Ada95" >&5
3103 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3104 echo "$as_me:3104: result: $cf_with_ada" >&5
3105 echo "${ECHO_T}$cf_with_ada" >&6
3106
3107 echo "$as_me:3107: checking if you want to install terminal database" >&5
3108 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3109
3110 # Check whether --enable-db-install or --disable-db-install was given.
3111 if test "${enable_db_install+set}" = set; then
3112   enableval="$enable_db_install"
3113   cf_with_db_install=$enableval
3114 else
3115   cf_with_db_install=yes
3116 fi;
3117 echo "$as_me:3117: result: $cf_with_db_install" >&5
3118 echo "${ECHO_T}$cf_with_db_install" >&6
3119
3120 echo "$as_me:3120: checking if you want to install manpages" >&5
3121 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3122
3123 # Check whether --with-manpages or --without-manpages was given.
3124 if test "${with_manpages+set}" = set; then
3125   withval="$with_manpages"
3126   cf_with_manpages=$withval
3127 else
3128   cf_with_manpages=yes
3129 fi;
3130 echo "$as_me:3130: result: $cf_with_manpages" >&5
3131 echo "${ECHO_T}$cf_with_manpages" >&6
3132
3133 echo "$as_me:3133: checking if you want to build programs such as tic" >&5
3134 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3135
3136 # Check whether --with-progs or --without-progs was given.
3137 if test "${with_progs+set}" = set; then
3138   withval="$with_progs"
3139   cf_with_progs=$withval
3140 else
3141   cf_with_progs=yes
3142 fi;
3143 echo "$as_me:3143: result: $cf_with_progs" >&5
3144 echo "${ECHO_T}$cf_with_progs" >&6
3145
3146 echo "$as_me:3146: checking if you want to build test-programs" >&5
3147 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3148
3149 # Check whether --with-tests or --without-tests was given.
3150 if test "${with_tests+set}" = set; then
3151   withval="$with_tests"
3152   cf_with_tests=$withval
3153 else
3154   cf_with_tests=yes
3155 fi;
3156 echo "$as_me:3156: result: $cf_with_tests" >&5
3157 echo "${ECHO_T}$cf_with_tests" >&6
3158
3159 echo "$as_me:3159: checking if you wish to install curses.h" >&5
3160 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3161
3162 # Check whether --with-curses-h or --without-curses-h was given.
3163 if test "${with_curses_h+set}" = set; then
3164   withval="$with_curses_h"
3165   with_curses_h=$withval
3166 else
3167   with_curses_h=yes
3168 fi;
3169 echo "$as_me:3169: result: $with_curses_h" >&5
3170 echo "${ECHO_T}$with_curses_h" >&6
3171
3172 modules_to_build="ncurses"
3173 if test "X$cf_with_progs" != Xno ; then
3174 modules_to_build="$modules_to_build progs tack"
3175 fi
3176 modules_to_build="$modules_to_build panel menu form"
3177
3178 test "$program_prefix" != NONE &&
3179   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3180 # Use a double $ so make ignores it.
3181 test "$program_suffix" != NONE &&
3182   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3183 # Double any \ or $.  echo might interpret backslashes.
3184 # By default was `s,x,x', remove it if useless.
3185 cat <<\_ACEOF >conftest.sed
3186 s/[\\$]/&&/g;s/;s,x,x,$//
3187 _ACEOF
3188 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3189 rm conftest.sed
3190
3191 for ac_prog in mawk gawk nawk awk
3192 do
3193   # Extract the first word of "$ac_prog", so it can be a program name with args.
3194 set dummy $ac_prog; ac_word=$2
3195 echo "$as_me:3195: checking for $ac_word" >&5
3196 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3197 if test "${ac_cv_prog_AWK+set}" = set; then
3198   echo $ECHO_N "(cached) $ECHO_C" >&6
3199 else
3200   if test -n "$AWK"; then
3201   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3202 else
3203   ac_save_IFS=$IFS; IFS=$ac_path_separator
3204 ac_dummy="$PATH"
3205 for ac_dir in $ac_dummy; do
3206   IFS=$ac_save_IFS
3207   test -z "$ac_dir" && ac_dir=.
3208   $as_executable_p "$ac_dir/$ac_word" || continue
3209 ac_cv_prog_AWK="$ac_prog"
3210 echo "$as_me:3210: found $ac_dir/$ac_word" >&5
3211 break
3212 done
3213
3214 fi
3215 fi
3216 AWK=$ac_cv_prog_AWK
3217 if test -n "$AWK"; then
3218   echo "$as_me:3218: result: $AWK" >&5
3219 echo "${ECHO_T}$AWK" >&6
3220 else
3221   echo "$as_me:3221: result: no" >&5
3222 echo "${ECHO_T}no" >&6
3223 fi
3224
3225   test -n "$AWK" && break
3226 done
3227
3228 test -z "$AWK" && { { echo "$as_me:3228: error: No awk program found" >&5
3229 echo "$as_me: error: No awk program found" >&2;}
3230    { (exit 1); exit 1; }; }
3231
3232 echo "$as_me:3232: checking for egrep" >&5
3233 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3234 if test "${ac_cv_prog_egrep+set}" = set; then
3235   echo $ECHO_N "(cached) $ECHO_C" >&6
3236 else
3237   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3238                 then ac_cv_prog_egrep='grep -E'
3239                 else ac_cv_prog_egrep='egrep'
3240         fi
3241 fi
3242 echo "$as_me:3242: result: $ac_cv_prog_egrep" >&5
3243 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3244         EGREP=$ac_cv_prog_egrep
3245
3246         test -z "$EGREP" && { { echo "$as_me:3246: error: No egrep program found" >&5
3247 echo "$as_me: error: No egrep program found" >&2;}
3248    { (exit 1); exit 1; }; }
3249
3250 # Find a good install program.  We prefer a C program (faster),
3251 # so one script is as good as another.  But avoid the broken or
3252 # incompatible versions:
3253 # SysV /etc/install, /usr/sbin/install
3254 # SunOS /usr/etc/install
3255 # IRIX /sbin/install
3256 # AIX /bin/install
3257 # AmigaOS /C/install, which installs bootblocks on floppy discs
3258 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3259 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3260 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3261 # ./install, which can be erroneously created by make from ./install.sh.
3262 echo "$as_me:3262: checking for a BSD compatible install" >&5
3263 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3264 if test -z "$INSTALL"; then
3265 if test "${ac_cv_path_install+set}" = set; then
3266   echo $ECHO_N "(cached) $ECHO_C" >&6
3267 else
3268     ac_save_IFS=$IFS; IFS=$ac_path_separator
3269   for ac_dir in $PATH; do
3270     IFS=$ac_save_IFS
3271     # Account for people who put trailing slashes in PATH elements.
3272     case $ac_dir/ in
3273     / | ./ | .// | /cC/* \
3274     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3275     | /usr/ucb/* ) ;;
3276     *)
3277       # OSF1 and SCO ODT 3.0 have their own names for install.
3278       # Don't use installbsd from OSF since it installs stuff as root
3279       # by default.
3280       for ac_prog in ginstall scoinst install; do
3281         if $as_executable_p "$ac_dir/$ac_prog"; then
3282           if test $ac_prog = install &&
3283             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3284             # AIX install.  It has an incompatible calling convention.
3285             :
3286           elif test $ac_prog = install &&
3287             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3288             # program-specific install script used by HP pwplus--don't use.
3289             :
3290           else
3291             ac_cv_path_install="$ac_dir/$ac_prog -c"
3292             break 2
3293           fi
3294         fi
3295       done
3296       ;;
3297     esac
3298   done
3299
3300 fi
3301   if test "${ac_cv_path_install+set}" = set; then
3302     INSTALL=$ac_cv_path_install
3303   else
3304     # As a last resort, use the slow shell script.  We don't cache a
3305     # path for INSTALL within a source directory, because that will
3306     # break other packages using the cache if that directory is
3307     # removed, or if the path is relative.
3308     INSTALL=$ac_install_sh
3309   fi
3310 fi
3311 echo "$as_me:3311: result: $INSTALL" >&5
3312 echo "${ECHO_T}$INSTALL" >&6
3313
3314 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3315 # It thinks the first close brace ends the variable substitution.
3316 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3317
3318 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3319
3320 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3321
3322 case $INSTALL in
3323 (/*)
3324         ;;
3325 (*)
3326         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3327         test -z "$cf_dir" && cf_dir=.
3328         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3329         ;;
3330 esac
3331
3332 for ac_prog in lint cppcheck splint
3333 do
3334   # Extract the first word of "$ac_prog", so it can be a program name with args.
3335 set dummy $ac_prog; ac_word=$2
3336 echo "$as_me:3336: checking for $ac_word" >&5
3337 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3338 if test "${ac_cv_prog_LINT+set}" = set; then
3339   echo $ECHO_N "(cached) $ECHO_C" >&6
3340 else
3341   if test -n "$LINT"; then
3342   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3343 else
3344   ac_save_IFS=$IFS; IFS=$ac_path_separator
3345 ac_dummy="$PATH"
3346 for ac_dir in $ac_dummy; do
3347   IFS=$ac_save_IFS
3348   test -z "$ac_dir" && ac_dir=.
3349   $as_executable_p "$ac_dir/$ac_word" || continue
3350 ac_cv_prog_LINT="$ac_prog"
3351 echo "$as_me:3351: found $ac_dir/$ac_word" >&5
3352 break
3353 done
3354
3355 fi
3356 fi
3357 LINT=$ac_cv_prog_LINT
3358 if test -n "$LINT"; then
3359   echo "$as_me:3359: result: $LINT" >&5
3360 echo "${ECHO_T}$LINT" >&6
3361 else
3362   echo "$as_me:3362: result: no" >&5
3363 echo "${ECHO_T}no" >&6
3364 fi
3365
3366   test -n "$LINT" && break
3367 done
3368
3369 echo "$as_me:3369: checking whether ln -s works" >&5
3370 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3371 LN_S=$as_ln_s
3372 if test "$LN_S" = "ln -s"; then
3373   echo "$as_me:3373: result: yes" >&5
3374 echo "${ECHO_T}yes" >&6
3375 else
3376   echo "$as_me:3376: result: no, using $LN_S" >&5
3377 echo "${ECHO_T}no, using $LN_S" >&6
3378 fi
3379
3380 echo "$as_me:3380: checking if $LN_S -f options work" >&5
3381 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3382
3383 rm -f conf$$.src conf$$dst
3384 echo >conf$$.dst
3385 echo first >conf$$.src
3386 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3387         cf_prog_ln_sf=yes
3388 else
3389         cf_prog_ln_sf=no
3390 fi
3391 rm -f conf$$.dst conf$$src
3392 echo "$as_me:3392: result: $cf_prog_ln_sf" >&5
3393 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3394
3395 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3396
3397 echo "$as_me:3397: checking for long file names" >&5
3398 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3399 if test "${ac_cv_sys_long_file_names+set}" = set; then
3400   echo $ECHO_N "(cached) $ECHO_C" >&6
3401 else
3402   ac_cv_sys_long_file_names=yes
3403 # Test for long file names in all the places we know might matter:
3404 #      .                the current directory, where building will happen
3405 #      $prefix/lib      where we will be installing things
3406 #      $exec_prefix/lib likewise
3407 # eval it to expand exec_prefix.
3408 #      $TMPDIR          if set, where it might want to write temporary files
3409 # if $TMPDIR is not set:
3410 #      /tmp             where it might want to write temporary files
3411 #      /var/tmp         likewise
3412 #      /usr/tmp         likewise
3413 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3414   ac_tmpdirs=$TMPDIR
3415 else
3416   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3417 fi
3418 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3419   test -d $ac_dir || continue
3420   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3421   ac_xdir=$ac_dir/cf$$
3422   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3423   ac_tf1=$ac_xdir/conftest9012345
3424   ac_tf2=$ac_xdir/conftest9012346
3425   (echo 1 >$ac_tf1) 2>/dev/null
3426   (echo 2 >$ac_tf2) 2>/dev/null
3427   ac_val=`cat $ac_tf1 2>/dev/null`
3428   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3429     ac_cv_sys_long_file_names=no
3430     rm -rf $ac_xdir 2>/dev/null
3431     break
3432   fi
3433   rm -rf $ac_xdir 2>/dev/null
3434 done
3435 fi
3436 echo "$as_me:3436: result: $ac_cv_sys_long_file_names" >&5
3437 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3438 if test $ac_cv_sys_long_file_names = yes; then
3439
3440 cat >>confdefs.h <<\EOF
3441 #define HAVE_LONG_FILE_NAMES 1
3442 EOF
3443
3444 fi
3445
3446 # if we find pkg-config, check if we should install the ".pc" files.
3447
3448 echo "$as_me:3448: checking if you want to use pkg-config" >&5
3449 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3450
3451 # Check whether --with-pkg-config or --without-pkg-config was given.
3452 if test "${with_pkg_config+set}" = set; then
3453   withval="$with_pkg_config"
3454   cf_pkg_config=$withval
3455 else
3456   cf_pkg_config=yes
3457 fi;
3458 echo "$as_me:3458: result: $cf_pkg_config" >&5
3459 echo "${ECHO_T}$cf_pkg_config" >&6
3460
3461 case $cf_pkg_config in
3462 (no)
3463         PKG_CONFIG=none
3464         ;;
3465 (yes)
3466
3467 if test -n "$ac_tool_prefix"; then
3468   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3469 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3470 echo "$as_me:3470: checking for $ac_word" >&5
3471 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3472 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3473   echo $ECHO_N "(cached) $ECHO_C" >&6
3474 else
3475   case $PKG_CONFIG in
3476   [\\/]* | ?:[\\/]*)
3477   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3478   ;;
3479   *)
3480   ac_save_IFS=$IFS; IFS=$ac_path_separator
3481 ac_dummy="$PATH"
3482 for ac_dir in $ac_dummy; do
3483   IFS=$ac_save_IFS
3484   test -z "$ac_dir" && ac_dir=.
3485   if $as_executable_p "$ac_dir/$ac_word"; then
3486    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3487    echo "$as_me:3487: found $ac_dir/$ac_word" >&5
3488    break
3489 fi
3490 done
3491
3492   ;;
3493 esac
3494 fi
3495 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3496
3497 if test -n "$PKG_CONFIG"; then
3498   echo "$as_me:3498: result: $PKG_CONFIG" >&5
3499 echo "${ECHO_T}$PKG_CONFIG" >&6
3500 else
3501   echo "$as_me:3501: result: no" >&5
3502 echo "${ECHO_T}no" >&6
3503 fi
3504
3505 fi
3506 if test -z "$ac_cv_path_PKG_CONFIG"; then
3507   ac_pt_PKG_CONFIG=$PKG_CONFIG
3508   # Extract the first word of "pkg-config", so it can be a program name with args.
3509 set dummy pkg-config; ac_word=$2
3510 echo "$as_me:3510: checking for $ac_word" >&5
3511 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3512 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3513   echo $ECHO_N "(cached) $ECHO_C" >&6
3514 else
3515   case $ac_pt_PKG_CONFIG in
3516   [\\/]* | ?:[\\/]*)
3517   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3518   ;;
3519   *)
3520   ac_save_IFS=$IFS; IFS=$ac_path_separator
3521 ac_dummy="$PATH"
3522 for ac_dir in $ac_dummy; do
3523   IFS=$ac_save_IFS
3524   test -z "$ac_dir" && ac_dir=.
3525   if $as_executable_p "$ac_dir/$ac_word"; then
3526    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3527    echo "$as_me:3527: found $ac_dir/$ac_word" >&5
3528    break
3529 fi
3530 done
3531
3532   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3533   ;;
3534 esac
3535 fi
3536 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3537
3538 if test -n "$ac_pt_PKG_CONFIG"; then
3539   echo "$as_me:3539: result: $ac_pt_PKG_CONFIG" >&5
3540 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3541 else
3542   echo "$as_me:3542: result: no" >&5
3543 echo "${ECHO_T}no" >&6
3544 fi
3545
3546   PKG_CONFIG=$ac_pt_PKG_CONFIG
3547 else
3548   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3549 fi
3550
3551         ;;
3552 (*)
3553         PKG_CONFIG=$withval
3554         ;;
3555 esac
3556
3557 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3558 if test "$PKG_CONFIG" != none ; then
3559
3560 if test "x$prefix" != xNONE; then
3561         cf_path_syntax="$prefix"
3562 else
3563         cf_path_syntax="$ac_default_prefix"
3564 fi
3565
3566 case ".$PKG_CONFIG" in
3567 (.\$\(*\)*|.\'*\'*)
3568         ;;
3569 (..|./*|.\\*)
3570         ;;
3571 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3572         ;;
3573 (.\${*prefix}*|.\${*dir}*)
3574         eval PKG_CONFIG="$PKG_CONFIG"
3575         case ".$PKG_CONFIG" in
3576         (.NONE/*)
3577                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3578                 ;;
3579         esac
3580         ;;
3581 (.no|.NONE/*)
3582         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3583         ;;
3584 (*)
3585         { { echo "$as_me:3585: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3586 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3587    { (exit 1); exit 1; }; }
3588         ;;
3589 esac
3590
3591 elif test "x$cf_pkg_config" != xno ; then
3592         { echo "$as_me:3592: WARNING: pkg-config is not installed" >&5
3593 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3594 fi
3595
3596 case $PKG_CONFIG in
3597 (no|none|yes)
3598         echo "$as_me:3598: checking for pkg-config library directory" >&5
3599 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3600         ;;
3601 (*)
3602         echo "$as_me:3602: checking for $PKG_CONFIG library directory" >&5
3603 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3604         ;;
3605 esac
3606
3607 PKG_CONFIG_LIBDIR=no
3608
3609 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3610 if test "${with_pkg_config_libdir+set}" = set; then
3611   withval="$with_pkg_config_libdir"
3612   PKG_CONFIG_LIBDIR=$withval
3613 else
3614   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3615 fi;
3616
3617 case x$PKG_CONFIG_LIBDIR in
3618 (x/*)
3619         ;;
3620 (xyes)
3621         # Look for the library directory using the same prefix as the executable
3622         if test "x$PKG_CONFIG" = xnone
3623         then
3624                 cf_path=$prefix
3625         else
3626                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3627         fi
3628
3629         # If you don't like using the default architecture, you have to specify the
3630         # intended library directory and corresponding compiler/linker options.
3631         #
3632         # This case allows for Debian's 2014-flavor of multiarch, along with the
3633         # most common variations before that point.  Some other variants spell the
3634         # directory differently, e.g., "pkg-config", and put it in unusual places.
3635         # pkg-config has always been poorly standardized, which is ironic...
3636         case x`(arch) 2>/dev/null` in
3637         (*64)
3638                 cf_search_path="\
3639                         $cf_path/lib/*64-linux-gnu \
3640                         $cf_path/share \
3641                         $cf_path/lib64 \
3642                         $cf_path/lib32 \
3643                         $cf_path/lib"
3644                 ;;
3645         (*)
3646                 cf_search_path="\
3647                         $cf_path/lib/*-linux-gnu \
3648                         $cf_path/share \
3649                         $cf_path/lib32 \
3650                         $cf_path/lib \
3651                         $cf_path/libdata"
3652                 ;;
3653         esac
3654
3655         test -n "$verbose" && echo "    list..." 1>&6
3656
3657 echo "${as_me:-configure}:3657: testing list... ..." 1>&5
3658
3659         for cf_config in $cf_search_path
3660         do
3661                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3662
3663 echo "${as_me:-configure}:3663: testing checking $cf_config/pkgconfig ..." 1>&5
3664
3665                 if test -d $cf_config/pkgconfig
3666                 then
3667                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3668                         echo "$as_me:3668: checking done" >&5
3669 echo $ECHO_N "checking done... $ECHO_C" >&6
3670                         break
3671                 fi
3672         done
3673         ;;
3674 (*)
3675         ;;
3676 esac
3677
3678 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3679         echo "$as_me:3679: result: $PKG_CONFIG_LIBDIR" >&5
3680 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3681 fi
3682
3683 if test "x$PKG_CONFIG" != xnone
3684 then
3685         echo "$as_me:3685: checking if we should install .pc files for $PKG_CONFIG" >&5
3686 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3687 else
3688         echo "$as_me:3688: checking if we should install .pc files" >&5
3689 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3690 fi
3691
3692 # Check whether --enable-pc-files or --disable-pc-files was given.
3693 if test "${enable_pc_files+set}" = set; then
3694   enableval="$enable_pc_files"
3695   enable_pc_files=$enableval
3696 else
3697   enable_pc_files=no
3698 fi;
3699 echo "$as_me:3699: result: $enable_pc_files" >&5
3700 echo "${ECHO_T}$enable_pc_files" >&6
3701
3702 if test "x$enable_pc_files" != xno
3703 then
3704         MAKE_PC_FILES=
3705         case "x$PKG_CONFIG_LIBDIR" in
3706         (xno|xyes)
3707                 { echo "$as_me:3707: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3708 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3709                 ;;
3710         (*)
3711
3712 if test "x$prefix" != xNONE; then
3713         cf_path_syntax="$prefix"
3714 else
3715         cf_path_syntax="$ac_default_prefix"
3716 fi
3717
3718 case ".$PKG_CONFIG_LIBDIR" in
3719 (.\$\(*\)*|.\'*\'*)
3720         ;;
3721 (..|./*|.\\*)
3722         ;;
3723 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3724         ;;
3725 (.\${*prefix}*|.\${*dir}*)
3726         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3727         case ".$PKG_CONFIG_LIBDIR" in
3728         (.NONE/*)
3729                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3730                 ;;
3731         esac
3732         ;;
3733 (.no|.NONE/*)
3734         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3735         ;;
3736 (*)
3737         { { echo "$as_me:3737: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3738 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3739    { (exit 1); exit 1; }; }
3740         ;;
3741 esac
3742
3743                 ;;
3744         esac
3745 else
3746         MAKE_PC_FILES="#"
3747 fi
3748
3749 if test -z "$MAKE_PC_FILES"
3750 then
3751         echo "$as_me:3751: checking for suffix to add to pc-files" >&5
3752 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3753
3754 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3755 if test "${with_pc_suffix+set}" = set; then
3756   withval="$with_pc_suffix"
3757   case "x$withval" in
3758         (xyes|xno)
3759                 PC_MODULE_SUFFIX=
3760                 ;;
3761         (*)     PC_MODULE_SUFFIX="$withval"
3762                 ;;
3763         esac
3764 fi;
3765         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3766         echo "$as_me:3766: result: $PC_MODULE_SUFFIX" >&5
3767 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3768         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3769
3770 fi
3771
3772 echo "$as_me:3772: checking if we should assume mixed-case filenames" >&5
3773 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3774
3775 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3776 if test "${enable_mixed_case+set}" = set; then
3777   enableval="$enable_mixed_case"
3778   enable_mixedcase=$enableval
3779 else
3780   enable_mixedcase=auto
3781 fi;
3782 echo "$as_me:3782: result: $enable_mixedcase" >&5
3783 echo "${ECHO_T}$enable_mixedcase" >&6
3784 if test "$enable_mixedcase" = "auto" ; then
3785
3786 echo "$as_me:3786: checking if filesystem supports mixed-case filenames" >&5
3787 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3788 if test "${cf_cv_mixedcase+set}" = set; then
3789   echo $ECHO_N "(cached) $ECHO_C" >&6
3790 else
3791
3792 if test "$cross_compiling" = yes ; then
3793         case $target_alias in
3794         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3795                 cf_cv_mixedcase=no
3796                 ;;
3797         (*)
3798                 cf_cv_mixedcase=yes
3799                 ;;
3800         esac
3801 else
3802         rm -f conftest CONFTEST
3803         echo test >conftest
3804         if test -f CONFTEST ; then
3805                 cf_cv_mixedcase=no
3806         else
3807                 cf_cv_mixedcase=yes
3808         fi
3809         rm -f conftest CONFTEST
3810 fi
3811
3812 fi
3813 echo "$as_me:3813: result: $cf_cv_mixedcase" >&5
3814 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3815 test "$cf_cv_mixedcase" = yes &&
3816 cat >>confdefs.h <<\EOF
3817 #define MIXEDCASE_FILENAMES 1
3818 EOF
3819
3820 else
3821         cf_cv_mixedcase=$enable_mixedcase
3822         if test "x$enable_mixedcase" = "xyes" ; then
3823
3824 cat >>confdefs.h <<\EOF
3825 #define MIXEDCASE_FILENAMES 1
3826 EOF
3827
3828         fi
3829 fi
3830
3831 # do this after mixed-case option (tags/TAGS is not as important as tic).
3832 echo "$as_me:3832: checking whether ${MAKE-make} sets \${MAKE}" >&5
3833 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3834 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3835 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3836   echo $ECHO_N "(cached) $ECHO_C" >&6
3837 else
3838   cat >conftest.make <<\EOF
3839 all:
3840         @echo 'ac_maketemp="${MAKE}"'
3841 EOF
3842 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3843 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3844 if test -n "$ac_maketemp"; then
3845   eval ac_cv_prog_make_${ac_make}_set=yes
3846 else
3847   eval ac_cv_prog_make_${ac_make}_set=no
3848 fi
3849 rm -f conftest.make
3850 fi
3851 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3852   echo "$as_me:3852: result: yes" >&5
3853 echo "${ECHO_T}yes" >&6
3854   SET_MAKE=
3855 else
3856   echo "$as_me:3856: result: no" >&5
3857 echo "${ECHO_T}no" >&6
3858   SET_MAKE="MAKE=${MAKE-make}"
3859 fi
3860
3861 for ac_prog in exctags ctags
3862 do
3863   # Extract the first word of "$ac_prog", so it can be a program name with args.
3864 set dummy $ac_prog; ac_word=$2
3865 echo "$as_me:3865: checking for $ac_word" >&5
3866 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3867 if test "${ac_cv_prog_CTAGS+set}" = set; then
3868   echo $ECHO_N "(cached) $ECHO_C" >&6
3869 else
3870   if test -n "$CTAGS"; then
3871   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3872 else
3873   ac_save_IFS=$IFS; IFS=$ac_path_separator
3874 ac_dummy="$PATH"
3875 for ac_dir in $ac_dummy; do
3876   IFS=$ac_save_IFS
3877   test -z "$ac_dir" && ac_dir=.
3878   $as_executable_p "$ac_dir/$ac_word" || continue
3879 ac_cv_prog_CTAGS="$ac_prog"
3880 echo "$as_me:3880: found $ac_dir/$ac_word" >&5
3881 break
3882 done
3883
3884 fi
3885 fi
3886 CTAGS=$ac_cv_prog_CTAGS
3887 if test -n "$CTAGS"; then
3888   echo "$as_me:3888: result: $CTAGS" >&5
3889 echo "${ECHO_T}$CTAGS" >&6
3890 else
3891   echo "$as_me:3891: result: no" >&5
3892 echo "${ECHO_T}no" >&6
3893 fi
3894
3895   test -n "$CTAGS" && break
3896 done
3897
3898 for ac_prog in exetags etags
3899 do
3900   # Extract the first word of "$ac_prog", so it can be a program name with args.
3901 set dummy $ac_prog; ac_word=$2
3902 echo "$as_me:3902: checking for $ac_word" >&5
3903 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3904 if test "${ac_cv_prog_ETAGS+set}" = set; then
3905   echo $ECHO_N "(cached) $ECHO_C" >&6
3906 else
3907   if test -n "$ETAGS"; then
3908   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3909 else
3910   ac_save_IFS=$IFS; IFS=$ac_path_separator
3911 ac_dummy="$PATH"
3912 for ac_dir in $ac_dummy; do
3913   IFS=$ac_save_IFS
3914   test -z "$ac_dir" && ac_dir=.
3915   $as_executable_p "$ac_dir/$ac_word" || continue
3916 ac_cv_prog_ETAGS="$ac_prog"
3917 echo "$as_me:3917: found $ac_dir/$ac_word" >&5
3918 break
3919 done
3920
3921 fi
3922 fi
3923 ETAGS=$ac_cv_prog_ETAGS
3924 if test -n "$ETAGS"; then
3925   echo "$as_me:3925: result: $ETAGS" >&5
3926 echo "${ECHO_T}$ETAGS" >&6
3927 else
3928   echo "$as_me:3928: result: no" >&5
3929 echo "${ECHO_T}no" >&6
3930 fi
3931
3932   test -n "$ETAGS" && break
3933 done
3934
3935 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3936 set dummy ${CTAGS:-ctags}; ac_word=$2
3937 echo "$as_me:3937: checking for $ac_word" >&5
3938 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3939 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3940   echo $ECHO_N "(cached) $ECHO_C" >&6
3941 else
3942   if test -n "$MAKE_LOWER_TAGS"; then
3943   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3944 else
3945   ac_save_IFS=$IFS; IFS=$ac_path_separator
3946 ac_dummy="$PATH"
3947 for ac_dir in $ac_dummy; do
3948   IFS=$ac_save_IFS
3949   test -z "$ac_dir" && ac_dir=.
3950   $as_executable_p "$ac_dir/$ac_word" || continue
3951 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3952 echo "$as_me:3952: found $ac_dir/$ac_word" >&5
3953 break
3954 done
3955
3956   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3957 fi
3958 fi
3959 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3960 if test -n "$MAKE_LOWER_TAGS"; then
3961   echo "$as_me:3961: result: $MAKE_LOWER_TAGS" >&5
3962 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3963 else
3964   echo "$as_me:3964: result: no" >&5
3965 echo "${ECHO_T}no" >&6
3966 fi
3967
3968 if test "$cf_cv_mixedcase" = yes ; then
3969         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3970 set dummy ${ETAGS:-etags}; ac_word=$2
3971 echo "$as_me:3971: checking for $ac_word" >&5
3972 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3973 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3974   echo $ECHO_N "(cached) $ECHO_C" >&6
3975 else
3976   if test -n "$MAKE_UPPER_TAGS"; then
3977   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3978 else
3979   ac_save_IFS=$IFS; IFS=$ac_path_separator
3980 ac_dummy="$PATH"
3981 for ac_dir in $ac_dummy; do
3982   IFS=$ac_save_IFS
3983   test -z "$ac_dir" && ac_dir=.
3984   $as_executable_p "$ac_dir/$ac_word" || continue
3985 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3986 echo "$as_me:3986: found $ac_dir/$ac_word" >&5
3987 break
3988 done
3989
3990   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3991 fi
3992 fi
3993 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3994 if test -n "$MAKE_UPPER_TAGS"; then
3995   echo "$as_me:3995: result: $MAKE_UPPER_TAGS" >&5
3996 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3997 else
3998   echo "$as_me:3998: result: no" >&5
3999 echo "${ECHO_T}no" >&6
4000 fi
4001
4002 else
4003         MAKE_UPPER_TAGS=no
4004 fi
4005
4006 if test "$MAKE_UPPER_TAGS" = yes ; then
4007         MAKE_UPPER_TAGS=
4008 else
4009         MAKE_UPPER_TAGS="#"
4010 fi
4011
4012 if test "$MAKE_LOWER_TAGS" = yes ; then
4013         MAKE_LOWER_TAGS=
4014 else
4015         MAKE_LOWER_TAGS="#"
4016 fi
4017
4018 echo "$as_me:4018: checking for makeflags variable" >&5
4019 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4020 if test "${cf_cv_makeflags+set}" = set; then
4021   echo $ECHO_N "(cached) $ECHO_C" >&6
4022 else
4023
4024         cf_cv_makeflags=''
4025         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4026         do
4027                 cat >cf_makeflags.tmp <<CF_EOF
4028 SHELL = $SHELL
4029 all :
4030         @ echo '.$cf_option'
4031 CF_EOF
4032                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4033                 case "$cf_result" in
4034                 (.*k|.*kw)
4035                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4036                         case "$cf_result" in
4037                         (.*CC=*)        cf_cv_makeflags=
4038                                 ;;
4039                         (*)     cf_cv_makeflags=$cf_option
4040                                 ;;
4041                         esac
4042                         break
4043                         ;;
4044                 (.-)    ;;
4045                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
4046                         ;;
4047                 esac
4048         done
4049         rm -f cf_makeflags.tmp
4050
4051 fi
4052 echo "$as_me:4052: result: $cf_cv_makeflags" >&5
4053 echo "${ECHO_T}$cf_cv_makeflags" >&6
4054
4055 if test -n "$ac_tool_prefix"; then
4056   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4057 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4058 echo "$as_me:4058: checking for $ac_word" >&5
4059 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4060 if test "${ac_cv_prog_RANLIB+set}" = set; then
4061   echo $ECHO_N "(cached) $ECHO_C" >&6
4062 else
4063   if test -n "$RANLIB"; then
4064   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4065 else
4066   ac_save_IFS=$IFS; IFS=$ac_path_separator
4067 ac_dummy="$PATH"
4068 for ac_dir in $ac_dummy; do
4069   IFS=$ac_save_IFS
4070   test -z "$ac_dir" && ac_dir=.
4071   $as_executable_p "$ac_dir/$ac_word" || continue
4072 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4073 echo "$as_me:4073: found $ac_dir/$ac_word" >&5
4074 break
4075 done
4076
4077 fi
4078 fi
4079 RANLIB=$ac_cv_prog_RANLIB
4080 if test -n "$RANLIB"; then
4081   echo "$as_me:4081: result: $RANLIB" >&5
4082 echo "${ECHO_T}$RANLIB" >&6
4083 else
4084   echo "$as_me:4084: result: no" >&5
4085 echo "${ECHO_T}no" >&6
4086 fi
4087
4088 fi
4089 if test -z "$ac_cv_prog_RANLIB"; then
4090   ac_ct_RANLIB=$RANLIB
4091   # Extract the first word of "ranlib", so it can be a program name with args.
4092 set dummy ranlib; ac_word=$2
4093 echo "$as_me:4093: checking for $ac_word" >&5
4094 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4095 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4096   echo $ECHO_N "(cached) $ECHO_C" >&6
4097 else
4098   if test -n "$ac_ct_RANLIB"; then
4099   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4100 else
4101   ac_save_IFS=$IFS; IFS=$ac_path_separator
4102 ac_dummy="$PATH"
4103 for ac_dir in $ac_dummy; do
4104   IFS=$ac_save_IFS
4105   test -z "$ac_dir" && ac_dir=.
4106   $as_executable_p "$ac_dir/$ac_word" || continue
4107 ac_cv_prog_ac_ct_RANLIB="ranlib"
4108 echo "$as_me:4108: found $ac_dir/$ac_word" >&5
4109 break
4110 done
4111
4112   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4113 fi
4114 fi
4115 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4116 if test -n "$ac_ct_RANLIB"; then
4117   echo "$as_me:4117: result: $ac_ct_RANLIB" >&5
4118 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4119 else
4120   echo "$as_me:4120: result: no" >&5
4121 echo "${ECHO_T}no" >&6
4122 fi
4123
4124   RANLIB=$ac_ct_RANLIB
4125 else
4126   RANLIB="$ac_cv_prog_RANLIB"
4127 fi
4128
4129 if test -n "$ac_tool_prefix"; then
4130   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4131 set dummy ${ac_tool_prefix}ld; ac_word=$2
4132 echo "$as_me:4132: checking for $ac_word" >&5
4133 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4134 if test "${ac_cv_prog_LD+set}" = set; then
4135   echo $ECHO_N "(cached) $ECHO_C" >&6
4136 else
4137   if test -n "$LD"; then
4138   ac_cv_prog_LD="$LD" # Let the user override the test.
4139 else
4140   ac_save_IFS=$IFS; IFS=$ac_path_separator
4141 ac_dummy="$PATH"
4142 for ac_dir in $ac_dummy; do
4143   IFS=$ac_save_IFS
4144   test -z "$ac_dir" && ac_dir=.
4145   $as_executable_p "$ac_dir/$ac_word" || continue
4146 ac_cv_prog_LD="${ac_tool_prefix}ld"
4147 echo "$as_me:4147: found $ac_dir/$ac_word" >&5
4148 break
4149 done
4150
4151 fi
4152 fi
4153 LD=$ac_cv_prog_LD
4154 if test -n "$LD"; then
4155   echo "$as_me:4155: result: $LD" >&5
4156 echo "${ECHO_T}$LD" >&6
4157 else
4158   echo "$as_me:4158: result: no" >&5
4159 echo "${ECHO_T}no" >&6
4160 fi
4161
4162 fi
4163 if test -z "$ac_cv_prog_LD"; then
4164   ac_ct_LD=$LD
4165   # Extract the first word of "ld", so it can be a program name with args.
4166 set dummy ld; ac_word=$2
4167 echo "$as_me:4167: checking for $ac_word" >&5
4168 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4169 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4170   echo $ECHO_N "(cached) $ECHO_C" >&6
4171 else
4172   if test -n "$ac_ct_LD"; then
4173   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4174 else
4175   ac_save_IFS=$IFS; IFS=$ac_path_separator
4176 ac_dummy="$PATH"
4177 for ac_dir in $ac_dummy; do
4178   IFS=$ac_save_IFS
4179   test -z "$ac_dir" && ac_dir=.
4180   $as_executable_p "$ac_dir/$ac_word" || continue
4181 ac_cv_prog_ac_ct_LD="ld"
4182 echo "$as_me:4182: found $ac_dir/$ac_word" >&5
4183 break
4184 done
4185
4186   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4187 fi
4188 fi
4189 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4190 if test -n "$ac_ct_LD"; then
4191   echo "$as_me:4191: result: $ac_ct_LD" >&5
4192 echo "${ECHO_T}$ac_ct_LD" >&6
4193 else
4194   echo "$as_me:4194: result: no" >&5
4195 echo "${ECHO_T}no" >&6
4196 fi
4197
4198   LD=$ac_ct_LD
4199 else
4200   LD="$ac_cv_prog_LD"
4201 fi
4202
4203 if test -n "$ac_tool_prefix"; then
4204   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4205 set dummy ${ac_tool_prefix}ar; ac_word=$2
4206 echo "$as_me:4206: checking for $ac_word" >&5
4207 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4208 if test "${ac_cv_prog_AR+set}" = set; then
4209   echo $ECHO_N "(cached) $ECHO_C" >&6
4210 else
4211   if test -n "$AR"; then
4212   ac_cv_prog_AR="$AR" # Let the user override the test.
4213 else
4214   ac_save_IFS=$IFS; IFS=$ac_path_separator
4215 ac_dummy="$PATH"
4216 for ac_dir in $ac_dummy; do
4217   IFS=$ac_save_IFS
4218   test -z "$ac_dir" && ac_dir=.
4219   $as_executable_p "$ac_dir/$ac_word" || continue
4220 ac_cv_prog_AR="${ac_tool_prefix}ar"
4221 echo "$as_me:4221: found $ac_dir/$ac_word" >&5
4222 break
4223 done
4224
4225 fi
4226 fi
4227 AR=$ac_cv_prog_AR
4228 if test -n "$AR"; then
4229   echo "$as_me:4229: result: $AR" >&5
4230 echo "${ECHO_T}$AR" >&6
4231 else
4232   echo "$as_me:4232: result: no" >&5
4233 echo "${ECHO_T}no" >&6
4234 fi
4235
4236 fi
4237 if test -z "$ac_cv_prog_AR"; then
4238   ac_ct_AR=$AR
4239   # Extract the first word of "ar", so it can be a program name with args.
4240 set dummy ar; ac_word=$2
4241 echo "$as_me:4241: checking for $ac_word" >&5
4242 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4243 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4244   echo $ECHO_N "(cached) $ECHO_C" >&6
4245 else
4246   if test -n "$ac_ct_AR"; then
4247   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4248 else
4249   ac_save_IFS=$IFS; IFS=$ac_path_separator
4250 ac_dummy="$PATH"
4251 for ac_dir in $ac_dummy; do
4252   IFS=$ac_save_IFS
4253   test -z "$ac_dir" && ac_dir=.
4254   $as_executable_p "$ac_dir/$ac_word" || continue
4255 ac_cv_prog_ac_ct_AR="ar"
4256 echo "$as_me:4256: found $ac_dir/$ac_word" >&5
4257 break
4258 done
4259
4260   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4261 fi
4262 fi
4263 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4264 if test -n "$ac_ct_AR"; then
4265   echo "$as_me:4265: result: $ac_ct_AR" >&5
4266 echo "${ECHO_T}$ac_ct_AR" >&6
4267 else
4268   echo "$as_me:4268: result: no" >&5
4269 echo "${ECHO_T}no" >&6
4270 fi
4271
4272   AR=$ac_ct_AR
4273 else
4274   AR="$ac_cv_prog_AR"
4275 fi
4276
4277 if test -n "$ac_tool_prefix"; then
4278   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4279 set dummy ${ac_tool_prefix}nm; ac_word=$2
4280 echo "$as_me:4280: checking for $ac_word" >&5
4281 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4282 if test "${ac_cv_prog_NM+set}" = set; then
4283   echo $ECHO_N "(cached) $ECHO_C" >&6
4284 else
4285   if test -n "$NM"; then
4286   ac_cv_prog_NM="$NM" # Let the user override the test.
4287 else
4288   ac_save_IFS=$IFS; IFS=$ac_path_separator
4289 ac_dummy="$PATH"
4290 for ac_dir in $ac_dummy; do
4291   IFS=$ac_save_IFS
4292   test -z "$ac_dir" && ac_dir=.
4293   $as_executable_p "$ac_dir/$ac_word" || continue
4294 ac_cv_prog_NM="${ac_tool_prefix}nm"
4295 echo "$as_me:4295: found $ac_dir/$ac_word" >&5
4296 break
4297 done
4298
4299 fi
4300 fi
4301 NM=$ac_cv_prog_NM
4302 if test -n "$NM"; then
4303   echo "$as_me:4303: result: $NM" >&5
4304 echo "${ECHO_T}$NM" >&6
4305 else
4306   echo "$as_me:4306: result: no" >&5
4307 echo "${ECHO_T}no" >&6
4308 fi
4309
4310 fi
4311 if test -z "$ac_cv_prog_NM"; then
4312   ac_ct_NM=$NM
4313   # Extract the first word of "nm", so it can be a program name with args.
4314 set dummy nm; ac_word=$2
4315 echo "$as_me:4315: checking for $ac_word" >&5
4316 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4317 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4318   echo $ECHO_N "(cached) $ECHO_C" >&6
4319 else
4320   if test -n "$ac_ct_NM"; then
4321   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4322 else
4323   ac_save_IFS=$IFS; IFS=$ac_path_separator
4324 ac_dummy="$PATH"
4325 for ac_dir in $ac_dummy; do
4326   IFS=$ac_save_IFS
4327   test -z "$ac_dir" && ac_dir=.
4328   $as_executable_p "$ac_dir/$ac_word" || continue
4329 ac_cv_prog_ac_ct_NM="nm"
4330 echo "$as_me:4330: found $ac_dir/$ac_word" >&5
4331 break
4332 done
4333
4334   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4335 fi
4336 fi
4337 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4338 if test -n "$ac_ct_NM"; then
4339   echo "$as_me:4339: result: $ac_ct_NM" >&5
4340 echo "${ECHO_T}$ac_ct_NM" >&6
4341 else
4342   echo "$as_me:4342: result: no" >&5
4343 echo "${ECHO_T}no" >&6
4344 fi
4345
4346   NM=$ac_ct_NM
4347 else
4348   NM="$ac_cv_prog_NM"
4349 fi
4350
4351 if test -n "$ac_tool_prefix"; then
4352   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4353 set dummy ${ac_tool_prefix}ar; ac_word=$2
4354 echo "$as_me:4354: checking for $ac_word" >&5
4355 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4356 if test "${ac_cv_prog_AR+set}" = set; then
4357   echo $ECHO_N "(cached) $ECHO_C" >&6
4358 else
4359   if test -n "$AR"; then
4360   ac_cv_prog_AR="$AR" # Let the user override the test.
4361 else
4362   ac_save_IFS=$IFS; IFS=$ac_path_separator
4363 ac_dummy="$PATH"
4364 for ac_dir in $ac_dummy; do
4365   IFS=$ac_save_IFS
4366   test -z "$ac_dir" && ac_dir=.
4367   $as_executable_p "$ac_dir/$ac_word" || continue
4368 ac_cv_prog_AR="${ac_tool_prefix}ar"
4369 echo "$as_me:4369: found $ac_dir/$ac_word" >&5
4370 break
4371 done
4372
4373 fi
4374 fi
4375 AR=$ac_cv_prog_AR
4376 if test -n "$AR"; then
4377   echo "$as_me:4377: result: $AR" >&5
4378 echo "${ECHO_T}$AR" >&6
4379 else
4380   echo "$as_me:4380: result: no" >&5
4381 echo "${ECHO_T}no" >&6
4382 fi
4383
4384 fi
4385 if test -z "$ac_cv_prog_AR"; then
4386   ac_ct_AR=$AR
4387   # Extract the first word of "ar", so it can be a program name with args.
4388 set dummy ar; ac_word=$2
4389 echo "$as_me:4389: checking for $ac_word" >&5
4390 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4391 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4392   echo $ECHO_N "(cached) $ECHO_C" >&6
4393 else
4394   if test -n "$ac_ct_AR"; then
4395   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4396 else
4397   ac_save_IFS=$IFS; IFS=$ac_path_separator
4398 ac_dummy="$PATH"
4399 for ac_dir in $ac_dummy; do
4400   IFS=$ac_save_IFS
4401   test -z "$ac_dir" && ac_dir=.
4402   $as_executable_p "$ac_dir/$ac_word" || continue
4403 ac_cv_prog_ac_ct_AR="ar"
4404 echo "$as_me:4404: found $ac_dir/$ac_word" >&5
4405 break
4406 done
4407
4408   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4409 fi
4410 fi
4411 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4412 if test -n "$ac_ct_AR"; then
4413   echo "$as_me:4413: result: $ac_ct_AR" >&5
4414 echo "${ECHO_T}$ac_ct_AR" >&6
4415 else
4416   echo "$as_me:4416: result: no" >&5
4417 echo "${ECHO_T}no" >&6
4418 fi
4419
4420   AR=$ac_ct_AR
4421 else
4422   AR="$ac_cv_prog_AR"
4423 fi
4424
4425 echo "$as_me:4425: checking for options to update archives" >&5
4426 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4427 if test "${cf_cv_ar_flags+set}" = set; then
4428   echo $ECHO_N "(cached) $ECHO_C" >&6
4429 else
4430
4431         cf_cv_ar_flags=unknown
4432         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4433         do
4434
4435                 # check if $ARFLAGS already contains this choice
4436                 if test "x$ARFLAGS" != "x" ; then
4437                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4438                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4439                                 cf_cv_ar_flags=
4440                                 break
4441                         fi
4442                 fi
4443
4444                 rm -f conftest.$ac_cv_objext
4445                 rm -f conftest.a
4446
4447                 cat >conftest.$ac_ext <<EOF
4448 #line 4448 "configure"
4449 int     testdata[3] = { 123, 456, 789 };
4450 EOF
4451                 if { (eval echo "$as_me:4451: \"$ac_compile\"") >&5
4452   (eval $ac_compile) 2>&5
4453   ac_status=$?
4454   echo "$as_me:4454: \$? = $ac_status" >&5
4455   (exit $ac_status); } ; then
4456                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4457                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4458                         if test -f conftest.a ; then
4459                                 cf_cv_ar_flags=$cf_ar_flags
4460                                 break
4461                         fi
4462                 else
4463                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4464
4465 echo "${as_me:-configure}:4465: testing cannot compile test-program ..." 1>&5
4466
4467                         break
4468                 fi
4469         done
4470         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4471
4472 fi
4473 echo "$as_me:4473: result: $cf_cv_ar_flags" >&5
4474 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4475
4476 if test -n "$ARFLAGS" ; then
4477         if test -n "$cf_cv_ar_flags" ; then
4478                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4479         fi
4480 else
4481         ARFLAGS=$cf_cv_ar_flags
4482 fi
4483
4484 echo "$as_me:4484: checking if you have specified an install-prefix" >&5
4485 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4486
4487 # Check whether --with-install-prefix or --without-install-prefix was given.
4488 if test "${with_install_prefix+set}" = set; then
4489   withval="$with_install_prefix"
4490   case "x$withval" in
4491         (xyes|xno)
4492                 ;;
4493         (*)     DESTDIR="$withval"
4494                 ;;
4495         esac
4496 fi;
4497 echo "$as_me:4497: result: $DESTDIR" >&5
4498 echo "${ECHO_T}$DESTDIR" >&6
4499
4500 ###############################################################################
4501
4502 # If we're cross-compiling, allow the user to override the tools and their
4503 # options.  The configure script is oriented toward identifying the host
4504 # compiler, etc., but we need a build compiler to generate parts of the source.
4505
4506 if test "$cross_compiling" = yes ; then
4507
4508         # defaults that we might want to override
4509         : ${BUILD_CFLAGS:=''}
4510         : ${BUILD_CPPFLAGS:=''}
4511         : ${BUILD_LDFLAGS:=''}
4512         : ${BUILD_LIBS:=''}
4513         : ${BUILD_EXEEXT:='$x'}
4514         : ${BUILD_OBJEXT:='o'}
4515
4516 # Check whether --with-build-cc or --without-build-cc was given.
4517 if test "${with_build_cc+set}" = set; then
4518   withval="$with_build_cc"
4519   BUILD_CC="$withval"
4520 else
4521   for ac_prog in gcc cc cl
4522 do
4523   # Extract the first word of "$ac_prog", so it can be a program name with args.
4524 set dummy $ac_prog; ac_word=$2
4525 echo "$as_me:4525: checking for $ac_word" >&5
4526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4527 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4528   echo $ECHO_N "(cached) $ECHO_C" >&6
4529 else
4530   if test -n "$BUILD_CC"; then
4531   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4532 else
4533   ac_save_IFS=$IFS; IFS=$ac_path_separator
4534 ac_dummy="$PATH"
4535 for ac_dir in $ac_dummy; do
4536   IFS=$ac_save_IFS
4537   test -z "$ac_dir" && ac_dir=.
4538   $as_executable_p "$ac_dir/$ac_word" || continue
4539 ac_cv_prog_BUILD_CC="$ac_prog"
4540 echo "$as_me:4540: found $ac_dir/$ac_word" >&5
4541 break
4542 done
4543
4544 fi
4545 fi
4546 BUILD_CC=$ac_cv_prog_BUILD_CC
4547 if test -n "$BUILD_CC"; then
4548   echo "$as_me:4548: result: $BUILD_CC" >&5
4549 echo "${ECHO_T}$BUILD_CC" >&6
4550 else
4551   echo "$as_me:4551: result: no" >&5
4552 echo "${ECHO_T}no" >&6
4553 fi
4554
4555   test -n "$BUILD_CC" && break
4556 done
4557
4558 fi;
4559         echo "$as_me:4559: checking for native build C compiler" >&5
4560 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4561         echo "$as_me:4561: result: $BUILD_CC" >&5
4562 echo "${ECHO_T}$BUILD_CC" >&6
4563
4564         echo "$as_me:4564: checking for native build C preprocessor" >&5
4565 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4566
4567 # Check whether --with-build-cpp or --without-build-cpp was given.
4568 if test "${with_build_cpp+set}" = set; then
4569   withval="$with_build_cpp"
4570   BUILD_CPP="$withval"
4571 else
4572   BUILD_CPP='${BUILD_CC} -E'
4573 fi;
4574         echo "$as_me:4574: result: $BUILD_CPP" >&5
4575 echo "${ECHO_T}$BUILD_CPP" >&6
4576
4577         echo "$as_me:4577: checking for native build C flags" >&5
4578 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4579
4580 # Check whether --with-build-cflags or --without-build-cflags was given.
4581 if test "${with_build_cflags+set}" = set; then
4582   withval="$with_build_cflags"
4583   BUILD_CFLAGS="$withval"
4584 fi;
4585         echo "$as_me:4585: result: $BUILD_CFLAGS" >&5
4586 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4587
4588         echo "$as_me:4588: checking for native build C preprocessor-flags" >&5
4589 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4590
4591 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4592 if test "${with_build_cppflags+set}" = set; then
4593   withval="$with_build_cppflags"
4594   BUILD_CPPFLAGS="$withval"
4595 fi;
4596         echo "$as_me:4596: result: $BUILD_CPPFLAGS" >&5
4597 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4598
4599         echo "$as_me:4599: checking for native build linker-flags" >&5
4600 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4601
4602 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4603 if test "${with_build_ldflags+set}" = set; then
4604   withval="$with_build_ldflags"
4605   BUILD_LDFLAGS="$withval"
4606 fi;
4607         echo "$as_me:4607: result: $BUILD_LDFLAGS" >&5
4608 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4609
4610         echo "$as_me:4610: checking for native build linker-libraries" >&5
4611 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4612
4613 # Check whether --with-build-libs or --without-build-libs was given.
4614 if test "${with_build_libs+set}" = set; then
4615   withval="$with_build_libs"
4616   BUILD_LIBS="$withval"
4617 fi;
4618         echo "$as_me:4618: result: $BUILD_LIBS" >&5
4619 echo "${ECHO_T}$BUILD_LIBS" >&6
4620
4621         # this assumes we're on Unix.
4622         BUILD_EXEEXT=
4623         BUILD_OBJEXT=o
4624
4625         : ${BUILD_CC:='${CC}'}
4626
4627         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4628                 { { echo "$as_me:4628: error: Cross-build requires two compilers.
4629 Use --with-build-cc to specify the native compiler." >&5
4630 echo "$as_me: error: Cross-build requires two compilers.
4631 Use --with-build-cc to specify the native compiler." >&2;}
4632    { (exit 1); exit 1; }; }
4633         fi
4634
4635 else
4636         : ${BUILD_CC:='${CC}'}
4637         : ${BUILD_CPP:='${CPP}'}
4638         : ${BUILD_CFLAGS:='${CFLAGS}'}
4639         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4640         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4641         : ${BUILD_LIBS:='${LIBS}'}
4642         : ${BUILD_EXEEXT:='$x'}
4643         : ${BUILD_OBJEXT:='o'}
4644 fi
4645
4646 ###############################################################################
4647
4648 ### Options to allow the user to specify the set of libraries which are used.
4649 ### Use "--without-normal --with-shared" to allow the default model to be
4650 ### shared, for example.
4651 cf_list_models=""
4652
4653 echo "$as_me:4653: checking if libtool -version-number should be used" >&5
4654 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4655
4656 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4657 if test "${enable_libtool_version+set}" = set; then
4658   enableval="$enable_libtool_version"
4659   test "$enableval" != no && enableval=yes
4660         if test "$enableval" != "yes" ; then
4661     cf_libtool_version=no
4662         else
4663                 cf_libtool_version=yes
4664         fi
4665 else
4666   enableval=yes
4667         cf_libtool_version=yes
4668
4669 fi;
4670 echo "$as_me:4670: result: $cf_libtool_version" >&5
4671 echo "${ECHO_T}$cf_libtool_version" >&6
4672
4673 if test "$cf_libtool_version" = yes ; then
4674         LIBTOOL_VERSION="-version-number"
4675 else
4676         LIBTOOL_VERSION="-version-info"
4677         case "x$VERSION" in
4678         (x)
4679                 { echo "$as_me:4679: WARNING: VERSION was not set" >&5
4680 echo "$as_me: WARNING: VERSION was not set" >&2;}
4681                 ;;
4682         (x*.*.*)
4683                 ABI_VERSION="$VERSION"
4684                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4685
4686 echo "${as_me:-configure}:4686: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4687
4688                 ;;
4689         (x*:*:*)
4690                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4691                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4692
4693 echo "${as_me:-configure}:4693: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4694
4695                 ;;
4696         (*)
4697                 { echo "$as_me:4697: WARNING: unexpected VERSION value: $VERSION" >&5
4698 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4699                 ;;
4700         esac
4701 fi
4702
4703 LIBTOOL=
4704
4705 # common library maintenance symbols that are convenient for libtool scripts:
4706 LIB_CREATE='${AR} -cr'
4707 LIB_OBJECT='${OBJECTS}'
4708 LIB_SUFFIX=.a
4709 LIB_PREP="$RANLIB"
4710
4711 # symbols used to prop libtool up to enable it to determine what it should be
4712 # doing:
4713 LIB_CLEAN=
4714 LIB_COMPILE=
4715 LIB_LINK='${CC}'
4716 LIB_INSTALL=
4717 LIB_UNINSTALL=
4718
4719 echo "$as_me:4719: checking if you want to build libraries with libtool" >&5
4720 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4721
4722 # Check whether --with-libtool or --without-libtool was given.
4723 if test "${with_libtool+set}" = set; then
4724   withval="$with_libtool"
4725   with_libtool=$withval
4726 else
4727   with_libtool=no
4728 fi;
4729 echo "$as_me:4729: result: $with_libtool" >&5
4730 echo "${ECHO_T}$with_libtool" >&6
4731 if test "$with_libtool" != "no"; then
4732
4733         if test "$with_libtool" != "yes" ; then
4734
4735 if test "x$prefix" != xNONE; then
4736         cf_path_syntax="$prefix"
4737 else
4738         cf_path_syntax="$ac_default_prefix"
4739 fi
4740
4741 case ".$with_libtool" in
4742 (.\$\(*\)*|.\'*\'*)
4743         ;;
4744 (..|./*|.\\*)
4745         ;;
4746 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4747         ;;
4748 (.\${*prefix}*|.\${*dir}*)
4749         eval with_libtool="$with_libtool"
4750         case ".$with_libtool" in
4751         (.NONE/*)
4752                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4753                 ;;
4754         esac
4755         ;;
4756 (.no|.NONE/*)
4757         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4758         ;;
4759 (*)
4760         { { echo "$as_me:4760: error: expected a pathname, not \"$with_libtool\"" >&5
4761 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4762    { (exit 1); exit 1; }; }
4763         ;;
4764 esac
4765
4766                 LIBTOOL=$with_libtool
4767         else
4768                 if test -n "$ac_tool_prefix"; then
4769   for ac_prog in libtool glibtool
4770   do
4771     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4772 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4773 echo "$as_me:4773: checking for $ac_word" >&5
4774 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4775 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4776   echo $ECHO_N "(cached) $ECHO_C" >&6
4777 else
4778   if test -n "$LIBTOOL"; then
4779   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4780 else
4781   ac_save_IFS=$IFS; IFS=$ac_path_separator
4782 ac_dummy="$PATH"
4783 for ac_dir in $ac_dummy; do
4784   IFS=$ac_save_IFS
4785   test -z "$ac_dir" && ac_dir=.
4786   $as_executable_p "$ac_dir/$ac_word" || continue
4787 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4788 echo "$as_me:4788: found $ac_dir/$ac_word" >&5
4789 break
4790 done
4791
4792 fi
4793 fi
4794 LIBTOOL=$ac_cv_prog_LIBTOOL
4795 if test -n "$LIBTOOL"; then
4796   echo "$as_me:4796: result: $LIBTOOL" >&5
4797 echo "${ECHO_T}$LIBTOOL" >&6
4798 else
4799   echo "$as_me:4799: result: no" >&5
4800 echo "${ECHO_T}no" >&6
4801 fi
4802
4803     test -n "$LIBTOOL" && break
4804   done
4805 fi
4806 if test -z "$LIBTOOL"; then
4807   ac_ct_LIBTOOL=$LIBTOOL
4808   for ac_prog in libtool glibtool
4809 do
4810   # Extract the first word of "$ac_prog", so it can be a program name with args.
4811 set dummy $ac_prog; ac_word=$2
4812 echo "$as_me:4812: checking for $ac_word" >&5
4813 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4814 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4815   echo $ECHO_N "(cached) $ECHO_C" >&6
4816 else
4817   if test -n "$ac_ct_LIBTOOL"; then
4818   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4819 else
4820   ac_save_IFS=$IFS; IFS=$ac_path_separator
4821 ac_dummy="$PATH"
4822 for ac_dir in $ac_dummy; do
4823   IFS=$ac_save_IFS
4824   test -z "$ac_dir" && ac_dir=.
4825   $as_executable_p "$ac_dir/$ac_word" || continue
4826 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4827 echo "$as_me:4827: found $ac_dir/$ac_word" >&5
4828 break
4829 done
4830
4831 fi
4832 fi
4833 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4834 if test -n "$ac_ct_LIBTOOL"; then
4835   echo "$as_me:4835: result: $ac_ct_LIBTOOL" >&5
4836 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4837 else
4838   echo "$as_me:4838: result: no" >&5
4839 echo "${ECHO_T}no" >&6
4840 fi
4841
4842   test -n "$ac_ct_LIBTOOL" && break
4843 done
4844 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4845
4846   LIBTOOL=$ac_ct_LIBTOOL
4847 fi
4848
4849 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4850 then
4851         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.].*//'`
4852 else
4853         cf_cv_libtool_version=
4854 fi
4855 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4856
4857                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4858                 then
4859
4860 unset ac_cv_prog_ac_ct_LIBTOOL
4861 unset ac_ct_LIBTOOL
4862 unset LIBTOOL
4863
4864                         if test -n "$ac_tool_prefix"; then
4865   for ac_prog in glibtool
4866   do
4867     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4868 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4869 echo "$as_me:4869: checking for $ac_word" >&5
4870 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4871 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4872   echo $ECHO_N "(cached) $ECHO_C" >&6
4873 else
4874   if test -n "$LIBTOOL"; then
4875   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4876 else
4877   ac_save_IFS=$IFS; IFS=$ac_path_separator
4878 ac_dummy="$PATH"
4879 for ac_dir in $ac_dummy; do
4880   IFS=$ac_save_IFS
4881   test -z "$ac_dir" && ac_dir=.
4882   $as_executable_p "$ac_dir/$ac_word" || continue
4883 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4884 echo "$as_me:4884: found $ac_dir/$ac_word" >&5
4885 break
4886 done
4887
4888 fi
4889 fi
4890 LIBTOOL=$ac_cv_prog_LIBTOOL
4891 if test -n "$LIBTOOL"; then
4892   echo "$as_me:4892: result: $LIBTOOL" >&5
4893 echo "${ECHO_T}$LIBTOOL" >&6
4894 else
4895   echo "$as_me:4895: result: no" >&5
4896 echo "${ECHO_T}no" >&6
4897 fi
4898
4899     test -n "$LIBTOOL" && break
4900   done
4901 fi
4902 if test -z "$LIBTOOL"; then
4903   ac_ct_LIBTOOL=$LIBTOOL
4904   for ac_prog in glibtool
4905 do
4906   # Extract the first word of "$ac_prog", so it can be a program name with args.
4907 set dummy $ac_prog; ac_word=$2
4908 echo "$as_me:4908: checking for $ac_word" >&5
4909 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4910 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4911   echo $ECHO_N "(cached) $ECHO_C" >&6
4912 else
4913   if test -n "$ac_ct_LIBTOOL"; then
4914   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4915 else
4916   ac_save_IFS=$IFS; IFS=$ac_path_separator
4917 ac_dummy="$PATH"
4918 for ac_dir in $ac_dummy; do
4919   IFS=$ac_save_IFS
4920   test -z "$ac_dir" && ac_dir=.
4921   $as_executable_p "$ac_dir/$ac_word" || continue
4922 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4923 echo "$as_me:4923: found $ac_dir/$ac_word" >&5
4924 break
4925 done
4926
4927 fi
4928 fi
4929 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4930 if test -n "$ac_ct_LIBTOOL"; then
4931   echo "$as_me:4931: result: $ac_ct_LIBTOOL" >&5
4932 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4933 else
4934   echo "$as_me:4934: result: no" >&5
4935 echo "${ECHO_T}no" >&6
4936 fi
4937
4938   test -n "$ac_ct_LIBTOOL" && break
4939 done
4940 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4941
4942   LIBTOOL=$ac_ct_LIBTOOL
4943 fi
4944
4945 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4946 then
4947         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.].*//'`
4948 else
4949         cf_cv_libtool_version=
4950 fi
4951 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4952
4953                 fi
4954         fi
4955         if test -z "$LIBTOOL" ; then
4956                 { { echo "$as_me:4956: error: Cannot find libtool" >&5
4957 echo "$as_me: error: Cannot find libtool" >&2;}
4958    { (exit 1); exit 1; }; }
4959         fi
4960         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4961         LIB_OBJECT='${OBJECTS:.o=.lo}'
4962         LIB_SUFFIX=.la
4963         LIB_CLEAN='${LIBTOOL} --mode=clean'
4964         LIB_COMPILE='${LIBTOOL} --mode=compile'
4965         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4966         LIB_INSTALL='${LIBTOOL} --mode=install'
4967         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4968         LIB_PREP=:
4969
4970 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4971 then
4972         echo "$as_me:4972: checking version of $LIBTOOL" >&5
4973 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4974
4975 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4976 then
4977         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.].*//'`
4978 else
4979         cf_cv_libtool_version=
4980 fi
4981 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4982
4983         echo "$as_me:4983: result: $cf_cv_libtool_version" >&5
4984 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4985         if test -z "$cf_cv_libtool_version" ; then
4986                 { { echo "$as_me:4986: error: This is not GNU libtool" >&5
4987 echo "$as_me: error: This is not GNU libtool" >&2;}
4988    { (exit 1); exit 1; }; }
4989         fi
4990 else
4991         { { echo "$as_me:4991: error: GNU libtool has not been found" >&5
4992 echo "$as_me: error: GNU libtool has not been found" >&2;}
4993    { (exit 1); exit 1; }; }
4994 fi
4995
4996         # special hack to add -no-undefined (which libtool should do for itself)
4997         LT_UNDEF=
4998         case "$cf_cv_system_name" in
4999         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5000                 LT_UNDEF=-no-undefined
5001                 ;;
5002         esac
5003
5004         # special hack to add --tag option for C++ compiler
5005         case $cf_cv_libtool_version in
5006         (1.[5-9]*|[2-9].[0-9.a-z]*)
5007                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5008                 LIBTOOL="$LIBTOOL --tag=CC"
5009                 ;;
5010         (*)
5011                 LIBTOOL_CXX="$LIBTOOL"
5012                 ;;
5013         esac
5014 else
5015         LIBTOOL=""
5016         LIBTOOL_CXX=""
5017 fi
5018
5019 test -z "$LIBTOOL" && ECHO_LT=
5020
5021 if test "$with_libtool" != "no" ; then
5022
5023 cf_list_models="$cf_list_models libtool"
5024
5025 else
5026
5027 echo "$as_me:5027: checking if you want to build shared libraries" >&5
5028 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5029
5030 # Check whether --with-shared or --without-shared was given.
5031 if test "${with_shared+set}" = set; then
5032   withval="$with_shared"
5033   with_shared=$withval
5034 else
5035   with_shared=no
5036 fi;
5037 echo "$as_me:5037: result: $with_shared" >&5
5038 echo "${ECHO_T}$with_shared" >&6
5039 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5040
5041 echo "$as_me:5041: checking if you want to build static libraries" >&5
5042 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5043
5044 # Check whether --with-normal or --without-normal was given.
5045 if test "${with_normal+set}" = set; then
5046   withval="$with_normal"
5047   with_normal=$withval
5048 else
5049   with_normal=yes
5050 fi;
5051 echo "$as_me:5051: result: $with_normal" >&5
5052 echo "${ECHO_T}$with_normal" >&6
5053 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5054
5055 echo "$as_me:5055: checking if you want to build debug libraries" >&5
5056 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5057
5058 # Check whether --with-debug or --without-debug was given.
5059 if test "${with_debug+set}" = set; then
5060   withval="$with_debug"
5061   with_debug=$withval
5062 else
5063   with_debug=yes
5064 fi;
5065 echo "$as_me:5065: result: $with_debug" >&5
5066 echo "${ECHO_T}$with_debug" >&6
5067 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5068
5069 echo "$as_me:5069: checking if you want to build profiling libraries" >&5
5070 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5071
5072 # Check whether --with-profile or --without-profile was given.
5073 if test "${with_profile+set}" = set; then
5074   withval="$with_profile"
5075   with_profile=$withval
5076 else
5077   with_profile=no
5078 fi;
5079 echo "$as_me:5079: result: $with_profile" >&5
5080 echo "${ECHO_T}$with_profile" >&6
5081 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5082
5083 fi
5084
5085 if test "X$cf_with_cxx_binding" != Xno; then
5086 if test "x$with_shared" = "xyes"; then
5087 echo "$as_me:5087: checking if you want to build C++ shared libraries" >&5
5088 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5089
5090 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5091 if test "${with_cxx_shared+set}" = set; then
5092   withval="$with_cxx_shared"
5093   with_shared_cxx=$withval
5094 else
5095   with_shared_cxx=no
5096 fi;
5097 echo "$as_me:5097: result: $with_shared_cxx" >&5
5098 echo "${ECHO_T}$with_shared_cxx" >&6
5099 fi
5100 fi
5101
5102 ###############################################################################
5103
5104 echo "$as_me:5104: checking for specified models" >&5
5105 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5106 test -z "$cf_list_models" && cf_list_models=normal
5107 test "$with_libtool" != "no" && cf_list_models=libtool
5108 echo "$as_me:5108: result: $cf_list_models" >&5
5109 echo "${ECHO_T}$cf_list_models" >&6
5110
5111 ### Use the first model as the default, and save its suffix for use in building
5112 ### up test-applications.
5113 echo "$as_me:5113: checking for default model" >&5
5114 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5115 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5116 echo "$as_me:5116: result: $DFT_LWR_MODEL" >&5
5117 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5118
5119 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5120
5121 TICS_NAME=tic
5122
5123 TINFO_NAME=tinfo
5124
5125 LIB_NAME=ncurses
5126
5127 LIB_DIR=../lib
5128 LIB_2ND=../../lib
5129
5130 echo "$as_me:5130: checking if you want to have a library-prefix" >&5
5131 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5132
5133 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5134 if test "${with_lib_prefix+set}" = set; then
5135   withval="$with_lib_prefix"
5136   with_lib_prefix=$withval
5137 else
5138   with_lib_prefix=auto
5139 fi;
5140 echo "$as_me:5140: result: $with_lib_prefix" >&5
5141 echo "${ECHO_T}$with_lib_prefix" >&6
5142
5143 if test $with_lib_prefix = auto
5144 then
5145
5146         case $cf_cv_system_name in
5147         (OS/2*|os2*)
5148                 if test "$DFT_LWR_MODEL" = libtool; then
5149                         LIB_PREFIX='lib'
5150                 else
5151                         LIB_PREFIX=''
5152                 fi
5153                 ;;
5154         (*)     LIB_PREFIX='lib'
5155                 ;;
5156         esac
5157 cf_prefix=$LIB_PREFIX
5158
5159 elif test $with_lib_prefix = no
5160 then
5161         LIB_PREFIX=
5162 else
5163         LIB_PREFIX=$with_lib_prefix
5164 fi
5165
5166 LIB_SUFFIX=
5167
5168         echo "$as_me:5168: checking for PATH separator" >&5
5169 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5170         case $cf_cv_system_name in
5171         (os2*)  PATH_SEPARATOR=';'  ;;
5172         (*)     ${PATH_SEPARATOR:=':'}  ;;
5173         esac
5174
5175         echo "$as_me:5175: result: $PATH_SEPARATOR" >&5
5176 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5177
5178 ###############################################################################
5179
5180 echo "$as_me:5180: checking if you want to build a separate terminfo library" >&5
5181 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5182
5183 # Check whether --with-termlib or --without-termlib was given.
5184 if test "${with_termlib+set}" = set; then
5185   withval="$with_termlib"
5186   with_termlib=$withval
5187 else
5188   with_termlib=no
5189 fi;
5190 echo "$as_me:5190: result: $with_termlib" >&5
5191 echo "${ECHO_T}$with_termlib" >&6
5192
5193 echo "$as_me:5193: checking if you want to build a separate tic library" >&5
5194 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5195
5196 # Check whether --with-ticlib or --without-ticlib was given.
5197 if test "${with_ticlib+set}" = set; then
5198   withval="$with_ticlib"
5199   with_ticlib=$withval
5200 else
5201   with_ticlib=no
5202 fi;
5203 echo "$as_me:5203: result: $with_ticlib" >&5
5204 echo "${ECHO_T}$with_ticlib" >&6
5205
5206 ### Checks for special libraries, must be done up-front.
5207 SHLIB_LIST=""
5208
5209 echo "$as_me:5209: checking if you want to link with the GPM mouse library" >&5
5210 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5211
5212 # Check whether --with-gpm or --without-gpm was given.
5213 if test "${with_gpm+set}" = set; then
5214   withval="$with_gpm"
5215   with_gpm=$withval
5216 else
5217   with_gpm=maybe
5218 fi;
5219 echo "$as_me:5219: result: $with_gpm" >&5
5220 echo "${ECHO_T}$with_gpm" >&6
5221
5222 if test "$with_gpm" != no ; then
5223         echo "$as_me:5223: checking for gpm.h" >&5
5224 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5225 if test "${ac_cv_header_gpm_h+set}" = set; then
5226   echo $ECHO_N "(cached) $ECHO_C" >&6
5227 else
5228   cat >conftest.$ac_ext <<_ACEOF
5229 #line 5229 "configure"
5230 #include "confdefs.h"
5231 #include <gpm.h>
5232 _ACEOF
5233 if { (eval echo "$as_me:5233: \"$ac_cpp conftest.$ac_ext\"") >&5
5234   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5235   ac_status=$?
5236   egrep -v '^ *\+' conftest.er1 >conftest.err
5237   rm -f conftest.er1
5238   cat conftest.err >&5
5239   echo "$as_me:5239: \$? = $ac_status" >&5
5240   (exit $ac_status); } >/dev/null; then
5241   if test -s conftest.err; then
5242     ac_cpp_err=$ac_c_preproc_warn_flag
5243   else
5244     ac_cpp_err=
5245   fi
5246 else
5247   ac_cpp_err=yes
5248 fi
5249 if test -z "$ac_cpp_err"; then
5250   ac_cv_header_gpm_h=yes
5251 else
5252   echo "$as_me: failed program was:" >&5
5253   cat conftest.$ac_ext >&5
5254   ac_cv_header_gpm_h=no
5255 fi
5256 rm -f conftest.err conftest.$ac_ext
5257 fi
5258 echo "$as_me:5258: result: $ac_cv_header_gpm_h" >&5
5259 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5260 if test $ac_cv_header_gpm_h = yes; then
5261
5262 cat >>confdefs.h <<\EOF
5263 #define HAVE_GPM_H 1
5264 EOF
5265
5266                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5267                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5268
5269 echo "${as_me:-configure}:5269: testing assuming we really have GPM library ..." 1>&5
5270
5271 cat >>confdefs.h <<\EOF
5272 #define HAVE_LIBGPM 1
5273 EOF
5274
5275                         with_gpm=yes
5276                 else
5277                         echo "$as_me:5277: checking for Gpm_Open in -lgpm" >&5
5278 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5279 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5280   echo $ECHO_N "(cached) $ECHO_C" >&6
5281 else
5282   ac_check_lib_save_LIBS=$LIBS
5283 LIBS="-lgpm  $LIBS"
5284 cat >conftest.$ac_ext <<_ACEOF
5285 #line 5285 "configure"
5286 #include "confdefs.h"
5287
5288 /* Override any gcc2 internal prototype to avoid an error.  */
5289 #ifdef __cplusplus
5290 extern "C"
5291 #endif
5292 /* We use char because int might match the return type of a gcc2
5293    builtin and then its argument prototype would still apply.  */
5294 char Gpm_Open ();
5295 int
5296 main ()
5297 {
5298 Gpm_Open ();
5299   ;
5300   return 0;
5301 }
5302 _ACEOF
5303 rm -f conftest.$ac_objext conftest$ac_exeext
5304 if { (eval echo "$as_me:5304: \"$ac_link\"") >&5
5305   (eval $ac_link) 2>&5
5306   ac_status=$?
5307   echo "$as_me:5307: \$? = $ac_status" >&5
5308   (exit $ac_status); } &&
5309          { ac_try='test -s conftest$ac_exeext'
5310   { (eval echo "$as_me:5310: \"$ac_try\"") >&5
5311   (eval $ac_try) 2>&5
5312   ac_status=$?
5313   echo "$as_me:5313: \$? = $ac_status" >&5
5314   (exit $ac_status); }; }; then
5315   ac_cv_lib_gpm_Gpm_Open=yes
5316 else
5317   echo "$as_me: failed program was:" >&5
5318 cat conftest.$ac_ext >&5
5319 ac_cv_lib_gpm_Gpm_Open=no
5320 fi
5321 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5322 LIBS=$ac_check_lib_save_LIBS
5323 fi
5324 echo "$as_me:5324: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5325 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5326 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5327   :
5328 else
5329
5330                                 if test "$with_gpm" = maybe; then
5331                                         { echo "$as_me:5331: WARNING: Cannot link with GPM library" >&5
5332 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
5333                                         with_gpm=no
5334                                 else
5335                                         { { echo "$as_me:5335: error: Cannot link with GPM library" >&5
5336 echo "$as_me: error: Cannot link with GPM library" >&2;}
5337    { (exit 1); exit 1; }; }
5338                                 fi
5339
5340 fi
5341
5342                 fi
5343
5344 else
5345
5346                 test "$with_gpm" != maybe && { echo "$as_me:5346: WARNING: Cannot find GPM header" >&5
5347 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5348                 with_gpm=no
5349
5350 fi
5351
5352 fi
5353
5354 if test "$with_gpm" != no ; then
5355         echo "$as_me:5355: checking if you want to load GPM dynamically" >&5
5356 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5357
5358 # Check whether --with-dlsym or --without-dlsym was given.
5359 if test "${with_dlsym+set}" = set; then
5360   withval="$with_dlsym"
5361   with_dlsym=$withval
5362 else
5363   with_dlsym=yes
5364 fi;
5365         echo "$as_me:5365: result: $with_dlsym" >&5
5366 echo "${ECHO_T}$with_dlsym" >&6
5367         if test "x$with_dlsym" = xyes ; then
5368
5369 cf_have_dlsym=no
5370 echo "$as_me:5370: checking for dlsym" >&5
5371 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5372 if test "${ac_cv_func_dlsym+set}" = set; then
5373   echo $ECHO_N "(cached) $ECHO_C" >&6
5374 else
5375   cat >conftest.$ac_ext <<_ACEOF
5376 #line 5376 "configure"
5377 #include "confdefs.h"
5378 /* System header to define __stub macros and hopefully few prototypes,
5379     which can conflict with char dlsym (); below.  */
5380 #include <assert.h>
5381 /* Override any gcc2 internal prototype to avoid an error.  */
5382 #ifdef __cplusplus
5383 extern "C"
5384 #endif
5385 /* We use char because int might match the return type of a gcc2
5386    builtin and then its argument prototype would still apply.  */
5387 char dlsym ();
5388 char (*f) ();
5389
5390 int
5391 main ()
5392 {
5393 /* The GNU C library defines this for functions which it implements
5394     to always fail with ENOSYS.  Some functions are actually named
5395     something starting with __ and the normal name is an alias.  */
5396 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5397 choke me
5398 #else
5399 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5400 #endif
5401
5402   ;
5403   return 0;
5404 }
5405 _ACEOF
5406 rm -f conftest.$ac_objext conftest$ac_exeext
5407 if { (eval echo "$as_me:5407: \"$ac_link\"") >&5
5408   (eval $ac_link) 2>&5
5409   ac_status=$?
5410   echo "$as_me:5410: \$? = $ac_status" >&5
5411   (exit $ac_status); } &&
5412          { ac_try='test -s conftest$ac_exeext'
5413   { (eval echo "$as_me:5413: \"$ac_try\"") >&5
5414   (eval $ac_try) 2>&5
5415   ac_status=$?
5416   echo "$as_me:5416: \$? = $ac_status" >&5
5417   (exit $ac_status); }; }; then
5418   ac_cv_func_dlsym=yes
5419 else
5420   echo "$as_me: failed program was:" >&5
5421 cat conftest.$ac_ext >&5
5422 ac_cv_func_dlsym=no
5423 fi
5424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5425 fi
5426 echo "$as_me:5426: result: $ac_cv_func_dlsym" >&5
5427 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5428 if test $ac_cv_func_dlsym = yes; then
5429   cf_have_dlsym=yes
5430 else
5431
5432 cf_have_libdl=no
5433 echo "$as_me:5433: checking for dlsym in -ldl" >&5
5434 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5435 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5436   echo $ECHO_N "(cached) $ECHO_C" >&6
5437 else
5438   ac_check_lib_save_LIBS=$LIBS
5439 LIBS="-ldl  $LIBS"
5440 cat >conftest.$ac_ext <<_ACEOF
5441 #line 5441 "configure"
5442 #include "confdefs.h"
5443
5444 /* Override any gcc2 internal prototype to avoid an error.  */
5445 #ifdef __cplusplus
5446 extern "C"
5447 #endif
5448 /* We use char because int might match the return type of a gcc2
5449    builtin and then its argument prototype would still apply.  */
5450 char dlsym ();
5451 int
5452 main ()
5453 {
5454 dlsym ();
5455   ;
5456   return 0;
5457 }
5458 _ACEOF
5459 rm -f conftest.$ac_objext conftest$ac_exeext
5460 if { (eval echo "$as_me:5460: \"$ac_link\"") >&5
5461   (eval $ac_link) 2>&5
5462   ac_status=$?
5463   echo "$as_me:5463: \$? = $ac_status" >&5
5464   (exit $ac_status); } &&
5465          { ac_try='test -s conftest$ac_exeext'
5466   { (eval echo "$as_me:5466: \"$ac_try\"") >&5
5467   (eval $ac_try) 2>&5
5468   ac_status=$?
5469   echo "$as_me:5469: \$? = $ac_status" >&5
5470   (exit $ac_status); }; }; then
5471   ac_cv_lib_dl_dlsym=yes
5472 else
5473   echo "$as_me: failed program was:" >&5
5474 cat conftest.$ac_ext >&5
5475 ac_cv_lib_dl_dlsym=no
5476 fi
5477 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5478 LIBS=$ac_check_lib_save_LIBS
5479 fi
5480 echo "$as_me:5480: result: $ac_cv_lib_dl_dlsym" >&5
5481 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5482 if test $ac_cv_lib_dl_dlsym = yes; then
5483
5484         cf_have_dlsym=yes
5485         cf_have_libdl=yes
5486 fi
5487
5488 fi
5489
5490 if test "$cf_have_dlsym" = yes ; then
5491         test "$cf_have_libdl" = yes && {
5492 cf_add_libs="-ldl"
5493 # Filter out duplicates - this happens with badly-designed ".pc" files...
5494 for cf_add_1lib in $LIBS
5495 do
5496         for cf_add_2lib in $cf_add_libs
5497         do
5498                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5499                 then
5500                         cf_add_1lib=
5501                         break
5502                 fi
5503         done
5504         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5505 done
5506 LIBS="$cf_add_libs"
5507  }
5508
5509         echo "$as_me:5509: checking whether able to link to dl*() functions" >&5
5510 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5511         cat >conftest.$ac_ext <<_ACEOF
5512 #line 5512 "configure"
5513 #include "confdefs.h"
5514 #include <dlfcn.h>
5515 int
5516 main ()
5517 {
5518
5519                 void *obj;
5520                 if ((obj = dlopen("filename", 0)) != 0) {
5521                         if (dlsym(obj, "symbolname") == 0) {
5522                         dlclose(obj);
5523                         }
5524                 }
5525   ;
5526   return 0;
5527 }
5528 _ACEOF
5529 rm -f conftest.$ac_objext conftest$ac_exeext
5530 if { (eval echo "$as_me:5530: \"$ac_link\"") >&5
5531   (eval $ac_link) 2>&5
5532   ac_status=$?
5533   echo "$as_me:5533: \$? = $ac_status" >&5
5534   (exit $ac_status); } &&
5535          { ac_try='test -s conftest$ac_exeext'
5536   { (eval echo "$as_me:5536: \"$ac_try\"") >&5
5537   (eval $ac_try) 2>&5
5538   ac_status=$?
5539   echo "$as_me:5539: \$? = $ac_status" >&5
5540   (exit $ac_status); }; }; then
5541
5542 cat >>confdefs.h <<\EOF
5543 #define HAVE_LIBDL 1
5544 EOF
5545
5546 else
5547   echo "$as_me: failed program was:" >&5
5548 cat conftest.$ac_ext >&5
5549
5550                 { { echo "$as_me:5550: error: Cannot link test program for libdl" >&5
5551 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5552    { (exit 1); exit 1; }; }
5553 fi
5554 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5555         echo "$as_me:5555: result: ok" >&5
5556 echo "${ECHO_T}ok" >&6
5557 else
5558         { { echo "$as_me:5558: error: Cannot find dlsym function" >&5
5559 echo "$as_me: error: Cannot find dlsym function" >&2;}
5560    { (exit 1); exit 1; }; }
5561 fi
5562
5563                 if test "x$with_gpm" != xyes ; then
5564                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5565
5566 echo "${as_me:-configure}:5566: testing assuming soname for gpm is $with_gpm ..." 1>&5
5567
5568                         cf_cv_gpm_soname="$with_gpm"
5569                 else
5570
5571 echo "$as_me:5571: checking for soname of gpm library" >&5
5572 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5573 if test "${cf_cv_gpm_soname+set}" = set; then
5574   echo $ECHO_N "(cached) $ECHO_C" >&6
5575 else
5576
5577 cf_cv_gpm_soname=unknown
5578 if test "$cross_compiling" != yes ; then
5579 cat >conftest.$ac_ext <<CF_EOF
5580 #include <gpm.h>
5581 int main(void)
5582 {
5583 if (Gpm_Open(0,0)) Gpm_Close();
5584         ${cf_cv_main_return:-return}(0);
5585 }
5586 CF_EOF
5587 cf_save_LIBS="$LIBS"
5588
5589 cf_add_libs="-lgpm"
5590 # Filter out duplicates - this happens with badly-designed ".pc" files...
5591 for cf_add_1lib in $LIBS
5592 do
5593         for cf_add_2lib in $cf_add_libs
5594         do
5595                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5596                 then
5597                         cf_add_1lib=
5598                         break
5599                 fi
5600         done
5601         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5602 done
5603 LIBS="$cf_add_libs"
5604
5605         if { (eval echo "$as_me:5605: \"$ac_compile\"") >&5
5606   (eval $ac_compile) 2>&5
5607   ac_status=$?
5608   echo "$as_me:5608: \$? = $ac_status" >&5
5609   (exit $ac_status); } ; then
5610                 if { (eval echo "$as_me:5610: \"$ac_link\"") >&5
5611   (eval $ac_link) 2>&5
5612   ac_status=$?
5613   echo "$as_me:5613: \$? = $ac_status" >&5
5614   (exit $ac_status); } ; then
5615                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5616                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5617                 fi
5618         fi
5619 rm -rf conftest*
5620 LIBS="$cf_save_LIBS"
5621 fi
5622
5623 fi
5624 echo "$as_me:5624: result: $cf_cv_gpm_soname" >&5
5625 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5626
5627                 fi
5628                 test "$cf_cv_gpm_soname" != "unknown" &&
5629 cat >>confdefs.h <<EOF
5630 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5631 EOF
5632
5633                 SHLIB_LIST="-ldl $SHLIB_LIST"
5634         else
5635                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5636
5637 cf_add_libs="-lgpm"
5638 # Filter out duplicates - this happens with badly-designed ".pc" files...
5639 for cf_add_1lib in $TEST_LIBS
5640 do
5641         for cf_add_2lib in $cf_add_libs
5642         do
5643                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5644                 then
5645                         cf_add_1lib=
5646                         break
5647                 fi
5648         done
5649         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5650 done
5651 TEST_LIBS="$cf_add_libs"
5652
5653         fi
5654
5655 cat >>confdefs.h <<\EOF
5656 #define HAVE_LIBGPM 1
5657 EOF
5658
5659 echo "$as_me:5659: checking for Gpm_Wgetch in -lgpm" >&5
5660 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5661 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5662   echo $ECHO_N "(cached) $ECHO_C" >&6
5663 else
5664   ac_check_lib_save_LIBS=$LIBS
5665 LIBS="-lgpm  $LIBS"
5666 cat >conftest.$ac_ext <<_ACEOF
5667 #line 5667 "configure"
5668 #include "confdefs.h"
5669
5670 /* Override any gcc2 internal prototype to avoid an error.  */
5671 #ifdef __cplusplus
5672 extern "C"
5673 #endif
5674 /* We use char because int might match the return type of a gcc2
5675    builtin and then its argument prototype would still apply.  */
5676 char Gpm_Wgetch ();
5677 int
5678 main ()
5679 {
5680 Gpm_Wgetch ();
5681   ;
5682   return 0;
5683 }
5684 _ACEOF
5685 rm -f conftest.$ac_objext conftest$ac_exeext
5686 if { (eval echo "$as_me:5686: \"$ac_link\"") >&5
5687   (eval $ac_link) 2>&5
5688   ac_status=$?
5689   echo "$as_me:5689: \$? = $ac_status" >&5
5690   (exit $ac_status); } &&
5691          { ac_try='test -s conftest$ac_exeext'
5692   { (eval echo "$as_me:5692: \"$ac_try\"") >&5
5693   (eval $ac_try) 2>&5
5694   ac_status=$?
5695   echo "$as_me:5695: \$? = $ac_status" >&5
5696   (exit $ac_status); }; }; then
5697   ac_cv_lib_gpm_Gpm_Wgetch=yes
5698 else
5699   echo "$as_me: failed program was:" >&5
5700 cat conftest.$ac_ext >&5
5701 ac_cv_lib_gpm_Gpm_Wgetch=no
5702 fi
5703 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5704 LIBS=$ac_check_lib_save_LIBS
5705 fi
5706 echo "$as_me:5706: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5707 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5708 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5709
5710 echo "$as_me:5710: checking if GPM is weakly bound to curses library" >&5
5711 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5712 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5713   echo $ECHO_N "(cached) $ECHO_C" >&6
5714 else
5715
5716 cf_cv_check_gpm_wgetch=unknown
5717 if test "$cross_compiling" != yes ; then
5718
5719 cat >conftest.$ac_ext <<CF_EOF
5720 #include <gpm.h>
5721 int main(void)
5722 {
5723         Gpm_Wgetch();
5724         ${cf_cv_main_return:-return}(0);
5725 }
5726 CF_EOF
5727
5728         cf_save_LIBS="$LIBS"
5729         # This only works if we can look at the symbol table.  If a shared
5730         # library is stripped for install, we cannot use that.  So we're forced
5731         # to rely on the static library, noting that some packagers may not
5732         # include it.
5733         LIBS="-static -lgpm -dynamic $LIBS"
5734         if { (eval echo "$as_me:5734: \"$ac_compile\"") >&5
5735   (eval $ac_compile) 2>&5
5736   ac_status=$?
5737   echo "$as_me:5737: \$? = $ac_status" >&5
5738   (exit $ac_status); } ; then
5739                 if { (eval echo "$as_me:5739: \"$ac_link\"") >&5
5740   (eval $ac_link) 2>&5
5741   ac_status=$?
5742   echo "$as_me:5742: \$? = $ac_status" >&5
5743   (exit $ac_status); } ; then
5744                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5745                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5746                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5747                 fi
5748         fi
5749         rm -rf conftest*
5750         LIBS="$cf_save_LIBS"
5751 fi
5752
5753 fi
5754 echo "$as_me:5754: result: $cf_cv_check_gpm_wgetch" >&5
5755 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5756
5757 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5758         { echo "$as_me:5758: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5759 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5760 fi
5761
5762 fi
5763
5764 fi
5765
5766 # not everyone has "test -c"
5767 if test -c /dev/sysmouse 2>/dev/null ; then
5768 echo "$as_me:5768: checking if you want to use sysmouse" >&5
5769 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5770
5771 # Check whether --with-sysmouse or --without-sysmouse was given.
5772 if test "${with_sysmouse+set}" = set; then
5773   withval="$with_sysmouse"
5774   cf_with_sysmouse=$withval
5775 else
5776   cf_with_sysmouse=maybe
5777 fi;
5778         if test "$cf_with_sysmouse" != no ; then
5779         cat >conftest.$ac_ext <<_ACEOF
5780 #line 5780 "configure"
5781 #include "confdefs.h"
5782
5783 #include <osreldate.h>
5784 #if (__FreeBSD_version >= 400017)
5785 #include <sys/consio.h>
5786 #include <sys/fbio.h>
5787 #else
5788 #include <machine/console.h>
5789 #endif
5790
5791 int
5792 main ()
5793 {
5794
5795         struct mouse_info the_mouse;
5796         ioctl(0, CONS_MOUSECTL, &the_mouse);
5797
5798   ;
5799   return 0;
5800 }
5801 _ACEOF
5802 rm -f conftest.$ac_objext
5803 if { (eval echo "$as_me:5803: \"$ac_compile\"") >&5
5804   (eval $ac_compile) 2>&5
5805   ac_status=$?
5806   echo "$as_me:5806: \$? = $ac_status" >&5
5807   (exit $ac_status); } &&
5808          { ac_try='test -s conftest.$ac_objext'
5809   { (eval echo "$as_me:5809: \"$ac_try\"") >&5
5810   (eval $ac_try) 2>&5
5811   ac_status=$?
5812   echo "$as_me:5812: \$? = $ac_status" >&5
5813   (exit $ac_status); }; }; then
5814   cf_with_sysmouse=yes
5815 else
5816   echo "$as_me: failed program was:" >&5
5817 cat conftest.$ac_ext >&5
5818 cf_with_sysmouse=no
5819 fi
5820 rm -f conftest.$ac_objext conftest.$ac_ext
5821         fi
5822 echo "$as_me:5822: result: $cf_with_sysmouse" >&5
5823 echo "${ECHO_T}$cf_with_sysmouse" >&6
5824 test "$cf_with_sysmouse" = yes &&
5825 cat >>confdefs.h <<\EOF
5826 #define USE_SYSMOUSE 1
5827 EOF
5828
5829 fi
5830
5831 if test X"$CC_G_OPT" = X"" ; then
5832         CC_G_OPT='-g'
5833         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5834 fi
5835
5836 if test X"$CXX_G_OPT" = X"" ; then
5837         CXX_G_OPT='-g'
5838         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5839 fi
5840
5841 echo "$as_me:5841: checking for default loader flags" >&5
5842 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5843 case $DFT_LWR_MODEL in
5844 (libtool) LD_MODEL=''   ;;
5845 (normal)  LD_MODEL=''   ;;
5846 (debug)   LD_MODEL=$CC_G_OPT ;;
5847 (profile) LD_MODEL='-pg';;
5848 (shared)  LD_MODEL=''   ;;
5849 esac
5850 echo "$as_me:5850: result: $LD_MODEL" >&5
5851 echo "${ECHO_T}$LD_MODEL" >&6
5852
5853 case $DFT_LWR_MODEL in
5854 (shared)
5855
5856 echo "$as_me:5856: checking if rpath option should be used" >&5
5857 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5858
5859 # Check whether --enable-rpath or --disable-rpath was given.
5860 if test "${enable_rpath+set}" = set; then
5861   enableval="$enable_rpath"
5862   cf_cv_enable_rpath=$enableval
5863 else
5864   cf_cv_enable_rpath=no
5865 fi;
5866 echo "$as_me:5866: result: $cf_cv_enable_rpath" >&5
5867 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5868
5869 echo "$as_me:5869: checking if shared libraries should be relinked during install" >&5
5870 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5871
5872 # Check whether --enable-relink or --disable-relink was given.
5873 if test "${enable_relink+set}" = set; then
5874   enableval="$enable_relink"
5875   cf_cv_do_relink=$enableval
5876 else
5877   cf_cv_do_relink=yes
5878 fi;
5879 echo "$as_me:5879: result: $cf_cv_do_relink" >&5
5880 echo "${ECHO_T}$cf_cv_do_relink" >&6
5881         ;;
5882 esac
5883
5884 # we will build libraries one-level down.
5885 rel_builddir=..
5886
5887 LD_RPATH_OPT=
5888 echo "$as_me:5888: checking for an rpath option" >&5
5889 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5890 case $cf_cv_system_name in
5891 (irix*)
5892         if test "$GCC" = yes; then
5893                 LD_RPATH_OPT="-Wl,-rpath,"
5894         else
5895                 LD_RPATH_OPT="-rpath "
5896         fi
5897         ;;
5898 (linux*|gnu*|k*bsd*-gnu|freebsd*)
5899         LD_RPATH_OPT="-Wl,-rpath,"
5900         ;;
5901 (openbsd[2-9].*|mirbsd*)
5902         LD_RPATH_OPT="-Wl,-rpath,"
5903         ;;
5904 (dragonfly*)
5905         LD_RPATH_OPT="-rpath "
5906         ;;
5907 (netbsd*)
5908         LD_RPATH_OPT="-Wl,-rpath,"
5909         ;;
5910 (osf*|mls+*)
5911         LD_RPATH_OPT="-rpath "
5912         ;;
5913 (solaris2*)
5914         LD_RPATH_OPT="-R"
5915         ;;
5916 (*)
5917         ;;
5918 esac
5919 echo "$as_me:5919: result: $LD_RPATH_OPT" >&5
5920 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5921
5922 case "x$LD_RPATH_OPT" in
5923 (x-R*)
5924         echo "$as_me:5924: checking if we need a space after rpath option" >&5
5925 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5926         cf_save_LIBS="$LIBS"
5927
5928 cf_add_libs="${LD_RPATH_OPT}$libdir"
5929 # Filter out duplicates - this happens with badly-designed ".pc" files...
5930 for cf_add_1lib in $LIBS
5931 do
5932         for cf_add_2lib in $cf_add_libs
5933         do
5934                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5935                 then
5936                         cf_add_1lib=
5937                         break
5938                 fi
5939         done
5940         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5941 done
5942 LIBS="$cf_add_libs"
5943
5944         cat >conftest.$ac_ext <<_ACEOF
5945 #line 5945 "configure"
5946 #include "confdefs.h"
5947
5948 int
5949 main ()
5950 {
5951
5952   ;
5953   return 0;
5954 }
5955 _ACEOF
5956 rm -f conftest.$ac_objext conftest$ac_exeext
5957 if { (eval echo "$as_me:5957: \"$ac_link\"") >&5
5958   (eval $ac_link) 2>&5
5959   ac_status=$?
5960   echo "$as_me:5960: \$? = $ac_status" >&5
5961   (exit $ac_status); } &&
5962          { ac_try='test -s conftest$ac_exeext'
5963   { (eval echo "$as_me:5963: \"$ac_try\"") >&5
5964   (eval $ac_try) 2>&5
5965   ac_status=$?
5966   echo "$as_me:5966: \$? = $ac_status" >&5
5967   (exit $ac_status); }; }; then
5968   cf_rpath_space=no
5969 else
5970   echo "$as_me: failed program was:" >&5
5971 cat conftest.$ac_ext >&5
5972 cf_rpath_space=yes
5973 fi
5974 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5975         LIBS="$cf_save_LIBS"
5976         echo "$as_me:5976: result: $cf_rpath_space" >&5
5977 echo "${ECHO_T}$cf_rpath_space" >&6
5978         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5979         ;;
5980 esac
5981
5982         RM_SHARED_OPTS=
5983         LOCAL_LDFLAGS=
5984         LOCAL_LDFLAGS2=
5985         LD_SHARED_OPTS=
5986         INSTALL_LIB="-m 644"
5987         : ${rel_builddir:=.}
5988
5989         shlibdir=$libdir
5990
5991         MAKE_DLLS="#"
5992
5993         cf_cv_do_symlinks=no
5994         cf_ld_rpath_opt=
5995         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5996
5997         echo "$as_me:5997: checking if release/abi version should be used for shared libs" >&5
5998 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5999
6000 # Check whether --with-shlib-version or --without-shlib-version was given.
6001 if test "${with_shlib_version+set}" = set; then
6002   withval="$with_shlib_version"
6003   test -z "$withval" && withval=auto
6004         case $withval in
6005         (yes)
6006                 cf_cv_shlib_version=auto
6007                 ;;
6008         (rel|abi|auto)
6009                 cf_cv_shlib_version=$withval
6010                 ;;
6011         (*)
6012                 echo "$as_me:6012: result: $withval" >&5
6013 echo "${ECHO_T}$withval" >&6
6014                 { { echo "$as_me:6014: error: option value must be one of: rel, abi, or auto" >&5
6015 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6016    { (exit 1); exit 1; }; }
6017                 ;;
6018         esac
6019
6020 else
6021   cf_cv_shlib_version=auto
6022 fi;
6023         echo "$as_me:6023: result: $cf_cv_shlib_version" >&5
6024 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6025
6026         cf_cv_rm_so_locs=no
6027         cf_try_cflags=
6028
6029         # Some less-capable ports of gcc support only -fpic
6030         CC_SHARED_OPTS=
6031         if test "$GCC" = yes
6032         then
6033                 echo "$as_me:6033: checking which $CC option to use" >&5
6034 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6035                 cf_save_CFLAGS="$CFLAGS"
6036                 for CC_SHARED_OPTS in -fPIC -fpic ''
6037                 do
6038                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6039                         cat >conftest.$ac_ext <<_ACEOF
6040 #line 6040 "configure"
6041 #include "confdefs.h"
6042 #include <stdio.h>
6043 int
6044 main ()
6045 {
6046 int x = 1
6047   ;
6048   return 0;
6049 }
6050 _ACEOF
6051 rm -f conftest.$ac_objext
6052 if { (eval echo "$as_me:6052: \"$ac_compile\"") >&5
6053   (eval $ac_compile) 2>&5
6054   ac_status=$?
6055   echo "$as_me:6055: \$? = $ac_status" >&5
6056   (exit $ac_status); } &&
6057          { ac_try='test -s conftest.$ac_objext'
6058   { (eval echo "$as_me:6058: \"$ac_try\"") >&5
6059   (eval $ac_try) 2>&5
6060   ac_status=$?
6061   echo "$as_me:6061: \$? = $ac_status" >&5
6062   (exit $ac_status); }; }; then
6063   break
6064 else
6065   echo "$as_me: failed program was:" >&5
6066 cat conftest.$ac_ext >&5
6067 fi
6068 rm -f conftest.$ac_objext conftest.$ac_ext
6069                 done
6070                 echo "$as_me:6070: result: $CC_SHARED_OPTS" >&5
6071 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6072                 CFLAGS="$cf_save_CFLAGS"
6073         fi
6074
6075         cf_cv_shlib_version_infix=no
6076
6077         case $cf_cv_system_name in
6078         (aix4.3-9*|aix[5-7]*)
6079                 if test "$GCC" = yes; then
6080                         CC_SHARED_OPTS='-Wl,-brtl'
6081                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6082                 else
6083                         CC_SHARED_OPTS='-brtl'
6084                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6085                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6086                 fi
6087                 ;;
6088         (beos*)
6089                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6090                 ;;
6091         (cygwin*)
6092                 CC_SHARED_OPTS=
6093                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6094                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6095                 cf_cv_shlib_version=cygdll
6096                 cf_cv_shlib_version_infix=cygdll
6097                 shlibdir=$bindir
6098                 MAKE_DLLS=
6099                 cat >mk_shared_lib.sh <<-CF_EOF
6100                 #!$SHELL
6101                 SHARED_LIB=\$1
6102                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6103                 shift
6104                 cat <<-EOF
6105                 Linking shared library
6106                 ** SHARED_LIB \$SHARED_LIB
6107                 ** IMPORT_LIB \$IMPORT_LIB
6108 EOF
6109                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6110 CF_EOF
6111                 chmod +x mk_shared_lib.sh
6112                 ;;
6113         (msys*)
6114                 CC_SHARED_OPTS=
6115                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6116                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6117                 cf_cv_shlib_version=msysdll
6118                 cf_cv_shlib_version_infix=msysdll
6119                 shlibdir=$bindir
6120                 MAKE_DLLS=
6121                 cat >mk_shared_lib.sh <<-CF_EOF
6122                 #!$SHELL
6123                 SHARED_LIB=\$1
6124                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6125                 shift
6126                 cat <<-EOF
6127                 Linking shared library
6128                 ** SHARED_LIB \$SHARED_LIB
6129                 ** IMPORT_LIB \$IMPORT_LIB
6130 EOF
6131                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6132 CF_EOF
6133                 chmod +x mk_shared_lib.sh
6134                 ;;
6135         (darwin*)
6136                 cf_try_cflags="no-cpp-precomp"
6137                 CC_SHARED_OPTS="-dynamic"
6138                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6139                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6140                 cf_cv_shlib_version_infix=yes
6141                 echo "$as_me:6141: checking if ld -search_paths_first works" >&5
6142 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6143 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6144   echo $ECHO_N "(cached) $ECHO_C" >&6
6145 else
6146
6147                         cf_save_LDFLAGS=$LDFLAGS
6148                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6149                         cat >conftest.$ac_ext <<_ACEOF
6150 #line 6150 "configure"
6151 #include "confdefs.h"
6152
6153 int
6154 main ()
6155 {
6156 int i;
6157   ;
6158   return 0;
6159 }
6160 _ACEOF
6161 rm -f conftest.$ac_objext conftest$ac_exeext
6162 if { (eval echo "$as_me:6162: \"$ac_link\"") >&5
6163   (eval $ac_link) 2>&5
6164   ac_status=$?
6165   echo "$as_me:6165: \$? = $ac_status" >&5
6166   (exit $ac_status); } &&
6167          { ac_try='test -s conftest$ac_exeext'
6168   { (eval echo "$as_me:6168: \"$ac_try\"") >&5
6169   (eval $ac_try) 2>&5
6170   ac_status=$?
6171   echo "$as_me:6171: \$? = $ac_status" >&5
6172   (exit $ac_status); }; }; then
6173   cf_cv_ldflags_search_paths_first=yes
6174 else
6175   echo "$as_me: failed program was:" >&5
6176 cat conftest.$ac_ext >&5
6177 cf_cv_ldflags_search_paths_first=no
6178 fi
6179 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6180                                 LDFLAGS=$cf_save_LDFLAGS
6181 fi
6182 echo "$as_me:6182: result: $cf_cv_ldflags_search_paths_first" >&5
6183 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6184                 if test $cf_cv_ldflags_search_paths_first = yes; then
6185                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6186                 fi
6187                 ;;
6188         (hpux[7-8]*)
6189                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6190                 if test "$GCC" != yes; then
6191                         CC_SHARED_OPTS='+Z'
6192                 fi
6193                 MK_SHARED_LIB='${LD} -b -o $@'
6194                 INSTALL_LIB="-m 555"
6195                 ;;
6196         (hpux*)
6197                 # (tested with gcc 2.7.2 -- I don't have c89)
6198                 if test "$GCC" = yes; then
6199                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6200                 else
6201                         CC_SHARED_OPTS='+Z'
6202                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6203                 fi
6204                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6205                 # HP-UX shared libraries must be executable, and should be
6206                 # readonly to exploit a quirk in the memory manager.
6207                 INSTALL_LIB="-m 555"
6208                 ;;
6209         (interix*)
6210                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6211                 if test "$cf_cv_shlib_version" = rel; then
6212                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6213                 else
6214                         cf_shared_soname='`basename `'
6215                 fi
6216                 CC_SHARED_OPTS=
6217                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6218                 ;;
6219         (irix*)
6220                 if test "$cf_cv_enable_rpath" = yes ; then
6221                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6222                 fi
6223                 # tested with IRIX 5.2 and 'cc'.
6224                 if test "$GCC" != yes; then
6225                         CC_SHARED_OPTS='-KPIC'
6226                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6227                 else
6228                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6229                 fi
6230                 cf_cv_rm_so_locs=yes
6231                 ;;
6232         (linux*|gnu*|k*bsd*-gnu)
6233                 if test "$DFT_LWR_MODEL" = "shared" ; then
6234                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6235                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6236                 fi
6237                 if test "$cf_cv_enable_rpath" = yes ; then
6238                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6239                 fi
6240
6241         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6242         if test "$cf_cv_shlib_version" = rel; then
6243                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6244         else
6245                 cf_cv_shared_soname='`basename $@`'
6246         fi
6247
6248                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6249                 ;;
6250         (mingw*)
6251                 cf_cv_shlib_version=mingw
6252                 cf_cv_shlib_version_infix=mingw
6253                 shlibdir=$bindir
6254                 MAKE_DLLS=
6255                 if test "$DFT_LWR_MODEL" = "shared" ; then
6256                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6257                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6258                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6259                 fi
6260                 CC_SHARED_OPTS=
6261                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6262                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6263                 cat >mk_shared_lib.sh <<-CF_EOF
6264                 #!$SHELL
6265                 SHARED_LIB=\$1
6266                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6267                 shift
6268                 cat <<-EOF
6269                 Linking shared library
6270                 ** SHARED_LIB \$SHARED_LIB
6271                 ** IMPORT_LIB \$IMPORT_LIB
6272 EOF
6273                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6274 CF_EOF
6275                 chmod +x mk_shared_lib.sh
6276                 ;;
6277         (openbsd[2-9].*|mirbsd*)
6278                 if test "$DFT_LWR_MODEL" = "shared" ; then
6279                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6280                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6281                 fi
6282                 if test "$cf_cv_enable_rpath" = yes ; then
6283                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6284                 fi
6285                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6286
6287         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6288         if test "$cf_cv_shlib_version" = rel; then
6289                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6290         else
6291                 cf_cv_shared_soname='`basename $@`'
6292         fi
6293
6294                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6295                 ;;
6296         (nto-qnx*|openbsd*|freebsd[12].*)
6297                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6298                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6299                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6300                 ;;
6301         (dragonfly*|freebsd*)
6302                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6303                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6304                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6305                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6306                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6307                 fi
6308
6309         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6310         if test "$cf_cv_shlib_version" = rel; then
6311                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6312         else
6313                 cf_cv_shared_soname='`basename $@`'
6314         fi
6315
6316                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6317                 ;;
6318         (netbsd*)
6319                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6320                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6321                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6322                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6323                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6324                         if test "$cf_cv_shlib_version" = auto; then
6325                         if test -f /usr/libexec/ld.elf_so; then
6326                                 cf_cv_shlib_version=abi
6327                         else
6328                                 cf_cv_shlib_version=rel
6329                         fi
6330                         fi
6331
6332         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6333         if test "$cf_cv_shlib_version" = rel; then
6334                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6335         else
6336                 cf_cv_shared_soname='`basename $@`'
6337         fi
6338
6339                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6340                 else
6341                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6342                 fi
6343                 ;;
6344         (osf*|mls+*)
6345                 # tested with OSF/1 V3.2 and 'cc'
6346                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6347                 # link with shared libs).
6348                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6349                 case $host_os in
6350                 (osf4*)
6351                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6352                         ;;
6353                 esac
6354                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6355                 if test "$DFT_LWR_MODEL" = "shared" ; then
6356                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6357                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6358                 fi
6359                 cf_cv_rm_so_locs=yes
6360                 ;;
6361         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6362                 # tested with osr5.0.5
6363                 if test "$GCC" != yes; then
6364                         CC_SHARED_OPTS='-belf -KPIC'
6365                 fi
6366                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6367                 if test "$cf_cv_enable_rpath" = yes ; then
6368                         # only way is to set LD_RUN_PATH but no switch for it
6369                         RUN_PATH=$libdir
6370                 fi
6371                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6372                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6373                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6374                 ;;
6375         (sunos4*)
6376                 # tested with SunOS 4.1.1 and gcc 2.7.0
6377                 if test "$GCC" != yes; then
6378                         CC_SHARED_OPTS='-KPIC'
6379                 fi
6380                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6381                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6382                 ;;
6383         (solaris2*)
6384                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6385                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6386                 if test "$DFT_LWR_MODEL" = "shared" ; then
6387                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6388                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6389                 fi
6390                 if test "$cf_cv_enable_rpath" = yes ; then
6391                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6392                 fi
6393
6394         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6395         if test "$cf_cv_shlib_version" = rel; then
6396                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6397         else
6398                 cf_cv_shared_soname='`basename $@`'
6399         fi
6400
6401                 if test "$GCC" != yes; then
6402                         cf_save_CFLAGS="$CFLAGS"
6403                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6404                         do
6405                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6406                                 cat >conftest.$ac_ext <<_ACEOF
6407 #line 6407 "configure"
6408 #include "confdefs.h"
6409 #include <stdio.h>
6410 int
6411 main ()
6412 {
6413 printf("Hello\n");
6414   ;
6415   return 0;
6416 }
6417 _ACEOF
6418 rm -f conftest.$ac_objext
6419 if { (eval echo "$as_me:6419: \"$ac_compile\"") >&5
6420   (eval $ac_compile) 2>&5
6421   ac_status=$?
6422   echo "$as_me:6422: \$? = $ac_status" >&5
6423   (exit $ac_status); } &&
6424          { ac_try='test -s conftest.$ac_objext'
6425   { (eval echo "$as_me:6425: \"$ac_try\"") >&5
6426   (eval $ac_try) 2>&5
6427   ac_status=$?
6428   echo "$as_me:6428: \$? = $ac_status" >&5
6429   (exit $ac_status); }; }; then
6430   break
6431 else
6432   echo "$as_me: failed program was:" >&5
6433 cat conftest.$ac_ext >&5
6434 fi
6435 rm -f conftest.$ac_objext conftest.$ac_ext
6436                         done
6437                         CFLAGS="$cf_save_CFLAGS"
6438                         CC_SHARED_OPTS=$cf_shared_opts
6439                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6440                 else
6441                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6442                 fi
6443                 ;;
6444         (sysv5uw7*|unix_sv*)
6445                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6446                 if test "$GCC" != yes; then
6447                         CC_SHARED_OPTS='-KPIC'
6448                 fi
6449                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6450                 ;;
6451         (*)
6452                 CC_SHARED_OPTS='unknown'
6453                 MK_SHARED_LIB='echo unknown'
6454                 ;;
6455         esac
6456
6457         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6458         case "$cf_cv_shlib_version" in
6459         (rel|abi)
6460                 case "$MK_SHARED_LIB" in
6461                 (*'-o $@')
6462                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6463                         ;;
6464                 (*)
6465                         { echo "$as_me:6465: WARNING: ignored --with-shlib-version" >&5
6466 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6467                         ;;
6468                 esac
6469                 ;;
6470         esac
6471
6472         if test -n "$cf_try_cflags"
6473         then
6474 cat > conftest.$ac_ext <<EOF
6475 #line 6475 "${as_me:-configure}"
6476 #include <stdio.h>
6477 int main(int argc, char *argv[])
6478 {
6479         printf("hello\n");
6480         return (argv[argc-1] == 0) ;
6481 }
6482 EOF
6483                 cf_save_CFLAGS="$CFLAGS"
6484                 for cf_opt in $cf_try_cflags
6485                 do
6486                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6487                         echo "$as_me:6487: checking if CFLAGS option -$cf_opt works" >&5
6488 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6489                         if { (eval echo "$as_me:6489: \"$ac_compile\"") >&5
6490   (eval $ac_compile) 2>&5
6491   ac_status=$?
6492   echo "$as_me:6492: \$? = $ac_status" >&5
6493   (exit $ac_status); }; then
6494                                 echo "$as_me:6494: result: yes" >&5
6495 echo "${ECHO_T}yes" >&6
6496                                 cf_save_CFLAGS="$CFLAGS"
6497                         else
6498                                 echo "$as_me:6498: result: no" >&5
6499 echo "${ECHO_T}no" >&6
6500                         fi
6501                 done
6502                 CFLAGS="$cf_save_CFLAGS"
6503         fi
6504
6505         # RPATH_LIST is a colon-separated list of directories
6506         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6507         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6508
6509         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6510
6511         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6512
6513 echo "${as_me:-configure}:6513: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6514
6515         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6516
6517 echo "${as_me:-configure}:6517: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6518
6519 for model in $cf_list_models; do
6520         case $model in
6521         (libtool)
6522
6523 echo "$as_me:6523: checking for additional libtool options" >&5
6524 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6525
6526 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6527 if test "${with_libtool_opts+set}" = set; then
6528   withval="$with_libtool_opts"
6529   with_libtool_opts=$withval
6530 else
6531   with_libtool_opts=no
6532 fi;
6533 echo "$as_me:6533: result: $with_libtool_opts" >&5
6534 echo "${ECHO_T}$with_libtool_opts" >&6
6535
6536 case .$with_libtool_opts in
6537 (.yes|.no|.)
6538         ;;
6539 (*)
6540         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6541         ;;
6542 esac
6543
6544 echo "$as_me:6544: checking if exported-symbols file should be used" >&5
6545 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6546
6547 # Check whether --with-export-syms or --without-export-syms was given.
6548 if test "${with_export_syms+set}" = set; then
6549   withval="$with_export_syms"
6550   with_export_syms=$withval
6551 else
6552   with_export_syms=no
6553 fi;
6554 if test "x$with_export_syms" = xyes
6555 then
6556         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6557
6558 fi
6559 echo "$as_me:6559: result: $with_export_syms" >&5
6560 echo "${ECHO_T}$with_export_syms" >&6
6561 if test "x$with_export_syms" != xno
6562 then
6563         EXPORT_SYMS="-export-symbols $with_export_syms"
6564
6565 fi
6566
6567                 ;;
6568         (shared)
6569                 if test "$CC_SHARED_OPTS" = "unknown"; then
6570                         { { echo "$as_me:6570: error: Shared libraries are not supported in this version" >&5
6571 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6572    { (exit 1); exit 1; }; }
6573                 fi
6574                 # workaround for inept transition to PIE vs PIC...
6575                 echo "$as_me:6575: checking if current CFLAGS link properly" >&5
6576 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6577                 cat >conftest.$ac_ext <<_ACEOF
6578 #line 6578 "configure"
6579 #include "confdefs.h"
6580 #include <stdio.h>
6581 int
6582 main ()
6583 {
6584 printf("Hello work\n");
6585   ;
6586   return 0;
6587 }
6588 _ACEOF
6589 rm -f conftest.$ac_objext conftest$ac_exeext
6590 if { (eval echo "$as_me:6590: \"$ac_link\"") >&5
6591   (eval $ac_link) 2>&5
6592   ac_status=$?
6593   echo "$as_me:6593: \$? = $ac_status" >&5
6594   (exit $ac_status); } &&
6595          { ac_try='test -s conftest$ac_exeext'
6596   { (eval echo "$as_me:6596: \"$ac_try\"") >&5
6597   (eval $ac_try) 2>&5
6598   ac_status=$?
6599   echo "$as_me:6599: \$? = $ac_status" >&5
6600   (exit $ac_status); }; }; then
6601   cf_cflags_work=yes
6602 else
6603   echo "$as_me: failed program was:" >&5
6604 cat conftest.$ac_ext >&5
6605 cf_cflags_work=no
6606 fi
6607 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6608                 echo "$as_me:6608: result: $cf_cflags_work" >&5
6609 echo "${ECHO_T}$cf_cflags_work" >&6
6610                 if test "$cf_cflags_work" = no
6611                 then
6612                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6613
6614 echo "${as_me:-configure}:6614: testing try to work around by appending shared-options ..." 1>&5
6615
6616                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6617                 fi
6618
6619 echo "$as_me:6619: checking if versioned-symbols file should be used" >&5
6620 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6621
6622 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6623 if test "${with_versioned_syms+set}" = set; then
6624   withval="$with_versioned_syms"
6625   with_versioned_syms=$withval
6626 else
6627   with_versioned_syms=no
6628 fi;
6629 if test "x$with_versioned_syms" = xyes
6630 then
6631         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6632
6633 fi
6634 echo "$as_me:6634: result: $with_versioned_syms" >&5
6635 echo "${ECHO_T}$with_versioned_syms" >&6
6636
6637 RESULTING_SYMS=
6638 VERSIONED_SYMS=
6639 WILDCARD_SYMS=
6640
6641 if test "x$with_versioned_syms" != xno
6642 then
6643         RESULTING_SYMS=$with_versioned_syms
6644         case "x$MK_SHARED_LIB" in
6645         (*-Wl,*)
6646                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6647                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6648                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6649
6650 echo "${as_me:-configure}:6650: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6651
6652                 ;;
6653         (*-dy\ *)
6654                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6655                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6656                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6657
6658 echo "${as_me:-configure}:6658: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6659
6660                 ;;
6661         (*)
6662                 { echo "$as_me:6662: WARNING: this system does not support versioned-symbols" >&5
6663 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6664                 ;;
6665         esac
6666
6667         # Linux ld can selectively override scope, e.g., of symbols beginning with
6668         # "_" by first declaring some as global, and then using a wildcard to
6669         # declare the others as local.  Some other loaders cannot do this.  Check
6670         # by constructing a (very) simple shared library and inspecting its
6671         # symbols.
6672         if test "x$VERSIONED_SYMS" != "x"
6673         then
6674                 echo "$as_me:6674: checking if wildcards can be used to selectively omit symbols" >&5
6675 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6676                 WILDCARD_SYMS=no
6677
6678                 # make sources
6679                 rm -f conftest.*
6680
6681                 cat >conftest.ver <<EOF
6682 module_1.0 {
6683 global:
6684         globalf1;
6685 local:
6686         localf1;
6687 };
6688 module_2.0 {
6689 global:
6690         globalf2;
6691 local:
6692         localf2;
6693         _*;
6694 } module_1.0;
6695 submodule_1.0 {
6696 global:
6697         subglobalf1;
6698         _ismissing;
6699 local:
6700         sublocalf1;
6701 };
6702 submodule_2.0 {
6703 global:
6704         subglobalf2;
6705 local:
6706         sublocalf2;
6707         _*;
6708 } submodule_1.0;
6709 EOF
6710                 cat >conftest.$ac_ext <<EOF
6711 #line 6711 "configure"
6712 int     _ismissing(void) { return 1; }
6713 int     _localf1(void) { return 1; }
6714 int     _localf2(void) { return 2; }
6715 int     globalf1(void) { return 1; }
6716 int     globalf2(void) { return 2; }
6717 int     _sublocalf1(void) { return 1; }
6718 int     _sublocalf2(void) { return 2; }
6719 int     subglobalf1(void) { return 1; }
6720 int     subglobalf2(void) { return 2; }
6721 EOF
6722                 cat >conftest.mk <<EOF
6723 CC=${CC}
6724 CFLAGS=${CFLAGS}
6725 CPPFLAGS=${CPPFLAGS}
6726 LDFLAGS=${LDFLAGS}
6727 LIBS=${LIBS}
6728 VERSIONED_SYMS=${VERSIONED_SYMS}
6729 RESULTING_SYMS=conftest.ver
6730 MK_SHARED_LIB=${MK_SHARED_LIB}
6731 conftest.so: conftest.$ac_cv_objext
6732                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6733 EOF
6734
6735                 # compile source, make library
6736                 if make -f conftest.mk 2>&5 >/dev/null
6737                 then
6738                         # test for missing symbol in either Data or Text section
6739                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6740                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6741                 fi
6742                 echo "$as_me:6742: result: $WILDCARD_SYMS" >&5
6743 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6744                 rm -f conftest.*
6745         fi
6746 fi
6747
6748                 ;;
6749         esac
6750 done
6751
6752 # pretend that ncurses==ncursesw==ncursest
6753 echo "$as_me:6753: checking if you want to disable library suffixes" >&5
6754 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6755
6756 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6757 if test "${enable_lib_suffixes+set}" = set; then
6758   enableval="$enable_lib_suffixes"
6759   test "$enableval" != no && enableval=yes
6760         if test "$enableval" != "yes" ; then
6761     disable_lib_suffixes=yes
6762         else
6763                 disable_lib_suffixes=no
6764         fi
6765 else
6766   enableval=yes
6767         disable_lib_suffixes=no
6768
6769 fi;
6770 echo "$as_me:6770: result: $disable_lib_suffixes" >&5
6771 echo "${ECHO_T}$disable_lib_suffixes" >&6
6772
6773 ### If we're building with rpath, try to link non-standard libs that way too.
6774 if test "$DFT_LWR_MODEL" = "shared"; then
6775
6776 echo "$as_me:6776: checking if rpath-hack should be disabled" >&5
6777 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6778
6779 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6780 if test "${enable_rpath_hack+set}" = set; then
6781   enableval="$enable_rpath_hack"
6782   test "$enableval" != no && enableval=yes
6783         if test "$enableval" != "yes" ; then
6784     cf_disable_rpath_hack=yes
6785         else
6786                 cf_disable_rpath_hack=no
6787         fi
6788 else
6789   enableval=yes
6790         cf_disable_rpath_hack=no
6791
6792 fi;
6793 echo "$as_me:6793: result: $cf_disable_rpath_hack" >&5
6794 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6795 if test "$cf_disable_rpath_hack" = no ; then
6796
6797 echo "$as_me:6797: checking for updated LDFLAGS" >&5
6798 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6799 if test -n "$LD_RPATH_OPT" ; then
6800         echo "$as_me:6800: result: maybe" >&5
6801 echo "${ECHO_T}maybe" >&6
6802
6803         for ac_prog in ldd
6804 do
6805   # Extract the first word of "$ac_prog", so it can be a program name with args.
6806 set dummy $ac_prog; ac_word=$2
6807 echo "$as_me:6807: checking for $ac_word" >&5
6808 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6809 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6810   echo $ECHO_N "(cached) $ECHO_C" >&6
6811 else
6812   if test -n "$cf_ldd_prog"; then
6813   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6814 else
6815   ac_save_IFS=$IFS; IFS=$ac_path_separator
6816 ac_dummy="$PATH"
6817 for ac_dir in $ac_dummy; do
6818   IFS=$ac_save_IFS
6819   test -z "$ac_dir" && ac_dir=.
6820   $as_executable_p "$ac_dir/$ac_word" || continue
6821 ac_cv_prog_cf_ldd_prog="$ac_prog"
6822 echo "$as_me:6822: found $ac_dir/$ac_word" >&5
6823 break
6824 done
6825
6826 fi
6827 fi
6828 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6829 if test -n "$cf_ldd_prog"; then
6830   echo "$as_me:6830: result: $cf_ldd_prog" >&5
6831 echo "${ECHO_T}$cf_ldd_prog" >&6
6832 else
6833   echo "$as_me:6833: result: no" >&5
6834 echo "${ECHO_T}no" >&6
6835 fi
6836
6837   test -n "$cf_ldd_prog" && break
6838 done
6839 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6840
6841         cf_rpath_list="/usr/lib /lib"
6842         if test "$cf_ldd_prog" != no
6843         then
6844                 cf_rpath_oops=
6845
6846 cat >conftest.$ac_ext <<_ACEOF
6847 #line 6847 "configure"
6848 #include "confdefs.h"
6849 #include <stdio.h>
6850 int
6851 main ()
6852 {
6853 printf("Hello");
6854   ;
6855   return 0;
6856 }
6857 _ACEOF
6858 rm -f conftest.$ac_objext conftest$ac_exeext
6859 if { (eval echo "$as_me:6859: \"$ac_link\"") >&5
6860   (eval $ac_link) 2>&5
6861   ac_status=$?
6862   echo "$as_me:6862: \$? = $ac_status" >&5
6863   (exit $ac_status); } &&
6864          { ac_try='test -s conftest$ac_exeext'
6865   { (eval echo "$as_me:6865: \"$ac_try\"") >&5
6866   (eval $ac_try) 2>&5
6867   ac_status=$?
6868   echo "$as_me:6868: \$? = $ac_status" >&5
6869   (exit $ac_status); }; }; then
6870   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6871                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6872 else
6873   echo "$as_me: failed program was:" >&5
6874 cat conftest.$ac_ext >&5
6875 fi
6876 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6877
6878                 # If we passed the link-test, but get a "not found" on a given library,
6879                 # this could be due to inept reconfiguration of gcc to make it only
6880                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6881                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6882                 # /usr/local libraries.
6883                 if test -n "$cf_rpath_oops"
6884                 then
6885                         for cf_rpath_src in $cf_rpath_oops
6886                         do
6887                                 for cf_rpath_dir in \
6888                                         /usr/local \
6889                                         /usr/pkg \
6890                                         /opt/sfw
6891                                 do
6892                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6893                                         then
6894                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6895
6896 echo "${as_me:-configure}:6896: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6897
6898                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6899                                                 break
6900                                         fi
6901                                 done
6902                         done
6903                 fi
6904         fi
6905
6906         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6907
6908 echo "${as_me:-configure}:6908: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6909
6910 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6911
6912 echo "${as_me:-configure}:6912: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6913
6914 cf_rpath_dst=
6915 for cf_rpath_src in $LDFLAGS
6916 do
6917         case $cf_rpath_src in
6918         (-L*)
6919
6920                 # check if this refers to a directory which we will ignore
6921                 cf_rpath_skip=no
6922                 if test -n "$cf_rpath_list"
6923                 then
6924                         for cf_rpath_item in $cf_rpath_list
6925                         do
6926                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6927                                 then
6928                                         cf_rpath_skip=yes
6929                                         break
6930                                 fi
6931                         done
6932                 fi
6933
6934                 if test "$cf_rpath_skip" = no
6935                 then
6936                         # transform the option
6937                         if test "$LD_RPATH_OPT" = "-R " ; then
6938                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6939                         else
6940                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6941                         fi
6942
6943                         # if we have not already added this, add it now
6944                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6945                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6946                         then
6947                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6948
6949 echo "${as_me:-configure}:6949: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6950
6951                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6952                         fi
6953                 fi
6954                 ;;
6955         esac
6956         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6957 done
6958 LDFLAGS=$cf_rpath_dst
6959
6960 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6961
6962 echo "${as_me:-configure}:6962: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6963
6964 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6965
6966 echo "${as_me:-configure}:6966: testing ...checking LIBS $LIBS ..." 1>&5
6967
6968 cf_rpath_dst=
6969 for cf_rpath_src in $LIBS
6970 do
6971         case $cf_rpath_src in
6972         (-L*)
6973
6974                 # check if this refers to a directory which we will ignore
6975                 cf_rpath_skip=no
6976                 if test -n "$cf_rpath_list"
6977                 then
6978                         for cf_rpath_item in $cf_rpath_list
6979                         do
6980                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6981                                 then
6982                                         cf_rpath_skip=yes
6983                                         break
6984                                 fi
6985                         done
6986                 fi
6987
6988                 if test "$cf_rpath_skip" = no
6989                 then
6990                         # transform the option
6991                         if test "$LD_RPATH_OPT" = "-R " ; then
6992                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6993                         else
6994                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6995                         fi
6996
6997                         # if we have not already added this, add it now
6998                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6999                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7000                         then
7001                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7002
7003 echo "${as_me:-configure}:7003: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7004
7005                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7006                         fi
7007                 fi
7008                 ;;
7009         esac
7010         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7011 done
7012 LIBS=$cf_rpath_dst
7013
7014 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7015
7016 echo "${as_me:-configure}:7016: testing ...checked LIBS $LIBS ..." 1>&5
7017
7018         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7019
7020 echo "${as_me:-configure}:7020: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7021
7022 else
7023         echo "$as_me:7023: result: no" >&5
7024 echo "${ECHO_T}no" >&6
7025 fi
7026
7027 fi
7028
7029 fi
7030
7031 ###############################################################################
7032
7033 ###     use option --with-extra-suffix to append suffix to headers and libraries
7034 echo "$as_me:7034: checking if you wish to append extra suffix to header/library paths" >&5
7035 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7036 EXTRA_SUFFIX=
7037
7038 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7039 if test "${with_extra_suffix+set}" = set; then
7040   withval="$with_extra_suffix"
7041   case x$withval in
7042         (no)
7043                 ;;
7044         (xyes|x)
7045                 EXTRA_SUFFIX=$cf_cv_abi_version
7046                 ;;
7047         (*)
7048                 EXTRA_SUFFIX=$withval
7049                 ;;
7050         esac
7051
7052 fi;
7053 echo "$as_me:7053: result: $EXTRA_SUFFIX" >&5
7054 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7055
7056 ###     use option --disable-overwrite to leave out the link to -lcurses
7057 echo "$as_me:7057: checking if you wish to install ncurses overwriting curses" >&5
7058 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7059
7060 # Check whether --enable-overwrite or --disable-overwrite was given.
7061 if test "${enable_overwrite+set}" = set; then
7062   enableval="$enable_overwrite"
7063   with_overwrite=$enableval
7064 else
7065   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7066 fi;
7067 echo "$as_me:7067: result: $with_overwrite" >&5
7068 echo "${ECHO_T}$with_overwrite" >&6
7069
7070 echo "$as_me:7070: checking if external terminfo-database is used" >&5
7071 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7072
7073 # Check whether --enable-database or --disable-database was given.
7074 if test "${enable_database+set}" = set; then
7075   enableval="$enable_database"
7076   use_database=$enableval
7077 else
7078   use_database=yes
7079 fi;
7080 echo "$as_me:7080: result: $use_database" >&5
7081 echo "${ECHO_T}$use_database" >&6
7082
7083 case $host_os in
7084 (os2*)
7085         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7086         ;;
7087 (*)
7088         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7089         ;;
7090 esac
7091
7092 NCURSES_USE_DATABASE=0
7093 if test "$use_database" != no ; then
7094         NCURSES_USE_DATABASE=1
7095
7096         echo "$as_me:7096: checking which terminfo source-file will be installed" >&5
7097 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7098
7099 # Check whether --with-database or --without-database was given.
7100 if test "${with_database+set}" = set; then
7101   withval="$with_database"
7102   TERMINFO_SRC=$withval
7103 fi;
7104         echo "$as_me:7104: result: $TERMINFO_SRC" >&5
7105 echo "${ECHO_T}$TERMINFO_SRC" >&6
7106
7107         echo "$as_me:7107: checking whether to use hashed database instead of directory/tree" >&5
7108 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7109
7110 # Check whether --with-hashed-db or --without-hashed-db was given.
7111 if test "${with_hashed_db+set}" = set; then
7112   withval="$with_hashed_db"
7113
7114 else
7115   with_hashed_db=no
7116 fi;
7117         echo "$as_me:7117: result: $with_hashed_db" >&5
7118 echo "${ECHO_T}$with_hashed_db" >&6
7119 else
7120         with_hashed_db=no
7121 fi
7122
7123 echo "$as_me:7123: checking for list of fallback descriptions" >&5
7124 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7125
7126 # Check whether --with-fallbacks or --without-fallbacks was given.
7127 if test "${with_fallbacks+set}" = set; then
7128   withval="$with_fallbacks"
7129   with_fallback=$withval
7130 else
7131   with_fallback=
7132 fi;
7133 echo "$as_me:7133: result: $with_fallback" >&5
7134 echo "${ECHO_T}$with_fallback" >&6
7135 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7136
7137 echo "$as_me:7137: checking if you want modern xterm or antique" >&5
7138 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7139
7140 # Check whether --with-xterm-new or --without-xterm-new was given.
7141 if test "${with_xterm_new+set}" = set; then
7142   withval="$with_xterm_new"
7143   with_xterm_new=$withval
7144 else
7145   with_xterm_new=yes
7146 fi;
7147 case $with_xterm_new in
7148 (no) with_xterm_new=xterm-old;;
7149 (*)      with_xterm_new=xterm-new;;
7150 esac
7151 echo "$as_me:7151: result: $with_xterm_new" >&5
7152 echo "${ECHO_T}$with_xterm_new" >&6
7153 WHICH_XTERM=$with_xterm_new
7154
7155 echo "$as_me:7155: checking if xterm backspace sends BS or DEL" >&5
7156 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7157
7158 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7159 if test "${with_xterm_kbs+set}" = set; then
7160   withval="$with_xterm_kbs"
7161   with_xterm_kbs=$withval
7162 else
7163   with_xterm_kbs=BS
7164 fi;
7165 case x$with_xterm_kbs in
7166 (xyes|xno|xBS|xbs|x8)
7167         with_xterm_kbs=BS
7168         ;;
7169 (xDEL|xdel|x127)
7170         with_xterm_kbs=DEL
7171         ;;
7172 (*)
7173         with_xterm_kbs=$withval
7174         ;;
7175 esac
7176 echo "$as_me:7176: result: $with_xterm_kbs" >&5
7177 echo "${ECHO_T}$with_xterm_kbs" >&6
7178 XTERM_KBS=$with_xterm_kbs
7179
7180 MAKE_TERMINFO=
7181 if test "$use_database" = no ; then
7182         TERMINFO="${datadir}/terminfo"
7183         MAKE_TERMINFO="#"
7184 else
7185
7186 echo "$as_me:7186: checking for list of terminfo directories" >&5
7187 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7188
7189 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7190 if test "${with_terminfo_dirs+set}" = set; then
7191   withval="$with_terminfo_dirs"
7192
7193 else
7194   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7195 fi;
7196 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7197 cf_dst_path=
7198 for cf_src_path in $withval
7199 do
7200
7201 if test "x$prefix" != xNONE; then
7202         cf_path_syntax="$prefix"
7203 else
7204         cf_path_syntax="$ac_default_prefix"
7205 fi
7206
7207 case ".$cf_src_path" in
7208 (.\$\(*\)*|.\'*\'*)
7209         ;;
7210 (..|./*|.\\*)
7211         ;;
7212 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7213         ;;
7214 (.\${*prefix}*|.\${*dir}*)
7215         eval cf_src_path="$cf_src_path"
7216         case ".$cf_src_path" in
7217         (.NONE/*)
7218                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7219                 ;;
7220         esac
7221         ;;
7222 (.no|.NONE/*)
7223         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7224         ;;
7225 (*)
7226         { { echo "$as_me:7226: error: expected a pathname, not \"$cf_src_path\"" >&5
7227 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7228    { (exit 1); exit 1; }; }
7229         ;;
7230 esac
7231
7232   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7233   cf_dst_path="${cf_dst_path}${cf_src_path}"
7234 done
7235 IFS="$ac_save_ifs"
7236
7237 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7238 # so we have to check/work around.  We do prefer the result of "eval"...
7239 eval cf_dst_eval="$cf_dst_path"
7240 case "x$cf_dst_eval" in
7241 (xNONE*)
7242         TERMINFO_DIRS=$cf_dst_path
7243         ;;
7244 (*)
7245         TERMINFO_DIRS="$cf_dst_eval"
7246         ;;
7247 esac
7248
7249 echo "$as_me:7249: result: $TERMINFO_DIRS" >&5
7250 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7251 test -n "$TERMINFO_DIRS" &&
7252 cat >>confdefs.h <<EOF
7253 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7254 EOF
7255
7256 echo "$as_me:7256: checking for default terminfo directory" >&5
7257 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7258
7259 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7260 if test "${with_default_terminfo_dir+set}" = set; then
7261   withval="$with_default_terminfo_dir"
7262
7263 else
7264   withval="${TERMINFO:-${datadir}/terminfo}"
7265 fi; if test -n "${datadir}/terminfo" ; then
7266
7267 if test "x$prefix" != xNONE; then
7268         cf_path_syntax="$prefix"
7269 else
7270         cf_path_syntax="$ac_default_prefix"
7271 fi
7272
7273 case ".$withval" in
7274 (.\$\(*\)*|.\'*\'*)
7275         ;;
7276 (..|./*|.\\*)
7277         ;;
7278 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7279         ;;
7280 (.\${*prefix}*|.\${*dir}*)
7281         eval withval="$withval"
7282         case ".$withval" in
7283         (.NONE/*)
7284                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7285                 ;;
7286         esac
7287         ;;
7288 (.no|.NONE/*)
7289         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7290         ;;
7291 (*)
7292         { { echo "$as_me:7292: error: expected a pathname, not \"$withval\"" >&5
7293 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7294    { (exit 1); exit 1; }; }
7295         ;;
7296 esac
7297
7298 fi
7299 eval TERMINFO="$withval"
7300
7301 echo "$as_me:7301: result: $TERMINFO" >&5
7302 echo "${ECHO_T}$TERMINFO" >&6
7303
7304 cat >>confdefs.h <<EOF
7305 #define TERMINFO "$TERMINFO"
7306 EOF
7307
7308 fi
7309
7310 ###     use option --disable-big-core to make tic run on small machines
7311 ###     We need 4Mb, check if we can allocate 50% more than that.
7312 echo "$as_me:7312: checking if big-core option selected" >&5
7313 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7314
7315 # Check whether --enable-big-core or --disable-big-core was given.
7316 if test "${enable_big_core+set}" = set; then
7317   enableval="$enable_big_core"
7318   with_big_core=$enableval
7319 else
7320   if test "$cross_compiling" = yes; then
7321   with_big_core=no
7322 else
7323   cat >conftest.$ac_ext <<_ACEOF
7324 #line 7324 "configure"
7325 #include "confdefs.h"
7326
7327 #include <stdlib.h>
7328 #include <string.h>
7329 int main() {
7330         unsigned long n = 6000000L;
7331         char *s = malloc(n);
7332         if (s != 0)
7333                 s[0] = s[n-1] = 0;
7334         ${cf_cv_main_return:-return}(s == 0);
7335 }
7336 _ACEOF
7337 rm -f conftest$ac_exeext
7338 if { (eval echo "$as_me:7338: \"$ac_link\"") >&5
7339   (eval $ac_link) 2>&5
7340   ac_status=$?
7341   echo "$as_me:7341: \$? = $ac_status" >&5
7342   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7343   { (eval echo "$as_me:7343: \"$ac_try\"") >&5
7344   (eval $ac_try) 2>&5
7345   ac_status=$?
7346   echo "$as_me:7346: \$? = $ac_status" >&5
7347   (exit $ac_status); }; }; then
7348   with_big_core=yes
7349 else
7350   echo "$as_me: program exited with status $ac_status" >&5
7351 echo "$as_me: failed program was:" >&5
7352 cat conftest.$ac_ext >&5
7353 with_big_core=no
7354 fi
7355 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7356 fi
7357 fi;
7358 echo "$as_me:7358: result: $with_big_core" >&5
7359 echo "${ECHO_T}$with_big_core" >&6
7360 test "x$with_big_core" = "xyes" &&
7361 cat >>confdefs.h <<\EOF
7362 #define HAVE_BIG_CORE 1
7363 EOF
7364
7365 ### ISO C only guarantees 512-char strings, we have tables which load faster
7366 ### when constructed using "big" strings.  More than the C compiler, the awk
7367 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7368 echo "$as_me:7368: checking if big-strings option selected" >&5
7369 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7370
7371 # Check whether --enable-big-strings or --disable-big-strings was given.
7372 if test "${enable_big_strings+set}" = set; then
7373   enableval="$enable_big_strings"
7374   with_big_strings=$enableval
7375 else
7376
7377         case x$AWK in
7378         (x)
7379                 eval with_big_strings=no
7380                 ;;
7381         (*)
7382                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7383                         | $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
7384                         eval with_big_strings=yes
7385                 else
7386                         eval with_big_strings=no
7387                 fi
7388                 ;;
7389         esac
7390
7391 fi;
7392 echo "$as_me:7392: result: $with_big_strings" >&5
7393 echo "${ECHO_T}$with_big_strings" >&6
7394
7395 USE_BIG_STRINGS=0
7396 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7397
7398 ###     use option --enable-termcap to compile in the termcap fallback support
7399 echo "$as_me:7399: checking if you want termcap-fallback support" >&5
7400 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7401
7402 # Check whether --enable-termcap or --disable-termcap was given.
7403 if test "${enable_termcap+set}" = set; then
7404   enableval="$enable_termcap"
7405   with_termcap=$enableval
7406 else
7407   with_termcap=no
7408 fi;
7409 echo "$as_me:7409: result: $with_termcap" >&5
7410 echo "${ECHO_T}$with_termcap" >&6
7411
7412 NCURSES_USE_TERMCAP=0
7413 if test "x$with_termcap" != "xyes" ; then
7414         if test "$use_database" = no ; then
7415                 if test -z "$with_fallback" ; then
7416                         { { echo "$as_me:7416: error: You have disabled the database w/o specifying fallbacks" >&5
7417 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7418    { (exit 1); exit 1; }; }
7419                 fi
7420         fi
7421
7422 cat >>confdefs.h <<\EOF
7423 #define PURE_TERMINFO 1
7424 EOF
7425
7426 else
7427
7428         if test "$with_ticlib" != no ; then
7429                 { { echo "$as_me:7429: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7430 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7431    { (exit 1); exit 1; }; }
7432         fi
7433
7434         NCURSES_USE_TERMCAP=1
7435         echo "$as_me:7435: checking for list of termcap files" >&5
7436 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7437
7438 # Check whether --with-termpath or --without-termpath was given.
7439 if test "${with_termpath+set}" = set; then
7440   withval="$with_termpath"
7441
7442 else
7443   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7444 fi;
7445 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7446 cf_dst_path=
7447 for cf_src_path in $withval
7448 do
7449
7450 if test "x$prefix" != xNONE; then
7451         cf_path_syntax="$prefix"
7452 else
7453         cf_path_syntax="$ac_default_prefix"
7454 fi
7455
7456 case ".$cf_src_path" in
7457 (.\$\(*\)*|.\'*\'*)
7458         ;;
7459 (..|./*|.\\*)
7460         ;;
7461 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7462         ;;
7463 (.\${*prefix}*|.\${*dir}*)
7464         eval cf_src_path="$cf_src_path"
7465         case ".$cf_src_path" in
7466         (.NONE/*)
7467                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7468                 ;;
7469         esac
7470         ;;
7471 (.no|.NONE/*)
7472         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7473         ;;
7474 (*)
7475         { { echo "$as_me:7475: error: expected a pathname, not \"$cf_src_path\"" >&5
7476 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7477    { (exit 1); exit 1; }; }
7478         ;;
7479 esac
7480
7481   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7482   cf_dst_path="${cf_dst_path}${cf_src_path}"
7483 done
7484 IFS="$ac_save_ifs"
7485
7486 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7487 # so we have to check/work around.  We do prefer the result of "eval"...
7488 eval cf_dst_eval="$cf_dst_path"
7489 case "x$cf_dst_eval" in
7490 (xNONE*)
7491         TERMPATH=$cf_dst_path
7492         ;;
7493 (*)
7494         TERMPATH="$cf_dst_eval"
7495         ;;
7496 esac
7497
7498         echo "$as_me:7498: result: $TERMPATH" >&5
7499 echo "${ECHO_T}$TERMPATH" >&6
7500         test -n "$TERMPATH" &&
7501 cat >>confdefs.h <<EOF
7502 #define TERMPATH "$TERMPATH"
7503 EOF
7504
7505         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7506         echo "$as_me:7506: checking if fast termcap-loader is needed" >&5
7507 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7508
7509 # Check whether --enable-getcap or --disable-getcap was given.
7510 if test "${enable_getcap+set}" = set; then
7511   enableval="$enable_getcap"
7512   with_getcap=$enableval
7513 else
7514   with_getcap=no
7515 fi;
7516         echo "$as_me:7516: result: $with_getcap" >&5
7517 echo "${ECHO_T}$with_getcap" >&6
7518         test "x$with_getcap" = "xyes" &&
7519 cat >>confdefs.h <<\EOF
7520 #define USE_GETCAP 1
7521 EOF
7522
7523         echo "$as_me:7523: checking if translated termcaps will be cached in ~/.terminfo" >&5
7524 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7525
7526 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7527 if test "${enable_getcap_cache+set}" = set; then
7528   enableval="$enable_getcap_cache"
7529   with_getcap_cache=$enableval
7530 else
7531   with_getcap_cache=no
7532 fi;
7533         echo "$as_me:7533: result: $with_getcap_cache" >&5
7534 echo "${ECHO_T}$with_getcap_cache" >&6
7535         test "x$with_getcap_cache" = "xyes" &&
7536 cat >>confdefs.h <<\EOF
7537 #define USE_GETCAP_CACHE 1
7538 EOF
7539
7540 fi
7541
7542 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7543 echo "$as_me:7543: checking if ~/.terminfo is wanted" >&5
7544 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7545
7546 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7547 if test "${enable_home_terminfo+set}" = set; then
7548   enableval="$enable_home_terminfo"
7549   with_home_terminfo=$enableval
7550 else
7551   with_home_terminfo=yes
7552 fi;
7553 echo "$as_me:7553: result: $with_home_terminfo" >&5
7554 echo "${ECHO_T}$with_home_terminfo" >&6
7555 test "x$with_home_terminfo" = "xyes" &&
7556 cat >>confdefs.h <<\EOF
7557 #define USE_HOME_TERMINFO 1
7558 EOF
7559
7560 echo "$as_me:7560: checking if you want to use restricted environment when running as root" >&5
7561 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7562
7563 # Check whether --enable-root-environ or --disable-root-environ was given.
7564 if test "${enable_root_environ+set}" = set; then
7565   enableval="$enable_root_environ"
7566   with_root_environ=$enableval
7567 else
7568   with_root_environ=yes
7569 fi;
7570 echo "$as_me:7570: result: $with_root_environ" >&5
7571 echo "${ECHO_T}$with_root_environ" >&6
7572 test "x$with_root_environ" = xyes &&
7573 cat >>confdefs.h <<\EOF
7574 #define USE_ROOT_ENVIRON 1
7575 EOF
7576
7577 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7578 ###   to reduce storage requirements for the terminfo database.
7579
7580 for ac_header in \
7581 unistd.h \
7582
7583 do
7584 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7585 echo "$as_me:7585: checking for $ac_header" >&5
7586 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7587 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7588   echo $ECHO_N "(cached) $ECHO_C" >&6
7589 else
7590   cat >conftest.$ac_ext <<_ACEOF
7591 #line 7591 "configure"
7592 #include "confdefs.h"
7593 #include <$ac_header>
7594 _ACEOF
7595 if { (eval echo "$as_me:7595: \"$ac_cpp conftest.$ac_ext\"") >&5
7596   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7597   ac_status=$?
7598   egrep -v '^ *\+' conftest.er1 >conftest.err
7599   rm -f conftest.er1
7600   cat conftest.err >&5
7601   echo "$as_me:7601: \$? = $ac_status" >&5
7602   (exit $ac_status); } >/dev/null; then
7603   if test -s conftest.err; then
7604     ac_cpp_err=$ac_c_preproc_warn_flag
7605   else
7606     ac_cpp_err=
7607   fi
7608 else
7609   ac_cpp_err=yes
7610 fi
7611 if test -z "$ac_cpp_err"; then
7612   eval "$as_ac_Header=yes"
7613 else
7614   echo "$as_me: failed program was:" >&5
7615   cat conftest.$ac_ext >&5
7616   eval "$as_ac_Header=no"
7617 fi
7618 rm -f conftest.err conftest.$ac_ext
7619 fi
7620 echo "$as_me:7620: result: `eval echo '${'$as_ac_Header'}'`" >&5
7621 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7622 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7623   cat >>confdefs.h <<EOF
7624 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7625 EOF
7626
7627 fi
7628 done
7629
7630 for ac_func in \
7631         remove \
7632         unlink
7633 do
7634 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7635 echo "$as_me:7635: checking for $ac_func" >&5
7636 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7637 if eval "test \"\${$as_ac_var+set}\" = set"; then
7638   echo $ECHO_N "(cached) $ECHO_C" >&6
7639 else
7640   cat >conftest.$ac_ext <<_ACEOF
7641 #line 7641 "configure"
7642 #include "confdefs.h"
7643 /* System header to define __stub macros and hopefully few prototypes,
7644     which can conflict with char $ac_func (); below.  */
7645 #include <assert.h>
7646 /* Override any gcc2 internal prototype to avoid an error.  */
7647 #ifdef __cplusplus
7648 extern "C"
7649 #endif
7650 /* We use char because int might match the return type of a gcc2
7651    builtin and then its argument prototype would still apply.  */
7652 char $ac_func ();
7653 char (*f) ();
7654
7655 int
7656 main ()
7657 {
7658 /* The GNU C library defines this for functions which it implements
7659     to always fail with ENOSYS.  Some functions are actually named
7660     something starting with __ and the normal name is an alias.  */
7661 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7662 choke me
7663 #else
7664 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7665 #endif
7666
7667   ;
7668   return 0;
7669 }
7670 _ACEOF
7671 rm -f conftest.$ac_objext conftest$ac_exeext
7672 if { (eval echo "$as_me:7672: \"$ac_link\"") >&5
7673   (eval $ac_link) 2>&5
7674   ac_status=$?
7675   echo "$as_me:7675: \$? = $ac_status" >&5
7676   (exit $ac_status); } &&
7677          { ac_try='test -s conftest$ac_exeext'
7678   { (eval echo "$as_me:7678: \"$ac_try\"") >&5
7679   (eval $ac_try) 2>&5
7680   ac_status=$?
7681   echo "$as_me:7681: \$? = $ac_status" >&5
7682   (exit $ac_status); }; }; then
7683   eval "$as_ac_var=yes"
7684 else
7685   echo "$as_me: failed program was:" >&5
7686 cat conftest.$ac_ext >&5
7687 eval "$as_ac_var=no"
7688 fi
7689 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7690 fi
7691 echo "$as_me:7691: result: `eval echo '${'$as_ac_var'}'`" >&5
7692 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7693 if test `eval echo '${'$as_ac_var'}'` = yes; then
7694   cat >>confdefs.h <<EOF
7695 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7696 EOF
7697
7698 fi
7699 done
7700
7701 if test "$cross_compiling" = yes ; then
7702
7703 for ac_func in \
7704                 link \
7705                 symlink
7706 do
7707 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7708 echo "$as_me:7708: checking for $ac_func" >&5
7709 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7710 if eval "test \"\${$as_ac_var+set}\" = set"; then
7711   echo $ECHO_N "(cached) $ECHO_C" >&6
7712 else
7713   cat >conftest.$ac_ext <<_ACEOF
7714 #line 7714 "configure"
7715 #include "confdefs.h"
7716 /* System header to define __stub macros and hopefully few prototypes,
7717     which can conflict with char $ac_func (); below.  */
7718 #include <assert.h>
7719 /* Override any gcc2 internal prototype to avoid an error.  */
7720 #ifdef __cplusplus
7721 extern "C"
7722 #endif
7723 /* We use char because int might match the return type of a gcc2
7724    builtin and then its argument prototype would still apply.  */
7725 char $ac_func ();
7726 char (*f) ();
7727
7728 int
7729 main ()
7730 {
7731 /* The GNU C library defines this for functions which it implements
7732     to always fail with ENOSYS.  Some functions are actually named
7733     something starting with __ and the normal name is an alias.  */
7734 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7735 choke me
7736 #else
7737 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7738 #endif
7739
7740   ;
7741   return 0;
7742 }
7743 _ACEOF
7744 rm -f conftest.$ac_objext conftest$ac_exeext
7745 if { (eval echo "$as_me:7745: \"$ac_link\"") >&5
7746   (eval $ac_link) 2>&5
7747   ac_status=$?
7748   echo "$as_me:7748: \$? = $ac_status" >&5
7749   (exit $ac_status); } &&
7750          { ac_try='test -s conftest$ac_exeext'
7751   { (eval echo "$as_me:7751: \"$ac_try\"") >&5
7752   (eval $ac_try) 2>&5
7753   ac_status=$?
7754   echo "$as_me:7754: \$? = $ac_status" >&5
7755   (exit $ac_status); }; }; then
7756   eval "$as_ac_var=yes"
7757 else
7758   echo "$as_me: failed program was:" >&5
7759 cat conftest.$ac_ext >&5
7760 eval "$as_ac_var=no"
7761 fi
7762 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7763 fi
7764 echo "$as_me:7764: result: `eval echo '${'$as_ac_var'}'`" >&5
7765 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7766 if test `eval echo '${'$as_ac_var'}'` = yes; then
7767   cat >>confdefs.h <<EOF
7768 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7769 EOF
7770
7771 fi
7772 done
7773
7774 else
7775         echo "$as_me:7775: checking if link/symlink functions work" >&5
7776 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7777 if test "${cf_cv_link_funcs+set}" = set; then
7778   echo $ECHO_N "(cached) $ECHO_C" >&6
7779 else
7780
7781                 cf_cv_link_funcs=
7782                 for cf_func in link symlink ; do
7783                         if test "$cross_compiling" = yes; then
7784
7785                         eval 'ac_cv_func_'$cf_func'=error'
7786 else
7787   cat >conftest.$ac_ext <<_ACEOF
7788 #line 7788 "configure"
7789 #include "confdefs.h"
7790
7791 #include <sys/types.h>
7792 #include <sys/stat.h>
7793 #ifdef HAVE_UNISTD_H
7794 #include <unistd.h>
7795 #endif
7796 int main(void)
7797 {
7798         int fail = 0;
7799         char *src = "config.log";
7800         char *dst = "conftest.chk";
7801         struct stat src_sb;
7802         struct stat dst_sb;
7803
7804         stat(src, &src_sb);
7805         fail = ($cf_func("config.log", "conftest.chk") < 0)
7806             || (stat(dst, &dst_sb) < 0)
7807             || (dst_sb.st_mtime != src_sb.st_mtime);
7808 #ifdef HAVE_UNLINK
7809         unlink(dst);
7810 #else
7811         remove(dst);
7812 #endif
7813         ${cf_cv_main_return:-return} (fail);
7814 }
7815
7816 _ACEOF
7817 rm -f conftest$ac_exeext
7818 if { (eval echo "$as_me:7818: \"$ac_link\"") >&5
7819   (eval $ac_link) 2>&5
7820   ac_status=$?
7821   echo "$as_me:7821: \$? = $ac_status" >&5
7822   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7823   { (eval echo "$as_me:7823: \"$ac_try\"") >&5
7824   (eval $ac_try) 2>&5
7825   ac_status=$?
7826   echo "$as_me:7826: \$? = $ac_status" >&5
7827   (exit $ac_status); }; }; then
7828
7829                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7830                         eval 'ac_cv_func_'$cf_func'=yes'
7831 else
7832   echo "$as_me: program exited with status $ac_status" >&5
7833 echo "$as_me: failed program was:" >&5
7834 cat conftest.$ac_ext >&5
7835
7836                         eval 'ac_cv_func_'$cf_func'=no'
7837 fi
7838 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7839 fi
7840                 done
7841                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7842
7843 fi
7844 echo "$as_me:7844: result: $cf_cv_link_funcs" >&5
7845 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7846         test "$ac_cv_func_link"    = yes &&
7847 cat >>confdefs.h <<\EOF
7848 #define HAVE_LINK 1
7849 EOF
7850
7851         test "$ac_cv_func_symlink" = yes &&
7852 cat >>confdefs.h <<\EOF
7853 #define HAVE_SYMLINK 1
7854 EOF
7855
7856 fi
7857
7858 with_links=no
7859 with_symlinks=no
7860
7861 # soft links (symbolic links) are useful for some systems where hard links do
7862 # not work, or to make it simpler to copy terminfo trees around.
7863 if test "x$ac_cv_func_symlink" = xyes ; then
7864         echo "$as_me:7864: checking if tic should use symbolic links" >&5
7865 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7866
7867 # Check whether --enable-symlinks or --disable-symlinks was given.
7868 if test "${enable_symlinks+set}" = set; then
7869   enableval="$enable_symlinks"
7870   with_symlinks=$enableval
7871 else
7872   with_symlinks=no
7873 fi;
7874         echo "$as_me:7874: result: $with_symlinks" >&5
7875 echo "${ECHO_T}$with_symlinks" >&6
7876 fi
7877
7878 # If we have hard links and did not choose to use soft links instead, there is
7879 # no reason to make this choice optional - use the hard links.
7880 if test "$with_symlinks" = no ; then
7881         echo "$as_me:7881: checking if tic should use hard links" >&5
7882 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7883         if test "x$ac_cv_func_link" = xyes ; then
7884                 with_links=yes
7885         else
7886                 with_links=no
7887         fi
7888         echo "$as_me:7888: result: $with_links" >&5
7889 echo "${ECHO_T}$with_links" >&6
7890 fi
7891
7892 test "x$with_links" = xyes &&
7893 cat >>confdefs.h <<\EOF
7894 #define USE_LINKS 1
7895 EOF
7896
7897 test "x$with_symlinks" = xyes &&
7898 cat >>confdefs.h <<\EOF
7899 #define USE_SYMLINKS 1
7900 EOF
7901
7902 ###   use option --enable-broken-linker to force on use of broken-linker support
7903 echo "$as_me:7903: checking if you want broken-linker support code" >&5
7904 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7905
7906 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7907 if test "${enable_broken_linker+set}" = set; then
7908   enableval="$enable_broken_linker"
7909   with_broken_linker=$enableval
7910 else
7911   with_broken_linker=${BROKEN_LINKER:-no}
7912 fi;
7913 echo "$as_me:7913: result: $with_broken_linker" >&5
7914 echo "${ECHO_T}$with_broken_linker" >&6
7915
7916 BROKEN_LINKER=0
7917 if test "x$with_broken_linker" = xyes ; then
7918
7919 cat >>confdefs.h <<\EOF
7920 #define BROKEN_LINKER 1
7921 EOF
7922
7923         BROKEN_LINKER=1
7924 elif test "$DFT_LWR_MODEL" = shared ; then
7925         case $cf_cv_system_name in
7926         (cygwin*)
7927
7928 cat >>confdefs.h <<\EOF
7929 #define BROKEN_LINKER 1
7930 EOF
7931
7932                 BROKEN_LINKER=1
7933                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7934
7935 echo "${as_me:-configure}:7935: testing cygwin linker is broken anyway ..." 1>&5
7936
7937                 ;;
7938         esac
7939 fi
7940
7941 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7942 echo "$as_me:7942: checking if tputs should process BSD-style prefix padding" >&5
7943 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7944
7945 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7946 if test "${enable_bsdpad+set}" = set; then
7947   enableval="$enable_bsdpad"
7948   with_bsdpad=$enableval
7949 else
7950   with_bsdpad=no
7951 fi;
7952 echo "$as_me:7952: result: $with_bsdpad" >&5
7953 echo "${ECHO_T}$with_bsdpad" >&6
7954 test "x$with_bsdpad" = xyes &&
7955 cat >>confdefs.h <<\EOF
7956 #define BSD_TPUTS 1
7957 EOF
7958
7959 ###   use option --enable-widec to turn on use of wide-character support
7960 NCURSES_CH_T=chtype
7961 NCURSES_LIBUTF8=0
7962
7963 NEED_WCHAR_H=0
7964 NCURSES_MBSTATE_T=0
7965 NCURSES_WCHAR_T=0
7966 NCURSES_WINT_T=0
7967
7968 # Check to define _XOPEN_SOURCE "automatically"
7969 CPPFLAGS_before_XOPEN="$CPPFLAGS"
7970
7971 cf_XOPEN_SOURCE=500
7972 cf_POSIX_C_SOURCE=199506L
7973 cf_xopen_source=
7974
7975 case $host_os in
7976 (aix[4-7]*)
7977         cf_xopen_source="-D_ALL_SOURCE"
7978         ;;
7979 (msys)
7980         cf_XOPEN_SOURCE=600
7981         ;;
7982 (darwin[0-8].*)
7983         cf_xopen_source="-D_APPLE_C_SOURCE"
7984         ;;
7985 (darwin*)
7986         cf_xopen_source="-D_DARWIN_C_SOURCE"
7987         cf_XOPEN_SOURCE=
7988         ;;
7989 (freebsd*|dragonfly*)
7990         # 5.x headers associate
7991         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7992         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7993         cf_POSIX_C_SOURCE=200112L
7994         cf_XOPEN_SOURCE=600
7995         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7996         ;;
7997 (hpux11*)
7998         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7999         ;;
8000 (hpux*)
8001         cf_xopen_source="-D_HPUX_SOURCE"
8002         ;;
8003 (irix[56].*)
8004         cf_xopen_source="-D_SGI_SOURCE"
8005         cf_XOPEN_SOURCE=
8006         ;;
8007 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
8008
8009 echo "$as_me:8009: checking if we must define _GNU_SOURCE" >&5
8010 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
8011 if test "${cf_cv_gnu_source+set}" = set; then
8012   echo $ECHO_N "(cached) $ECHO_C" >&6
8013 else
8014
8015 cat >conftest.$ac_ext <<_ACEOF
8016 #line 8016 "configure"
8017 #include "confdefs.h"
8018 #include <sys/types.h>
8019 int
8020 main ()
8021 {
8022
8023 #ifndef _XOPEN_SOURCE
8024 make an error
8025 #endif
8026   ;
8027   return 0;
8028 }
8029 _ACEOF
8030 rm -f conftest.$ac_objext
8031 if { (eval echo "$as_me:8031: \"$ac_compile\"") >&5
8032   (eval $ac_compile) 2>&5
8033   ac_status=$?
8034   echo "$as_me:8034: \$? = $ac_status" >&5
8035   (exit $ac_status); } &&
8036          { ac_try='test -s conftest.$ac_objext'
8037   { (eval echo "$as_me:8037: \"$ac_try\"") >&5
8038   (eval $ac_try) 2>&5
8039   ac_status=$?
8040   echo "$as_me:8040: \$? = $ac_status" >&5
8041   (exit $ac_status); }; }; then
8042   cf_cv_gnu_source=no
8043 else
8044   echo "$as_me: failed program was:" >&5
8045 cat conftest.$ac_ext >&5
8046 cf_save="$CPPFLAGS"
8047          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8048          cat >conftest.$ac_ext <<_ACEOF
8049 #line 8049 "configure"
8050 #include "confdefs.h"
8051 #include <sys/types.h>
8052 int
8053 main ()
8054 {
8055
8056 #ifdef _XOPEN_SOURCE
8057 make an error
8058 #endif
8059   ;
8060   return 0;
8061 }
8062 _ACEOF
8063 rm -f conftest.$ac_objext
8064 if { (eval echo "$as_me:8064: \"$ac_compile\"") >&5
8065   (eval $ac_compile) 2>&5
8066   ac_status=$?
8067   echo "$as_me:8067: \$? = $ac_status" >&5
8068   (exit $ac_status); } &&
8069          { ac_try='test -s conftest.$ac_objext'
8070   { (eval echo "$as_me:8070: \"$ac_try\"") >&5
8071   (eval $ac_try) 2>&5
8072   ac_status=$?
8073   echo "$as_me:8073: \$? = $ac_status" >&5
8074   (exit $ac_status); }; }; then
8075   cf_cv_gnu_source=no
8076 else
8077   echo "$as_me: failed program was:" >&5
8078 cat conftest.$ac_ext >&5
8079 cf_cv_gnu_source=yes
8080 fi
8081 rm -f conftest.$ac_objext conftest.$ac_ext
8082         CPPFLAGS="$cf_save"
8083
8084 fi
8085 rm -f conftest.$ac_objext conftest.$ac_ext
8086
8087 fi
8088 echo "$as_me:8088: result: $cf_cv_gnu_source" >&5
8089 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8090
8091 if test "$cf_cv_gnu_source" = yes
8092 then
8093 echo "$as_me:8093: checking if we should also define _DEFAULT_SOURCE" >&5
8094 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
8095 if test "${cf_cv_default_source+set}" = set; then
8096   echo $ECHO_N "(cached) $ECHO_C" >&6
8097 else
8098
8099 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8100         cat >conftest.$ac_ext <<_ACEOF
8101 #line 8101 "configure"
8102 #include "confdefs.h"
8103 #include <sys/types.h>
8104 int
8105 main ()
8106 {
8107
8108 #ifdef _DEFAULT_SOURCE
8109 make an error
8110 #endif
8111   ;
8112   return 0;
8113 }
8114 _ACEOF
8115 rm -f conftest.$ac_objext
8116 if { (eval echo "$as_me:8116: \"$ac_compile\"") >&5
8117   (eval $ac_compile) 2>&5
8118   ac_status=$?
8119   echo "$as_me:8119: \$? = $ac_status" >&5
8120   (exit $ac_status); } &&
8121          { ac_try='test -s conftest.$ac_objext'
8122   { (eval echo "$as_me:8122: \"$ac_try\"") >&5
8123   (eval $ac_try) 2>&5
8124   ac_status=$?
8125   echo "$as_me:8125: \$? = $ac_status" >&5
8126   (exit $ac_status); }; }; then
8127   cf_cv_default_source=no
8128 else
8129   echo "$as_me: failed program was:" >&5
8130 cat conftest.$ac_ext >&5
8131 cf_cv_default_source=yes
8132 fi
8133 rm -f conftest.$ac_objext conftest.$ac_ext
8134
8135 fi
8136 echo "$as_me:8136: result: $cf_cv_default_source" >&5
8137 echo "${ECHO_T}$cf_cv_default_source" >&6
8138 test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
8139 fi
8140
8141         ;;
8142 (minix*)
8143         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
8144         ;;
8145 (mirbsd*)
8146         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8147         cf_XOPEN_SOURCE=
8148
8149 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8150
8151 cf_save_CFLAGS="$CFLAGS"
8152 cf_save_CPPFLAGS="$CPPFLAGS"
8153
8154 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8155         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8156                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8157
8158 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8159         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8160                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8161
8162 echo "$as_me:8162: checking if we should define _POSIX_C_SOURCE" >&5
8163 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8164 if test "${cf_cv_posix_c_source+set}" = set; then
8165   echo $ECHO_N "(cached) $ECHO_C" >&6
8166 else
8167
8168 echo "${as_me:-configure}:8168: testing if the symbol is already defined go no further ..." 1>&5
8169
8170         cat >conftest.$ac_ext <<_ACEOF
8171 #line 8171 "configure"
8172 #include "confdefs.h"
8173 #include <sys/types.h>
8174 int
8175 main ()
8176 {
8177
8178 #ifndef _POSIX_C_SOURCE
8179 make an error
8180 #endif
8181   ;
8182   return 0;
8183 }
8184 _ACEOF
8185 rm -f conftest.$ac_objext
8186 if { (eval echo "$as_me:8186: \"$ac_compile\"") >&5
8187   (eval $ac_compile) 2>&5
8188   ac_status=$?
8189   echo "$as_me:8189: \$? = $ac_status" >&5
8190   (exit $ac_status); } &&
8191          { ac_try='test -s conftest.$ac_objext'
8192   { (eval echo "$as_me:8192: \"$ac_try\"") >&5
8193   (eval $ac_try) 2>&5
8194   ac_status=$?
8195   echo "$as_me:8195: \$? = $ac_status" >&5
8196   (exit $ac_status); }; }; then
8197   cf_cv_posix_c_source=no
8198 else
8199   echo "$as_me: failed program was:" >&5
8200 cat conftest.$ac_ext >&5
8201 cf_want_posix_source=no
8202          case .$cf_POSIX_C_SOURCE in
8203          (.[12]??*)
8204                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8205                 ;;
8206          (.2)
8207                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8208                 cf_want_posix_source=yes
8209                 ;;
8210          (.*)
8211                 cf_want_posix_source=yes
8212                 ;;
8213          esac
8214          if test "$cf_want_posix_source" = yes ; then
8215                 cat >conftest.$ac_ext <<_ACEOF
8216 #line 8216 "configure"
8217 #include "confdefs.h"
8218 #include <sys/types.h>
8219 int
8220 main ()
8221 {
8222
8223 #ifdef _POSIX_SOURCE
8224 make an error
8225 #endif
8226   ;
8227   return 0;
8228 }
8229 _ACEOF
8230 rm -f conftest.$ac_objext
8231 if { (eval echo "$as_me:8231: \"$ac_compile\"") >&5
8232   (eval $ac_compile) 2>&5
8233   ac_status=$?
8234   echo "$as_me:8234: \$? = $ac_status" >&5
8235   (exit $ac_status); } &&
8236          { ac_try='test -s conftest.$ac_objext'
8237   { (eval echo "$as_me:8237: \"$ac_try\"") >&5
8238   (eval $ac_try) 2>&5
8239   ac_status=$?
8240   echo "$as_me:8240: \$? = $ac_status" >&5
8241   (exit $ac_status); }; }; then
8242   :
8243 else
8244   echo "$as_me: failed program was:" >&5
8245 cat conftest.$ac_ext >&5
8246 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8247 fi
8248 rm -f conftest.$ac_objext conftest.$ac_ext
8249          fi
8250
8251 echo "${as_me:-configure}:8251: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8252
8253          CFLAGS="$cf_trim_CFLAGS"
8254          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8255
8256 echo "${as_me:-configure}:8256: testing if the second compile does not leave our definition intact error ..." 1>&5
8257
8258          cat >conftest.$ac_ext <<_ACEOF
8259 #line 8259 "configure"
8260 #include "confdefs.h"
8261 #include <sys/types.h>
8262 int
8263 main ()
8264 {
8265
8266 #ifndef _POSIX_C_SOURCE
8267 make an error
8268 #endif
8269   ;
8270   return 0;
8271 }
8272 _ACEOF
8273 rm -f conftest.$ac_objext
8274 if { (eval echo "$as_me:8274: \"$ac_compile\"") >&5
8275   (eval $ac_compile) 2>&5
8276   ac_status=$?
8277   echo "$as_me:8277: \$? = $ac_status" >&5
8278   (exit $ac_status); } &&
8279          { ac_try='test -s conftest.$ac_objext'
8280   { (eval echo "$as_me:8280: \"$ac_try\"") >&5
8281   (eval $ac_try) 2>&5
8282   ac_status=$?
8283   echo "$as_me:8283: \$? = $ac_status" >&5
8284   (exit $ac_status); }; }; then
8285   :
8286 else
8287   echo "$as_me: failed program was:" >&5
8288 cat conftest.$ac_ext >&5
8289 cf_cv_posix_c_source=no
8290 fi
8291 rm -f conftest.$ac_objext conftest.$ac_ext
8292          CFLAGS="$cf_save_CFLAGS"
8293          CPPFLAGS="$cf_save_CPPFLAGS"
8294
8295 fi
8296 rm -f conftest.$ac_objext conftest.$ac_ext
8297
8298 fi
8299 echo "$as_me:8299: result: $cf_cv_posix_c_source" >&5
8300 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8301
8302 if test "$cf_cv_posix_c_source" != no ; then
8303         CFLAGS="$cf_trim_CFLAGS"
8304         CPPFLAGS="$cf_trim_CPPFLAGS"
8305
8306 cf_fix_cppflags=no
8307 cf_new_cflags=
8308 cf_new_cppflags=
8309 cf_new_extra_cppflags=
8310
8311 for cf_add_cflags in $cf_cv_posix_c_source
8312 do
8313 case $cf_fix_cppflags in
8314 (no)
8315         case $cf_add_cflags in
8316         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8317                 case $cf_add_cflags in
8318                 (-D*)
8319                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8320
8321                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8322                                 && test -z "${cf_tst_cflags}" \
8323                                 && cf_fix_cppflags=yes
8324
8325                         if test $cf_fix_cppflags = yes ; then
8326                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8327                                 continue
8328                         elif test "${cf_tst_cflags}" = "\"'" ; then
8329                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8330                                 continue
8331                         fi
8332                         ;;
8333                 esac
8334                 case "$CPPFLAGS" in
8335                 (*$cf_add_cflags)
8336                         ;;
8337                 (*)
8338                         case $cf_add_cflags in
8339                         (-D*)
8340                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8341
8342 CPPFLAGS=`echo "$CPPFLAGS" | \
8343         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8344                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8345
8346                                 ;;
8347                         esac
8348                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8349                         ;;
8350                 esac
8351                 ;;
8352         (*)
8353                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8354                 ;;
8355         esac
8356         ;;
8357 (yes)
8358         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8359
8360         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8361
8362         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8363                 && test -z "${cf_tst_cflags}" \
8364                 && cf_fix_cppflags=no
8365         ;;
8366 esac
8367 done
8368
8369 if test -n "$cf_new_cflags" ; then
8370
8371         CFLAGS="$CFLAGS $cf_new_cflags"
8372 fi
8373
8374 if test -n "$cf_new_cppflags" ; then
8375
8376         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8377 fi
8378
8379 if test -n "$cf_new_extra_cppflags" ; then
8380
8381         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8382 fi
8383
8384 fi
8385
8386         ;;
8387 (netbsd*)
8388         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8389         ;;
8390 (openbsd[4-9]*)
8391         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8392         cf_xopen_source="-D_BSD_SOURCE"
8393         cf_XOPEN_SOURCE=600
8394         ;;
8395 (openbsd*)
8396         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8397         ;;
8398 (osf[45]*)
8399         cf_xopen_source="-D_OSF_SOURCE"
8400         ;;
8401 (nto-qnx*)
8402         cf_xopen_source="-D_QNX_SOURCE"
8403         ;;
8404 (sco*)
8405         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8406         ;;
8407 (solaris2.*)
8408         cf_xopen_source="-D__EXTENSIONS__"
8409         cf_cv_xopen_source=broken
8410         ;;
8411 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8412         cf_XOPEN_SOURCE=
8413         cf_POSIX_C_SOURCE=
8414         ;;
8415 (*)
8416
8417 echo "$as_me:8417: checking if we should define _XOPEN_SOURCE" >&5
8418 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8419 if test "${cf_cv_xopen_source+set}" = set; then
8420   echo $ECHO_N "(cached) $ECHO_C" >&6
8421 else
8422
8423         cat >conftest.$ac_ext <<_ACEOF
8424 #line 8424 "configure"
8425 #include "confdefs.h"
8426
8427 #include <stdlib.h>
8428 #include <string.h>
8429 #include <sys/types.h>
8430
8431 int
8432 main ()
8433 {
8434
8435 #ifndef _XOPEN_SOURCE
8436 make an error
8437 #endif
8438   ;
8439   return 0;
8440 }
8441 _ACEOF
8442 rm -f conftest.$ac_objext
8443 if { (eval echo "$as_me:8443: \"$ac_compile\"") >&5
8444   (eval $ac_compile) 2>&5
8445   ac_status=$?
8446   echo "$as_me:8446: \$? = $ac_status" >&5
8447   (exit $ac_status); } &&
8448          { ac_try='test -s conftest.$ac_objext'
8449   { (eval echo "$as_me:8449: \"$ac_try\"") >&5
8450   (eval $ac_try) 2>&5
8451   ac_status=$?
8452   echo "$as_me:8452: \$? = $ac_status" >&5
8453   (exit $ac_status); }; }; then
8454   cf_cv_xopen_source=no
8455 else
8456   echo "$as_me: failed program was:" >&5
8457 cat conftest.$ac_ext >&5
8458 cf_save="$CPPFLAGS"
8459          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8460          cat >conftest.$ac_ext <<_ACEOF
8461 #line 8461 "configure"
8462 #include "confdefs.h"
8463
8464 #include <stdlib.h>
8465 #include <string.h>
8466 #include <sys/types.h>
8467
8468 int
8469 main ()
8470 {
8471
8472 #ifdef _XOPEN_SOURCE
8473 make an error
8474 #endif
8475   ;
8476   return 0;
8477 }
8478 _ACEOF
8479 rm -f conftest.$ac_objext
8480 if { (eval echo "$as_me:8480: \"$ac_compile\"") >&5
8481   (eval $ac_compile) 2>&5
8482   ac_status=$?
8483   echo "$as_me:8483: \$? = $ac_status" >&5
8484   (exit $ac_status); } &&
8485          { ac_try='test -s conftest.$ac_objext'
8486   { (eval echo "$as_me:8486: \"$ac_try\"") >&5
8487   (eval $ac_try) 2>&5
8488   ac_status=$?
8489   echo "$as_me:8489: \$? = $ac_status" >&5
8490   (exit $ac_status); }; }; then
8491   cf_cv_xopen_source=no
8492 else
8493   echo "$as_me: failed program was:" >&5
8494 cat conftest.$ac_ext >&5
8495 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8496 fi
8497 rm -f conftest.$ac_objext conftest.$ac_ext
8498         CPPFLAGS="$cf_save"
8499
8500 fi
8501 rm -f conftest.$ac_objext conftest.$ac_ext
8502
8503 fi
8504 echo "$as_me:8504: result: $cf_cv_xopen_source" >&5
8505 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8506
8507 if test "$cf_cv_xopen_source" != no ; then
8508
8509 CFLAGS=`echo "$CFLAGS" | \
8510         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8511                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8512
8513 CPPFLAGS=`echo "$CPPFLAGS" | \
8514         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8515                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8516
8517         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8518
8519 cf_fix_cppflags=no
8520 cf_new_cflags=
8521 cf_new_cppflags=
8522 cf_new_extra_cppflags=
8523
8524 for cf_add_cflags in $cf_temp_xopen_source
8525 do
8526 case $cf_fix_cppflags in
8527 (no)
8528         case $cf_add_cflags in
8529         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8530                 case $cf_add_cflags in
8531                 (-D*)
8532                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8533
8534                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8535                                 && test -z "${cf_tst_cflags}" \
8536                                 && cf_fix_cppflags=yes
8537
8538                         if test $cf_fix_cppflags = yes ; then
8539                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8540                                 continue
8541                         elif test "${cf_tst_cflags}" = "\"'" ; then
8542                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8543                                 continue
8544                         fi
8545                         ;;
8546                 esac
8547                 case "$CPPFLAGS" in
8548                 (*$cf_add_cflags)
8549                         ;;
8550                 (*)
8551                         case $cf_add_cflags in
8552                         (-D*)
8553                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8554
8555 CPPFLAGS=`echo "$CPPFLAGS" | \
8556         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8557                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8558
8559                                 ;;
8560                         esac
8561                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8562                         ;;
8563                 esac
8564                 ;;
8565         (*)
8566                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8567                 ;;
8568         esac
8569         ;;
8570 (yes)
8571         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8572
8573         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8574
8575         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8576                 && test -z "${cf_tst_cflags}" \
8577                 && cf_fix_cppflags=no
8578         ;;
8579 esac
8580 done
8581
8582 if test -n "$cf_new_cflags" ; then
8583
8584         CFLAGS="$CFLAGS $cf_new_cflags"
8585 fi
8586
8587 if test -n "$cf_new_cppflags" ; then
8588
8589         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8590 fi
8591
8592 if test -n "$cf_new_extra_cppflags" ; then
8593
8594         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8595 fi
8596
8597 fi
8598
8599 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8600
8601 cf_save_CFLAGS="$CFLAGS"
8602 cf_save_CPPFLAGS="$CPPFLAGS"
8603
8604 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8605         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8606                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8607
8608 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8609         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8610                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8611
8612 echo "$as_me:8612: checking if we should define _POSIX_C_SOURCE" >&5
8613 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8614 if test "${cf_cv_posix_c_source+set}" = set; then
8615   echo $ECHO_N "(cached) $ECHO_C" >&6
8616 else
8617
8618 echo "${as_me:-configure}:8618: testing if the symbol is already defined go no further ..." 1>&5
8619
8620         cat >conftest.$ac_ext <<_ACEOF
8621 #line 8621 "configure"
8622 #include "confdefs.h"
8623 #include <sys/types.h>
8624 int
8625 main ()
8626 {
8627
8628 #ifndef _POSIX_C_SOURCE
8629 make an error
8630 #endif
8631   ;
8632   return 0;
8633 }
8634 _ACEOF
8635 rm -f conftest.$ac_objext
8636 if { (eval echo "$as_me:8636: \"$ac_compile\"") >&5
8637   (eval $ac_compile) 2>&5
8638   ac_status=$?
8639   echo "$as_me:8639: \$? = $ac_status" >&5
8640   (exit $ac_status); } &&
8641          { ac_try='test -s conftest.$ac_objext'
8642   { (eval echo "$as_me:8642: \"$ac_try\"") >&5
8643   (eval $ac_try) 2>&5
8644   ac_status=$?
8645   echo "$as_me:8645: \$? = $ac_status" >&5
8646   (exit $ac_status); }; }; then
8647   cf_cv_posix_c_source=no
8648 else
8649   echo "$as_me: failed program was:" >&5
8650 cat conftest.$ac_ext >&5
8651 cf_want_posix_source=no
8652          case .$cf_POSIX_C_SOURCE in
8653          (.[12]??*)
8654                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8655                 ;;
8656          (.2)
8657                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8658                 cf_want_posix_source=yes
8659                 ;;
8660          (.*)
8661                 cf_want_posix_source=yes
8662                 ;;
8663          esac
8664          if test "$cf_want_posix_source" = yes ; then
8665                 cat >conftest.$ac_ext <<_ACEOF
8666 #line 8666 "configure"
8667 #include "confdefs.h"
8668 #include <sys/types.h>
8669 int
8670 main ()
8671 {
8672
8673 #ifdef _POSIX_SOURCE
8674 make an error
8675 #endif
8676   ;
8677   return 0;
8678 }
8679 _ACEOF
8680 rm -f conftest.$ac_objext
8681 if { (eval echo "$as_me:8681: \"$ac_compile\"") >&5
8682   (eval $ac_compile) 2>&5
8683   ac_status=$?
8684   echo "$as_me:8684: \$? = $ac_status" >&5
8685   (exit $ac_status); } &&
8686          { ac_try='test -s conftest.$ac_objext'
8687   { (eval echo "$as_me:8687: \"$ac_try\"") >&5
8688   (eval $ac_try) 2>&5
8689   ac_status=$?
8690   echo "$as_me:8690: \$? = $ac_status" >&5
8691   (exit $ac_status); }; }; then
8692   :
8693 else
8694   echo "$as_me: failed program was:" >&5
8695 cat conftest.$ac_ext >&5
8696 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8697 fi
8698 rm -f conftest.$ac_objext conftest.$ac_ext
8699          fi
8700
8701 echo "${as_me:-configure}:8701: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8702
8703          CFLAGS="$cf_trim_CFLAGS"
8704          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8705
8706 echo "${as_me:-configure}:8706: testing if the second compile does not leave our definition intact error ..." 1>&5
8707
8708          cat >conftest.$ac_ext <<_ACEOF
8709 #line 8709 "configure"
8710 #include "confdefs.h"
8711 #include <sys/types.h>
8712 int
8713 main ()
8714 {
8715
8716 #ifndef _POSIX_C_SOURCE
8717 make an error
8718 #endif
8719   ;
8720   return 0;
8721 }
8722 _ACEOF
8723 rm -f conftest.$ac_objext
8724 if { (eval echo "$as_me:8724: \"$ac_compile\"") >&5
8725   (eval $ac_compile) 2>&5
8726   ac_status=$?
8727   echo "$as_me:8727: \$? = $ac_status" >&5
8728   (exit $ac_status); } &&
8729          { ac_try='test -s conftest.$ac_objext'
8730   { (eval echo "$as_me:8730: \"$ac_try\"") >&5
8731   (eval $ac_try) 2>&5
8732   ac_status=$?
8733   echo "$as_me:8733: \$? = $ac_status" >&5
8734   (exit $ac_status); }; }; then
8735   :
8736 else
8737   echo "$as_me: failed program was:" >&5
8738 cat conftest.$ac_ext >&5
8739 cf_cv_posix_c_source=no
8740 fi
8741 rm -f conftest.$ac_objext conftest.$ac_ext
8742          CFLAGS="$cf_save_CFLAGS"
8743          CPPFLAGS="$cf_save_CPPFLAGS"
8744
8745 fi
8746 rm -f conftest.$ac_objext conftest.$ac_ext
8747
8748 fi
8749 echo "$as_me:8749: result: $cf_cv_posix_c_source" >&5
8750 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8751
8752 if test "$cf_cv_posix_c_source" != no ; then
8753         CFLAGS="$cf_trim_CFLAGS"
8754         CPPFLAGS="$cf_trim_CPPFLAGS"
8755
8756 cf_fix_cppflags=no
8757 cf_new_cflags=
8758 cf_new_cppflags=
8759 cf_new_extra_cppflags=
8760
8761 for cf_add_cflags in $cf_cv_posix_c_source
8762 do
8763 case $cf_fix_cppflags in
8764 (no)
8765         case $cf_add_cflags in
8766         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8767                 case $cf_add_cflags in
8768                 (-D*)
8769                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8770
8771                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8772                                 && test -z "${cf_tst_cflags}" \
8773                                 && cf_fix_cppflags=yes
8774
8775                         if test $cf_fix_cppflags = yes ; then
8776                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8777                                 continue
8778                         elif test "${cf_tst_cflags}" = "\"'" ; then
8779                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8780                                 continue
8781                         fi
8782                         ;;
8783                 esac
8784                 case "$CPPFLAGS" in
8785                 (*$cf_add_cflags)
8786                         ;;
8787                 (*)
8788                         case $cf_add_cflags in
8789                         (-D*)
8790                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8791
8792 CPPFLAGS=`echo "$CPPFLAGS" | \
8793         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8794                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8795
8796                                 ;;
8797                         esac
8798                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8799                         ;;
8800                 esac
8801                 ;;
8802         (*)
8803                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8804                 ;;
8805         esac
8806         ;;
8807 (yes)
8808         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8809
8810         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8811
8812         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8813                 && test -z "${cf_tst_cflags}" \
8814                 && cf_fix_cppflags=no
8815         ;;
8816 esac
8817 done
8818
8819 if test -n "$cf_new_cflags" ; then
8820
8821         CFLAGS="$CFLAGS $cf_new_cflags"
8822 fi
8823
8824 if test -n "$cf_new_cppflags" ; then
8825
8826         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8827 fi
8828
8829 if test -n "$cf_new_extra_cppflags" ; then
8830
8831         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8832 fi
8833
8834 fi
8835
8836         ;;
8837 esac
8838
8839 if test -n "$cf_xopen_source" ; then
8840
8841 cf_fix_cppflags=no
8842 cf_new_cflags=
8843 cf_new_cppflags=
8844 cf_new_extra_cppflags=
8845
8846 for cf_add_cflags in $cf_xopen_source
8847 do
8848 case $cf_fix_cppflags in
8849 (no)
8850         case $cf_add_cflags in
8851         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8852                 case $cf_add_cflags in
8853                 (-D*)
8854                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8855
8856                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8857                                 && test -z "${cf_tst_cflags}" \
8858                                 && cf_fix_cppflags=yes
8859
8860                         if test $cf_fix_cppflags = yes ; then
8861                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8862                                 continue
8863                         elif test "${cf_tst_cflags}" = "\"'" ; then
8864                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8865                                 continue
8866                         fi
8867                         ;;
8868                 esac
8869                 case "$CPPFLAGS" in
8870                 (*$cf_add_cflags)
8871                         ;;
8872                 (*)
8873                         case $cf_add_cflags in
8874                         (-D*)
8875                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8876
8877 CPPFLAGS=`echo "$CPPFLAGS" | \
8878         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8879                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8880
8881                                 ;;
8882                         esac
8883                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8884                         ;;
8885                 esac
8886                 ;;
8887         (*)
8888                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8889                 ;;
8890         esac
8891         ;;
8892 (yes)
8893         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8894
8895         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8896
8897         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8898                 && test -z "${cf_tst_cflags}" \
8899                 && cf_fix_cppflags=no
8900         ;;
8901 esac
8902 done
8903
8904 if test -n "$cf_new_cflags" ; then
8905         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8906
8907 echo "${as_me:-configure}:8907: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8908
8909         CFLAGS="$CFLAGS $cf_new_cflags"
8910 fi
8911
8912 if test -n "$cf_new_cppflags" ; then
8913         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8914
8915 echo "${as_me:-configure}:8915: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8916
8917         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8918 fi
8919
8920 if test -n "$cf_new_extra_cppflags" ; then
8921         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8922
8923 echo "${as_me:-configure}:8923: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8924
8925         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8926 fi
8927
8928 fi
8929
8930 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8931         echo "$as_me:8931: checking if _XOPEN_SOURCE really is set" >&5
8932 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8933         cat >conftest.$ac_ext <<_ACEOF
8934 #line 8934 "configure"
8935 #include "confdefs.h"
8936 #include <stdlib.h>
8937 int
8938 main ()
8939 {
8940
8941 #ifndef _XOPEN_SOURCE
8942 make an error
8943 #endif
8944   ;
8945   return 0;
8946 }
8947 _ACEOF
8948 rm -f conftest.$ac_objext
8949 if { (eval echo "$as_me:8949: \"$ac_compile\"") >&5
8950   (eval $ac_compile) 2>&5
8951   ac_status=$?
8952   echo "$as_me:8952: \$? = $ac_status" >&5
8953   (exit $ac_status); } &&
8954          { ac_try='test -s conftest.$ac_objext'
8955   { (eval echo "$as_me:8955: \"$ac_try\"") >&5
8956   (eval $ac_try) 2>&5
8957   ac_status=$?
8958   echo "$as_me:8958: \$? = $ac_status" >&5
8959   (exit $ac_status); }; }; then
8960   cf_XOPEN_SOURCE_set=yes
8961 else
8962   echo "$as_me: failed program was:" >&5
8963 cat conftest.$ac_ext >&5
8964 cf_XOPEN_SOURCE_set=no
8965 fi
8966 rm -f conftest.$ac_objext conftest.$ac_ext
8967         echo "$as_me:8967: result: $cf_XOPEN_SOURCE_set" >&5
8968 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8969         if test $cf_XOPEN_SOURCE_set = yes
8970         then
8971                 cat >conftest.$ac_ext <<_ACEOF
8972 #line 8972 "configure"
8973 #include "confdefs.h"
8974 #include <stdlib.h>
8975 int
8976 main ()
8977 {
8978
8979 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8980 make an error
8981 #endif
8982   ;
8983   return 0;
8984 }
8985 _ACEOF
8986 rm -f conftest.$ac_objext
8987 if { (eval echo "$as_me:8987: \"$ac_compile\"") >&5
8988   (eval $ac_compile) 2>&5
8989   ac_status=$?
8990   echo "$as_me:8990: \$? = $ac_status" >&5
8991   (exit $ac_status); } &&
8992          { ac_try='test -s conftest.$ac_objext'
8993   { (eval echo "$as_me:8993: \"$ac_try\"") >&5
8994   (eval $ac_try) 2>&5
8995   ac_status=$?
8996   echo "$as_me:8996: \$? = $ac_status" >&5
8997   (exit $ac_status); }; }; then
8998   cf_XOPEN_SOURCE_set_ok=yes
8999 else
9000   echo "$as_me: failed program was:" >&5
9001 cat conftest.$ac_ext >&5
9002 cf_XOPEN_SOURCE_set_ok=no
9003 fi
9004 rm -f conftest.$ac_objext conftest.$ac_ext
9005                 if test $cf_XOPEN_SOURCE_set_ok = no
9006                 then
9007                         { echo "$as_me:9007: WARNING: _XOPEN_SOURCE is lower than requested" >&5
9008 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
9009                 fi
9010         else
9011
9012 echo "$as_me:9012: checking if we should define _XOPEN_SOURCE" >&5
9013 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9014 if test "${cf_cv_xopen_source+set}" = set; then
9015   echo $ECHO_N "(cached) $ECHO_C" >&6
9016 else
9017
9018         cat >conftest.$ac_ext <<_ACEOF
9019 #line 9019 "configure"
9020 #include "confdefs.h"
9021
9022 #include <stdlib.h>
9023 #include <string.h>
9024 #include <sys/types.h>
9025
9026 int
9027 main ()
9028 {
9029
9030 #ifndef _XOPEN_SOURCE
9031 make an error
9032 #endif
9033   ;
9034   return 0;
9035 }
9036 _ACEOF
9037 rm -f conftest.$ac_objext
9038 if { (eval echo "$as_me:9038: \"$ac_compile\"") >&5
9039   (eval $ac_compile) 2>&5
9040   ac_status=$?
9041   echo "$as_me:9041: \$? = $ac_status" >&5
9042   (exit $ac_status); } &&
9043          { ac_try='test -s conftest.$ac_objext'
9044   { (eval echo "$as_me:9044: \"$ac_try\"") >&5
9045   (eval $ac_try) 2>&5
9046   ac_status=$?
9047   echo "$as_me:9047: \$? = $ac_status" >&5
9048   (exit $ac_status); }; }; then
9049   cf_cv_xopen_source=no
9050 else
9051   echo "$as_me: failed program was:" >&5
9052 cat conftest.$ac_ext >&5
9053 cf_save="$CPPFLAGS"
9054          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9055          cat >conftest.$ac_ext <<_ACEOF
9056 #line 9056 "configure"
9057 #include "confdefs.h"
9058
9059 #include <stdlib.h>
9060 #include <string.h>
9061 #include <sys/types.h>
9062
9063 int
9064 main ()
9065 {
9066
9067 #ifdef _XOPEN_SOURCE
9068 make an error
9069 #endif
9070   ;
9071   return 0;
9072 }
9073 _ACEOF
9074 rm -f conftest.$ac_objext
9075 if { (eval echo "$as_me:9075: \"$ac_compile\"") >&5
9076   (eval $ac_compile) 2>&5
9077   ac_status=$?
9078   echo "$as_me:9078: \$? = $ac_status" >&5
9079   (exit $ac_status); } &&
9080          { ac_try='test -s conftest.$ac_objext'
9081   { (eval echo "$as_me:9081: \"$ac_try\"") >&5
9082   (eval $ac_try) 2>&5
9083   ac_status=$?
9084   echo "$as_me:9084: \$? = $ac_status" >&5
9085   (exit $ac_status); }; }; then
9086   cf_cv_xopen_source=no
9087 else
9088   echo "$as_me: failed program was:" >&5
9089 cat conftest.$ac_ext >&5
9090 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9091 fi
9092 rm -f conftest.$ac_objext conftest.$ac_ext
9093         CPPFLAGS="$cf_save"
9094
9095 fi
9096 rm -f conftest.$ac_objext conftest.$ac_ext
9097
9098 fi
9099 echo "$as_me:9099: result: $cf_cv_xopen_source" >&5
9100 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9101
9102 if test "$cf_cv_xopen_source" != no ; then
9103
9104 CFLAGS=`echo "$CFLAGS" | \
9105         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9106                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9107
9108 CPPFLAGS=`echo "$CPPFLAGS" | \
9109         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9110                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9111
9112         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9113
9114 cf_fix_cppflags=no
9115 cf_new_cflags=
9116 cf_new_cppflags=
9117 cf_new_extra_cppflags=
9118
9119 for cf_add_cflags in $cf_temp_xopen_source
9120 do
9121 case $cf_fix_cppflags in
9122 (no)
9123         case $cf_add_cflags in
9124         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9125                 case $cf_add_cflags in
9126                 (-D*)
9127                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9128
9129                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9130                                 && test -z "${cf_tst_cflags}" \
9131                                 && cf_fix_cppflags=yes
9132
9133                         if test $cf_fix_cppflags = yes ; then
9134                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9135                                 continue
9136                         elif test "${cf_tst_cflags}" = "\"'" ; then
9137                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9138                                 continue
9139                         fi
9140                         ;;
9141                 esac
9142                 case "$CPPFLAGS" in
9143                 (*$cf_add_cflags)
9144                         ;;
9145                 (*)
9146                         case $cf_add_cflags in
9147                         (-D*)
9148                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9149
9150 CPPFLAGS=`echo "$CPPFLAGS" | \
9151         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9152                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9153
9154                                 ;;
9155                         esac
9156                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9157                         ;;
9158                 esac
9159                 ;;
9160         (*)
9161                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9162                 ;;
9163         esac
9164         ;;
9165 (yes)
9166         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9167
9168         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9169
9170         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9171                 && test -z "${cf_tst_cflags}" \
9172                 && cf_fix_cppflags=no
9173         ;;
9174 esac
9175 done
9176
9177 if test -n "$cf_new_cflags" ; then
9178
9179         CFLAGS="$CFLAGS $cf_new_cflags"
9180 fi
9181
9182 if test -n "$cf_new_cppflags" ; then
9183
9184         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9185 fi
9186
9187 if test -n "$cf_new_extra_cppflags" ; then
9188
9189         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9190 fi
9191
9192 fi
9193
9194         fi
9195 fi
9196
9197 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9198
9199 # Work around breakage on OS X
9200
9201 echo "$as_me:9201: checking if SIGWINCH is defined" >&5
9202 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9203 if test "${cf_cv_define_sigwinch+set}" = set; then
9204   echo $ECHO_N "(cached) $ECHO_C" >&6
9205 else
9206
9207         cat >conftest.$ac_ext <<_ACEOF
9208 #line 9208 "configure"
9209 #include "confdefs.h"
9210
9211 #include <sys/types.h>
9212 #include <sys/signal.h>
9213
9214 int
9215 main ()
9216 {
9217 int x = SIGWINCH
9218   ;
9219   return 0;
9220 }
9221 _ACEOF
9222 rm -f conftest.$ac_objext
9223 if { (eval echo "$as_me:9223: \"$ac_compile\"") >&5
9224   (eval $ac_compile) 2>&5
9225   ac_status=$?
9226   echo "$as_me:9226: \$? = $ac_status" >&5
9227   (exit $ac_status); } &&
9228          { ac_try='test -s conftest.$ac_objext'
9229   { (eval echo "$as_me:9229: \"$ac_try\"") >&5
9230   (eval $ac_try) 2>&5
9231   ac_status=$?
9232   echo "$as_me:9232: \$? = $ac_status" >&5
9233   (exit $ac_status); }; }; then
9234   cf_cv_define_sigwinch=yes
9235 else
9236   echo "$as_me: failed program was:" >&5
9237 cat conftest.$ac_ext >&5
9238 cat >conftest.$ac_ext <<_ACEOF
9239 #line 9239 "configure"
9240 #include "confdefs.h"
9241
9242 #undef _XOPEN_SOURCE
9243 #undef _POSIX_SOURCE
9244 #undef _POSIX_C_SOURCE
9245 #include <sys/types.h>
9246 #include <sys/signal.h>
9247
9248 int
9249 main ()
9250 {
9251 int x = SIGWINCH
9252   ;
9253   return 0;
9254 }
9255 _ACEOF
9256 rm -f conftest.$ac_objext
9257 if { (eval echo "$as_me:9257: \"$ac_compile\"") >&5
9258   (eval $ac_compile) 2>&5
9259   ac_status=$?
9260   echo "$as_me:9260: \$? = $ac_status" >&5
9261   (exit $ac_status); } &&
9262          { ac_try='test -s conftest.$ac_objext'
9263   { (eval echo "$as_me:9263: \"$ac_try\"") >&5
9264   (eval $ac_try) 2>&5
9265   ac_status=$?
9266   echo "$as_me:9266: \$? = $ac_status" >&5
9267   (exit $ac_status); }; }; then
9268   cf_cv_define_sigwinch=maybe
9269 else
9270   echo "$as_me: failed program was:" >&5
9271 cat conftest.$ac_ext >&5
9272 cf_cv_define_sigwinch=no
9273 fi
9274 rm -f conftest.$ac_objext conftest.$ac_ext
9275
9276 fi
9277 rm -f conftest.$ac_objext conftest.$ac_ext
9278
9279 fi
9280 echo "$as_me:9280: result: $cf_cv_define_sigwinch" >&5
9281 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9282
9283 if test "$cf_cv_define_sigwinch" = maybe ; then
9284 echo "$as_me:9284: checking for actual SIGWINCH definition" >&5
9285 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9286 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9287   echo $ECHO_N "(cached) $ECHO_C" >&6
9288 else
9289
9290 cf_cv_fixup_sigwinch=unknown
9291 cf_sigwinch=32
9292 while test $cf_sigwinch != 1
9293 do
9294         cat >conftest.$ac_ext <<_ACEOF
9295 #line 9295 "configure"
9296 #include "confdefs.h"
9297
9298 #undef _XOPEN_SOURCE
9299 #undef _POSIX_SOURCE
9300 #undef _POSIX_C_SOURCE
9301 #include <sys/types.h>
9302 #include <sys/signal.h>
9303
9304 int
9305 main ()
9306 {
9307
9308 #if SIGWINCH != $cf_sigwinch
9309 make an error
9310 #endif
9311 int x = SIGWINCH
9312   ;
9313   return 0;
9314 }
9315 _ACEOF
9316 rm -f conftest.$ac_objext
9317 if { (eval echo "$as_me:9317: \"$ac_compile\"") >&5
9318   (eval $ac_compile) 2>&5
9319   ac_status=$?
9320   echo "$as_me:9320: \$? = $ac_status" >&5
9321   (exit $ac_status); } &&
9322          { ac_try='test -s conftest.$ac_objext'
9323   { (eval echo "$as_me:9323: \"$ac_try\"") >&5
9324   (eval $ac_try) 2>&5
9325   ac_status=$?
9326   echo "$as_me:9326: \$? = $ac_status" >&5
9327   (exit $ac_status); }; }; then
9328   cf_cv_fixup_sigwinch=$cf_sigwinch
9329          break
9330 else
9331   echo "$as_me: failed program was:" >&5
9332 cat conftest.$ac_ext >&5
9333 fi
9334 rm -f conftest.$ac_objext conftest.$ac_ext
9335
9336 cf_sigwinch=`expr $cf_sigwinch - 1`
9337 done
9338
9339 fi
9340 echo "$as_me:9340: result: $cf_cv_fixup_sigwinch" >&5
9341 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9342
9343         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9344                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9345         fi
9346 fi
9347
9348 # Checks for CODESET support.
9349
9350 echo "$as_me:9350: checking for nl_langinfo and CODESET" >&5
9351 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9352 if test "${am_cv_langinfo_codeset+set}" = set; then
9353   echo $ECHO_N "(cached) $ECHO_C" >&6
9354 else
9355   cat >conftest.$ac_ext <<_ACEOF
9356 #line 9356 "configure"
9357 #include "confdefs.h"
9358 #include <langinfo.h>
9359 int
9360 main ()
9361 {
9362 char* cs = nl_langinfo(CODESET);
9363   ;
9364   return 0;
9365 }
9366 _ACEOF
9367 rm -f conftest.$ac_objext conftest$ac_exeext
9368 if { (eval echo "$as_me:9368: \"$ac_link\"") >&5
9369   (eval $ac_link) 2>&5
9370   ac_status=$?
9371   echo "$as_me:9371: \$? = $ac_status" >&5
9372   (exit $ac_status); } &&
9373          { ac_try='test -s conftest$ac_exeext'
9374   { (eval echo "$as_me:9374: \"$ac_try\"") >&5
9375   (eval $ac_try) 2>&5
9376   ac_status=$?
9377   echo "$as_me:9377: \$? = $ac_status" >&5
9378   (exit $ac_status); }; }; then
9379   am_cv_langinfo_codeset=yes
9380 else
9381   echo "$as_me: failed program was:" >&5
9382 cat conftest.$ac_ext >&5
9383 am_cv_langinfo_codeset=no
9384 fi
9385 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9386
9387 fi
9388 echo "$as_me:9388: result: $am_cv_langinfo_codeset" >&5
9389 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9390         if test $am_cv_langinfo_codeset = yes; then
9391
9392 cat >>confdefs.h <<\EOF
9393 #define HAVE_LANGINFO_CODESET 1
9394 EOF
9395
9396         fi
9397
9398 # use these variables to work around a defect in gcc's fixincludes.
9399 NCURSES_OK_WCHAR_T=
9400 NCURSES_OK_WINT_T=
9401
9402 echo "$as_me:9402: checking if you want wide-character code" >&5
9403 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9404
9405 # Check whether --enable-widec or --disable-widec was given.
9406 if test "${enable_widec+set}" = set; then
9407   enableval="$enable_widec"
9408   with_widec=$enableval
9409 else
9410   with_widec=no
9411 fi;
9412 echo "$as_me:9412: result: $with_widec" >&5
9413 echo "${ECHO_T}$with_widec" >&6
9414
9415 NCURSES_WCWIDTH_GRAPHICS=1
9416
9417 if test "x$with_widec" = xyes ; then
9418         if test "x$disable_lib_suffixes" = xno ; then
9419                 LIB_SUFFIX="w${LIB_SUFFIX}"
9420         fi
9421
9422 cat >>confdefs.h <<\EOF
9423 #define USE_WIDEC_SUPPORT 1
9424 EOF
9425
9426 cat >>confdefs.h <<\EOF
9427 #define NCURSES_WIDECHAR 1
9428 EOF
9429
9430 for ac_header in \
9431 wchar.h \
9432 wctype.h \
9433
9434 do
9435 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9436 echo "$as_me:9436: checking for $ac_header" >&5
9437 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9438 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9439   echo $ECHO_N "(cached) $ECHO_C" >&6
9440 else
9441   cat >conftest.$ac_ext <<_ACEOF
9442 #line 9442 "configure"
9443 #include "confdefs.h"
9444 #include <$ac_header>
9445 _ACEOF
9446 if { (eval echo "$as_me:9446: \"$ac_cpp conftest.$ac_ext\"") >&5
9447   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9448   ac_status=$?
9449   egrep -v '^ *\+' conftest.er1 >conftest.err
9450   rm -f conftest.er1
9451   cat conftest.err >&5
9452   echo "$as_me:9452: \$? = $ac_status" >&5
9453   (exit $ac_status); } >/dev/null; then
9454   if test -s conftest.err; then
9455     ac_cpp_err=$ac_c_preproc_warn_flag
9456   else
9457     ac_cpp_err=
9458   fi
9459 else
9460   ac_cpp_err=yes
9461 fi
9462 if test -z "$ac_cpp_err"; then
9463   eval "$as_ac_Header=yes"
9464 else
9465   echo "$as_me: failed program was:" >&5
9466   cat conftest.$ac_ext >&5
9467   eval "$as_ac_Header=no"
9468 fi
9469 rm -f conftest.err conftest.$ac_ext
9470 fi
9471 echo "$as_me:9471: result: `eval echo '${'$as_ac_Header'}'`" >&5
9472 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9473 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9474   cat >>confdefs.h <<EOF
9475 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9476 EOF
9477
9478 fi
9479 done
9480
9481 echo "$as_me:9481: checking if wchar.h can be used as is" >&5
9482 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9483 if test "${cf_cv_wchar_h_okay+set}" = set; then
9484   echo $ECHO_N "(cached) $ECHO_C" >&6
9485 else
9486
9487 cat >conftest.$ac_ext <<_ACEOF
9488 #line 9488 "configure"
9489 #include "confdefs.h"
9490
9491 #include <stdlib.h>
9492 #ifdef HAVE_WCHAR_H
9493 #include <wchar.h>
9494 #endif
9495 #ifdef HAVE_WCTYPE_H
9496 #include <wctype.h>
9497 #endif
9498
9499 int
9500 main ()
9501 {
9502
9503         wint_t foo = 0;
9504         int bar = iswpunct(foo)
9505   ;
9506   return 0;
9507 }
9508 _ACEOF
9509 rm -f conftest.$ac_objext
9510 if { (eval echo "$as_me:9510: \"$ac_compile\"") >&5
9511   (eval $ac_compile) 2>&5
9512   ac_status=$?
9513   echo "$as_me:9513: \$? = $ac_status" >&5
9514   (exit $ac_status); } &&
9515          { ac_try='test -s conftest.$ac_objext'
9516   { (eval echo "$as_me:9516: \"$ac_try\"") >&5
9517   (eval $ac_try) 2>&5
9518   ac_status=$?
9519   echo "$as_me:9519: \$? = $ac_status" >&5
9520   (exit $ac_status); }; }; then
9521   cf_cv_wchar_h_okay=yes
9522 else
9523   echo "$as_me: failed program was:" >&5
9524 cat conftest.$ac_ext >&5
9525 cf_cv_wchar_h_okay=no
9526 fi
9527 rm -f conftest.$ac_objext conftest.$ac_ext
9528 fi
9529 echo "$as_me:9529: result: $cf_cv_wchar_h_okay" >&5
9530 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9531
9532 if test $cf_cv_wchar_h_okay = no
9533 then
9534
9535 echo "$as_me:9535: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9536 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9537 cat >conftest.$ac_ext <<_ACEOF
9538 #line 9538 "configure"
9539 #include "confdefs.h"
9540 #include <sys/types.h>
9541
9542 int
9543 main ()
9544 {
9545
9546 #ifndef _XOPEN_SOURCE_EXTENDED
9547 make an error
9548 #endif
9549   ;
9550   return 0;
9551 }
9552 _ACEOF
9553 rm -f conftest.$ac_objext
9554 if { (eval echo "$as_me:9554: \"$ac_compile\"") >&5
9555   (eval $ac_compile) 2>&5
9556   ac_status=$?
9557   echo "$as_me:9557: \$? = $ac_status" >&5
9558   (exit $ac_status); } &&
9559          { ac_try='test -s conftest.$ac_objext'
9560   { (eval echo "$as_me:9560: \"$ac_try\"") >&5
9561   (eval $ac_try) 2>&5
9562   ac_status=$?
9563   echo "$as_me:9563: \$? = $ac_status" >&5
9564   (exit $ac_status); }; }; then
9565   cf_result=no
9566 else
9567   echo "$as_me: failed program was:" >&5
9568 cat conftest.$ac_ext >&5
9569 cf_result=yes
9570 fi
9571 rm -f conftest.$ac_objext conftest.$ac_ext
9572 echo "$as_me:9572: result: $cf_result" >&5
9573 echo "${ECHO_T}$cf_result" >&6
9574
9575 if test "$cf_result" = yes ; then
9576         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9577 elif test "x" != "x" ; then
9578         echo "$as_me:9578: checking checking for compatible value versus " >&5
9579 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9580         cat >conftest.$ac_ext <<_ACEOF
9581 #line 9581 "configure"
9582 #include "confdefs.h"
9583 #include <sys/types.h>
9584
9585 int
9586 main ()
9587 {
9588
9589 #if _XOPEN_SOURCE_EXTENDED- < 0
9590 make an error
9591 #endif
9592   ;
9593   return 0;
9594 }
9595 _ACEOF
9596 rm -f conftest.$ac_objext
9597 if { (eval echo "$as_me:9597: \"$ac_compile\"") >&5
9598   (eval $ac_compile) 2>&5
9599   ac_status=$?
9600   echo "$as_me:9600: \$? = $ac_status" >&5
9601   (exit $ac_status); } &&
9602          { ac_try='test -s conftest.$ac_objext'
9603   { (eval echo "$as_me:9603: \"$ac_try\"") >&5
9604   (eval $ac_try) 2>&5
9605   ac_status=$?
9606   echo "$as_me:9606: \$? = $ac_status" >&5
9607   (exit $ac_status); }; }; then
9608   cf_result=yes
9609 else
9610   echo "$as_me: failed program was:" >&5
9611 cat conftest.$ac_ext >&5
9612 cf_result=no
9613 fi
9614 rm -f conftest.$ac_objext conftest.$ac_ext
9615         echo "$as_me:9615: result: $cf_result" >&5
9616 echo "${ECHO_T}$cf_result" >&6
9617         if test "$cf_result" = no ; then
9618                 # perhaps we can override it - try...
9619                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9620         fi
9621 fi
9622
9623 fi
9624
9625 echo "$as_me:9625: checking if wcwidth agrees graphics are single-width" >&5
9626 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
9627 if test "${cf_cv_wcwidth_graphics+set}" = set; then
9628   echo $ECHO_N "(cached) $ECHO_C" >&6
9629 else
9630
9631 cat >conftest.in <<CF_EOF
9632 -       VT100 symbols
9633 0x250c  upper left corner
9634 0x2514  lower left corner
9635 0x2510  upper right corner
9636 0x2518  lower right corner
9637 0x251c  tee pointing left
9638 0x2524  tee pointing right
9639 0x2534  tee pointing up
9640 0x252c  tee pointing down
9641 0x2500  horizontal line
9642 0x2502  vertical line
9643 0x253c  large plus or crossover
9644 0x23ba  scan line 1
9645 0x23bd  scan line 9
9646 0x25c6  diamond
9647 0x2592  checker board (stipple)
9648 0x00b0  degree symbol
9649 0x00b1  plus/minus
9650 0x00b7  bullet
9651 -       Teletype 5410v1 symbols
9652 0x2190  arrow pointing left
9653 0x2192  arrow pointing right
9654 0x2193  arrow pointing down
9655 0x2191  arrow pointing up
9656 0x2592  board of squares
9657 0x2603  lantern symbol
9658 0x25ae  solid square block
9659 -       these defaults were invented for ncurses
9660 0x23bb  scan line 3
9661 0x23bc  scan line 7
9662 0x2264  less-than-or-equal-to
9663 0x2265  greater-than-or-equal-to
9664 0x03c0  greek pi
9665 0x2260  not-equal
9666 0x00a3  pound-sterling symbol
9667 -       thick-line-drawing
9668 0x250f  upper left corner
9669 0x2517  lower left corner
9670 0x2513  upper right corner
9671 0x251b  lower right corner
9672 0x2523  tee pointing left
9673 0x252b  tee pointing right
9674 0x253b  tee pointing up
9675 0x2533  tee pointing down
9676 0x2501  horizontal line
9677 0x2503  vertical line
9678 0x254b  large plus or crossover
9679 -       double-line-drawing
9680 0x2554  upper left corner
9681 0x255a  lower left corner
9682 0x2557  upper right corner
9683 0x255d  lower right corner
9684 0x2563  tee pointing left
9685 0x2560  tee pointing right
9686 0x2569  tee pointing up
9687 0x2566  tee pointing down
9688 0x2550  horizontal line
9689 0x2551  vertical line
9690 0x256c  large plus or crossover
9691 CF_EOF
9692 if test "$cross_compiling" = yes; then
9693   cf_cv_wcwidth_graphics=unknown
9694 else
9695   cat >conftest.$ac_ext <<_ACEOF
9696 #line 9696 "configure"
9697 #include "confdefs.h"
9698
9699 #include <locale.h>
9700 #include <stdio.h>
9701 #include <wchar.h>
9702
9703 #define MY_LEN 80
9704
9705 int
9706 main(void)
9707 {
9708         FILE *fp;
9709         int value;
9710         char buffer[MY_LEN + 1];
9711         char notes[MY_LEN + 1];
9712         int totals = 0;
9713         int passed = 0;
9714
9715         if (setlocale(LC_ALL, "en_US.UTF8") ||
9716                 setlocale(LC_ALL, "en_US.UTF-8") ||
9717                 setlocale(LC_ALL, "en_US.utf8") ||
9718                 setlocale(LC_ALL, "en_US.utf-8")) {
9719                 if ((fp = fopen("conftest.in", "r")) != 0) {
9720                         while (fgets(buffer, MY_LEN, fp) != 0) {
9721                                 if (*buffer == '-') {
9722                                         fprintf(stderr, "\t%s", buffer);
9723                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
9724                                         ++totals;
9725                                         if (wcwidth(value) == 1)
9726                                                 ++passed;
9727                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
9728                                 } else {
9729                                         fprintf(stderr, "?\t%s", buffer);
9730                                 }
9731                         }
9732                 }
9733         }
9734         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
9735         return (totals == passed) ? 0 : 1;
9736 }
9737
9738 _ACEOF
9739 rm -f conftest$ac_exeext
9740 if { (eval echo "$as_me:9740: \"$ac_link\"") >&5
9741   (eval $ac_link) 2>&5
9742   ac_status=$?
9743   echo "$as_me:9743: \$? = $ac_status" >&5
9744   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9745   { (eval echo "$as_me:9745: \"$ac_try\"") >&5
9746   (eval $ac_try) 2>&5
9747   ac_status=$?
9748   echo "$as_me:9748: \$? = $ac_status" >&5
9749   (exit $ac_status); }; }; then
9750   cf_cv_wcwidth_graphics=yes
9751 else
9752   echo "$as_me: program exited with status $ac_status" >&5
9753 echo "$as_me: failed program was:" >&5
9754 cat conftest.$ac_ext >&5
9755 cf_cv_wcwidth_graphics=no
9756 fi
9757 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9758 fi
9759
9760 fi
9761 echo "$as_me:9761: result: $cf_cv_wcwidth_graphics" >&5
9762 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
9763
9764         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
9765
9766         # with_overwrite=no
9767         NCURSES_CH_T=cchar_t
9768
9769 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9770 do
9771 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9772 echo "$as_me:9772: checking for $ac_func" >&5
9773 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9774 if eval "test \"\${$as_ac_var+set}\" = set"; then
9775   echo $ECHO_N "(cached) $ECHO_C" >&6
9776 else
9777   cat >conftest.$ac_ext <<_ACEOF
9778 #line 9778 "configure"
9779 #include "confdefs.h"
9780 /* System header to define __stub macros and hopefully few prototypes,
9781     which can conflict with char $ac_func (); below.  */
9782 #include <assert.h>
9783 /* Override any gcc2 internal prototype to avoid an error.  */
9784 #ifdef __cplusplus
9785 extern "C"
9786 #endif
9787 /* We use char because int might match the return type of a gcc2
9788    builtin and then its argument prototype would still apply.  */
9789 char $ac_func ();
9790 char (*f) ();
9791
9792 int
9793 main ()
9794 {
9795 /* The GNU C library defines this for functions which it implements
9796     to always fail with ENOSYS.  Some functions are actually named
9797     something starting with __ and the normal name is an alias.  */
9798 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9799 choke me
9800 #else
9801 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9802 #endif
9803
9804   ;
9805   return 0;
9806 }
9807 _ACEOF
9808 rm -f conftest.$ac_objext conftest$ac_exeext
9809 if { (eval echo "$as_me:9809: \"$ac_link\"") >&5
9810   (eval $ac_link) 2>&5
9811   ac_status=$?
9812   echo "$as_me:9812: \$? = $ac_status" >&5
9813   (exit $ac_status); } &&
9814          { ac_try='test -s conftest$ac_exeext'
9815   { (eval echo "$as_me:9815: \"$ac_try\"") >&5
9816   (eval $ac_try) 2>&5
9817   ac_status=$?
9818   echo "$as_me:9818: \$? = $ac_status" >&5
9819   (exit $ac_status); }; }; then
9820   eval "$as_ac_var=yes"
9821 else
9822   echo "$as_me: failed program was:" >&5
9823 cat conftest.$ac_ext >&5
9824 eval "$as_ac_var=no"
9825 fi
9826 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9827 fi
9828 echo "$as_me:9828: result: `eval echo '${'$as_ac_var'}'`" >&5
9829 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9830 if test `eval echo '${'$as_ac_var'}'` = yes; then
9831   cat >>confdefs.h <<EOF
9832 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9833 EOF
9834
9835 fi
9836 done
9837
9838         if test "x$ac_cv_func_putwc" != xyes ; then
9839
9840 echo "$as_me:9840: checking for multibyte character support" >&5
9841 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9842 if test "${cf_cv_utf8_lib+set}" = set; then
9843   echo $ECHO_N "(cached) $ECHO_C" >&6
9844 else
9845
9846         cf_save_LIBS="$LIBS"
9847         cat >conftest.$ac_ext <<_ACEOF
9848 #line 9848 "configure"
9849 #include "confdefs.h"
9850
9851 #include <stdlib.h>
9852 int
9853 main ()
9854 {
9855 putwc(0,0);
9856   ;
9857   return 0;
9858 }
9859 _ACEOF
9860 rm -f conftest.$ac_objext conftest$ac_exeext
9861 if { (eval echo "$as_me:9861: \"$ac_link\"") >&5
9862   (eval $ac_link) 2>&5
9863   ac_status=$?
9864   echo "$as_me:9864: \$? = $ac_status" >&5
9865   (exit $ac_status); } &&
9866          { ac_try='test -s conftest$ac_exeext'
9867   { (eval echo "$as_me:9867: \"$ac_try\"") >&5
9868   (eval $ac_try) 2>&5
9869   ac_status=$?
9870   echo "$as_me:9870: \$? = $ac_status" >&5
9871   (exit $ac_status); }; }; then
9872   cf_cv_utf8_lib=yes
9873 else
9874   echo "$as_me: failed program was:" >&5
9875 cat conftest.$ac_ext >&5
9876
9877 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9878 # will be set on completion of the AC_TRY_LINK below.
9879 cf_cv_header_path_utf8=
9880 cf_cv_library_path_utf8=
9881
9882 echo "${as_me:-configure}:9882: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9883
9884 cf_save_LIBS="$LIBS"
9885
9886 cat >conftest.$ac_ext <<_ACEOF
9887 #line 9887 "configure"
9888 #include "confdefs.h"
9889
9890 #include <libutf8.h>
9891 int
9892 main ()
9893 {
9894 putwc(0,0);
9895   ;
9896   return 0;
9897 }
9898 _ACEOF
9899 rm -f conftest.$ac_objext conftest$ac_exeext
9900 if { (eval echo "$as_me:9900: \"$ac_link\"") >&5
9901   (eval $ac_link) 2>&5
9902   ac_status=$?
9903   echo "$as_me:9903: \$? = $ac_status" >&5
9904   (exit $ac_status); } &&
9905          { ac_try='test -s conftest$ac_exeext'
9906   { (eval echo "$as_me:9906: \"$ac_try\"") >&5
9907   (eval $ac_try) 2>&5
9908   ac_status=$?
9909   echo "$as_me:9909: \$? = $ac_status" >&5
9910   (exit $ac_status); }; }; then
9911
9912         cf_cv_find_linkage_utf8=yes
9913         cf_cv_header_path_utf8=/usr/include
9914         cf_cv_library_path_utf8=/usr/lib
9915
9916 else
9917   echo "$as_me: failed program was:" >&5
9918 cat conftest.$ac_ext >&5
9919
9920 LIBS="-lutf8  $cf_save_LIBS"
9921
9922 cat >conftest.$ac_ext <<_ACEOF
9923 #line 9923 "configure"
9924 #include "confdefs.h"
9925
9926 #include <libutf8.h>
9927 int
9928 main ()
9929 {
9930 putwc(0,0);
9931   ;
9932   return 0;
9933 }
9934 _ACEOF
9935 rm -f conftest.$ac_objext conftest$ac_exeext
9936 if { (eval echo "$as_me:9936: \"$ac_link\"") >&5
9937   (eval $ac_link) 2>&5
9938   ac_status=$?
9939   echo "$as_me:9939: \$? = $ac_status" >&5
9940   (exit $ac_status); } &&
9941          { ac_try='test -s conftest$ac_exeext'
9942   { (eval echo "$as_me:9942: \"$ac_try\"") >&5
9943   (eval $ac_try) 2>&5
9944   ac_status=$?
9945   echo "$as_me:9945: \$? = $ac_status" >&5
9946   (exit $ac_status); }; }; then
9947
9948         cf_cv_find_linkage_utf8=yes
9949         cf_cv_header_path_utf8=/usr/include
9950         cf_cv_library_path_utf8=/usr/lib
9951         cf_cv_library_file_utf8="-lutf8"
9952
9953 else
9954   echo "$as_me: failed program was:" >&5
9955 cat conftest.$ac_ext >&5
9956
9957         cf_cv_find_linkage_utf8=no
9958         LIBS="$cf_save_LIBS"
9959
9960         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
9961
9962 echo "${as_me:-configure}:9962: testing find linkage for utf8 library ..." 1>&5
9963
9964 echo "${as_me:-configure}:9964: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9965
9966         cf_save_CPPFLAGS="$CPPFLAGS"
9967         cf_test_CPPFLAGS="$CPPFLAGS"
9968
9969 cf_search=
9970
9971 # collect the current set of include-directories from compiler flags
9972 cf_header_path_list=""
9973 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9974         for cf_header_path in $CPPFLAGS $CFLAGS
9975         do
9976                 case $cf_header_path in
9977                 (-I*)
9978                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9979
9980 test "x$cf_header_path" != "xNONE" && \
9981 test -d "$cf_header_path" && \
9982  {
9983         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9984         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9985         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9986         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9987         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9988         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9989 }
9990
9991                         cf_header_path_list="$cf_header_path_list $cf_search"
9992                         ;;
9993                 esac
9994         done
9995 fi
9996
9997 # add the variations for the package we are looking for
9998
9999 cf_search=
10000
10001 test "x$prefix" != "xNONE" && \
10002 test -d "$prefix" && \
10003  {
10004         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
10005         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
10006         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
10007         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
10008         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
10009         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
10010 }
10011
10012 for cf_subdir_prefix in \
10013         /usr \
10014         /usr/local \
10015         /usr/pkg \
10016         /opt \
10017         /opt/local \
10018         $HOME
10019 do
10020
10021 test "x$cf_subdir_prefix" != "x$prefix" && \
10022 test -d "$cf_subdir_prefix" && \
10023 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10024         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
10025         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
10026         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
10027         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
10028         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
10029         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
10030 }
10031
10032 done
10033
10034 test "$includedir" != NONE && \
10035 test "$includedir" != "/usr/include" && \
10036 test -d "$includedir" && {
10037         test -d $includedir &&    cf_search="$cf_search $includedir"
10038         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
10039 }
10040
10041 test "$oldincludedir" != NONE && \
10042 test "$oldincludedir" != "/usr/include" && \
10043 test -d "$oldincludedir" && {
10044         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
10045         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
10046 }
10047
10048 cf_search="$cf_search $cf_header_path_list"
10049
10050         for cf_cv_header_path_utf8 in $cf_search
10051         do
10052                 if test -d $cf_cv_header_path_utf8 ; then
10053                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
10054
10055 echo "${as_me:-configure}:10055: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
10056
10057                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
10058                         cat >conftest.$ac_ext <<_ACEOF
10059 #line 10059 "configure"
10060 #include "confdefs.h"
10061
10062 #include <libutf8.h>
10063 int
10064 main ()
10065 {
10066 putwc(0,0);
10067   ;
10068   return 0;
10069 }
10070 _ACEOF
10071 rm -f conftest.$ac_objext
10072 if { (eval echo "$as_me:10072: \"$ac_compile\"") >&5
10073   (eval $ac_compile) 2>&5
10074   ac_status=$?
10075   echo "$as_me:10075: \$? = $ac_status" >&5
10076   (exit $ac_status); } &&
10077          { ac_try='test -s conftest.$ac_objext'
10078   { (eval echo "$as_me:10078: \"$ac_try\"") >&5
10079   (eval $ac_try) 2>&5
10080   ac_status=$?
10081   echo "$as_me:10081: \$? = $ac_status" >&5
10082   (exit $ac_status); }; }; then
10083
10084                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
10085
10086 echo "${as_me:-configure}:10086: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
10087
10088                                 cf_cv_find_linkage_utf8=maybe
10089                                 cf_test_CPPFLAGS="$CPPFLAGS"
10090                                 break
10091 else
10092   echo "$as_me: failed program was:" >&5
10093 cat conftest.$ac_ext >&5
10094
10095                                 CPPFLAGS="$cf_save_CPPFLAGS"
10096
10097 fi
10098 rm -f conftest.$ac_objext conftest.$ac_ext
10099                 fi
10100         done
10101
10102         if test "$cf_cv_find_linkage_utf8" = maybe ; then
10103
10104 echo "${as_me:-configure}:10104: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
10105
10106                 cf_save_LIBS="$LIBS"
10107                 cf_save_LDFLAGS="$LDFLAGS"
10108
10109                 if test "$cf_cv_find_linkage_utf8" != yes ; then
10110
10111 cf_search=
10112 cf_library_path_list=""
10113 if test -n "${LDFLAGS}${LIBS}" ; then
10114         for cf_library_path in $LDFLAGS $LIBS
10115         do
10116                 case $cf_library_path in
10117                 (-L*)
10118                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10119
10120 test "x$cf_library_path" != "xNONE" && \
10121 test -d "$cf_library_path" && \
10122  {
10123         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
10124         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
10125         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
10126         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
10127         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
10128         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
10129 }
10130
10131                         cf_library_path_list="$cf_library_path_list $cf_search"
10132                         ;;
10133                 esac
10134         done
10135 fi
10136
10137 cf_search=
10138
10139 test "x$prefix" != "xNONE" && \
10140 test -d "$prefix" && \
10141  {
10142         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
10143         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
10144         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
10145         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
10146         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
10147         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
10148 }
10149
10150 for cf_subdir_prefix in \
10151         /usr \
10152         /usr/local \
10153         /usr/pkg \
10154         /opt \
10155         /opt/local \
10156         $HOME
10157 do
10158
10159 test "x$cf_subdir_prefix" != "x$prefix" && \
10160 test -d "$cf_subdir_prefix" && \
10161 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10162         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
10163         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
10164         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
10165         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
10166         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
10167         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
10168 }
10169
10170 done
10171
10172 cf_search="$cf_library_path_list $cf_search"
10173
10174                         for cf_cv_library_path_utf8 in $cf_search
10175                         do
10176                                 if test -d $cf_cv_library_path_utf8 ; then
10177                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
10178
10179 echo "${as_me:-configure}:10179: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
10180
10181                                         CPPFLAGS="$cf_test_CPPFLAGS"
10182                                         LIBS="-lutf8  $cf_save_LIBS"
10183                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
10184                                         cat >conftest.$ac_ext <<_ACEOF
10185 #line 10185 "configure"
10186 #include "confdefs.h"
10187
10188 #include <libutf8.h>
10189 int
10190 main ()
10191 {
10192 putwc(0,0);
10193   ;
10194   return 0;
10195 }
10196 _ACEOF
10197 rm -f conftest.$ac_objext conftest$ac_exeext
10198 if { (eval echo "$as_me:10198: \"$ac_link\"") >&5
10199   (eval $ac_link) 2>&5
10200   ac_status=$?
10201   echo "$as_me:10201: \$? = $ac_status" >&5
10202   (exit $ac_status); } &&
10203          { ac_try='test -s conftest$ac_exeext'
10204   { (eval echo "$as_me:10204: \"$ac_try\"") >&5
10205   (eval $ac_try) 2>&5
10206   ac_status=$?
10207   echo "$as_me:10207: \$? = $ac_status" >&5
10208   (exit $ac_status); }; }; then
10209
10210                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
10211
10212 echo "${as_me:-configure}:10212: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
10213
10214                                         cf_cv_find_linkage_utf8=yes
10215                                         cf_cv_library_file_utf8="-lutf8"
10216                                         break
10217 else
10218   echo "$as_me: failed program was:" >&5
10219 cat conftest.$ac_ext >&5
10220
10221                                         CPPFLAGS="$cf_save_CPPFLAGS"
10222                                         LIBS="$cf_save_LIBS"
10223                                         LDFLAGS="$cf_save_LDFLAGS"
10224
10225 fi
10226 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10227                                 fi
10228                         done
10229                         CPPFLAGS="$cf_save_CPPFLAGS"
10230                         LDFLAGS="$cf_save_LDFLAGS"
10231                 fi
10232
10233         else
10234                 cf_cv_find_linkage_utf8=no
10235         fi
10236
10237 fi
10238 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10239
10240 fi
10241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10242
10243 LIBS="$cf_save_LIBS"
10244
10245 if test "$cf_cv_find_linkage_utf8" = yes ; then
10246 cf_cv_utf8_lib=add-on
10247 else
10248 cf_cv_utf8_lib=no
10249 fi
10250
10251 fi
10252 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10253 fi
10254 echo "$as_me:10254: result: $cf_cv_utf8_lib" >&5
10255 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10256
10257 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10258 # ncurses/ncursesw:
10259 if test "$cf_cv_utf8_lib" = "add-on" ; then
10260
10261 cat >>confdefs.h <<\EOF
10262 #define HAVE_LIBUTF8_H 1
10263 EOF
10264
10265 if test -n "$cf_cv_header_path_utf8" ; then
10266   for cf_add_incdir in $cf_cv_header_path_utf8
10267   do
10268         while test $cf_add_incdir != /usr/include
10269         do
10270           if test -d $cf_add_incdir
10271           then
10272                 cf_have_incdir=no
10273                 if test -n "$CFLAGS$CPPFLAGS" ; then
10274                   # a loop is needed to ensure we can add subdirs of existing dirs
10275                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10276                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10277                           cf_have_incdir=yes; break
10278                         fi
10279                   done
10280                 fi
10281
10282                 if test "$cf_have_incdir" = no ; then
10283                   if test "$cf_add_incdir" = /usr/local/include ; then
10284                         if test "$GCC" = yes
10285                         then
10286                           cf_save_CPPFLAGS=$CPPFLAGS
10287                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10288                           cat >conftest.$ac_ext <<_ACEOF
10289 #line 10289 "configure"
10290 #include "confdefs.h"
10291 #include <stdio.h>
10292 int
10293 main ()
10294 {
10295 printf("Hello")
10296   ;
10297   return 0;
10298 }
10299 _ACEOF
10300 rm -f conftest.$ac_objext
10301 if { (eval echo "$as_me:10301: \"$ac_compile\"") >&5
10302   (eval $ac_compile) 2>&5
10303   ac_status=$?
10304   echo "$as_me:10304: \$? = $ac_status" >&5
10305   (exit $ac_status); } &&
10306          { ac_try='test -s conftest.$ac_objext'
10307   { (eval echo "$as_me:10307: \"$ac_try\"") >&5
10308   (eval $ac_try) 2>&5
10309   ac_status=$?
10310   echo "$as_me:10310: \$? = $ac_status" >&5
10311   (exit $ac_status); }; }; then
10312   :
10313 else
10314   echo "$as_me: failed program was:" >&5
10315 cat conftest.$ac_ext >&5
10316 cf_have_incdir=yes
10317 fi
10318 rm -f conftest.$ac_objext conftest.$ac_ext
10319                           CPPFLAGS=$cf_save_CPPFLAGS
10320                         fi
10321                   fi
10322                 fi
10323
10324                 if test "$cf_have_incdir" = no ; then
10325                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10326
10327 echo "${as_me:-configure}:10327: testing adding $cf_add_incdir to include-path ..." 1>&5
10328
10329                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10330
10331                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10332                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10333                   cf_add_incdir="$cf_top_incdir"
10334                 else
10335                   break
10336                 fi
10337           else
10338                 break
10339           fi
10340         done
10341   done
10342 fi
10343
10344 if test -n "$cf_cv_library_path_utf8" ; then
10345         for cf_add_libdir in $cf_cv_library_path_utf8
10346         do
10347                 if test $cf_add_libdir = /usr/lib ; then
10348                         :
10349                 elif test -d $cf_add_libdir
10350                 then
10351                         cf_have_libdir=no
10352                         if test -n "$LDFLAGS$LIBS" ; then
10353                                 # a loop is needed to ensure we can add subdirs of existing dirs
10354                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10355                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10356                                                 cf_have_libdir=yes; break
10357                                         fi
10358                                 done
10359                         fi
10360                         if test "$cf_have_libdir" = no ; then
10361                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10362
10363 echo "${as_me:-configure}:10363: testing adding $cf_add_libdir to library-path ..." 1>&5
10364
10365                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10366                         fi
10367                 fi
10368         done
10369 fi
10370
10371 cf_add_libs="$cf_cv_library_file_utf8"
10372 # Filter out duplicates - this happens with badly-designed ".pc" files...
10373 for cf_add_1lib in $LIBS
10374 do
10375         for cf_add_2lib in $cf_add_libs
10376         do
10377                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10378                 then
10379                         cf_add_1lib=
10380                         break
10381                 fi
10382         done
10383         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10384 done
10385 LIBS="$cf_add_libs"
10386
10387 fi
10388
10389                 if test "$cf_cv_utf8_lib" != no ; then
10390                         NCURSES_LIBUTF8=1
10391                 fi
10392         fi
10393
10394 # This is needed on Tru64 5.0 to declare mbstate_t
10395 echo "$as_me:10395: checking if we must include wchar.h to declare mbstate_t" >&5
10396 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10397 if test "${cf_cv_mbstate_t+set}" = set; then
10398   echo $ECHO_N "(cached) $ECHO_C" >&6
10399 else
10400
10401 cat >conftest.$ac_ext <<_ACEOF
10402 #line 10402 "configure"
10403 #include "confdefs.h"
10404
10405 #include <stdlib.h>
10406 #include <stdarg.h>
10407 #include <stdio.h>
10408 #ifdef HAVE_LIBUTF8_H
10409 #include <libutf8.h>
10410 #endif
10411 int
10412 main ()
10413 {
10414 mbstate_t state
10415   ;
10416   return 0;
10417 }
10418 _ACEOF
10419 rm -f conftest.$ac_objext
10420 if { (eval echo "$as_me:10420: \"$ac_compile\"") >&5
10421   (eval $ac_compile) 2>&5
10422   ac_status=$?
10423   echo "$as_me:10423: \$? = $ac_status" >&5
10424   (exit $ac_status); } &&
10425          { ac_try='test -s conftest.$ac_objext'
10426   { (eval echo "$as_me:10426: \"$ac_try\"") >&5
10427   (eval $ac_try) 2>&5
10428   ac_status=$?
10429   echo "$as_me:10429: \$? = $ac_status" >&5
10430   (exit $ac_status); }; }; then
10431   cf_cv_mbstate_t=no
10432 else
10433   echo "$as_me: failed program was:" >&5
10434 cat conftest.$ac_ext >&5
10435 cat >conftest.$ac_ext <<_ACEOF
10436 #line 10436 "configure"
10437 #include "confdefs.h"
10438
10439 #include <stdlib.h>
10440 #include <stdarg.h>
10441 #include <stdio.h>
10442 #include <wchar.h>
10443 #ifdef HAVE_LIBUTF8_H
10444 #include <libutf8.h>
10445 #endif
10446 int
10447 main ()
10448 {
10449 mbstate_t value
10450   ;
10451   return 0;
10452 }
10453 _ACEOF
10454 rm -f conftest.$ac_objext
10455 if { (eval echo "$as_me:10455: \"$ac_compile\"") >&5
10456   (eval $ac_compile) 2>&5
10457   ac_status=$?
10458   echo "$as_me:10458: \$? = $ac_status" >&5
10459   (exit $ac_status); } &&
10460          { ac_try='test -s conftest.$ac_objext'
10461   { (eval echo "$as_me:10461: \"$ac_try\"") >&5
10462   (eval $ac_try) 2>&5
10463   ac_status=$?
10464   echo "$as_me:10464: \$? = $ac_status" >&5
10465   (exit $ac_status); }; }; then
10466   cf_cv_mbstate_t=yes
10467 else
10468   echo "$as_me: failed program was:" >&5
10469 cat conftest.$ac_ext >&5
10470 cf_cv_mbstate_t=unknown
10471 fi
10472 rm -f conftest.$ac_objext conftest.$ac_ext
10473 fi
10474 rm -f conftest.$ac_objext conftest.$ac_ext
10475 fi
10476 echo "$as_me:10476: result: $cf_cv_mbstate_t" >&5
10477 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10478
10479 if test "$cf_cv_mbstate_t" = yes ; then
10480
10481 cat >>confdefs.h <<\EOF
10482 #define NEED_WCHAR_H 1
10483 EOF
10484
10485         NEED_WCHAR_H=1
10486 fi
10487
10488 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10489 if test "$cf_cv_mbstate_t" = unknown ; then
10490         NCURSES_MBSTATE_T=1
10491 fi
10492
10493 # This is needed on Tru64 5.0 to declare wchar_t
10494 echo "$as_me:10494: checking if we must include wchar.h to declare wchar_t" >&5
10495 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10496 if test "${cf_cv_wchar_t+set}" = set; then
10497   echo $ECHO_N "(cached) $ECHO_C" >&6
10498 else
10499
10500 cat >conftest.$ac_ext <<_ACEOF
10501 #line 10501 "configure"
10502 #include "confdefs.h"
10503
10504 #include <stdlib.h>
10505 #include <stdarg.h>
10506 #include <stdio.h>
10507 #ifdef HAVE_LIBUTF8_H
10508 #include <libutf8.h>
10509 #endif
10510 int
10511 main ()
10512 {
10513 wchar_t state
10514   ;
10515   return 0;
10516 }
10517 _ACEOF
10518 rm -f conftest.$ac_objext
10519 if { (eval echo "$as_me:10519: \"$ac_compile\"") >&5
10520   (eval $ac_compile) 2>&5
10521   ac_status=$?
10522   echo "$as_me:10522: \$? = $ac_status" >&5
10523   (exit $ac_status); } &&
10524          { ac_try='test -s conftest.$ac_objext'
10525   { (eval echo "$as_me:10525: \"$ac_try\"") >&5
10526   (eval $ac_try) 2>&5
10527   ac_status=$?
10528   echo "$as_me:10528: \$? = $ac_status" >&5
10529   (exit $ac_status); }; }; then
10530   cf_cv_wchar_t=no
10531 else
10532   echo "$as_me: failed program was:" >&5
10533 cat conftest.$ac_ext >&5
10534 cat >conftest.$ac_ext <<_ACEOF
10535 #line 10535 "configure"
10536 #include "confdefs.h"
10537
10538 #include <stdlib.h>
10539 #include <stdarg.h>
10540 #include <stdio.h>
10541 #include <wchar.h>
10542 #ifdef HAVE_LIBUTF8_H
10543 #include <libutf8.h>
10544 #endif
10545 int
10546 main ()
10547 {
10548 wchar_t value
10549   ;
10550   return 0;
10551 }
10552 _ACEOF
10553 rm -f conftest.$ac_objext
10554 if { (eval echo "$as_me:10554: \"$ac_compile\"") >&5
10555   (eval $ac_compile) 2>&5
10556   ac_status=$?
10557   echo "$as_me:10557: \$? = $ac_status" >&5
10558   (exit $ac_status); } &&
10559          { ac_try='test -s conftest.$ac_objext'
10560   { (eval echo "$as_me:10560: \"$ac_try\"") >&5
10561   (eval $ac_try) 2>&5
10562   ac_status=$?
10563   echo "$as_me:10563: \$? = $ac_status" >&5
10564   (exit $ac_status); }; }; then
10565   cf_cv_wchar_t=yes
10566 else
10567   echo "$as_me: failed program was:" >&5
10568 cat conftest.$ac_ext >&5
10569 cf_cv_wchar_t=unknown
10570 fi
10571 rm -f conftest.$ac_objext conftest.$ac_ext
10572 fi
10573 rm -f conftest.$ac_objext conftest.$ac_ext
10574 fi
10575 echo "$as_me:10575: result: $cf_cv_wchar_t" >&5
10576 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10577
10578 if test "$cf_cv_wchar_t" = yes ; then
10579
10580 cat >>confdefs.h <<\EOF
10581 #define NEED_WCHAR_H 1
10582 EOF
10583
10584         NEED_WCHAR_H=1
10585 fi
10586
10587 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10588 if test "$cf_cv_wchar_t" = unknown ; then
10589         NCURSES_WCHAR_T=1
10590 fi
10591
10592 # if we find wchar_t in either place, use substitution to provide a fallback.
10593 if test "$cf_cv_wchar_t" != unknown ; then
10594         NCURSES_OK_WCHAR_T=1
10595 fi
10596
10597 # This is needed on Tru64 5.0 to declare wint_t
10598 echo "$as_me:10598: checking if we must include wchar.h to declare wint_t" >&5
10599 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10600 if test "${cf_cv_wint_t+set}" = set; then
10601   echo $ECHO_N "(cached) $ECHO_C" >&6
10602 else
10603
10604 cat >conftest.$ac_ext <<_ACEOF
10605 #line 10605 "configure"
10606 #include "confdefs.h"
10607
10608 #include <stdlib.h>
10609 #include <stdarg.h>
10610 #include <stdio.h>
10611 #ifdef HAVE_LIBUTF8_H
10612 #include <libutf8.h>
10613 #endif
10614 int
10615 main ()
10616 {
10617 wint_t state
10618   ;
10619   return 0;
10620 }
10621 _ACEOF
10622 rm -f conftest.$ac_objext
10623 if { (eval echo "$as_me:10623: \"$ac_compile\"") >&5
10624   (eval $ac_compile) 2>&5
10625   ac_status=$?
10626   echo "$as_me:10626: \$? = $ac_status" >&5
10627   (exit $ac_status); } &&
10628          { ac_try='test -s conftest.$ac_objext'
10629   { (eval echo "$as_me:10629: \"$ac_try\"") >&5
10630   (eval $ac_try) 2>&5
10631   ac_status=$?
10632   echo "$as_me:10632: \$? = $ac_status" >&5
10633   (exit $ac_status); }; }; then
10634   cf_cv_wint_t=no
10635 else
10636   echo "$as_me: failed program was:" >&5
10637 cat conftest.$ac_ext >&5
10638 cat >conftest.$ac_ext <<_ACEOF
10639 #line 10639 "configure"
10640 #include "confdefs.h"
10641
10642 #include <stdlib.h>
10643 #include <stdarg.h>
10644 #include <stdio.h>
10645 #include <wchar.h>
10646 #ifdef HAVE_LIBUTF8_H
10647 #include <libutf8.h>
10648 #endif
10649 int
10650 main ()
10651 {
10652 wint_t value
10653   ;
10654   return 0;
10655 }
10656 _ACEOF
10657 rm -f conftest.$ac_objext
10658 if { (eval echo "$as_me:10658: \"$ac_compile\"") >&5
10659   (eval $ac_compile) 2>&5
10660   ac_status=$?
10661   echo "$as_me:10661: \$? = $ac_status" >&5
10662   (exit $ac_status); } &&
10663          { ac_try='test -s conftest.$ac_objext'
10664   { (eval echo "$as_me:10664: \"$ac_try\"") >&5
10665   (eval $ac_try) 2>&5
10666   ac_status=$?
10667   echo "$as_me:10667: \$? = $ac_status" >&5
10668   (exit $ac_status); }; }; then
10669   cf_cv_wint_t=yes
10670 else
10671   echo "$as_me: failed program was:" >&5
10672 cat conftest.$ac_ext >&5
10673 cf_cv_wint_t=unknown
10674 fi
10675 rm -f conftest.$ac_objext conftest.$ac_ext
10676 fi
10677 rm -f conftest.$ac_objext conftest.$ac_ext
10678 fi
10679 echo "$as_me:10679: result: $cf_cv_wint_t" >&5
10680 echo "${ECHO_T}$cf_cv_wint_t" >&6
10681
10682 if test "$cf_cv_wint_t" = yes ; then
10683
10684 cat >>confdefs.h <<\EOF
10685 #define NEED_WCHAR_H 1
10686 EOF
10687
10688         NEED_WCHAR_H=1
10689 fi
10690
10691 # if we do not find wint_t in either place, use substitution to provide a fallback.
10692 if test "$cf_cv_wint_t" = unknown ; then
10693         NCURSES_WINT_T=1
10694 fi
10695
10696 # if we find wint_t in either place, use substitution to provide a fallback.
10697 if test "$cf_cv_wint_t" != unknown ; then
10698         NCURSES_OK_WINT_T=1
10699 fi
10700
10701         if test "$NCURSES_MBSTATE_T" != 0; then
10702
10703 cat >>confdefs.h <<\EOF
10704 #define NEED_MBSTATE_T_DEF 1
10705 EOF
10706
10707         fi
10708 fi
10709
10710 ###   use option --disable-lp64 to allow long chtype
10711 echo "$as_me:10711: checking whether to enable _LP64 definition in curses.h" >&5
10712 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10713
10714 # Check whether --enable-lp64 or --disable-lp64 was given.
10715 if test "${enable_lp64+set}" = set; then
10716   enableval="$enable_lp64"
10717   with_lp64=$enableval
10718 else
10719   with_lp64=$cf_dft_with_lp64
10720 fi;
10721 echo "$as_me:10721: result: $with_lp64" >&5
10722 echo "${ECHO_T}$with_lp64" >&6
10723
10724 if test "x$with_lp64" = xyes ; then
10725         cf_cv_enable_lp64=1
10726 else
10727         cf_cv_enable_lp64=0
10728 fi
10729
10730 # Check whether --enable-largefile or --disable-largefile was given.
10731 if test "${enable_largefile+set}" = set; then
10732   enableval="$enable_largefile"
10733
10734 fi;
10735 if test "$enable_largefile" != no; then
10736
10737   echo "$as_me:10737: checking for special C compiler options needed for large files" >&5
10738 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10739 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10740   echo $ECHO_N "(cached) $ECHO_C" >&6
10741 else
10742   ac_cv_sys_largefile_CC=no
10743      if test "$GCC" != yes; then
10744        ac_save_CC=$CC
10745        while :; do
10746          # IRIX 6.2 and later do not support large files by default,
10747          # so use the C compiler's -n32 option if that helps.
10748          cat >conftest.$ac_ext <<_ACEOF
10749 #line 10749 "configure"
10750 #include "confdefs.h"
10751 #include <sys/types.h>
10752  /* Check that off_t can represent 2**63 - 1 correctly.
10753     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10754     since some C++ compilers masquerading as C compilers
10755     incorrectly reject 9223372036854775807.  */
10756 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10757   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10758                        && LARGE_OFF_T % 2147483647 == 1)
10759                       ? 1 : -1];
10760 int
10761 main ()
10762 {
10763
10764   ;
10765   return 0;
10766 }
10767 _ACEOF
10768          rm -f conftest.$ac_objext
10769 if { (eval echo "$as_me:10769: \"$ac_compile\"") >&5
10770   (eval $ac_compile) 2>&5
10771   ac_status=$?
10772   echo "$as_me:10772: \$? = $ac_status" >&5
10773   (exit $ac_status); } &&
10774          { ac_try='test -s conftest.$ac_objext'
10775   { (eval echo "$as_me:10775: \"$ac_try\"") >&5
10776   (eval $ac_try) 2>&5
10777   ac_status=$?
10778   echo "$as_me:10778: \$? = $ac_status" >&5
10779   (exit $ac_status); }; }; then
10780   break
10781 else
10782   echo "$as_me: failed program was:" >&5
10783 cat conftest.$ac_ext >&5
10784 fi
10785 rm -f conftest.$ac_objext
10786          CC="$CC -n32"
10787          rm -f conftest.$ac_objext
10788 if { (eval echo "$as_me:10788: \"$ac_compile\"") >&5
10789   (eval $ac_compile) 2>&5
10790   ac_status=$?
10791   echo "$as_me:10791: \$? = $ac_status" >&5
10792   (exit $ac_status); } &&
10793          { ac_try='test -s conftest.$ac_objext'
10794   { (eval echo "$as_me:10794: \"$ac_try\"") >&5
10795   (eval $ac_try) 2>&5
10796   ac_status=$?
10797   echo "$as_me:10797: \$? = $ac_status" >&5
10798   (exit $ac_status); }; }; then
10799   ac_cv_sys_largefile_CC=' -n32'; break
10800 else
10801   echo "$as_me: failed program was:" >&5
10802 cat conftest.$ac_ext >&5
10803 fi
10804 rm -f conftest.$ac_objext
10805          break
10806        done
10807        CC=$ac_save_CC
10808        rm -f conftest.$ac_ext
10809     fi
10810 fi
10811 echo "$as_me:10811: result: $ac_cv_sys_largefile_CC" >&5
10812 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10813   if test "$ac_cv_sys_largefile_CC" != no; then
10814     CC=$CC$ac_cv_sys_largefile_CC
10815   fi
10816
10817   echo "$as_me:10817: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10818 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10819 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10820   echo $ECHO_N "(cached) $ECHO_C" >&6
10821 else
10822   while :; do
10823   ac_cv_sys_file_offset_bits=no
10824   cat >conftest.$ac_ext <<_ACEOF
10825 #line 10825 "configure"
10826 #include "confdefs.h"
10827 #include <sys/types.h>
10828  /* Check that off_t can represent 2**63 - 1 correctly.
10829     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10830     since some C++ compilers masquerading as C compilers
10831     incorrectly reject 9223372036854775807.  */
10832 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10833   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10834                        && LARGE_OFF_T % 2147483647 == 1)
10835                       ? 1 : -1];
10836 int
10837 main ()
10838 {
10839
10840   ;
10841   return 0;
10842 }
10843 _ACEOF
10844 rm -f conftest.$ac_objext
10845 if { (eval echo "$as_me:10845: \"$ac_compile\"") >&5
10846   (eval $ac_compile) 2>&5
10847   ac_status=$?
10848   echo "$as_me:10848: \$? = $ac_status" >&5
10849   (exit $ac_status); } &&
10850          { ac_try='test -s conftest.$ac_objext'
10851   { (eval echo "$as_me:10851: \"$ac_try\"") >&5
10852   (eval $ac_try) 2>&5
10853   ac_status=$?
10854   echo "$as_me:10854: \$? = $ac_status" >&5
10855   (exit $ac_status); }; }; then
10856   break
10857 else
10858   echo "$as_me: failed program was:" >&5
10859 cat conftest.$ac_ext >&5
10860 fi
10861 rm -f conftest.$ac_objext conftest.$ac_ext
10862   cat >conftest.$ac_ext <<_ACEOF
10863 #line 10863 "configure"
10864 #include "confdefs.h"
10865 #define _FILE_OFFSET_BITS 64
10866 #include <sys/types.h>
10867  /* Check that off_t can represent 2**63 - 1 correctly.
10868     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10869     since some C++ compilers masquerading as C compilers
10870     incorrectly reject 9223372036854775807.  */
10871 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10872   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10873                        && LARGE_OFF_T % 2147483647 == 1)
10874                       ? 1 : -1];
10875 int
10876 main ()
10877 {
10878
10879   ;
10880   return 0;
10881 }
10882 _ACEOF
10883 rm -f conftest.$ac_objext
10884 if { (eval echo "$as_me:10884: \"$ac_compile\"") >&5
10885   (eval $ac_compile) 2>&5
10886   ac_status=$?
10887   echo "$as_me:10887: \$? = $ac_status" >&5
10888   (exit $ac_status); } &&
10889          { ac_try='test -s conftest.$ac_objext'
10890   { (eval echo "$as_me:10890: \"$ac_try\"") >&5
10891   (eval $ac_try) 2>&5
10892   ac_status=$?
10893   echo "$as_me:10893: \$? = $ac_status" >&5
10894   (exit $ac_status); }; }; then
10895   ac_cv_sys_file_offset_bits=64; break
10896 else
10897   echo "$as_me: failed program was:" >&5
10898 cat conftest.$ac_ext >&5
10899 fi
10900 rm -f conftest.$ac_objext conftest.$ac_ext
10901   break
10902 done
10903 fi
10904 echo "$as_me:10904: result: $ac_cv_sys_file_offset_bits" >&5
10905 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10906 if test "$ac_cv_sys_file_offset_bits" != no; then
10907
10908 cat >>confdefs.h <<EOF
10909 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10910 EOF
10911
10912 fi
10913 rm -rf conftest*
10914   echo "$as_me:10914: checking for _LARGE_FILES value needed for large files" >&5
10915 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10916 if test "${ac_cv_sys_large_files+set}" = set; then
10917   echo $ECHO_N "(cached) $ECHO_C" >&6
10918 else
10919   while :; do
10920   ac_cv_sys_large_files=no
10921   cat >conftest.$ac_ext <<_ACEOF
10922 #line 10922 "configure"
10923 #include "confdefs.h"
10924 #include <sys/types.h>
10925  /* Check that off_t can represent 2**63 - 1 correctly.
10926     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10927     since some C++ compilers masquerading as C compilers
10928     incorrectly reject 9223372036854775807.  */
10929 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10930   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10931                        && LARGE_OFF_T % 2147483647 == 1)
10932                       ? 1 : -1];
10933 int
10934 main ()
10935 {
10936
10937   ;
10938   return 0;
10939 }
10940 _ACEOF
10941 rm -f conftest.$ac_objext
10942 if { (eval echo "$as_me:10942: \"$ac_compile\"") >&5
10943   (eval $ac_compile) 2>&5
10944   ac_status=$?
10945   echo "$as_me:10945: \$? = $ac_status" >&5
10946   (exit $ac_status); } &&
10947          { ac_try='test -s conftest.$ac_objext'
10948   { (eval echo "$as_me:10948: \"$ac_try\"") >&5
10949   (eval $ac_try) 2>&5
10950   ac_status=$?
10951   echo "$as_me:10951: \$? = $ac_status" >&5
10952   (exit $ac_status); }; }; then
10953   break
10954 else
10955   echo "$as_me: failed program was:" >&5
10956 cat conftest.$ac_ext >&5
10957 fi
10958 rm -f conftest.$ac_objext conftest.$ac_ext
10959   cat >conftest.$ac_ext <<_ACEOF
10960 #line 10960 "configure"
10961 #include "confdefs.h"
10962 #define _LARGE_FILES 1
10963 #include <sys/types.h>
10964  /* Check that off_t can represent 2**63 - 1 correctly.
10965     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10966     since some C++ compilers masquerading as C compilers
10967     incorrectly reject 9223372036854775807.  */
10968 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10969   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10970                        && LARGE_OFF_T % 2147483647 == 1)
10971                       ? 1 : -1];
10972 int
10973 main ()
10974 {
10975
10976   ;
10977   return 0;
10978 }
10979 _ACEOF
10980 rm -f conftest.$ac_objext
10981 if { (eval echo "$as_me:10981: \"$ac_compile\"") >&5
10982   (eval $ac_compile) 2>&5
10983   ac_status=$?
10984   echo "$as_me:10984: \$? = $ac_status" >&5
10985   (exit $ac_status); } &&
10986          { ac_try='test -s conftest.$ac_objext'
10987   { (eval echo "$as_me:10987: \"$ac_try\"") >&5
10988   (eval $ac_try) 2>&5
10989   ac_status=$?
10990   echo "$as_me:10990: \$? = $ac_status" >&5
10991   (exit $ac_status); }; }; then
10992   ac_cv_sys_large_files=1; break
10993 else
10994   echo "$as_me: failed program was:" >&5
10995 cat conftest.$ac_ext >&5
10996 fi
10997 rm -f conftest.$ac_objext conftest.$ac_ext
10998   break
10999 done
11000 fi
11001 echo "$as_me:11001: result: $ac_cv_sys_large_files" >&5
11002 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11003 if test "$ac_cv_sys_large_files" != no; then
11004
11005 cat >>confdefs.h <<EOF
11006 #define _LARGE_FILES $ac_cv_sys_large_files
11007 EOF
11008
11009 fi
11010 rm -rf conftest*
11011 fi
11012
11013         if test "$enable_largefile" != no ; then
11014         echo "$as_me:11014: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11015 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11016 if test "${ac_cv_sys_largefile_source+set}" = set; then
11017   echo $ECHO_N "(cached) $ECHO_C" >&6
11018 else
11019   while :; do
11020   ac_cv_sys_largefile_source=no
11021   cat >conftest.$ac_ext <<_ACEOF
11022 #line 11022 "configure"
11023 #include "confdefs.h"
11024 #include <stdio.h>
11025 int
11026 main ()
11027 {
11028 return !fseeko;
11029   ;
11030   return 0;
11031 }
11032 _ACEOF
11033 rm -f conftest.$ac_objext
11034 if { (eval echo "$as_me:11034: \"$ac_compile\"") >&5
11035   (eval $ac_compile) 2>&5
11036   ac_status=$?
11037   echo "$as_me:11037: \$? = $ac_status" >&5
11038   (exit $ac_status); } &&
11039          { ac_try='test -s conftest.$ac_objext'
11040   { (eval echo "$as_me:11040: \"$ac_try\"") >&5
11041   (eval $ac_try) 2>&5
11042   ac_status=$?
11043   echo "$as_me:11043: \$? = $ac_status" >&5
11044   (exit $ac_status); }; }; then
11045   break
11046 else
11047   echo "$as_me: failed program was:" >&5
11048 cat conftest.$ac_ext >&5
11049 fi
11050 rm -f conftest.$ac_objext conftest.$ac_ext
11051   cat >conftest.$ac_ext <<_ACEOF
11052 #line 11052 "configure"
11053 #include "confdefs.h"
11054 #define _LARGEFILE_SOURCE 1
11055 #include <stdio.h>
11056 int
11057 main ()
11058 {
11059 return !fseeko;
11060   ;
11061   return 0;
11062 }
11063 _ACEOF
11064 rm -f conftest.$ac_objext
11065 if { (eval echo "$as_me:11065: \"$ac_compile\"") >&5
11066   (eval $ac_compile) 2>&5
11067   ac_status=$?
11068   echo "$as_me:11068: \$? = $ac_status" >&5
11069   (exit $ac_status); } &&
11070          { ac_try='test -s conftest.$ac_objext'
11071   { (eval echo "$as_me:11071: \"$ac_try\"") >&5
11072   (eval $ac_try) 2>&5
11073   ac_status=$?
11074   echo "$as_me:11074: \$? = $ac_status" >&5
11075   (exit $ac_status); }; }; then
11076   ac_cv_sys_largefile_source=1; break
11077 else
11078   echo "$as_me: failed program was:" >&5
11079 cat conftest.$ac_ext >&5
11080 fi
11081 rm -f conftest.$ac_objext conftest.$ac_ext
11082   break
11083 done
11084 fi
11085 echo "$as_me:11085: result: $ac_cv_sys_largefile_source" >&5
11086 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11087 if test "$ac_cv_sys_largefile_source" != no; then
11088
11089 cat >>confdefs.h <<EOF
11090 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11091 EOF
11092
11093 fi
11094 rm -rf conftest*
11095
11096 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11097 # in glibc 2.1.3, but that breaks too many other things.
11098 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11099 echo "$as_me:11099: checking for fseeko" >&5
11100 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
11101 if test "${ac_cv_func_fseeko+set}" = set; then
11102   echo $ECHO_N "(cached) $ECHO_C" >&6
11103 else
11104   cat >conftest.$ac_ext <<_ACEOF
11105 #line 11105 "configure"
11106 #include "confdefs.h"
11107 #include <stdio.h>
11108 int
11109 main ()
11110 {
11111 return fseeko && fseeko (stdin, 0, 0);
11112   ;
11113   return 0;
11114 }
11115 _ACEOF
11116 rm -f conftest.$ac_objext conftest$ac_exeext
11117 if { (eval echo "$as_me:11117: \"$ac_link\"") >&5
11118   (eval $ac_link) 2>&5
11119   ac_status=$?
11120   echo "$as_me:11120: \$? = $ac_status" >&5
11121   (exit $ac_status); } &&
11122          { ac_try='test -s conftest$ac_exeext'
11123   { (eval echo "$as_me:11123: \"$ac_try\"") >&5
11124   (eval $ac_try) 2>&5
11125   ac_status=$?
11126   echo "$as_me:11126: \$? = $ac_status" >&5
11127   (exit $ac_status); }; }; then
11128   ac_cv_func_fseeko=yes
11129 else
11130   echo "$as_me: failed program was:" >&5
11131 cat conftest.$ac_ext >&5
11132 ac_cv_func_fseeko=no
11133 fi
11134 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11135 fi
11136 echo "$as_me:11136: result: $ac_cv_func_fseeko" >&5
11137 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11138 if test $ac_cv_func_fseeko = yes; then
11139
11140 cat >>confdefs.h <<\EOF
11141 #define HAVE_FSEEKO 1
11142 EOF
11143
11144 fi
11145
11146         # Normally we would collect these definitions in the config.h,
11147         # but (like _XOPEN_SOURCE), some environments rely on having these
11148         # defined before any of the system headers are included.  Another
11149         # case comes up with C++, e.g., on AIX the compiler compiles the
11150         # header files by themselves before looking at the body files it is
11151         # told to compile.  For ncurses, those header files do not include
11152         # the config.h
11153         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11154         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11155         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11156
11157         echo "$as_me:11157: checking whether to use struct dirent64" >&5
11158 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11159 if test "${cf_cv_struct_dirent64+set}" = set; then
11160   echo $ECHO_N "(cached) $ECHO_C" >&6
11161 else
11162
11163                 cat >conftest.$ac_ext <<_ACEOF
11164 #line 11164 "configure"
11165 #include "confdefs.h"
11166
11167 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
11168 #include <sys/types.h>
11169 #include <dirent.h>
11170
11171 int
11172 main ()
11173 {
11174
11175                 /* if transitional largefile support is setup, this is true */
11176                 extern struct dirent64 * readdir(DIR *);
11177                 struct dirent64 *x = readdir((DIR *)0);
11178                 struct dirent *y = readdir((DIR *)0);
11179                 int z = x - y;
11180
11181   ;
11182   return 0;
11183 }
11184 _ACEOF
11185 rm -f conftest.$ac_objext
11186 if { (eval echo "$as_me:11186: \"$ac_compile\"") >&5
11187   (eval $ac_compile) 2>&5
11188   ac_status=$?
11189   echo "$as_me:11189: \$? = $ac_status" >&5
11190   (exit $ac_status); } &&
11191          { ac_try='test -s conftest.$ac_objext'
11192   { (eval echo "$as_me:11192: \"$ac_try\"") >&5
11193   (eval $ac_try) 2>&5
11194   ac_status=$?
11195   echo "$as_me:11195: \$? = $ac_status" >&5
11196   (exit $ac_status); }; }; then
11197   cf_cv_struct_dirent64=yes
11198 else
11199   echo "$as_me: failed program was:" >&5
11200 cat conftest.$ac_ext >&5
11201 cf_cv_struct_dirent64=no
11202 fi
11203 rm -f conftest.$ac_objext conftest.$ac_ext
11204
11205 fi
11206 echo "$as_me:11206: result: $cf_cv_struct_dirent64" >&5
11207 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11208         test "$cf_cv_struct_dirent64" = yes &&
11209 cat >>confdefs.h <<\EOF
11210 #define HAVE_STRUCT_DIRENT64 1
11211 EOF
11212
11213         fi
11214
11215 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
11216 echo "$as_me:11216: checking if you want tparm not to use X/Open fixed-parameter list" >&5
11217 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
11218
11219 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
11220 if test "${enable_tparm_varargs+set}" = set; then
11221   enableval="$enable_tparm_varargs"
11222   with_tparm_varargs=$enableval
11223 else
11224   with_tparm_varargs=yes
11225 fi;
11226 echo "$as_me:11226: result: $with_tparm_varargs" >&5
11227 echo "${ECHO_T}$with_tparm_varargs" >&6
11228 NCURSES_TPARM_VARARGS=0
11229 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
11230
11231 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
11232 if test "$with_ticlib" != no ; then
11233 echo "$as_me:11233: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
11234 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
11235
11236 # Check whether --enable-tic-depends or --disable-tic-depends was given.
11237 if test "${enable_tic_depends+set}" = set; then
11238   enableval="$enable_tic_depends"
11239   with_tic_depends=$enableval
11240 else
11241   with_tic_depends=yes
11242 fi;
11243 echo "$as_me:11243: result: $with_tic_depends" >&5
11244 echo "${ECHO_T}$with_tic_depends" >&6
11245 else
11246         with_tic_depends=no
11247 fi
11248
11249 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
11250 echo "$as_me:11250: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
11251 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
11252
11253 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
11254 if test "${enable_wattr_macros+set}" = set; then
11255   enableval="$enable_wattr_macros"
11256   with_wattr_macros=$enableval
11257 else
11258   with_wattr_macros=yes
11259 fi;
11260 if [ "x$with_wattr_macros" != xyes ]; then
11261         NCURSES_WATTR_MACROS=0
11262         echo "$as_me:11262: result: yes" >&5
11263 echo "${ECHO_T}yes" >&6
11264 else
11265         NCURSES_WATTR_MACROS=1
11266         echo "$as_me:11266: result: no" >&5
11267 echo "${ECHO_T}no" >&6
11268 fi
11269
11270 ###   use option --with-bool to override bool's type
11271 echo "$as_me:11271: checking for type of bool" >&5
11272 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
11273
11274 # Check whether --with-bool or --without-bool was given.
11275 if test "${with_bool+set}" = set; then
11276   withval="$with_bool"
11277   NCURSES_BOOL="$withval"
11278 else
11279   NCURSES_BOOL=auto
11280 fi;
11281 echo "$as_me:11281: result: $NCURSES_BOOL" >&5
11282 echo "${ECHO_T}$NCURSES_BOOL" >&6
11283
11284 echo "$as_me:11284: checking for alternate terminal capabilities file" >&5
11285 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
11286
11287 # Check whether --with-caps or --without-caps was given.
11288 if test "${with_caps+set}" = set; then
11289   withval="$with_caps"
11290   TERMINFO_CAPS=Caps.$withval
11291 else
11292   TERMINFO_CAPS=Caps
11293 fi;
11294 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
11295 echo "$as_me:11295: result: $TERMINFO_CAPS" >&5
11296 echo "${ECHO_T}$TERMINFO_CAPS" >&6
11297
11298 ###   use option --with-chtype to override chtype's type
11299 echo "$as_me:11299: checking for type of chtype" >&5
11300 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11301
11302 # Check whether --with-chtype or --without-chtype was given.
11303 if test "${with_chtype+set}" = set; then
11304   withval="$with_chtype"
11305   NCURSES_CHTYPE="$withval"
11306 else
11307   NCURSES_CHTYPE=$cf_dft_chtype
11308 fi;
11309 echo "$as_me:11309: result: $NCURSES_CHTYPE" >&5
11310 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
11311
11312 ###   use option --with-ospeed to override ospeed's type
11313 echo "$as_me:11313: checking for type of ospeed" >&5
11314 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
11315
11316 # Check whether --with-ospeed or --without-ospeed was given.
11317 if test "${with_ospeed+set}" = set; then
11318   withval="$with_ospeed"
11319   NCURSES_OSPEED="$withval"
11320 else
11321   NCURSES_OSPEED=short
11322 fi;
11323 echo "$as_me:11323: result: $NCURSES_OSPEED" >&5
11324 echo "${ECHO_T}$NCURSES_OSPEED" >&6
11325
11326 ###   use option --with-mmask-t to override mmask_t's type
11327 echo "$as_me:11327: checking for type of mmask_t" >&5
11328 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
11329
11330 # Check whether --with-mmask-t or --without-mmask-t was given.
11331 if test "${with_mmask_t+set}" = set; then
11332   withval="$with_mmask_t"
11333   NCURSES_MMASK_T="$withval"
11334 else
11335   NCURSES_MMASK_T=$cf_dft_mmask_t
11336 fi;
11337 echo "$as_me:11337: result: $NCURSES_MMASK_T" >&5
11338 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
11339
11340 ###   use option --with-ccharw-max to override CCHARW_MAX size
11341 echo "$as_me:11341: checking for size CCHARW_MAX" >&5
11342 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
11343
11344 # Check whether --with-ccharw-max or --without-ccharw-max was given.
11345 if test "${with_ccharw_max+set}" = set; then
11346   withval="$with_ccharw_max"
11347   NCURSES_CCHARW_MAX="$withval"
11348 else
11349   NCURSES_CCHARW_MAX=5
11350 fi;
11351 echo "$as_me:11351: result: $NCURSES_CCHARW_MAX" >&5
11352 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
11353
11354 ###   use option --with-tparm-arg to override tparm's argument type
11355 echo "$as_me:11355: checking for type of tparm args" >&5
11356 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
11357
11358 # Check whether --with-tparm-arg or --without-tparm-arg was given.
11359 if test "${with_tparm_arg+set}" = set; then
11360   withval="$with_tparm_arg"
11361   NCURSES_TPARM_ARG="$withval"
11362 else
11363   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
11364 fi;
11365 echo "$as_me:11365: result: $NCURSES_TPARM_ARG" >&5
11366 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
11367
11368 ### Enable compiling-in rcs id's
11369 echo "$as_me:11369: checking if RCS identifiers should be compiled-in" >&5
11370 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
11371
11372 # Check whether --with-rcs-ids or --without-rcs-ids was given.
11373 if test "${with_rcs_ids+set}" = set; then
11374   withval="$with_rcs_ids"
11375   with_rcs_ids=$withval
11376 else
11377   with_rcs_ids=no
11378 fi;
11379 echo "$as_me:11379: result: $with_rcs_ids" >&5
11380 echo "${ECHO_T}$with_rcs_ids" >&6
11381 test "x$with_rcs_ids" = xyes &&
11382 cat >>confdefs.h <<\EOF
11383 #define USE_RCS_IDS 1
11384 EOF
11385
11386 ###############################################################################
11387
11388 echo "$as_me:11388: checking format of man-pages" >&5
11389 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
11390
11391 # Check whether --with-manpage-format or --without-manpage-format was given.
11392 if test "${with_manpage_format+set}" = set; then
11393   withval="$with_manpage_format"
11394   MANPAGE_FORMAT=$withval
11395 else
11396   MANPAGE_FORMAT=unknown
11397 fi;
11398
11399 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
11400 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
11401
11402 cf_unknown=
11403
11404 case $MANPAGE_FORMAT in
11405 (unknown)
11406         if test -z "$MANPATH" ; then
11407                 MANPATH="/usr/man:/usr/share/man"
11408         fi
11409
11410         # look for the 'date' man-page (it's most likely to be installed!)
11411         MANPAGE_FORMAT=
11412         cf_preform=no
11413         cf_catonly=yes
11414         cf_example=date
11415
11416         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11417         for cf_dir in $MANPATH; do
11418                 test -z "$cf_dir" && cf_dir=/usr/man
11419                 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
11420                 do
11421                         cf_test=`echo $cf_name | sed -e 's/*//'`
11422                         if test "x$cf_test" = "x$cf_name" ; then
11423
11424                                 case "$cf_name" in
11425                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11426                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11427                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11428                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11429                                 esac
11430
11431                                 case "$cf_name" in
11432                                 ($cf_dir/man*)
11433                                         cf_catonly=no
11434                                         ;;
11435                                 ($cf_dir/cat*)
11436                                         cf_preform=yes
11437                                         ;;
11438                                 esac
11439                                 break
11440                         fi
11441
11442                         # if we found a match in either man* or cat*, stop looking
11443                         if test -n "$MANPAGE_FORMAT" ; then
11444                                 cf_found=no
11445                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11446                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11447                                 case "$cf_name" in
11448                                 ($cf_dir/cat*)
11449                                         cf_found=yes
11450                                         ;;
11451                                 esac
11452                                 test $cf_found=yes && break
11453                         fi
11454                 done
11455                 # only check the first directory in $MANPATH where we find manpages
11456                 if test -n "$MANPAGE_FORMAT" ; then
11457                         break
11458                 fi
11459         done
11460         # if we did not find the example, just assume it is normal
11461         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11462         IFS="$ac_save_ifs"
11463         ;;
11464 (*)
11465         for cf_option in $MANPAGE_FORMAT; do
11466         case $cf_option in
11467         (gzip|compress|BSDI|normal|formatted|catonly)
11468                 ;;
11469         (*)
11470                 cf_unknown="$cf_unknown $cf_option"
11471                 ;;
11472         esac
11473         done
11474         ;;
11475 esac
11476
11477 echo "$as_me:11477: result: $MANPAGE_FORMAT" >&5
11478 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11479 if test -n "$cf_unknown" ; then
11480         { echo "$as_me:11480: WARNING: Unexpected manpage-format $cf_unknown" >&5
11481 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11482 fi
11483
11484 echo "$as_me:11484: checking for manpage renaming" >&5
11485 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11486
11487 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11488 if test "${with_manpage_renames+set}" = set; then
11489   withval="$with_manpage_renames"
11490   MANPAGE_RENAMES=$withval
11491 else
11492   MANPAGE_RENAMES=yes
11493 fi;
11494
11495 case ".$MANPAGE_RENAMES" in
11496 (.no)
11497         ;;
11498 (.|.yes)
11499         # Debian 'man' program?
11500         if test -f /etc/debian_version ; then
11501                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11502         else
11503                 MANPAGE_RENAMES=no
11504         fi
11505         ;;
11506 esac
11507
11508 if test "$MANPAGE_RENAMES" != no ; then
11509         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11510                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11511         elif test ! -f $MANPAGE_RENAMES ; then
11512                 { { echo "$as_me:11512: error: not a filename: $MANPAGE_RENAMES" >&5
11513 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11514    { (exit 1); exit 1; }; }
11515         fi
11516
11517         test ! -d man && mkdir man
11518
11519         # Construct a sed-script to perform renaming within man-pages
11520         if test -n "$MANPAGE_RENAMES" ; then
11521                 test ! -d man && mkdir man
11522                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11523         fi
11524 fi
11525
11526 echo "$as_me:11526: result: $MANPAGE_RENAMES" >&5
11527 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11528
11529 echo "$as_me:11529: checking if manpage aliases will be installed" >&5
11530 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11531
11532 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11533 if test "${with_manpage_aliases+set}" = set; then
11534   withval="$with_manpage_aliases"
11535   MANPAGE_ALIASES=$withval
11536 else
11537   MANPAGE_ALIASES=yes
11538 fi;
11539
11540 echo "$as_me:11540: result: $MANPAGE_ALIASES" >&5
11541 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11542
11543 case "x$LN_S" in
11544 (xln*)
11545         cf_use_symlinks=yes
11546         ;;
11547 (*)
11548         cf_use_symlinks=no
11549         ;;
11550 esac
11551
11552 MANPAGE_SYMLINKS=no
11553 if test "$MANPAGE_ALIASES" = yes ; then
11554 echo "$as_me:11554: checking if manpage symlinks should be used" >&5
11555 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11556
11557 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11558 if test "${with_manpage_symlinks+set}" = set; then
11559   withval="$with_manpage_symlinks"
11560   MANPAGE_SYMLINKS=$withval
11561 else
11562   MANPAGE_SYMLINKS=$cf_use_symlinks
11563 fi;
11564
11565 if test "$$cf_use_symlinks" = no; then
11566 if test "$MANPAGE_SYMLINKS" = yes ; then
11567         { echo "$as_me:11567: WARNING: cannot make symlinks" >&5
11568 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11569         MANPAGE_SYMLINKS=no
11570 fi
11571 fi
11572
11573 echo "$as_me:11573: result: $MANPAGE_SYMLINKS" >&5
11574 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11575 fi
11576
11577 echo "$as_me:11577: checking for manpage tbl" >&5
11578 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11579
11580 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11581 if test "${with_manpage_tbl+set}" = set; then
11582   withval="$with_manpage_tbl"
11583   MANPAGE_TBL=$withval
11584 else
11585   MANPAGE_TBL=no
11586 fi;
11587
11588 echo "$as_me:11588: result: $MANPAGE_TBL" >&5
11589 echo "${ECHO_T}$MANPAGE_TBL" >&6
11590
11591 if test "$prefix" = "NONE" ; then
11592         cf_prefix="$ac_default_prefix"
11593 else
11594         cf_prefix="$prefix"
11595 fi
11596
11597 case "$MANPAGE_FORMAT" in
11598 (*catonly*)
11599         cf_format=yes
11600         cf_inboth=no
11601         ;;
11602 (*formatted*)
11603         cf_format=yes
11604         cf_inboth=yes
11605         ;;
11606 (*)
11607         cf_format=no
11608         cf_inboth=no
11609         ;;
11610 esac
11611
11612 test ! -d man && mkdir man
11613
11614 cf_so_strip=
11615 cf_compress=
11616 case "$MANPAGE_FORMAT" in
11617 (*compress*)
11618         cf_so_strip="Z"
11619         cf_compress=compress
11620         ;;
11621 (*gzip*)
11622         cf_so_strip="gz"
11623         cf_compress=gzip
11624         ;;
11625 esac
11626
11627 cf_edit_man=./edit_man.sh
11628 cf_man_alias=`pwd`/man_alias.sed
11629
11630 cat >$cf_edit_man <<CF_EOF
11631 #! $SHELL
11632 # this script is generated by the configure-script CF_MAN_PAGES macro.
11633
11634 prefix="$cf_prefix"
11635 datarootdir="$datarootdir"
11636 datadir="$datadir"
11637
11638 NCURSES_MAJOR="$NCURSES_MAJOR"
11639 NCURSES_MINOR="$NCURSES_MINOR"
11640 NCURSES_PATCH="$NCURSES_PATCH"
11641
11642 NCURSES_OSPEED="$NCURSES_OSPEED"
11643 TERMINFO="$TERMINFO"
11644
11645 INSTALL="$INSTALL"
11646 INSTALL_DATA="$INSTALL_DATA"
11647
11648 transform="$program_transform_name"
11649
11650 TMP=\${TMPDIR:=/tmp}/man\$\$
11651 trap "rm -f \$TMP" 0 1 2 5 15
11652
11653 form=\$1
11654 shift || exit 1
11655
11656 verb=\$1
11657 shift || exit 1
11658
11659 mandir=\$1
11660 shift || exit 1
11661
11662 srcdir=\$1
11663 top_srcdir=\$srcdir/..
11664 shift || exit 1
11665
11666 if test "\$form" = normal ; then
11667         if test "$cf_format" = yes ; then
11668         if test "$cf_inboth" = no ; then
11669                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11670                 exit $?
11671         fi
11672         fi
11673         cf_subdir=\$mandir/man
11674         cf_tables=$MANPAGE_TBL
11675 else
11676         cf_subdir=\$mandir/cat
11677         cf_tables=yes
11678 fi
11679
11680 # process the list of source-files
11681 for i in \$* ; do
11682 case \$i in
11683 (*.orig|*.rej) ;;
11684 (*.[0-9]*)
11685         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11686         if test \$verb = installing ; then
11687         if test ! -d \$cf_subdir\${section} ; then
11688                 mkdir -p \$cf_subdir\$section
11689         fi
11690         fi
11691
11692         # replace variables in man page
11693         if test ! -f $cf_man_alias ; then
11694 cat >>$cf_man_alias <<-CF_EOF2
11695                 s,@DATADIR@,\$datadir,g
11696                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11697                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11698                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11699                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11700                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11701                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11702 CF_EOF
11703
11704         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
11705         do
11706                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11707                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11708 cat >>$cf_edit_man <<-CF_EOF
11709                 s,@$cf_NAME@,$cf_name,g
11710 CF_EOF
11711         done
11712
11713 cat >>$cf_edit_man <<CF_EOF
11714 CF_EOF2
11715                 echo "...made $cf_man_alias"
11716         fi
11717
11718         aliases=
11719         cf_source=\`basename \$i\`
11720         inalias=\$cf_source
11721         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11722         if test ! -f \$inalias ; then
11723                 echo .. skipped \$cf_source
11724                 continue
11725         fi
11726 CF_EOF
11727
11728 if test "$MANPAGE_ALIASES" != no ; then
11729 cat >>$cf_edit_man <<CF_EOF
11730         nCurses=ignore.3x
11731         test $with_curses_h = yes && nCurses=ncurses.3x
11732         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11733 CF_EOF
11734 fi
11735
11736 if test "$MANPAGE_RENAMES" = no ; then
11737 cat >>$cf_edit_man <<CF_EOF
11738         # perform program transformations for section 1 man pages
11739         if test \$section = 1 ; then
11740                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11741         else
11742                 cf_target=\$cf_subdir\${section}/\$cf_source
11743         fi
11744 CF_EOF
11745 else
11746 cat >>$cf_edit_man <<CF_EOF
11747         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11748         if test -z "\$cf_target" ; then
11749                 echo '? missing rename for '\$cf_source
11750                 cf_target="\$cf_source"
11751         fi
11752         cf_target="\$cf_subdir\${section}/\${cf_target}"
11753
11754 CF_EOF
11755 fi
11756
11757 cat >>$cf_edit_man <<CF_EOF
11758         sed     -f $cf_man_alias \\
11759 CF_EOF
11760
11761 if test -f $MANPAGE_RENAMES ; then
11762 cat >>$cf_edit_man <<CF_EOF
11763                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11764 CF_EOF
11765 else
11766 cat >>$cf_edit_man <<CF_EOF
11767                 < \$i >\$TMP
11768 CF_EOF
11769 fi
11770
11771 cat >>$cf_edit_man <<CF_EOF
11772 if test \$cf_tables = yes ; then
11773         tbl \$TMP >\$TMP.out
11774         mv \$TMP.out \$TMP
11775 fi
11776 CF_EOF
11777
11778 if test $with_overwrite != yes ; then
11779 cat >>$cf_edit_man <<CF_EOF
11780         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11781         mv \$TMP.out \$TMP
11782 CF_EOF
11783 fi
11784
11785 if test $with_curses_h != yes ; then
11786 cat >>$cf_edit_man <<CF_EOF
11787         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11788         mv \$TMP.out \$TMP
11789 CF_EOF
11790 fi
11791
11792 cat >>$cf_edit_man <<CF_EOF
11793         if test \$form = format ; then
11794                 nroff -man \$TMP >\$TMP.out
11795                 mv \$TMP.out \$TMP
11796         fi
11797 CF_EOF
11798
11799 if test -n "$cf_compress" ; then
11800 cat >>$cf_edit_man <<CF_EOF
11801         if test \$verb = installing ; then
11802         if ( $cf_compress -f \$TMP )
11803         then
11804                 mv \$TMP.$cf_so_strip \$TMP
11805         fi
11806         fi
11807         cf_target="\$cf_target.$cf_so_strip"
11808 CF_EOF
11809 fi
11810
11811 case "$MANPAGE_FORMAT" in
11812 (*BSDI*)
11813 cat >>$cf_edit_man <<CF_EOF
11814         if test \$form = format ; then
11815                 # BSDI installs only .0 suffixes in the cat directories
11816                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11817         fi
11818 CF_EOF
11819   ;;
11820 esac
11821
11822 cat >>$cf_edit_man <<CF_EOF
11823         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11824         if test \$verb = installing ; then
11825                 echo \$verb \$cf_target
11826                 \$INSTALL_DATA \$TMP \$cf_target
11827                 test -d \$cf_subdir\${section} &&
11828                 test -n "\$aliases" && (
11829                         cd \$cf_subdir\${section} && (
11830                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11831                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11832                                 cf_target=\`basename \$cf_target\`
11833                                 for cf_alias in \$aliases
11834                                 do
11835                                         if test \$section = 1 ; then
11836                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11837                                         fi
11838
11839                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11840                                                 if test -f \$cf_alias\${suffix} ; then
11841                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11842                                                         then
11843                                                                 continue
11844                                                         fi
11845                                                 fi
11846                                                 echo .. \$verb alias \$cf_alias\${suffix}
11847 CF_EOF
11848 case "x$LN_S" in
11849 (*-f)
11850 cat >>$cf_edit_man <<CF_EOF
11851                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11852 CF_EOF
11853         ;;
11854 (*)
11855 cat >>$cf_edit_man <<CF_EOF
11856                                                 rm -f \$cf_alias\${suffix}
11857                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11858 CF_EOF
11859         ;;
11860 esac
11861 cat >>$cf_edit_man <<CF_EOF
11862                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11863                                                 echo ".so \$cf_source" >\$TMP
11864 CF_EOF
11865 if test -n "$cf_compress" ; then
11866 cat >>$cf_edit_man <<CF_EOF
11867                                                 if test -n "$cf_so_strip" ; then
11868                                                         $cf_compress -f \$TMP
11869                                                         mv \$TMP.$cf_so_strip \$TMP
11870                                                 fi
11871 CF_EOF
11872 fi
11873 cat >>$cf_edit_man <<CF_EOF
11874                                                 echo .. \$verb alias \$cf_alias\${suffix}
11875                                                 rm -f \$cf_alias\${suffix}
11876                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11877                                         fi
11878                                 done
11879                         )
11880                 )
11881         elif test \$verb = removing ; then
11882                 test -f \$cf_target && (
11883                         echo \$verb \$cf_target
11884                         rm -f \$cf_target
11885                 )
11886                 test -d \$cf_subdir\${section} &&
11887                 test -n "\$aliases" && (
11888                         cd \$cf_subdir\${section} && (
11889                                 for cf_alias in \$aliases
11890                                 do
11891                                         if test \$section = 1 ; then
11892                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11893                                         fi
11894
11895                                         echo .. \$verb alias \$cf_alias\${suffix}
11896                                         rm -f \$cf_alias\${suffix}
11897                                 done
11898                         )
11899                 )
11900         else
11901 #               echo ".hy 0"
11902                 cat \$TMP
11903         fi
11904         ;;
11905 esac
11906 done
11907
11908 if test $cf_inboth = yes ; then
11909 if test \$form != format ; then
11910         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11911 fi
11912 fi
11913
11914 exit 0
11915 CF_EOF
11916 chmod 755 $cf_edit_man
11917
11918 ###############################################################################
11919
11920 ### Note that some functions (such as const) are normally disabled anyway.
11921 echo "$as_me:11921: checking if you want to build with function extensions" >&5
11922 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11923
11924 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11925 if test "${enable_ext_funcs+set}" = set; then
11926   enableval="$enable_ext_funcs"
11927   with_ext_funcs=$enableval
11928 else
11929   with_ext_funcs=yes
11930 fi;
11931 echo "$as_me:11931: result: $with_ext_funcs" >&5
11932 echo "${ECHO_T}$with_ext_funcs" >&6
11933 if test "x$with_ext_funcs" = xyes ; then
11934         NCURSES_EXT_FUNCS=1
11935
11936 cat >>confdefs.h <<\EOF
11937 #define HAVE_ASSUME_DEFAULT_COLORS 1
11938 EOF
11939
11940 cat >>confdefs.h <<\EOF
11941 #define HAVE_CURSES_VERSION 1
11942 EOF
11943
11944 cat >>confdefs.h <<\EOF
11945 #define HAVE_HAS_KEY 1
11946 EOF
11947
11948 cat >>confdefs.h <<\EOF
11949 #define HAVE_RESIZETERM 1
11950 EOF
11951
11952 cat >>confdefs.h <<\EOF
11953 #define HAVE_RESIZE_TERM 1
11954 EOF
11955
11956 cat >>confdefs.h <<\EOF
11957 #define HAVE_TERM_ENTRY_H 1
11958 EOF
11959
11960 cat >>confdefs.h <<\EOF
11961 #define HAVE_USE_DEFAULT_COLORS 1
11962 EOF
11963
11964 cat >>confdefs.h <<\EOF
11965 #define HAVE_USE_EXTENDED_NAMES 1
11966 EOF
11967
11968 cat >>confdefs.h <<\EOF
11969 #define HAVE_USE_SCREEN 1
11970 EOF
11971
11972 cat >>confdefs.h <<\EOF
11973 #define HAVE_USE_WINDOW 1
11974 EOF
11975
11976 cat >>confdefs.h <<\EOF
11977 #define HAVE_WRESIZE 1
11978 EOF
11979
11980 cat >>confdefs.h <<\EOF
11981 #define NCURSES_EXT_FUNCS 1
11982 EOF
11983
11984         GENERATED_EXT_FUNCS=generated
11985 else
11986         NCURSES_EXT_FUNCS=0
11987         GENERATED_EXT_FUNCS=
11988 fi
11989
11990 echo "$as_me:11990: checking if you want to build with SCREEN extensions" >&5
11991 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
11992
11993 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11994 if test "${enable_sp_funcs+set}" = set; then
11995   enableval="$enable_sp_funcs"
11996   with_sp_funcs=$enableval
11997 else
11998   with_sp_funcs=$cf_dft_ext_spfuncs
11999 fi;
12000 echo "$as_me:12000: result: $with_sp_funcs" >&5
12001 echo "${ECHO_T}$with_sp_funcs" >&6
12002 if test "x$with_sp_funcs" = xyes ; then
12003         NCURSES_SP_FUNCS=1
12004
12005 cat >>confdefs.h <<\EOF
12006 #define NCURSES_SP_FUNCS 1
12007 EOF
12008
12009         GENERATED_SP_FUNCS=generated
12010 else
12011         NCURSES_SP_FUNCS=0
12012         GENERATED_SP_FUNCS=
12013 fi
12014
12015 echo "$as_me:12015: checking if you want to build with terminal-driver" >&5
12016 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
12017
12018 # Check whether --enable-term-driver or --disable-term-driver was given.
12019 if test "${enable_term_driver+set}" = set; then
12020   enableval="$enable_term_driver"
12021   with_term_driver=$enableval
12022 else
12023   with_term_driver=no
12024 fi;
12025 echo "$as_me:12025: result: $with_term_driver" >&5
12026 echo "${ECHO_T}$with_term_driver" >&6
12027 if test "x$with_term_driver" = xyes ; then
12028
12029 cat >>confdefs.h <<\EOF
12030 #define USE_TERM_DRIVER 1
12031 EOF
12032
12033         if test "x$with_termlib" != xno ; then
12034                 { { echo "$as_me:12034: error: The term-driver option conflicts with the termlib option" >&5
12035 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
12036    { (exit 1); exit 1; }; }
12037         fi
12038         if test "x$with_sp_funcs" != xyes ; then
12039                 { { echo "$as_me:12039: error: The term-driver option relies upon sp-funcs" >&5
12040 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
12041    { (exit 1); exit 1; }; }
12042         fi
12043 fi
12044
12045 ###   use option --enable-const to turn on use of const beyond that in XSI.
12046 echo "$as_me:12046: checking for extended use of const keyword" >&5
12047 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
12048
12049 # Check whether --enable-const or --disable-const was given.
12050 if test "${enable_const+set}" = set; then
12051   enableval="$enable_const"
12052   with_ext_const=$enableval
12053 else
12054   with_ext_const=$cf_dft_ext_const
12055 fi;
12056 echo "$as_me:12056: result: $with_ext_const" >&5
12057 echo "${ECHO_T}$with_ext_const" >&6
12058 NCURSES_CONST='/*nothing*/'
12059 if test "x$with_ext_const" = xyes ; then
12060         NCURSES_CONST=const
12061 fi
12062
12063 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
12064 echo "$as_me:12064: checking if you want to use extended colors" >&5
12065 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
12066
12067 # Check whether --enable-ext-colors or --disable-ext-colors was given.
12068 if test "${enable_ext_colors+set}" = set; then
12069   enableval="$enable_ext_colors"
12070   with_ext_colors=$enableval
12071 else
12072   with_ext_colors=$cf_dft_ext_colors
12073 fi;
12074 echo "$as_me:12074: result: $with_ext_colors" >&5
12075 echo "${ECHO_T}$with_ext_colors" >&6
12076 NCURSES_EXT_COLORS=0
12077 if test "x$with_ext_colors" = xyes ; then
12078         if test "x$with_widec" != xyes ; then
12079                 { echo "$as_me:12079: WARNING: This option applies only to wide-character library" >&5
12080 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
12081         else
12082                 # cannot be ABI 5 since it changes sizeof(cchar_t)
12083
12084 if test "${with_abi_version+set}" != set; then
12085         case $cf_cv_rel_version in
12086         (5.*)
12087                 cf_cv_rel_version=6.0
12088                 cf_cv_abi_version=6
12089                 { echo "$as_me:12089: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12090 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12091                 ;;
12092         esac
12093 fi
12094
12095                 NCURSES_EXT_COLORS=1
12096
12097 cat >>confdefs.h <<\EOF
12098 #define NCURSES_EXT_COLORS 1
12099 EOF
12100
12101         fi
12102 fi
12103
12104 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
12105 echo "$as_me:12105: checking if you want to use extended mouse encoding" >&5
12106 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
12107
12108 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
12109 if test "${enable_ext_mouse+set}" = set; then
12110   enableval="$enable_ext_mouse"
12111   with_ext_mouse=$enableval
12112 else
12113   with_ext_mouse=$cf_dft_ext_mouse
12114 fi;
12115 echo "$as_me:12115: result: $with_ext_mouse" >&5
12116 echo "${ECHO_T}$with_ext_mouse" >&6
12117 NCURSES_MOUSE_VERSION=1
12118 if test "x$with_ext_mouse" = xyes ; then
12119         NCURSES_MOUSE_VERSION=2
12120
12121 if test "${with_abi_version+set}" != set; then
12122         case $cf_cv_rel_version in
12123         (5.*)
12124                 cf_cv_rel_version=6.0
12125                 cf_cv_abi_version=6
12126                 { echo "$as_me:12126: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12127 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12128                 ;;
12129         esac
12130 fi
12131
12132 fi
12133
12134 ###   use option --enable-ext-putwin to turn on extended screendumps
12135 echo "$as_me:12135: checking if you want to use extended putwin/screendump" >&5
12136 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
12137
12138 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
12139 if test "${enable_ext_putwin+set}" = set; then
12140   enableval="$enable_ext_putwin"
12141   with_ext_putwin=$enableval
12142 else
12143   with_ext_putwin=$cf_dft_ext_putwin
12144 fi;
12145 echo "$as_me:12145: result: $with_ext_putwin" >&5
12146 echo "${ECHO_T}$with_ext_putwin" >&6
12147 if test "x$with_ext_putwin" = xyes ; then
12148
12149 cat >>confdefs.h <<\EOF
12150 #define NCURSES_EXT_PUTWIN 1
12151 EOF
12152
12153 fi
12154
12155 echo "$as_me:12155: checking if you want \$NCURSES_NO_PADDING code" >&5
12156 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
12157
12158 # Check whether --enable-no-padding or --disable-no-padding was given.
12159 if test "${enable_no_padding+set}" = set; then
12160   enableval="$enable_no_padding"
12161   with_no_padding=$enableval
12162 else
12163   with_no_padding=$with_ext_funcs
12164 fi;
12165 echo "$as_me:12165: result: $with_no_padding" >&5
12166 echo "${ECHO_T}$with_no_padding" >&6
12167 test "x$with_no_padding" = xyes &&
12168 cat >>confdefs.h <<\EOF
12169 #define NCURSES_NO_PADDING 1
12170 EOF
12171
12172 echo "$as_me:12172: checking for ANSI C header files" >&5
12173 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12174 if test "${ac_cv_header_stdc+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 #include <stdlib.h>
12181 #include <stdarg.h>
12182 #include <string.h>
12183 #include <float.h>
12184
12185 _ACEOF
12186 if { (eval echo "$as_me:12186: \"$ac_cpp conftest.$ac_ext\"") >&5
12187   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12188   ac_status=$?
12189   egrep -v '^ *\+' conftest.er1 >conftest.err
12190   rm -f conftest.er1
12191   cat conftest.err >&5
12192   echo "$as_me:12192: \$? = $ac_status" >&5
12193   (exit $ac_status); } >/dev/null; then
12194   if test -s conftest.err; then
12195     ac_cpp_err=$ac_c_preproc_warn_flag
12196   else
12197     ac_cpp_err=
12198   fi
12199 else
12200   ac_cpp_err=yes
12201 fi
12202 if test -z "$ac_cpp_err"; then
12203   ac_cv_header_stdc=yes
12204 else
12205   echo "$as_me: failed program was:" >&5
12206   cat conftest.$ac_ext >&5
12207   ac_cv_header_stdc=no
12208 fi
12209 rm -f conftest.err conftest.$ac_ext
12210
12211 if test $ac_cv_header_stdc = yes; then
12212   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12213   cat >conftest.$ac_ext <<_ACEOF
12214 #line 12214 "configure"
12215 #include "confdefs.h"
12216 #include <string.h>
12217
12218 _ACEOF
12219 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12220   egrep "memchr" >/dev/null 2>&1; then
12221   :
12222 else
12223   ac_cv_header_stdc=no
12224 fi
12225 rm -rf conftest*
12226
12227 fi
12228
12229 if test $ac_cv_header_stdc = yes; then
12230   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12231   cat >conftest.$ac_ext <<_ACEOF
12232 #line 12232 "configure"
12233 #include "confdefs.h"
12234 #include <stdlib.h>
12235
12236 _ACEOF
12237 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12238   egrep "free" >/dev/null 2>&1; then
12239   :
12240 else
12241   ac_cv_header_stdc=no
12242 fi
12243 rm -rf conftest*
12244
12245 fi
12246
12247 if test $ac_cv_header_stdc = yes; then
12248   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12249   if test "$cross_compiling" = yes; then
12250   :
12251 else
12252   cat >conftest.$ac_ext <<_ACEOF
12253 #line 12253 "configure"
12254 #include "confdefs.h"
12255 #include <ctype.h>
12256 #if ((' ' & 0x0FF) == 0x020)
12257 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12258 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12259 #else
12260 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12261                      || ('j' <= (c) && (c) <= 'r') \
12262                      || ('s' <= (c) && (c) <= 'z'))
12263 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12264 #endif
12265
12266 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12267 int
12268 main ()
12269 {
12270   int i;
12271   for (i = 0; i < 256; i++)
12272     if (XOR (islower (i), ISLOWER (i))
12273         || toupper (i) != TOUPPER (i))
12274       $ac_main_return(2);
12275   $ac_main_return (0);
12276 }
12277 _ACEOF
12278 rm -f conftest$ac_exeext
12279 if { (eval echo "$as_me:12279: \"$ac_link\"") >&5
12280   (eval $ac_link) 2>&5
12281   ac_status=$?
12282   echo "$as_me:12282: \$? = $ac_status" >&5
12283   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12284   { (eval echo "$as_me:12284: \"$ac_try\"") >&5
12285   (eval $ac_try) 2>&5
12286   ac_status=$?
12287   echo "$as_me:12287: \$? = $ac_status" >&5
12288   (exit $ac_status); }; }; then
12289   :
12290 else
12291   echo "$as_me: program exited with status $ac_status" >&5
12292 echo "$as_me: failed program was:" >&5
12293 cat conftest.$ac_ext >&5
12294 ac_cv_header_stdc=no
12295 fi
12296 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12297 fi
12298 fi
12299 fi
12300 echo "$as_me:12300: result: $ac_cv_header_stdc" >&5
12301 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12302 if test $ac_cv_header_stdc = yes; then
12303
12304 cat >>confdefs.h <<\EOF
12305 #define STDC_HEADERS 1
12306 EOF
12307
12308 fi
12309
12310 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12311
12312 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12313                   inttypes.h stdint.h unistd.h
12314 do
12315 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12316 echo "$as_me:12316: checking for $ac_header" >&5
12317 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12318 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12319   echo $ECHO_N "(cached) $ECHO_C" >&6
12320 else
12321   cat >conftest.$ac_ext <<_ACEOF
12322 #line 12322 "configure"
12323 #include "confdefs.h"
12324 $ac_includes_default
12325 #include <$ac_header>
12326 _ACEOF
12327 rm -f conftest.$ac_objext
12328 if { (eval echo "$as_me:12328: \"$ac_compile\"") >&5
12329   (eval $ac_compile) 2>&5
12330   ac_status=$?
12331   echo "$as_me:12331: \$? = $ac_status" >&5
12332   (exit $ac_status); } &&
12333          { ac_try='test -s conftest.$ac_objext'
12334   { (eval echo "$as_me:12334: \"$ac_try\"") >&5
12335   (eval $ac_try) 2>&5
12336   ac_status=$?
12337   echo "$as_me:12337: \$? = $ac_status" >&5
12338   (exit $ac_status); }; }; then
12339   eval "$as_ac_Header=yes"
12340 else
12341   echo "$as_me: failed program was:" >&5
12342 cat conftest.$ac_ext >&5
12343 eval "$as_ac_Header=no"
12344 fi
12345 rm -f conftest.$ac_objext conftest.$ac_ext
12346 fi
12347 echo "$as_me:12347: result: `eval echo '${'$as_ac_Header'}'`" >&5
12348 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12349 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12350   cat >>confdefs.h <<EOF
12351 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12352 EOF
12353
12354 fi
12355 done
12356
12357 echo "$as_me:12357: checking for signed char" >&5
12358 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12359 if test "${ac_cv_type_signed_char+set}" = set; then
12360   echo $ECHO_N "(cached) $ECHO_C" >&6
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 if ((signed char *) 0)
12370   return 0;
12371 if (sizeof (signed char))
12372   return 0;
12373   ;
12374   return 0;
12375 }
12376 _ACEOF
12377 rm -f conftest.$ac_objext
12378 if { (eval echo "$as_me:12378: \"$ac_compile\"") >&5
12379   (eval $ac_compile) 2>&5
12380   ac_status=$?
12381   echo "$as_me:12381: \$? = $ac_status" >&5
12382   (exit $ac_status); } &&
12383          { ac_try='test -s conftest.$ac_objext'
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_type_signed_char=yes
12390 else
12391   echo "$as_me: failed program was:" >&5
12392 cat conftest.$ac_ext >&5
12393 ac_cv_type_signed_char=no
12394 fi
12395 rm -f conftest.$ac_objext conftest.$ac_ext
12396 fi
12397 echo "$as_me:12397: result: $ac_cv_type_signed_char" >&5
12398 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12399
12400 echo "$as_me:12400: checking size of signed char" >&5
12401 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12402 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12403   echo $ECHO_N "(cached) $ECHO_C" >&6
12404 else
12405   if test "$ac_cv_type_signed_char" = yes; then
12406   if test "$cross_compiling" = yes; then
12407   # Depending upon the size, compute the lo and hi bounds.
12408 cat >conftest.$ac_ext <<_ACEOF
12409 #line 12409 "configure"
12410 #include "confdefs.h"
12411 $ac_includes_default
12412 int
12413 main ()
12414 {
12415 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12416   ;
12417   return 0;
12418 }
12419 _ACEOF
12420 rm -f conftest.$ac_objext
12421 if { (eval echo "$as_me:12421: \"$ac_compile\"") >&5
12422   (eval $ac_compile) 2>&5
12423   ac_status=$?
12424   echo "$as_me:12424: \$? = $ac_status" >&5
12425   (exit $ac_status); } &&
12426          { ac_try='test -s conftest.$ac_objext'
12427   { (eval echo "$as_me:12427: \"$ac_try\"") >&5
12428   (eval $ac_try) 2>&5
12429   ac_status=$?
12430   echo "$as_me:12430: \$? = $ac_status" >&5
12431   (exit $ac_status); }; }; then
12432   ac_lo=0 ac_mid=0
12433   while :; do
12434     cat >conftest.$ac_ext <<_ACEOF
12435 #line 12435 "configure"
12436 #include "confdefs.h"
12437 $ac_includes_default
12438 int
12439 main ()
12440 {
12441 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12442   ;
12443   return 0;
12444 }
12445 _ACEOF
12446 rm -f conftest.$ac_objext
12447 if { (eval echo "$as_me:12447: \"$ac_compile\"") >&5
12448   (eval $ac_compile) 2>&5
12449   ac_status=$?
12450   echo "$as_me:12450: \$? = $ac_status" >&5
12451   (exit $ac_status); } &&
12452          { ac_try='test -s conftest.$ac_objext'
12453   { (eval echo "$as_me:12453: \"$ac_try\"") >&5
12454   (eval $ac_try) 2>&5
12455   ac_status=$?
12456   echo "$as_me:12456: \$? = $ac_status" >&5
12457   (exit $ac_status); }; }; then
12458   ac_hi=$ac_mid; break
12459 else
12460   echo "$as_me: failed program was:" >&5
12461 cat conftest.$ac_ext >&5
12462 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12463 fi
12464 rm -f conftest.$ac_objext conftest.$ac_ext
12465   done
12466 else
12467   echo "$as_me: failed program was:" >&5
12468 cat conftest.$ac_ext >&5
12469 ac_hi=-1 ac_mid=-1
12470   while :; do
12471     cat >conftest.$ac_ext <<_ACEOF
12472 #line 12472 "configure"
12473 #include "confdefs.h"
12474 $ac_includes_default
12475 int
12476 main ()
12477 {
12478 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12479   ;
12480   return 0;
12481 }
12482 _ACEOF
12483 rm -f conftest.$ac_objext
12484 if { (eval echo "$as_me:12484: \"$ac_compile\"") >&5
12485   (eval $ac_compile) 2>&5
12486   ac_status=$?
12487   echo "$as_me:12487: \$? = $ac_status" >&5
12488   (exit $ac_status); } &&
12489          { ac_try='test -s conftest.$ac_objext'
12490   { (eval echo "$as_me:12490: \"$ac_try\"") >&5
12491   (eval $ac_try) 2>&5
12492   ac_status=$?
12493   echo "$as_me:12493: \$? = $ac_status" >&5
12494   (exit $ac_status); }; }; then
12495   ac_lo=$ac_mid; break
12496 else
12497   echo "$as_me: failed program was:" >&5
12498 cat conftest.$ac_ext >&5
12499 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12500 fi
12501 rm -f conftest.$ac_objext conftest.$ac_ext
12502   done
12503 fi
12504 rm -f conftest.$ac_objext conftest.$ac_ext
12505 # Binary search between lo and hi bounds.
12506 while test "x$ac_lo" != "x$ac_hi"; do
12507   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12508   cat >conftest.$ac_ext <<_ACEOF
12509 #line 12509 "configure"
12510 #include "confdefs.h"
12511 $ac_includes_default
12512 int
12513 main ()
12514 {
12515 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12516   ;
12517   return 0;
12518 }
12519 _ACEOF
12520 rm -f conftest.$ac_objext
12521 if { (eval echo "$as_me:12521: \"$ac_compile\"") >&5
12522   (eval $ac_compile) 2>&5
12523   ac_status=$?
12524   echo "$as_me:12524: \$? = $ac_status" >&5
12525   (exit $ac_status); } &&
12526          { ac_try='test -s conftest.$ac_objext'
12527   { (eval echo "$as_me:12527: \"$ac_try\"") >&5
12528   (eval $ac_try) 2>&5
12529   ac_status=$?
12530   echo "$as_me:12530: \$? = $ac_status" >&5
12531   (exit $ac_status); }; }; then
12532   ac_hi=$ac_mid
12533 else
12534   echo "$as_me: failed program was:" >&5
12535 cat conftest.$ac_ext >&5
12536 ac_lo=`expr $ac_mid + 1`
12537 fi
12538 rm -f conftest.$ac_objext conftest.$ac_ext
12539 done
12540 ac_cv_sizeof_signed_char=$ac_lo
12541 else
12542   if test "$cross_compiling" = yes; then
12543   { { echo "$as_me:12543: error: cannot run test program while cross compiling" >&5
12544 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12545    { (exit 1); exit 1; }; }
12546 else
12547   cat >conftest.$ac_ext <<_ACEOF
12548 #line 12548 "configure"
12549 #include "confdefs.h"
12550 $ac_includes_default
12551 int
12552 main ()
12553 {
12554 FILE *f = fopen ("conftest.val", "w");
12555 if (!f)
12556   $ac_main_return (1);
12557 fprintf (f, "%d", (sizeof (signed char)));
12558 fclose (f);
12559   ;
12560   return 0;
12561 }
12562 _ACEOF
12563 rm -f conftest$ac_exeext
12564 if { (eval echo "$as_me:12564: \"$ac_link\"") >&5
12565   (eval $ac_link) 2>&5
12566   ac_status=$?
12567   echo "$as_me:12567: \$? = $ac_status" >&5
12568   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12569   { (eval echo "$as_me:12569: \"$ac_try\"") >&5
12570   (eval $ac_try) 2>&5
12571   ac_status=$?
12572   echo "$as_me:12572: \$? = $ac_status" >&5
12573   (exit $ac_status); }; }; then
12574   ac_cv_sizeof_signed_char=`cat conftest.val`
12575 else
12576   echo "$as_me: program exited with status $ac_status" >&5
12577 echo "$as_me: failed program was:" >&5
12578 cat conftest.$ac_ext >&5
12579 fi
12580 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12581 fi
12582 fi
12583 rm -f conftest.val
12584 else
12585   ac_cv_sizeof_signed_char=0
12586 fi
12587 fi
12588 echo "$as_me:12588: result: $ac_cv_sizeof_signed_char" >&5
12589 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12590 cat >>confdefs.h <<EOF
12591 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12592 EOF
12593
12594 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12595         NCURSES_SBOOL="signed char"
12596 else
12597         NCURSES_SBOOL="char"
12598 fi
12599 echo "$as_me:12599: checking if you want to use signed Boolean array in term.h" >&5
12600 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12601
12602 # Check whether --enable-signed-char or --disable-signed-char was given.
12603 if test "${enable_signed_char+set}" = set; then
12604   enableval="$enable_signed_char"
12605   with_signed_char=$enableval
12606 else
12607   with_signed_char=no
12608 fi;
12609 echo "$as_me:12609: result: $with_signed_char" >&5
12610 echo "${ECHO_T}$with_signed_char" >&6
12611 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12612
12613 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12614 echo "$as_me:12614: checking if you want SIGWINCH handler" >&5
12615 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12616
12617 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12618 if test "${enable_sigwinch+set}" = set; then
12619   enableval="$enable_sigwinch"
12620   with_sigwinch=$enableval
12621 else
12622   with_sigwinch=$with_ext_funcs
12623 fi;
12624 echo "$as_me:12624: result: $with_sigwinch" >&5
12625 echo "${ECHO_T}$with_sigwinch" >&6
12626 test "x$with_sigwinch" = xyes &&
12627 cat >>confdefs.h <<\EOF
12628 #define USE_SIGWINCH 1
12629 EOF
12630
12631 ###   use option --enable-tcap-names to allow user to define new capabilities
12632 echo "$as_me:12632: checking if you want user-definable terminal capabilities like termcap" >&5
12633 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12634
12635 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12636 if test "${enable_tcap_names+set}" = set; then
12637   enableval="$enable_tcap_names"
12638   with_tcap_names=$enableval
12639 else
12640   with_tcap_names=$with_ext_funcs
12641 fi;
12642 echo "$as_me:12642: result: $with_tcap_names" >&5
12643 echo "${ECHO_T}$with_tcap_names" >&6
12644 NCURSES_XNAMES=0
12645 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12646
12647 ###############################################################################
12648 # These options are relatively safe to experiment with.
12649
12650 echo "$as_me:12650: checking if you want all development code" >&5
12651 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12652
12653 # Check whether --with-develop or --without-develop was given.
12654 if test "${with_develop+set}" = set; then
12655   withval="$with_develop"
12656   with_develop=$withval
12657 else
12658   with_develop=no
12659 fi;
12660 echo "$as_me:12660: result: $with_develop" >&5
12661 echo "${ECHO_T}$with_develop" >&6
12662
12663 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12664 echo "$as_me:12664: checking if you want hard-tabs code" >&5
12665 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12666
12667 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12668 if test "${enable_hard_tabs+set}" = set; then
12669   enableval="$enable_hard_tabs"
12670
12671 else
12672   enable_hard_tabs=$with_develop
12673 fi;
12674 echo "$as_me:12674: result: $enable_hard_tabs" >&5
12675 echo "${ECHO_T}$enable_hard_tabs" >&6
12676 test "x$enable_hard_tabs" = xyes &&
12677 cat >>confdefs.h <<\EOF
12678 #define USE_HARD_TABS 1
12679 EOF
12680
12681 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12682 echo "$as_me:12682: checking if you want limited support for xmc" >&5
12683 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12684
12685 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12686 if test "${enable_xmc_glitch+set}" = set; then
12687   enableval="$enable_xmc_glitch"
12688
12689 else
12690   enable_xmc_glitch=$with_develop
12691 fi;
12692 echo "$as_me:12692: result: $enable_xmc_glitch" >&5
12693 echo "${ECHO_T}$enable_xmc_glitch" >&6
12694 test "x$enable_xmc_glitch" = xyes &&
12695 cat >>confdefs.h <<\EOF
12696 #define USE_XMC_SUPPORT 1
12697 EOF
12698
12699 ###############################################################################
12700 # These are just experimental, probably should not be in a package:
12701
12702 echo "$as_me:12702: checking if you do not want to assume colors are white-on-black" >&5
12703 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12704
12705 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12706 if test "${enable_assumed_color+set}" = set; then
12707   enableval="$enable_assumed_color"
12708   with_assumed_color=$enableval
12709 else
12710   with_assumed_color=yes
12711 fi;
12712 echo "$as_me:12712: result: $with_assumed_color" >&5
12713 echo "${ECHO_T}$with_assumed_color" >&6
12714 test "x$with_assumed_color" = xyes &&
12715 cat >>confdefs.h <<\EOF
12716 #define USE_ASSUMED_COLOR 1
12717 EOF
12718
12719 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12720 echo "$as_me:12720: checking if you want hashmap scrolling-optimization code" >&5
12721 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12722
12723 # Check whether --enable-hashmap or --disable-hashmap was given.
12724 if test "${enable_hashmap+set}" = set; then
12725   enableval="$enable_hashmap"
12726   with_hashmap=$enableval
12727 else
12728   with_hashmap=yes
12729 fi;
12730 echo "$as_me:12730: result: $with_hashmap" >&5
12731 echo "${ECHO_T}$with_hashmap" >&6
12732 test "x$with_hashmap" = xyes &&
12733 cat >>confdefs.h <<\EOF
12734 #define USE_HASHMAP 1
12735 EOF
12736
12737 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12738 echo "$as_me:12738: checking if you want colorfgbg code" >&5
12739 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12740
12741 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12742 if test "${enable_colorfgbg+set}" = set; then
12743   enableval="$enable_colorfgbg"
12744   with_colorfgbg=$enableval
12745 else
12746   with_colorfgbg=no
12747 fi;
12748 echo "$as_me:12748: result: $with_colorfgbg" >&5
12749 echo "${ECHO_T}$with_colorfgbg" >&6
12750 test "x$with_colorfgbg" = xyes &&
12751 cat >>confdefs.h <<\EOF
12752 #define USE_COLORFGBG 1
12753 EOF
12754
12755 ###   use option --enable-interop to turn on use of bindings used for interop
12756 echo "$as_me:12756: checking if you want interop bindings" >&5
12757 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12758
12759 # Check whether --enable-interop or --disable-interop was given.
12760 if test "${enable_interop+set}" = set; then
12761   enableval="$enable_interop"
12762   with_exp_interop=$enableval
12763 else
12764   with_exp_interop=$cf_dft_interop
12765 fi;
12766 echo "$as_me:12766: result: $with_exp_interop" >&5
12767 echo "${ECHO_T}$with_exp_interop" >&6
12768
12769 NCURSES_INTEROP_FUNCS=0
12770 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12771
12772 # This is still experimental (20080329), but should ultimately be moved to
12773 # the script-block --with-normal, etc.
12774
12775 echo "$as_me:12775: checking if you want to link with the pthread library" >&5
12776 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12777
12778 # Check whether --with-pthread or --without-pthread was given.
12779 if test "${with_pthread+set}" = set; then
12780   withval="$with_pthread"
12781   with_pthread=$withval
12782 else
12783   with_pthread=no
12784 fi;
12785 echo "$as_me:12785: result: $with_pthread" >&5
12786 echo "${ECHO_T}$with_pthread" >&6
12787
12788 if test "$with_pthread" != no ; then
12789         echo "$as_me:12789: checking for pthread.h" >&5
12790 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12791 if test "${ac_cv_header_pthread_h+set}" = set; then
12792   echo $ECHO_N "(cached) $ECHO_C" >&6
12793 else
12794   cat >conftest.$ac_ext <<_ACEOF
12795 #line 12795 "configure"
12796 #include "confdefs.h"
12797 #include <pthread.h>
12798 _ACEOF
12799 if { (eval echo "$as_me:12799: \"$ac_cpp conftest.$ac_ext\"") >&5
12800   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12801   ac_status=$?
12802   egrep -v '^ *\+' conftest.er1 >conftest.err
12803   rm -f conftest.er1
12804   cat conftest.err >&5
12805   echo "$as_me:12805: \$? = $ac_status" >&5
12806   (exit $ac_status); } >/dev/null; then
12807   if test -s conftest.err; then
12808     ac_cpp_err=$ac_c_preproc_warn_flag
12809   else
12810     ac_cpp_err=
12811   fi
12812 else
12813   ac_cpp_err=yes
12814 fi
12815 if test -z "$ac_cpp_err"; then
12816   ac_cv_header_pthread_h=yes
12817 else
12818   echo "$as_me: failed program was:" >&5
12819   cat conftest.$ac_ext >&5
12820   ac_cv_header_pthread_h=no
12821 fi
12822 rm -f conftest.err conftest.$ac_ext
12823 fi
12824 echo "$as_me:12824: result: $ac_cv_header_pthread_h" >&5
12825 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12826 if test $ac_cv_header_pthread_h = yes; then
12827
12828 cat >>confdefs.h <<\EOF
12829 #define HAVE_PTHREADS_H 1
12830 EOF
12831
12832         for cf_lib_pthread in pthread c_r
12833         do
12834             echo "$as_me:12834: checking if we can link with the $cf_lib_pthread library" >&5
12835 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12836             cf_save_LIBS="$LIBS"
12837
12838 cf_add_libs="-l$cf_lib_pthread"
12839 # Filter out duplicates - this happens with badly-designed ".pc" files...
12840 for cf_add_1lib in $LIBS
12841 do
12842         for cf_add_2lib in $cf_add_libs
12843         do
12844                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12845                 then
12846                         cf_add_1lib=
12847                         break
12848                 fi
12849         done
12850         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12851 done
12852 LIBS="$cf_add_libs"
12853
12854             cat >conftest.$ac_ext <<_ACEOF
12855 #line 12855 "configure"
12856 #include "confdefs.h"
12857
12858 #include <pthread.h>
12859
12860 int
12861 main ()
12862 {
12863
12864                 int rc = pthread_create(0,0,0,0);
12865                 int r2 = pthread_mutexattr_settype(0, 0);
12866
12867   ;
12868   return 0;
12869 }
12870 _ACEOF
12871 rm -f conftest.$ac_objext conftest$ac_exeext
12872 if { (eval echo "$as_me:12872: \"$ac_link\"") >&5
12873   (eval $ac_link) 2>&5
12874   ac_status=$?
12875   echo "$as_me:12875: \$? = $ac_status" >&5
12876   (exit $ac_status); } &&
12877          { ac_try='test -s conftest$ac_exeext'
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   with_pthread=yes
12884 else
12885   echo "$as_me: failed program was:" >&5
12886 cat conftest.$ac_ext >&5
12887 with_pthread=no
12888 fi
12889 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12890             LIBS="$cf_save_LIBS"
12891             echo "$as_me:12891: result: $with_pthread" >&5
12892 echo "${ECHO_T}$with_pthread" >&6
12893             test "$with_pthread" = yes && break
12894         done
12895
12896         if test "$with_pthread" = yes ; then
12897
12898 cf_add_libs="-l$cf_lib_pthread"
12899 # Filter out duplicates - this happens with badly-designed ".pc" files...
12900 for cf_add_1lib in $LIBS
12901 do
12902         for cf_add_2lib in $cf_add_libs
12903         do
12904                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12905                 then
12906                         cf_add_1lib=
12907                         break
12908                 fi
12909         done
12910         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12911 done
12912 LIBS="$cf_add_libs"
12913
12914 cat >>confdefs.h <<\EOF
12915 #define HAVE_LIBPTHREADS 1
12916 EOF
12917
12918         else
12919             { { echo "$as_me:12919: error: Cannot link with pthread library" >&5
12920 echo "$as_me: error: Cannot link with pthread library" >&2;}
12921    { (exit 1); exit 1; }; }
12922         fi
12923
12924 fi
12925
12926 fi
12927
12928 if test "x$with_pthread" != xno; then
12929         echo "$as_me:12929: checking for pthread_kill" >&5
12930 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12931 if test "${ac_cv_func_pthread_kill+set}" = set; then
12932   echo $ECHO_N "(cached) $ECHO_C" >&6
12933 else
12934   cat >conftest.$ac_ext <<_ACEOF
12935 #line 12935 "configure"
12936 #include "confdefs.h"
12937 /* System header to define __stub macros and hopefully few prototypes,
12938     which can conflict with char pthread_kill (); below.  */
12939 #include <assert.h>
12940 /* Override any gcc2 internal prototype to avoid an error.  */
12941 #ifdef __cplusplus
12942 extern "C"
12943 #endif
12944 /* We use char because int might match the return type of a gcc2
12945    builtin and then its argument prototype would still apply.  */
12946 char pthread_kill ();
12947 char (*f) ();
12948
12949 int
12950 main ()
12951 {
12952 /* The GNU C library defines this for functions which it implements
12953     to always fail with ENOSYS.  Some functions are actually named
12954     something starting with __ and the normal name is an alias.  */
12955 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12956 choke me
12957 #else
12958 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12959 #endif
12960
12961   ;
12962   return 0;
12963 }
12964 _ACEOF
12965 rm -f conftest.$ac_objext conftest$ac_exeext
12966 if { (eval echo "$as_me:12966: \"$ac_link\"") >&5
12967   (eval $ac_link) 2>&5
12968   ac_status=$?
12969   echo "$as_me:12969: \$? = $ac_status" >&5
12970   (exit $ac_status); } &&
12971          { ac_try='test -s conftest$ac_exeext'
12972   { (eval echo "$as_me:12972: \"$ac_try\"") >&5
12973   (eval $ac_try) 2>&5
12974   ac_status=$?
12975   echo "$as_me:12975: \$? = $ac_status" >&5
12976   (exit $ac_status); }; }; then
12977   ac_cv_func_pthread_kill=yes
12978 else
12979   echo "$as_me: failed program was:" >&5
12980 cat conftest.$ac_ext >&5
12981 ac_cv_func_pthread_kill=no
12982 fi
12983 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12984 fi
12985 echo "$as_me:12985: result: $ac_cv_func_pthread_kill" >&5
12986 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12987 if test $ac_cv_func_pthread_kill = yes; then
12988
12989                 echo "$as_me:12989: checking if you want to allow EINTR in wgetch with pthreads" >&5
12990 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12991
12992 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12993 if test "${enable_pthreads_eintr+set}" = set; then
12994   enableval="$enable_pthreads_eintr"
12995   use_pthreads_eintr=$enableval
12996 else
12997   use_pthreads_eintr=no
12998 fi;
12999                 echo "$as_me:12999: result: $use_pthreads_eintr" >&5
13000 echo "${ECHO_T}$use_pthreads_eintr" >&6
13001                 if test "x$use_pthreads_eintr" = xyes ; then
13002
13003 cat >>confdefs.h <<\EOF
13004 #define USE_PTHREADS_EINTR 1
13005 EOF
13006
13007                 fi
13008 fi
13009
13010         echo "$as_me:13010: checking if you want to use weak-symbols for pthreads" >&5
13011 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
13012
13013 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
13014 if test "${enable_weak_symbols+set}" = set; then
13015   enableval="$enable_weak_symbols"
13016   use_weak_symbols=$enableval
13017 else
13018   use_weak_symbols=no
13019 fi;
13020         echo "$as_me:13020: result: $use_weak_symbols" >&5
13021 echo "${ECHO_T}$use_weak_symbols" >&6
13022         if test "x$use_weak_symbols" = xyes ; then
13023
13024 echo "$as_me:13024: checking if $CC supports weak symbols" >&5
13025 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
13026 if test "${cf_cv_weak_symbols+set}" = set; then
13027   echo $ECHO_N "(cached) $ECHO_C" >&6
13028 else
13029
13030 cat >conftest.$ac_ext <<_ACEOF
13031 #line 13031 "configure"
13032 #include "confdefs.h"
13033
13034 #include <stdio.h>
13035 int
13036 main ()
13037 {
13038
13039 #if defined(__GNUC__)
13040 #  if defined __USE_ISOC99
13041 #    define _cat_pragma(exp)    _Pragma(#exp)
13042 #    define _weak_pragma(exp)   _cat_pragma(weak name)
13043 #  else
13044 #    define _weak_pragma(exp)
13045 #  endif
13046 #  define _declare(name)        __extension__ extern __typeof__(name) name
13047 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
13048 #endif
13049
13050 weak_symbol(fopen);
13051
13052   ;
13053   return 0;
13054 }
13055 _ACEOF
13056 rm -f conftest.$ac_objext
13057 if { (eval echo "$as_me:13057: \"$ac_compile\"") >&5
13058   (eval $ac_compile) 2>&5
13059   ac_status=$?
13060   echo "$as_me:13060: \$? = $ac_status" >&5
13061   (exit $ac_status); } &&
13062          { ac_try='test -s conftest.$ac_objext'
13063   { (eval echo "$as_me:13063: \"$ac_try\"") >&5
13064   (eval $ac_try) 2>&5
13065   ac_status=$?
13066   echo "$as_me:13066: \$? = $ac_status" >&5
13067   (exit $ac_status); }; }; then
13068   cf_cv_weak_symbols=yes
13069 else
13070   echo "$as_me: failed program was:" >&5
13071 cat conftest.$ac_ext >&5
13072 cf_cv_weak_symbols=no
13073 fi
13074 rm -f conftest.$ac_objext conftest.$ac_ext
13075
13076 fi
13077 echo "$as_me:13077: result: $cf_cv_weak_symbols" >&5
13078 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
13079
13080         else
13081                 cf_cv_weak_symbols=no
13082         fi
13083
13084         if test "x$cf_cv_weak_symbols" = xyes ; then
13085
13086 cat >>confdefs.h <<\EOF
13087 #define USE_WEAK_SYMBOLS 1
13088 EOF
13089
13090         fi
13091 fi
13092
13093 PTHREAD=
13094 if test "x$with_pthread" = "xyes" ; then
13095
13096 cat >>confdefs.h <<\EOF
13097 #define USE_PTHREADS 1
13098 EOF
13099
13100         enable_reentrant=yes
13101         if test "x$cf_cv_weak_symbols" = xyes ; then
13102                 PTHREAD=-lpthread
13103         fi
13104 fi
13105
13106 # Reentrant code has to be opaque; there's little advantage to making ncurses
13107 # opaque outside of that, so there is no --enable-opaque option.  We can use
13108 # this option without --with-pthreads, but this will be always set for
13109 # pthreads.
13110 echo "$as_me:13110: checking if you want reentrant code" >&5
13111 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
13112
13113 # Check whether --enable-reentrant or --disable-reentrant was given.
13114 if test "${enable_reentrant+set}" = set; then
13115   enableval="$enable_reentrant"
13116   with_reentrant=$enableval
13117 else
13118   with_reentrant=no
13119 fi;
13120 echo "$as_me:13120: result: $with_reentrant" >&5
13121 echo "${ECHO_T}$with_reentrant" >&6
13122 if test "x$with_reentrant" = xyes ; then
13123         cf_cv_enable_reentrant=1
13124         cf_cv_enable_opaque="NCURSES_INTERNALS"
13125         NCURSES_OPAQUE=1
13126         NCURSES_SIZE_T=int
13127         if test "x$cf_cv_weak_symbols" = xyes ; then
13128
13129 # remove pthread library from $LIBS
13130 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
13131
13132 cf_add_libs="-lpthread"
13133 # Filter out duplicates - this happens with badly-designed ".pc" files...
13134 for cf_add_1lib in $TEST_LIBS
13135 do
13136         for cf_add_2lib in $cf_add_libs
13137         do
13138                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13139                 then
13140                         cf_add_1lib=
13141                         break
13142                 fi
13143         done
13144         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13145 done
13146 TEST_LIBS="$cf_add_libs"
13147
13148 cf_add_libs="-lpthread"
13149 # Filter out duplicates - this happens with badly-designed ".pc" files...
13150 for cf_add_1lib in $TEST_LIBS2
13151 do
13152         for cf_add_2lib in $cf_add_libs
13153         do
13154                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13155                 then
13156                         cf_add_1lib=
13157                         break
13158                 fi
13159         done
13160         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13161 done
13162 TEST_LIBS2="$cf_add_libs"
13163
13164         else
13165                 # when not using weak symbols but with_reentrant,
13166                 # add 't' to the library suffix on all platforms
13167                 # except cygwin, where we only do that if ALSO
13168                 # compiling with full thread support.
13169                 case "$host" in
13170                 (*cygwin* | *msys*)
13171                         if test "$with_pthread" = "yes" ; then
13172                                 if test "x$disable_lib_suffixes" = "xno" ; then
13173                                         LIB_SUFFIX="t${LIB_SUFFIX}"
13174                                 fi
13175                         fi ;;
13176                 (*)
13177                         if test "x$disable_lib_suffixes" = "xno" ; then
13178                                 LIB_SUFFIX="t${LIB_SUFFIX}"
13179                         fi
13180                         ;;
13181                 esac
13182         fi
13183
13184 cat >>confdefs.h <<\EOF
13185 #define USE_REENTRANT 1
13186 EOF
13187
13188 if test "${with_abi_version+set}" != set; then
13189         case $cf_cv_rel_version in
13190         (5.*)
13191                 cf_cv_rel_version=6.0
13192                 cf_cv_abi_version=6
13193                 { echo "$as_me:13193: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13194 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13195                 ;;
13196         esac
13197 fi
13198
13199 else
13200         cf_cv_enable_reentrant=0
13201         cf_cv_enable_opaque="NCURSES_OPAQUE"
13202         NCURSES_OPAQUE=0
13203         NCURSES_SIZE_T=short
13204 fi
13205
13206 ### Allow using a different wrap-prefix
13207 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13208         echo "$as_me:13208: checking for prefix used to wrap public variables" >&5
13209 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13210
13211 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13212 if test "${with_wrap_prefix+set}" = set; then
13213   withval="$with_wrap_prefix"
13214   NCURSES_WRAP_PREFIX=$withval
13215 else
13216   NCURSES_WRAP_PREFIX=_nc_
13217 fi;
13218         echo "$as_me:13218: result: $NCURSES_WRAP_PREFIX" >&5
13219 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13220 else
13221         NCURSES_WRAP_PREFIX=_nc_
13222 fi
13223
13224 cat >>confdefs.h <<EOF
13225 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13226 EOF
13227
13228 echo "$as_me:13228: checking if you want experimental safe-sprintf code" >&5
13229 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
13230
13231 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
13232 if test "${enable_safe_sprintf+set}" = set; then
13233   enableval="$enable_safe_sprintf"
13234   with_safe_sprintf=$enableval
13235 else
13236   with_safe_sprintf=no
13237 fi;
13238 echo "$as_me:13238: result: $with_safe_sprintf" >&5
13239 echo "${ECHO_T}$with_safe_sprintf" >&6
13240 test "x$with_safe_sprintf" = xyes &&
13241 cat >>confdefs.h <<\EOF
13242 #define USE_SAFE_SPRINTF 1
13243 EOF
13244
13245 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
13246 # when hashmap is used scroll hints are useless
13247 if test "$with_hashmap" = no ; then
13248 echo "$as_me:13248: checking if you want to experiment without scrolling-hints code" >&5
13249 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
13250
13251 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
13252 if test "${enable_scroll_hints+set}" = set; then
13253   enableval="$enable_scroll_hints"
13254   with_scroll_hints=$enableval
13255 else
13256   with_scroll_hints=yes
13257 fi;
13258 echo "$as_me:13258: result: $with_scroll_hints" >&5
13259 echo "${ECHO_T}$with_scroll_hints" >&6
13260 test "x$with_scroll_hints" = xyes &&
13261 cat >>confdefs.h <<\EOF
13262 #define USE_SCROLL_HINTS 1
13263 EOF
13264
13265 fi
13266
13267 echo "$as_me:13267: checking if you want wgetch-events code" >&5
13268 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
13269
13270 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
13271 if test "${enable_wgetch_events+set}" = set; then
13272   enableval="$enable_wgetch_events"
13273   with_wgetch_events=$enableval
13274 else
13275   with_wgetch_events=no
13276 fi;
13277 echo "$as_me:13277: result: $with_wgetch_events" >&5
13278 echo "${ECHO_T}$with_wgetch_events" >&6
13279 test "x$with_wgetch_events" = xyes &&
13280 cat >>confdefs.h <<\EOF
13281 #define NCURSES_WGETCH_EVENTS 1
13282 EOF
13283
13284 ###############################################################################
13285
13286 ###     use option --disable-echo to suppress full display compiling commands
13287
13288 echo "$as_me:13288: checking if you want to see long compiling messages" >&5
13289 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13290
13291 # Check whether --enable-echo or --disable-echo was given.
13292 if test "${enable_echo+set}" = set; then
13293   enableval="$enable_echo"
13294   test "$enableval" != no && enableval=yes
13295         if test "$enableval" != "yes" ; then
13296
13297         ECHO_LT='--silent'
13298         ECHO_LD='@echo linking $@;'
13299         RULE_CC='@echo compiling $<'
13300         SHOW_CC='@echo compiling $@'
13301         ECHO_CC='@'
13302
13303         else
13304
13305         ECHO_LT=''
13306         ECHO_LD=''
13307         RULE_CC=''
13308         SHOW_CC=''
13309         ECHO_CC=''
13310
13311         fi
13312 else
13313   enableval=yes
13314
13315         ECHO_LT=''
13316         ECHO_LD=''
13317         RULE_CC=''
13318         SHOW_CC=''
13319         ECHO_CC=''
13320
13321 fi;
13322 echo "$as_me:13322: result: $enableval" >&5
13323 echo "${ECHO_T}$enableval" >&6
13324
13325 if test "x$enable_echo" = xyes; then
13326         ECHO_LINK=
13327 else
13328         ECHO_LINK='@ echo linking $@ ... ;'
13329         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
13330         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
13331 fi
13332
13333 ###     use option --enable-warnings to turn on all gcc warnings
13334 echo "$as_me:13334: checking if you want to see compiler warnings" >&5
13335 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13336
13337 # Check whether --enable-warnings or --disable-warnings was given.
13338 if test "${enable_warnings+set}" = set; then
13339   enableval="$enable_warnings"
13340   with_warnings=$enableval
13341 fi;
13342 echo "$as_me:13342: result: $with_warnings" >&5
13343 echo "${ECHO_T}$with_warnings" >&6
13344
13345 if test "x$with_warnings" = "xyes"; then
13346
13347         ADAFLAGS="$ADAFLAGS -gnatg"
13348
13349 INTEL_COMPILER=no
13350
13351 if test "$GCC" = yes ; then
13352         case $host_os in
13353         (linux*|gnu*)
13354                 echo "$as_me:13354: checking if this is really Intel C compiler" >&5
13355 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13356                 cf_save_CFLAGS="$CFLAGS"
13357                 CFLAGS="$CFLAGS -no-gcc"
13358                 cat >conftest.$ac_ext <<_ACEOF
13359 #line 13359 "configure"
13360 #include "confdefs.h"
13361
13362 int
13363 main ()
13364 {
13365
13366 #ifdef __INTEL_COMPILER
13367 #else
13368 make an error
13369 #endif
13370
13371   ;
13372   return 0;
13373 }
13374 _ACEOF
13375 rm -f conftest.$ac_objext
13376 if { (eval echo "$as_me:13376: \"$ac_compile\"") >&5
13377   (eval $ac_compile) 2>&5
13378   ac_status=$?
13379   echo "$as_me:13379: \$? = $ac_status" >&5
13380   (exit $ac_status); } &&
13381          { ac_try='test -s conftest.$ac_objext'
13382   { (eval echo "$as_me:13382: \"$ac_try\"") >&5
13383   (eval $ac_try) 2>&5
13384   ac_status=$?
13385   echo "$as_me:13385: \$? = $ac_status" >&5
13386   (exit $ac_status); }; }; then
13387   INTEL_COMPILER=yes
13388 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13389
13390 else
13391   echo "$as_me: failed program was:" >&5
13392 cat conftest.$ac_ext >&5
13393 fi
13394 rm -f conftest.$ac_objext conftest.$ac_ext
13395                 CFLAGS="$cf_save_CFLAGS"
13396                 echo "$as_me:13396: result: $INTEL_COMPILER" >&5
13397 echo "${ECHO_T}$INTEL_COMPILER" >&6
13398                 ;;
13399         esac
13400 fi
13401
13402 CLANG_COMPILER=no
13403
13404 if test "$GCC" = yes ; then
13405         echo "$as_me:13405: checking if this is really Clang C compiler" >&5
13406 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13407         cf_save_CFLAGS="$CFLAGS"
13408         CFLAGS="$CFLAGS -Qunused-arguments"
13409         cat >conftest.$ac_ext <<_ACEOF
13410 #line 13410 "configure"
13411 #include "confdefs.h"
13412
13413 int
13414 main ()
13415 {
13416
13417 #ifdef __clang__
13418 #else
13419 make an error
13420 #endif
13421
13422   ;
13423   return 0;
13424 }
13425 _ACEOF
13426 rm -f conftest.$ac_objext
13427 if { (eval echo "$as_me:13427: \"$ac_compile\"") >&5
13428   (eval $ac_compile) 2>&5
13429   ac_status=$?
13430   echo "$as_me:13430: \$? = $ac_status" >&5
13431   (exit $ac_status); } &&
13432          { ac_try='test -s conftest.$ac_objext'
13433   { (eval echo "$as_me:13433: \"$ac_try\"") >&5
13434   (eval $ac_try) 2>&5
13435   ac_status=$?
13436   echo "$as_me:13436: \$? = $ac_status" >&5
13437   (exit $ac_status); }; }; then
13438   CLANG_COMPILER=yes
13439 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13440
13441 else
13442   echo "$as_me: failed program was:" >&5
13443 cat conftest.$ac_ext >&5
13444 fi
13445 rm -f conftest.$ac_objext conftest.$ac_ext
13446         CFLAGS="$cf_save_CFLAGS"
13447         echo "$as_me:13447: result: $CLANG_COMPILER" >&5
13448 echo "${ECHO_T}$CLANG_COMPILER" >&6
13449 fi
13450
13451 cat > conftest.$ac_ext <<EOF
13452 #line 13452 "${as_me:-configure}"
13453 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13454 EOF
13455
13456 if test "$INTEL_COMPILER" = yes
13457 then
13458 # The "-wdXXX" options suppress warnings:
13459 # remark #1419: external declaration in primary source file
13460 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13461 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13462 # remark #193: zero used for undefined preprocessing identifier
13463 # remark #593: variable "curs_sb_left_arrow" was set but never used
13464 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13465 # remark #869: parameter "tw" was never referenced
13466 # remark #981: operands are evaluated in unspecified order
13467 # warning #279: controlling expression is constant
13468
13469         { echo "$as_me:13469: checking for $CC warning options..." >&5
13470 echo "$as_me: checking for $CC warning options..." >&6;}
13471         cf_save_CFLAGS="$CFLAGS"
13472         EXTRA_CFLAGS="-Wall"
13473         for cf_opt in \
13474                 wd1419 \
13475                 wd1683 \
13476                 wd1684 \
13477                 wd193 \
13478                 wd593 \
13479                 wd279 \
13480                 wd810 \
13481                 wd869 \
13482                 wd981
13483         do
13484                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13485                 if { (eval echo "$as_me:13485: \"$ac_compile\"") >&5
13486   (eval $ac_compile) 2>&5
13487   ac_status=$?
13488   echo "$as_me:13488: \$? = $ac_status" >&5
13489   (exit $ac_status); }; then
13490                         test -n "$verbose" && echo "$as_me:13490: result: ... -$cf_opt" >&5
13491 echo "${ECHO_T}... -$cf_opt" >&6
13492                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13493                 fi
13494         done
13495         CFLAGS="$cf_save_CFLAGS"
13496
13497 elif test "$GCC" = yes
13498 then
13499         { echo "$as_me:13499: checking for $CC warning options..." >&5
13500 echo "$as_me: checking for $CC warning options..." >&6;}
13501         cf_save_CFLAGS="$CFLAGS"
13502         EXTRA_CFLAGS=
13503         cf_warn_CONST=""
13504         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13505         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13506         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13507         for cf_opt in W Wall \
13508                 Wbad-function-cast \
13509                 Wcast-align \
13510                 Wcast-qual \
13511                 Wdeclaration-after-statement \
13512                 Wextra \
13513                 Winline \
13514                 Wmissing-declarations \
13515                 Wmissing-prototypes \
13516                 Wnested-externs \
13517                 Wpointer-arith \
13518                 Wshadow \
13519                 Wstrict-prototypes \
13520                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13521         do
13522                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13523                 if { (eval echo "$as_me:13523: \"$ac_compile\"") >&5
13524   (eval $ac_compile) 2>&5
13525   ac_status=$?
13526   echo "$as_me:13526: \$? = $ac_status" >&5
13527   (exit $ac_status); }; then
13528                         test -n "$verbose" && echo "$as_me:13528: result: ... -$cf_opt" >&5
13529 echo "${ECHO_T}... -$cf_opt" >&6
13530                         case $cf_opt in
13531                         (Wcast-qual)
13532                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13533                                 ;;
13534                         (Winline)
13535                                 case $GCC_VERSION in
13536                                 ([34].*)
13537                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13538
13539 echo "${as_me:-configure}:13539: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13540
13541                                         continue;;
13542                                 esac
13543                                 ;;
13544                         (Wpointer-arith)
13545                                 case $GCC_VERSION in
13546                                 ([12].*)
13547                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13548
13549 echo "${as_me:-configure}:13549: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13550
13551                                         continue;;
13552                                 esac
13553                                 ;;
13554                         esac
13555                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13556                 fi
13557         done
13558         CFLAGS="$cf_save_CFLAGS"
13559 fi
13560 rm -rf conftest*
13561
13562         if test "x$cf_with_cxx" = xyes ; then
13563
13564 INTEL_CPLUSPLUS=no
13565
13566 if test "$GCC" = yes ; then
13567         case $host_os in
13568         (linux*|gnu*)
13569                 echo "$as_me:13569: checking if this is really Intel C++ compiler" >&5
13570 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13571                 cf_save_CFLAGS="$CXXFLAGS"
13572                 CXXFLAGS="$CXXFLAGS -no-gcc"
13573                 cat >conftest.$ac_ext <<_ACEOF
13574 #line 13574 "configure"
13575 #include "confdefs.h"
13576
13577 int
13578 main ()
13579 {
13580
13581 #ifdef __INTEL_COMPILER
13582 #else
13583 make an error
13584 #endif
13585
13586   ;
13587   return 0;
13588 }
13589 _ACEOF
13590 rm -f conftest.$ac_objext
13591 if { (eval echo "$as_me:13591: \"$ac_compile\"") >&5
13592   (eval $ac_compile) 2>&5
13593   ac_status=$?
13594   echo "$as_me:13594: \$? = $ac_status" >&5
13595   (exit $ac_status); } &&
13596          { ac_try='test -s conftest.$ac_objext'
13597   { (eval echo "$as_me:13597: \"$ac_try\"") >&5
13598   (eval $ac_try) 2>&5
13599   ac_status=$?
13600   echo "$as_me:13600: \$? = $ac_status" >&5
13601   (exit $ac_status); }; }; then
13602   INTEL_CPLUSPLUS=yes
13603 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13604
13605 else
13606   echo "$as_me: failed program was:" >&5
13607 cat conftest.$ac_ext >&5
13608 fi
13609 rm -f conftest.$ac_objext conftest.$ac_ext
13610                 CXXFLAGS="$cf_save_CFLAGS"
13611                 echo "$as_me:13611: result: $INTEL_CPLUSPLUS" >&5
13612 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13613                 ;;
13614         esac
13615 fi
13616
13617 CLANG_CPLUSPLUS=no
13618
13619 if test "$GCC" = yes ; then
13620         echo "$as_me:13620: checking if this is really Clang C++ compiler" >&5
13621 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13622         cf_save_CFLAGS="$CXXFLAGS"
13623         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13624         cat >conftest.$ac_ext <<_ACEOF
13625 #line 13625 "configure"
13626 #include "confdefs.h"
13627
13628 int
13629 main ()
13630 {
13631
13632 #ifdef __clang__
13633 #else
13634 make an error
13635 #endif
13636
13637   ;
13638   return 0;
13639 }
13640 _ACEOF
13641 rm -f conftest.$ac_objext
13642 if { (eval echo "$as_me:13642: \"$ac_compile\"") >&5
13643   (eval $ac_compile) 2>&5
13644   ac_status=$?
13645   echo "$as_me:13645: \$? = $ac_status" >&5
13646   (exit $ac_status); } &&
13647          { ac_try='test -s conftest.$ac_objext'
13648   { (eval echo "$as_me:13648: \"$ac_try\"") >&5
13649   (eval $ac_try) 2>&5
13650   ac_status=$?
13651   echo "$as_me:13651: \$? = $ac_status" >&5
13652   (exit $ac_status); }; }; then
13653   CLANG_CPLUSPLUS=yes
13654 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13655
13656 else
13657   echo "$as_me: failed program was:" >&5
13658 cat conftest.$ac_ext >&5
13659 fi
13660 rm -f conftest.$ac_objext conftest.$ac_ext
13661         CXXFLAGS="$cf_save_CFLAGS"
13662         echo "$as_me:13662: result: $CLANG_CPLUSPLUS" >&5
13663 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13664 fi
13665
13666 ac_ext=cc
13667 ac_cpp='$CXXCPP $CPPFLAGS'
13668 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13669 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13670 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13671 ac_main_return=return
13672
13673 cat > conftest.$ac_ext <<EOF
13674 #line 13674 "configure"
13675 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13676 EOF
13677
13678 if test "$INTEL_CPLUSPLUS" = yes
13679 then
13680 # The "-wdXXX" options suppress warnings:
13681 # remark #1419: external declaration in primary source file
13682 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13683 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13684 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13685 # remark #193: zero used for undefined preprocessing identifier
13686 # remark #593: variable "curs_sb_left_arrow" was set but never used
13687 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13688 # remark #869: parameter "tw" was never referenced
13689 # remark #981: operands are evaluated in unspecified order
13690 # warning #269: invalid format string conversion
13691
13692         { echo "$as_me:13692: checking for $CC warning options..." >&5
13693 echo "$as_me: checking for $CC warning options..." >&6;}
13694         cf_save_CXXFLAGS="$CXXFLAGS"
13695         EXTRA_CXXFLAGS="-Wall"
13696         for cf_opt in \
13697                 wd1419 \
13698                 wd1682 \
13699                 wd1683 \
13700                 wd1684 \
13701                 wd193 \
13702                 wd279 \
13703                 wd593 \
13704                 wd810 \
13705                 wd869 \
13706                 wd981
13707         do
13708                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13709                 if { (eval echo "$as_me:13709: \"$ac_compile\"") >&5
13710   (eval $ac_compile) 2>&5
13711   ac_status=$?
13712   echo "$as_me:13712: \$? = $ac_status" >&5
13713   (exit $ac_status); }; then
13714                         test -n "$verbose" && echo "$as_me:13714: result: ... -$cf_opt" >&5
13715 echo "${ECHO_T}... -$cf_opt" >&6
13716                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13717                 fi
13718         done
13719         CXXFLAGS="$cf_save_CXXFLAGS"
13720
13721 elif test "$GXX" = yes
13722 then
13723         { echo "$as_me:13723: checking for $CXX warning options..." >&5
13724 echo "$as_me: checking for $CXX warning options..." >&6;}
13725         cf_save_CXXFLAGS="$CXXFLAGS"
13726         EXTRA_CXXFLAGS="-W -Wall"
13727         cf_gxx_extra_warnings=""
13728         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13729         case "$GCC_VERSION" in
13730         ([1-2].*)
13731                 ;;
13732         (*)
13733                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13734                 ;;
13735         esac
13736         for cf_opt in \
13737                 Wabi \
13738                 fabi-version=0 \
13739                 Wextra \
13740                 Wignored-qualifiers \
13741                 Wlogical-op \
13742                 Woverloaded-virtual \
13743                 Wsign-promo \
13744                 Wsynth \
13745                 Wold-style-cast \
13746                 Wcast-align \
13747                 Wcast-qual \
13748                 Wpointer-arith \
13749                 Wshadow \
13750                 Wundef $cf_gxx_extra_warnings Wno-unused
13751         do
13752                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13753                 if { (eval echo "$as_me:13753: \"$ac_compile\"") >&5
13754   (eval $ac_compile) 2>&5
13755   ac_status=$?
13756   echo "$as_me:13756: \$? = $ac_status" >&5
13757   (exit $ac_status); }; then
13758                         test -n "$verbose" && echo "$as_me:13758: result: ... -$cf_opt" >&5
13759 echo "${ECHO_T}... -$cf_opt" >&6
13760                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13761                 else
13762                         test -n "$verbose" && echo "$as_me:13762: result: ... no -$cf_opt" >&5
13763 echo "${ECHO_T}... no -$cf_opt" >&6
13764                 fi
13765         done
13766         CXXFLAGS="$cf_save_CXXFLAGS"
13767 fi
13768
13769 rm -rf conftest*
13770 ac_ext=c
13771 ac_cpp='$CPP $CPPFLAGS'
13772 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13773 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13774 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13775 ac_main_return=return
13776
13777         fi
13778 fi
13779
13780 if test "$GCC" = yes
13781 then
13782 cat > conftest.i <<EOF
13783 #ifndef GCC_PRINTF
13784 #define GCC_PRINTF 0
13785 #endif
13786 #ifndef GCC_SCANF
13787 #define GCC_SCANF 0
13788 #endif
13789 #ifndef GCC_NORETURN
13790 #define GCC_NORETURN /* nothing */
13791 #endif
13792 #ifndef GCC_UNUSED
13793 #define GCC_UNUSED /* nothing */
13794 #endif
13795 EOF
13796 if test "$GCC" = yes
13797 then
13798         { echo "$as_me:13798: checking for $CC __attribute__ directives..." >&5
13799 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13800 cat > conftest.$ac_ext <<EOF
13801 #line 13801 "${as_me:-configure}"
13802 #include "confdefs.h"
13803 #include "conftest.h"
13804 #include "conftest.i"
13805 #if     GCC_PRINTF
13806 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13807 #else
13808 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13809 #endif
13810 #if     GCC_SCANF
13811 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13812 #else
13813 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13814 #endif
13815 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13816 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13817 extern void foo(void) GCC_NORETURN;
13818 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13819 EOF
13820         cf_printf_attribute=no
13821         cf_scanf_attribute=no
13822         for cf_attribute in scanf printf unused noreturn
13823         do
13824
13825 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13826
13827                 cf_directive="__attribute__(($cf_attribute))"
13828                 echo "checking for $CC $cf_directive" 1>&5
13829
13830                 case $cf_attribute in
13831                 (printf)
13832                         cf_printf_attribute=yes
13833                         cat >conftest.h <<EOF
13834 #define GCC_$cf_ATTRIBUTE 1
13835 EOF
13836                         ;;
13837                 (scanf)
13838                         cf_scanf_attribute=yes
13839                         cat >conftest.h <<EOF
13840 #define GCC_$cf_ATTRIBUTE 1
13841 EOF
13842                         ;;
13843                 (*)
13844                         cat >conftest.h <<EOF
13845 #define GCC_$cf_ATTRIBUTE $cf_directive
13846 EOF
13847                         ;;
13848                 esac
13849
13850                 if { (eval echo "$as_me:13850: \"$ac_compile\"") >&5
13851   (eval $ac_compile) 2>&5
13852   ac_status=$?
13853   echo "$as_me:13853: \$? = $ac_status" >&5
13854   (exit $ac_status); }; then
13855                         test -n "$verbose" && echo "$as_me:13855: result: ... $cf_attribute" >&5
13856 echo "${ECHO_T}... $cf_attribute" >&6
13857                         cat conftest.h >>confdefs.h
13858                         case $cf_attribute in
13859                         (noreturn)
13860
13861 cat >>confdefs.h <<EOF
13862 #define GCC_NORETURN $cf_directive
13863 EOF
13864
13865                                 ;;
13866                         (printf)
13867                                 cf_value='/* nothing */'
13868                                 if test "$cf_printf_attribute" != no ; then
13869                                         cf_value='__attribute__((format(printf,fmt,var)))'
13870
13871 cat >>confdefs.h <<\EOF
13872 #define GCC_PRINTF 1
13873 EOF
13874
13875                                 fi
13876
13877 cat >>confdefs.h <<EOF
13878 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13879 EOF
13880
13881                                 ;;
13882                         (scanf)
13883                                 cf_value='/* nothing */'
13884                                 if test "$cf_scanf_attribute" != no ; then
13885                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13886
13887 cat >>confdefs.h <<\EOF
13888 #define GCC_SCANF 1
13889 EOF
13890
13891                                 fi
13892
13893 cat >>confdefs.h <<EOF
13894 #define GCC_SCANFLIKE(fmt,var) $cf_value
13895 EOF
13896
13897                                 ;;
13898                         (unused)
13899
13900 cat >>confdefs.h <<EOF
13901 #define GCC_UNUSED $cf_directive
13902 EOF
13903
13904                                 ;;
13905                         esac
13906                 fi
13907         done
13908 else
13909         fgrep define conftest.i >>confdefs.h
13910 fi
13911 rm -rf conftest*
13912 fi
13913
13914 echo "$as_me:13914: checking if you want to work around bogus compiler/loader warnings" >&5
13915 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13916
13917 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13918 if test "${enable_string_hacks+set}" = set; then
13919   enableval="$enable_string_hacks"
13920   with_string_hacks=$enableval
13921 else
13922   with_string_hacks=no
13923 fi;
13924 echo "$as_me:13924: result: $with_string_hacks" >&5
13925 echo "${ECHO_T}$with_string_hacks" >&6
13926
13927 if test "x$with_string_hacks" = "xyes"; then
13928
13929 cat >>confdefs.h <<\EOF
13930 #define USE_STRING_HACKS 1
13931 EOF
13932
13933         { echo "$as_me:13933: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13934 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13935         echo "$as_me:13935: checking for strlcat" >&5
13936 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
13937 if test "${ac_cv_func_strlcat+set}" = set; then
13938   echo $ECHO_N "(cached) $ECHO_C" >&6
13939 else
13940   cat >conftest.$ac_ext <<_ACEOF
13941 #line 13941 "configure"
13942 #include "confdefs.h"
13943 /* System header to define __stub macros and hopefully few prototypes,
13944     which can conflict with char strlcat (); below.  */
13945 #include <assert.h>
13946 /* Override any gcc2 internal prototype to avoid an error.  */
13947 #ifdef __cplusplus
13948 extern "C"
13949 #endif
13950 /* We use char because int might match the return type of a gcc2
13951    builtin and then its argument prototype would still apply.  */
13952 char strlcat ();
13953 char (*f) ();
13954
13955 int
13956 main ()
13957 {
13958 /* The GNU C library defines this for functions which it implements
13959     to always fail with ENOSYS.  Some functions are actually named
13960     something starting with __ and the normal name is an alias.  */
13961 #if defined (__stub_strlcat) || defined (__stub___strlcat)
13962 choke me
13963 #else
13964 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13965 #endif
13966
13967   ;
13968   return 0;
13969 }
13970 _ACEOF
13971 rm -f conftest.$ac_objext conftest$ac_exeext
13972 if { (eval echo "$as_me:13972: \"$ac_link\"") >&5
13973   (eval $ac_link) 2>&5
13974   ac_status=$?
13975   echo "$as_me:13975: \$? = $ac_status" >&5
13976   (exit $ac_status); } &&
13977          { ac_try='test -s conftest$ac_exeext'
13978   { (eval echo "$as_me:13978: \"$ac_try\"") >&5
13979   (eval $ac_try) 2>&5
13980   ac_status=$?
13981   echo "$as_me:13981: \$? = $ac_status" >&5
13982   (exit $ac_status); }; }; then
13983   ac_cv_func_strlcat=yes
13984 else
13985   echo "$as_me: failed program was:" >&5
13986 cat conftest.$ac_ext >&5
13987 ac_cv_func_strlcat=no
13988 fi
13989 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13990 fi
13991 echo "$as_me:13991: result: $ac_cv_func_strlcat" >&5
13992 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
13993 if test $ac_cv_func_strlcat = yes; then
13994
13995 cat >>confdefs.h <<\EOF
13996 #define HAVE_STRLCAT 1
13997 EOF
13998
13999 else
14000
14001                 echo "$as_me:14001: checking for strlcat in -lbsd" >&5
14002 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
14003 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
14004   echo $ECHO_N "(cached) $ECHO_C" >&6
14005 else
14006   ac_check_lib_save_LIBS=$LIBS
14007 LIBS="-lbsd  $LIBS"
14008 cat >conftest.$ac_ext <<_ACEOF
14009 #line 14009 "configure"
14010 #include "confdefs.h"
14011
14012 /* Override any gcc2 internal prototype to avoid an error.  */
14013 #ifdef __cplusplus
14014 extern "C"
14015 #endif
14016 /* We use char because int might match the return type of a gcc2
14017    builtin and then its argument prototype would still apply.  */
14018 char strlcat ();
14019 int
14020 main ()
14021 {
14022 strlcat ();
14023   ;
14024   return 0;
14025 }
14026 _ACEOF
14027 rm -f conftest.$ac_objext conftest$ac_exeext
14028 if { (eval echo "$as_me:14028: \"$ac_link\"") >&5
14029   (eval $ac_link) 2>&5
14030   ac_status=$?
14031   echo "$as_me:14031: \$? = $ac_status" >&5
14032   (exit $ac_status); } &&
14033          { ac_try='test -s conftest$ac_exeext'
14034   { (eval echo "$as_me:14034: \"$ac_try\"") >&5
14035   (eval $ac_try) 2>&5
14036   ac_status=$?
14037   echo "$as_me:14037: \$? = $ac_status" >&5
14038   (exit $ac_status); }; }; then
14039   ac_cv_lib_bsd_strlcat=yes
14040 else
14041   echo "$as_me: failed program was:" >&5
14042 cat conftest.$ac_ext >&5
14043 ac_cv_lib_bsd_strlcat=no
14044 fi
14045 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14046 LIBS=$ac_check_lib_save_LIBS
14047 fi
14048 echo "$as_me:14048: result: $ac_cv_lib_bsd_strlcat" >&5
14049 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
14050 if test $ac_cv_lib_bsd_strlcat = yes; then
14051
14052 cf_add_libs="-lbsd"
14053 # Filter out duplicates - this happens with badly-designed ".pc" files...
14054 for cf_add_1lib in $LIBS
14055 do
14056         for cf_add_2lib in $cf_add_libs
14057         do
14058                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14059                 then
14060                         cf_add_1lib=
14061                         break
14062                 fi
14063         done
14064         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14065 done
14066 LIBS="$cf_add_libs"
14067
14068 for ac_header in bsd/string.h
14069 do
14070 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14071 echo "$as_me:14071: checking for $ac_header" >&5
14072 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14073 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14074   echo $ECHO_N "(cached) $ECHO_C" >&6
14075 else
14076   cat >conftest.$ac_ext <<_ACEOF
14077 #line 14077 "configure"
14078 #include "confdefs.h"
14079 #include <$ac_header>
14080 _ACEOF
14081 if { (eval echo "$as_me:14081: \"$ac_cpp conftest.$ac_ext\"") >&5
14082   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14083   ac_status=$?
14084   egrep -v '^ *\+' conftest.er1 >conftest.err
14085   rm -f conftest.er1
14086   cat conftest.err >&5
14087   echo "$as_me:14087: \$? = $ac_status" >&5
14088   (exit $ac_status); } >/dev/null; then
14089   if test -s conftest.err; then
14090     ac_cpp_err=$ac_c_preproc_warn_flag
14091   else
14092     ac_cpp_err=
14093   fi
14094 else
14095   ac_cpp_err=yes
14096 fi
14097 if test -z "$ac_cpp_err"; then
14098   eval "$as_ac_Header=yes"
14099 else
14100   echo "$as_me: failed program was:" >&5
14101   cat conftest.$ac_ext >&5
14102   eval "$as_ac_Header=no"
14103 fi
14104 rm -f conftest.err conftest.$ac_ext
14105 fi
14106 echo "$as_me:14106: result: `eval echo '${'$as_ac_Header'}'`" >&5
14107 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14108 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14109   cat >>confdefs.h <<EOF
14110 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14111 EOF
14112
14113 fi
14114 done
14115
14116 cat >>confdefs.h <<\EOF
14117 #define HAVE_STRLCAT 1
14118 EOF
14119
14120 fi
14121
14122 fi
14123
14124 for ac_func in strlcpy snprintf
14125 do
14126 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14127 echo "$as_me:14127: checking for $ac_func" >&5
14128 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14129 if eval "test \"\${$as_ac_var+set}\" = set"; then
14130   echo $ECHO_N "(cached) $ECHO_C" >&6
14131 else
14132   cat >conftest.$ac_ext <<_ACEOF
14133 #line 14133 "configure"
14134 #include "confdefs.h"
14135 /* System header to define __stub macros and hopefully few prototypes,
14136     which can conflict with char $ac_func (); below.  */
14137 #include <assert.h>
14138 /* Override any gcc2 internal prototype to avoid an error.  */
14139 #ifdef __cplusplus
14140 extern "C"
14141 #endif
14142 /* We use char because int might match the return type of a gcc2
14143    builtin and then its argument prototype would still apply.  */
14144 char $ac_func ();
14145 char (*f) ();
14146
14147 int
14148 main ()
14149 {
14150 /* The GNU C library defines this for functions which it implements
14151     to always fail with ENOSYS.  Some functions are actually named
14152     something starting with __ and the normal name is an alias.  */
14153 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14154 choke me
14155 #else
14156 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14157 #endif
14158
14159   ;
14160   return 0;
14161 }
14162 _ACEOF
14163 rm -f conftest.$ac_objext conftest$ac_exeext
14164 if { (eval echo "$as_me:14164: \"$ac_link\"") >&5
14165   (eval $ac_link) 2>&5
14166   ac_status=$?
14167   echo "$as_me:14167: \$? = $ac_status" >&5
14168   (exit $ac_status); } &&
14169          { ac_try='test -s conftest$ac_exeext'
14170   { (eval echo "$as_me:14170: \"$ac_try\"") >&5
14171   (eval $ac_try) 2>&5
14172   ac_status=$?
14173   echo "$as_me:14173: \$? = $ac_status" >&5
14174   (exit $ac_status); }; }; then
14175   eval "$as_ac_var=yes"
14176 else
14177   echo "$as_me: failed program was:" >&5
14178 cat conftest.$ac_ext >&5
14179 eval "$as_ac_var=no"
14180 fi
14181 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14182 fi
14183 echo "$as_me:14183: result: `eval echo '${'$as_ac_var'}'`" >&5
14184 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14185 if test `eval echo '${'$as_ac_var'}'` = yes; then
14186   cat >>confdefs.h <<EOF
14187 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14188 EOF
14189
14190 fi
14191 done
14192
14193 fi
14194
14195 ###     use option --enable-assertions to turn on generation of assertion code
14196 echo "$as_me:14196: checking if you want to enable runtime assertions" >&5
14197 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
14198
14199 # Check whether --enable-assertions or --disable-assertions was given.
14200 if test "${enable_assertions+set}" = set; then
14201   enableval="$enable_assertions"
14202   with_assertions=$enableval
14203 else
14204   with_assertions=no
14205 fi;
14206 echo "$as_me:14206: result: $with_assertions" >&5
14207 echo "${ECHO_T}$with_assertions" >&6
14208 if test -n "$GCC"
14209 then
14210         if test "$with_assertions" = no
14211         then
14212                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
14213         else
14214
14215         ADAFLAGS="$ADAFLAGS -gnata"
14216
14217         fi
14218 fi
14219
14220 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
14221
14222 echo "$as_me:14222: checking if you want to use dmalloc for testing" >&5
14223 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
14224
14225 # Check whether --with-dmalloc or --without-dmalloc was given.
14226 if test "${with_dmalloc+set}" = set; then
14227   withval="$with_dmalloc"
14228
14229 cat >>confdefs.h <<EOF
14230 #define USE_DMALLOC 1
14231 EOF
14232
14233         : ${with_cflags:=-g}
14234         : ${with_no_leaks:=yes}
14235          with_dmalloc=yes
14236 else
14237   with_dmalloc=
14238 fi;
14239 echo "$as_me:14239: result: ${with_dmalloc:-no}" >&5
14240 echo "${ECHO_T}${with_dmalloc:-no}" >&6
14241
14242 case .$with_cflags in
14243 (.*-g*)
14244         case .$CFLAGS in
14245         (.*-g*)
14246                 ;;
14247         (*)
14248
14249 cf_fix_cppflags=no
14250 cf_new_cflags=
14251 cf_new_cppflags=
14252 cf_new_extra_cppflags=
14253
14254 for cf_add_cflags in -g
14255 do
14256 case $cf_fix_cppflags in
14257 (no)
14258         case $cf_add_cflags in
14259         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14260                 case $cf_add_cflags in
14261                 (-D*)
14262                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14263
14264                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14265                                 && test -z "${cf_tst_cflags}" \
14266                                 && cf_fix_cppflags=yes
14267
14268                         if test $cf_fix_cppflags = yes ; then
14269                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14270                                 continue
14271                         elif test "${cf_tst_cflags}" = "\"'" ; then
14272                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14273                                 continue
14274                         fi
14275                         ;;
14276                 esac
14277                 case "$CPPFLAGS" in
14278                 (*$cf_add_cflags)
14279                         ;;
14280                 (*)
14281                         case $cf_add_cflags in
14282                         (-D*)
14283                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14284
14285 CPPFLAGS=`echo "$CPPFLAGS" | \
14286         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14287                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14288
14289                                 ;;
14290                         esac
14291                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14292                         ;;
14293                 esac
14294                 ;;
14295         (*)
14296                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14297                 ;;
14298         esac
14299         ;;
14300 (yes)
14301         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14302
14303         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14304
14305         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14306                 && test -z "${cf_tst_cflags}" \
14307                 && cf_fix_cppflags=no
14308         ;;
14309 esac
14310 done
14311
14312 if test -n "$cf_new_cflags" ; then
14313
14314         CFLAGS="$CFLAGS $cf_new_cflags"
14315 fi
14316
14317 if test -n "$cf_new_cppflags" ; then
14318
14319         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14320 fi
14321
14322 if test -n "$cf_new_extra_cppflags" ; then
14323
14324         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14325 fi
14326
14327                 ;;
14328         esac
14329         ;;
14330 esac
14331
14332 if test "$with_dmalloc" = yes ; then
14333         echo "$as_me:14333: checking for dmalloc.h" >&5
14334 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
14335 if test "${ac_cv_header_dmalloc_h+set}" = set; then
14336   echo $ECHO_N "(cached) $ECHO_C" >&6
14337 else
14338   cat >conftest.$ac_ext <<_ACEOF
14339 #line 14339 "configure"
14340 #include "confdefs.h"
14341 #include <dmalloc.h>
14342 _ACEOF
14343 if { (eval echo "$as_me:14343: \"$ac_cpp conftest.$ac_ext\"") >&5
14344   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14345   ac_status=$?
14346   egrep -v '^ *\+' conftest.er1 >conftest.err
14347   rm -f conftest.er1
14348   cat conftest.err >&5
14349   echo "$as_me:14349: \$? = $ac_status" >&5
14350   (exit $ac_status); } >/dev/null; then
14351   if test -s conftest.err; then
14352     ac_cpp_err=$ac_c_preproc_warn_flag
14353   else
14354     ac_cpp_err=
14355   fi
14356 else
14357   ac_cpp_err=yes
14358 fi
14359 if test -z "$ac_cpp_err"; then
14360   ac_cv_header_dmalloc_h=yes
14361 else
14362   echo "$as_me: failed program was:" >&5
14363   cat conftest.$ac_ext >&5
14364   ac_cv_header_dmalloc_h=no
14365 fi
14366 rm -f conftest.err conftest.$ac_ext
14367 fi
14368 echo "$as_me:14368: result: $ac_cv_header_dmalloc_h" >&5
14369 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
14370 if test $ac_cv_header_dmalloc_h = yes; then
14371
14372 echo "$as_me:14372: checking for dmalloc_debug in -ldmalloc" >&5
14373 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
14374 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
14375   echo $ECHO_N "(cached) $ECHO_C" >&6
14376 else
14377   ac_check_lib_save_LIBS=$LIBS
14378 LIBS="-ldmalloc  $LIBS"
14379 cat >conftest.$ac_ext <<_ACEOF
14380 #line 14380 "configure"
14381 #include "confdefs.h"
14382
14383 /* Override any gcc2 internal prototype to avoid an error.  */
14384 #ifdef __cplusplus
14385 extern "C"
14386 #endif
14387 /* We use char because int might match the return type of a gcc2
14388    builtin and then its argument prototype would still apply.  */
14389 char dmalloc_debug ();
14390 int
14391 main ()
14392 {
14393 dmalloc_debug ();
14394   ;
14395   return 0;
14396 }
14397 _ACEOF
14398 rm -f conftest.$ac_objext conftest$ac_exeext
14399 if { (eval echo "$as_me:14399: \"$ac_link\"") >&5
14400   (eval $ac_link) 2>&5
14401   ac_status=$?
14402   echo "$as_me:14402: \$? = $ac_status" >&5
14403   (exit $ac_status); } &&
14404          { ac_try='test -s conftest$ac_exeext'
14405   { (eval echo "$as_me:14405: \"$ac_try\"") >&5
14406   (eval $ac_try) 2>&5
14407   ac_status=$?
14408   echo "$as_me:14408: \$? = $ac_status" >&5
14409   (exit $ac_status); }; }; then
14410   ac_cv_lib_dmalloc_dmalloc_debug=yes
14411 else
14412   echo "$as_me: failed program was:" >&5
14413 cat conftest.$ac_ext >&5
14414 ac_cv_lib_dmalloc_dmalloc_debug=no
14415 fi
14416 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14417 LIBS=$ac_check_lib_save_LIBS
14418 fi
14419 echo "$as_me:14419: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
14420 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
14421 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
14422   cat >>confdefs.h <<EOF
14423 #define HAVE_LIBDMALLOC 1
14424 EOF
14425
14426   LIBS="-ldmalloc $LIBS"
14427
14428 fi
14429
14430 fi
14431
14432 fi
14433
14434 echo "$as_me:14434: checking if you want to use dbmalloc for testing" >&5
14435 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
14436
14437 # Check whether --with-dbmalloc or --without-dbmalloc was given.
14438 if test "${with_dbmalloc+set}" = set; then
14439   withval="$with_dbmalloc"
14440
14441 cat >>confdefs.h <<EOF
14442 #define USE_DBMALLOC 1
14443 EOF
14444
14445         : ${with_cflags:=-g}
14446         : ${with_no_leaks:=yes}
14447          with_dbmalloc=yes
14448 else
14449   with_dbmalloc=
14450 fi;
14451 echo "$as_me:14451: result: ${with_dbmalloc:-no}" >&5
14452 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
14453
14454 case .$with_cflags in
14455 (.*-g*)
14456         case .$CFLAGS in
14457         (.*-g*)
14458                 ;;
14459         (*)
14460
14461 cf_fix_cppflags=no
14462 cf_new_cflags=
14463 cf_new_cppflags=
14464 cf_new_extra_cppflags=
14465
14466 for cf_add_cflags in -g
14467 do
14468 case $cf_fix_cppflags in
14469 (no)
14470         case $cf_add_cflags in
14471         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14472                 case $cf_add_cflags in
14473                 (-D*)
14474                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14475
14476                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14477                                 && test -z "${cf_tst_cflags}" \
14478                                 && cf_fix_cppflags=yes
14479
14480                         if test $cf_fix_cppflags = yes ; then
14481                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14482                                 continue
14483                         elif test "${cf_tst_cflags}" = "\"'" ; then
14484                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14485                                 continue
14486                         fi
14487                         ;;
14488                 esac
14489                 case "$CPPFLAGS" in
14490                 (*$cf_add_cflags)
14491                         ;;
14492                 (*)
14493                         case $cf_add_cflags in
14494                         (-D*)
14495                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14496
14497 CPPFLAGS=`echo "$CPPFLAGS" | \
14498         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14499                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14500
14501                                 ;;
14502                         esac
14503                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14504                         ;;
14505                 esac
14506                 ;;
14507         (*)
14508                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14509                 ;;
14510         esac
14511         ;;
14512 (yes)
14513         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14514
14515         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14516
14517         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14518                 && test -z "${cf_tst_cflags}" \
14519                 && cf_fix_cppflags=no
14520         ;;
14521 esac
14522 done
14523
14524 if test -n "$cf_new_cflags" ; then
14525
14526         CFLAGS="$CFLAGS $cf_new_cflags"
14527 fi
14528
14529 if test -n "$cf_new_cppflags" ; then
14530
14531         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14532 fi
14533
14534 if test -n "$cf_new_extra_cppflags" ; then
14535
14536         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14537 fi
14538
14539                 ;;
14540         esac
14541         ;;
14542 esac
14543
14544 if test "$with_dbmalloc" = yes ; then
14545         echo "$as_me:14545: checking for dbmalloc.h" >&5
14546 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
14547 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
14548   echo $ECHO_N "(cached) $ECHO_C" >&6
14549 else
14550   cat >conftest.$ac_ext <<_ACEOF
14551 #line 14551 "configure"
14552 #include "confdefs.h"
14553 #include <dbmalloc.h>
14554 _ACEOF
14555 if { (eval echo "$as_me:14555: \"$ac_cpp conftest.$ac_ext\"") >&5
14556   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14557   ac_status=$?
14558   egrep -v '^ *\+' conftest.er1 >conftest.err
14559   rm -f conftest.er1
14560   cat conftest.err >&5
14561   echo "$as_me:14561: \$? = $ac_status" >&5
14562   (exit $ac_status); } >/dev/null; then
14563   if test -s conftest.err; then
14564     ac_cpp_err=$ac_c_preproc_warn_flag
14565   else
14566     ac_cpp_err=
14567   fi
14568 else
14569   ac_cpp_err=yes
14570 fi
14571 if test -z "$ac_cpp_err"; then
14572   ac_cv_header_dbmalloc_h=yes
14573 else
14574   echo "$as_me: failed program was:" >&5
14575   cat conftest.$ac_ext >&5
14576   ac_cv_header_dbmalloc_h=no
14577 fi
14578 rm -f conftest.err conftest.$ac_ext
14579 fi
14580 echo "$as_me:14580: result: $ac_cv_header_dbmalloc_h" >&5
14581 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
14582 if test $ac_cv_header_dbmalloc_h = yes; then
14583
14584 echo "$as_me:14584: checking for debug_malloc in -ldbmalloc" >&5
14585 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
14586 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
14587   echo $ECHO_N "(cached) $ECHO_C" >&6
14588 else
14589   ac_check_lib_save_LIBS=$LIBS
14590 LIBS="-ldbmalloc  $LIBS"
14591 cat >conftest.$ac_ext <<_ACEOF
14592 #line 14592 "configure"
14593 #include "confdefs.h"
14594
14595 /* Override any gcc2 internal prototype to avoid an error.  */
14596 #ifdef __cplusplus
14597 extern "C"
14598 #endif
14599 /* We use char because int might match the return type of a gcc2
14600    builtin and then its argument prototype would still apply.  */
14601 char debug_malloc ();
14602 int
14603 main ()
14604 {
14605 debug_malloc ();
14606   ;
14607   return 0;
14608 }
14609 _ACEOF
14610 rm -f conftest.$ac_objext conftest$ac_exeext
14611 if { (eval echo "$as_me:14611: \"$ac_link\"") >&5
14612   (eval $ac_link) 2>&5
14613   ac_status=$?
14614   echo "$as_me:14614: \$? = $ac_status" >&5
14615   (exit $ac_status); } &&
14616          { ac_try='test -s conftest$ac_exeext'
14617   { (eval echo "$as_me:14617: \"$ac_try\"") >&5
14618   (eval $ac_try) 2>&5
14619   ac_status=$?
14620   echo "$as_me:14620: \$? = $ac_status" >&5
14621   (exit $ac_status); }; }; then
14622   ac_cv_lib_dbmalloc_debug_malloc=yes
14623 else
14624   echo "$as_me: failed program was:" >&5
14625 cat conftest.$ac_ext >&5
14626 ac_cv_lib_dbmalloc_debug_malloc=no
14627 fi
14628 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14629 LIBS=$ac_check_lib_save_LIBS
14630 fi
14631 echo "$as_me:14631: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14632 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14633 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14634   cat >>confdefs.h <<EOF
14635 #define HAVE_LIBDBMALLOC 1
14636 EOF
14637
14638   LIBS="-ldbmalloc $LIBS"
14639
14640 fi
14641
14642 fi
14643
14644 fi
14645
14646 echo "$as_me:14646: checking if you want to use valgrind for testing" >&5
14647 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14648
14649 # Check whether --with-valgrind or --without-valgrind was given.
14650 if test "${with_valgrind+set}" = set; then
14651   withval="$with_valgrind"
14652
14653 cat >>confdefs.h <<EOF
14654 #define USE_VALGRIND 1
14655 EOF
14656
14657         : ${with_cflags:=-g}
14658         : ${with_no_leaks:=yes}
14659          with_valgrind=yes
14660 else
14661   with_valgrind=
14662 fi;
14663 echo "$as_me:14663: result: ${with_valgrind:-no}" >&5
14664 echo "${ECHO_T}${with_valgrind:-no}" >&6
14665
14666 case .$with_cflags in
14667 (.*-g*)
14668         case .$CFLAGS in
14669         (.*-g*)
14670                 ;;
14671         (*)
14672
14673 cf_fix_cppflags=no
14674 cf_new_cflags=
14675 cf_new_cppflags=
14676 cf_new_extra_cppflags=
14677
14678 for cf_add_cflags in -g
14679 do
14680 case $cf_fix_cppflags in
14681 (no)
14682         case $cf_add_cflags in
14683         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14684                 case $cf_add_cflags in
14685                 (-D*)
14686                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14687
14688                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14689                                 && test -z "${cf_tst_cflags}" \
14690                                 && cf_fix_cppflags=yes
14691
14692                         if test $cf_fix_cppflags = yes ; then
14693                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14694                                 continue
14695                         elif test "${cf_tst_cflags}" = "\"'" ; then
14696                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14697                                 continue
14698                         fi
14699                         ;;
14700                 esac
14701                 case "$CPPFLAGS" in
14702                 (*$cf_add_cflags)
14703                         ;;
14704                 (*)
14705                         case $cf_add_cflags in
14706                         (-D*)
14707                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14708
14709 CPPFLAGS=`echo "$CPPFLAGS" | \
14710         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14711                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14712
14713                                 ;;
14714                         esac
14715                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14716                         ;;
14717                 esac
14718                 ;;
14719         (*)
14720                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14721                 ;;
14722         esac
14723         ;;
14724 (yes)
14725         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14726
14727         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14728
14729         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14730                 && test -z "${cf_tst_cflags}" \
14731                 && cf_fix_cppflags=no
14732         ;;
14733 esac
14734 done
14735
14736 if test -n "$cf_new_cflags" ; then
14737
14738         CFLAGS="$CFLAGS $cf_new_cflags"
14739 fi
14740
14741 if test -n "$cf_new_cppflags" ; then
14742
14743         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14744 fi
14745
14746 if test -n "$cf_new_extra_cppflags" ; then
14747
14748         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14749 fi
14750
14751                 ;;
14752         esac
14753         ;;
14754 esac
14755
14756 echo "$as_me:14756: checking if you want to perform memory-leak testing" >&5
14757 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14758
14759 # Check whether --enable-leaks or --disable-leaks was given.
14760 if test "${enable_leaks+set}" = set; then
14761   enableval="$enable_leaks"
14762   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14763 else
14764   : ${with_no_leaks:=no}
14765 fi;
14766 echo "$as_me:14766: result: $with_no_leaks" >&5
14767 echo "${ECHO_T}$with_no_leaks" >&6
14768
14769 if test "$with_no_leaks" = yes ; then
14770
14771 cat >>confdefs.h <<\EOF
14772 #define NO_LEAKS 1
14773 EOF
14774
14775 cat >>confdefs.h <<\EOF
14776 #define YY_NO_LEAKS 1
14777 EOF
14778
14779 fi
14780
14781 cat >>confdefs.h <<\EOF
14782 #define HAVE_NC_ALLOC_H 1
14783 EOF
14784
14785 ###     use option --enable-expanded to generate certain macros as functions
14786
14787 # Check whether --enable-expanded or --disable-expanded was given.
14788 if test "${enable_expanded+set}" = set; then
14789   enableval="$enable_expanded"
14790   test "x$enableval" = xyes &&
14791 cat >>confdefs.h <<\EOF
14792 #define NCURSES_EXPANDED 1
14793 EOF
14794
14795 fi;
14796
14797 ###     use option --disable-macros to suppress macros in favor of functions
14798
14799 # Check whether --enable-macros or --disable-macros was given.
14800 if test "${enable_macros+set}" = set; then
14801   enableval="$enable_macros"
14802   test "$enableval" = no &&
14803 cat >>confdefs.h <<\EOF
14804 #define NCURSES_NOMACROS 1
14805 EOF
14806
14807 fi;
14808
14809 # Normally we only add trace() to the debug-library.  Allow this to be
14810 # extended to all models of the ncurses library:
14811 cf_all_traces=no
14812 case "$CFLAGS $CPPFLAGS" in
14813 (*-DTRACE*)
14814         cf_all_traces=yes
14815         ;;
14816 esac
14817
14818 echo "$as_me:14818: checking whether to add trace feature to all models" >&5
14819 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14820
14821 # Check whether --with-trace or --without-trace was given.
14822 if test "${with_trace+set}" = set; then
14823   withval="$with_trace"
14824   cf_with_trace=$withval
14825 else
14826   cf_with_trace=$cf_all_traces
14827 fi;
14828 echo "$as_me:14828: result: $cf_with_trace" >&5
14829 echo "${ECHO_T}$cf_with_trace" >&6
14830
14831 if test "x$cf_with_trace" = xyes ; then
14832         LIB_TRACING=all
14833         ADA_TRACE=TRUE
14834
14835 cf_fix_cppflags=no
14836 cf_new_cflags=
14837 cf_new_cppflags=
14838 cf_new_extra_cppflags=
14839
14840 for cf_add_cflags in -DTRACE
14841 do
14842 case $cf_fix_cppflags in
14843 (no)
14844         case $cf_add_cflags in
14845         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14846                 case $cf_add_cflags in
14847                 (-D*)
14848                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14849
14850                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14851                                 && test -z "${cf_tst_cflags}" \
14852                                 && cf_fix_cppflags=yes
14853
14854                         if test $cf_fix_cppflags = yes ; then
14855                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14856                                 continue
14857                         elif test "${cf_tst_cflags}" = "\"'" ; then
14858                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14859                                 continue
14860                         fi
14861                         ;;
14862                 esac
14863                 case "$CPPFLAGS" in
14864                 (*$cf_add_cflags)
14865                         ;;
14866                 (*)
14867                         case $cf_add_cflags in
14868                         (-D*)
14869                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14870
14871 CPPFLAGS=`echo "$CPPFLAGS" | \
14872         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14873                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14874
14875                                 ;;
14876                         esac
14877                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14878                         ;;
14879                 esac
14880                 ;;
14881         (*)
14882                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14883                 ;;
14884         esac
14885         ;;
14886 (yes)
14887         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14888
14889         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14890
14891         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14892                 && test -z "${cf_tst_cflags}" \
14893                 && cf_fix_cppflags=no
14894         ;;
14895 esac
14896 done
14897
14898 if test -n "$cf_new_cflags" ; then
14899
14900         CFLAGS="$CFLAGS $cf_new_cflags"
14901 fi
14902
14903 if test -n "$cf_new_cppflags" ; then
14904
14905         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14906 fi
14907
14908 if test -n "$cf_new_extra_cppflags" ; then
14909
14910         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14911 fi
14912
14913 else
14914         LIB_TRACING=DEBUG
14915         ADA_TRACE=FALSE
14916 fi
14917
14918 echo "$as_me:14918: checking if we want to use GNAT projects" >&5
14919 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14920
14921 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14922 if test "${enable_gnat_projects+set}" = set; then
14923   enableval="$enable_gnat_projects"
14924   test "$enableval" != no && enableval=yes
14925         if test "$enableval" != "yes" ; then
14926     enable_gnat_projects=no
14927         else
14928                 enable_gnat_projects=yes
14929         fi
14930 else
14931   enableval=yes
14932         enable_gnat_projects=yes
14933
14934 fi;
14935 echo "$as_me:14935: result: $enable_gnat_projects" >&5
14936 echo "${ECHO_T}$enable_gnat_projects" >&6
14937
14938 ###     Checks for libraries.
14939 case $cf_cv_system_name in
14940 (*mingw32*|*mingw64*)
14941         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
14942         LIBS=" -lpsapi $LIBS"
14943         ;;
14944 (*)
14945 echo "$as_me:14945: checking for gettimeofday" >&5
14946 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14947 if test "${ac_cv_func_gettimeofday+set}" = set; then
14948   echo $ECHO_N "(cached) $ECHO_C" >&6
14949 else
14950   cat >conftest.$ac_ext <<_ACEOF
14951 #line 14951 "configure"
14952 #include "confdefs.h"
14953 /* System header to define __stub macros and hopefully few prototypes,
14954     which can conflict with char gettimeofday (); below.  */
14955 #include <assert.h>
14956 /* Override any gcc2 internal prototype to avoid an error.  */
14957 #ifdef __cplusplus
14958 extern "C"
14959 #endif
14960 /* We use char because int might match the return type of a gcc2
14961    builtin and then its argument prototype would still apply.  */
14962 char gettimeofday ();
14963 char (*f) ();
14964
14965 int
14966 main ()
14967 {
14968 /* The GNU C library defines this for functions which it implements
14969     to always fail with ENOSYS.  Some functions are actually named
14970     something starting with __ and the normal name is an alias.  */
14971 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14972 choke me
14973 #else
14974 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14975 #endif
14976
14977   ;
14978   return 0;
14979 }
14980 _ACEOF
14981 rm -f conftest.$ac_objext conftest$ac_exeext
14982 if { (eval echo "$as_me:14982: \"$ac_link\"") >&5
14983   (eval $ac_link) 2>&5
14984   ac_status=$?
14985   echo "$as_me:14985: \$? = $ac_status" >&5
14986   (exit $ac_status); } &&
14987          { ac_try='test -s conftest$ac_exeext'
14988   { (eval echo "$as_me:14988: \"$ac_try\"") >&5
14989   (eval $ac_try) 2>&5
14990   ac_status=$?
14991   echo "$as_me:14991: \$? = $ac_status" >&5
14992   (exit $ac_status); }; }; then
14993   ac_cv_func_gettimeofday=yes
14994 else
14995   echo "$as_me: failed program was:" >&5
14996 cat conftest.$ac_ext >&5
14997 ac_cv_func_gettimeofday=no
14998 fi
14999 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15000 fi
15001 echo "$as_me:15001: result: $ac_cv_func_gettimeofday" >&5
15002 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
15003 if test $ac_cv_func_gettimeofday = yes; then
15004
15005 cat >>confdefs.h <<\EOF
15006 #define HAVE_GETTIMEOFDAY 1
15007 EOF
15008
15009 else
15010
15011 echo "$as_me:15011: checking for gettimeofday in -lbsd" >&5
15012 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
15013 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
15014   echo $ECHO_N "(cached) $ECHO_C" >&6
15015 else
15016   ac_check_lib_save_LIBS=$LIBS
15017 LIBS="-lbsd  $LIBS"
15018 cat >conftest.$ac_ext <<_ACEOF
15019 #line 15019 "configure"
15020 #include "confdefs.h"
15021
15022 /* Override any gcc2 internal prototype to avoid an error.  */
15023 #ifdef __cplusplus
15024 extern "C"
15025 #endif
15026 /* We use char because int might match the return type of a gcc2
15027    builtin and then its argument prototype would still apply.  */
15028 char gettimeofday ();
15029 int
15030 main ()
15031 {
15032 gettimeofday ();
15033   ;
15034   return 0;
15035 }
15036 _ACEOF
15037 rm -f conftest.$ac_objext conftest$ac_exeext
15038 if { (eval echo "$as_me:15038: \"$ac_link\"") >&5
15039   (eval $ac_link) 2>&5
15040   ac_status=$?
15041   echo "$as_me:15041: \$? = $ac_status" >&5
15042   (exit $ac_status); } &&
15043          { ac_try='test -s conftest$ac_exeext'
15044   { (eval echo "$as_me:15044: \"$ac_try\"") >&5
15045   (eval $ac_try) 2>&5
15046   ac_status=$?
15047   echo "$as_me:15047: \$? = $ac_status" >&5
15048   (exit $ac_status); }; }; then
15049   ac_cv_lib_bsd_gettimeofday=yes
15050 else
15051   echo "$as_me: failed program was:" >&5
15052 cat conftest.$ac_ext >&5
15053 ac_cv_lib_bsd_gettimeofday=no
15054 fi
15055 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15056 LIBS=$ac_check_lib_save_LIBS
15057 fi
15058 echo "$as_me:15058: result: $ac_cv_lib_bsd_gettimeofday" >&5
15059 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
15060 if test $ac_cv_lib_bsd_gettimeofday = yes; then
15061
15062 cat >>confdefs.h <<\EOF
15063 #define HAVE_GETTIMEOFDAY 1
15064 EOF
15065
15066 cf_add_libs="-lbsd"
15067 # Filter out duplicates - this happens with badly-designed ".pc" files...
15068 for cf_add_1lib in $LIBS
15069 do
15070         for cf_add_2lib in $cf_add_libs
15071         do
15072                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15073                 then
15074                         cf_add_1lib=
15075                         break
15076                 fi
15077         done
15078         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15079 done
15080 LIBS="$cf_add_libs"
15081
15082 fi
15083
15084 fi
15085         ;;
15086 esac
15087
15088 echo "$as_me:15088: checking if -lm needed for math functions" >&5
15089 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
15090 if test "${cf_cv_need_libm+set}" = set; then
15091   echo $ECHO_N "(cached) $ECHO_C" >&6
15092 else
15093
15094         cat >conftest.$ac_ext <<_ACEOF
15095 #line 15095 "configure"
15096 #include "confdefs.h"
15097
15098         #include <stdio.h>
15099         #include <stdlib.h>
15100         #include <math.h>
15101
15102 int
15103 main ()
15104 {
15105 double x = rand(); printf("result = %g\n", pow(sin(x),x))
15106   ;
15107   return 0;
15108 }
15109 _ACEOF
15110 rm -f conftest.$ac_objext conftest$ac_exeext
15111 if { (eval echo "$as_me:15111: \"$ac_link\"") >&5
15112   (eval $ac_link) 2>&5
15113   ac_status=$?
15114   echo "$as_me:15114: \$? = $ac_status" >&5
15115   (exit $ac_status); } &&
15116          { ac_try='test -s conftest$ac_exeext'
15117   { (eval echo "$as_me:15117: \"$ac_try\"") >&5
15118   (eval $ac_try) 2>&5
15119   ac_status=$?
15120   echo "$as_me:15120: \$? = $ac_status" >&5
15121   (exit $ac_status); }; }; then
15122   cf_cv_need_libm=no
15123 else
15124   echo "$as_me: failed program was:" >&5
15125 cat conftest.$ac_ext >&5
15126 cf_cv_need_libm=yes
15127 fi
15128 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15129 fi
15130 echo "$as_me:15130: result: $cf_cv_need_libm" >&5
15131 echo "${ECHO_T}$cf_cv_need_libm" >&6
15132 if test "$cf_cv_need_libm" = yes
15133 then
15134 MATH_LIB=-lm
15135 fi
15136
15137 ###     Checks for header files.
15138 echo "$as_me:15138: checking for ANSI C header files" >&5
15139 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15140 if test "${ac_cv_header_stdc+set}" = set; then
15141   echo $ECHO_N "(cached) $ECHO_C" >&6
15142 else
15143   cat >conftest.$ac_ext <<_ACEOF
15144 #line 15144 "configure"
15145 #include "confdefs.h"
15146 #include <stdlib.h>
15147 #include <stdarg.h>
15148 #include <string.h>
15149 #include <float.h>
15150
15151 _ACEOF
15152 if { (eval echo "$as_me:15152: \"$ac_cpp conftest.$ac_ext\"") >&5
15153   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15154   ac_status=$?
15155   egrep -v '^ *\+' conftest.er1 >conftest.err
15156   rm -f conftest.er1
15157   cat conftest.err >&5
15158   echo "$as_me:15158: \$? = $ac_status" >&5
15159   (exit $ac_status); } >/dev/null; then
15160   if test -s conftest.err; then
15161     ac_cpp_err=$ac_c_preproc_warn_flag
15162   else
15163     ac_cpp_err=
15164   fi
15165 else
15166   ac_cpp_err=yes
15167 fi
15168 if test -z "$ac_cpp_err"; then
15169   ac_cv_header_stdc=yes
15170 else
15171   echo "$as_me: failed program was:" >&5
15172   cat conftest.$ac_ext >&5
15173   ac_cv_header_stdc=no
15174 fi
15175 rm -f conftest.err conftest.$ac_ext
15176
15177 if test $ac_cv_header_stdc = yes; then
15178   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15179   cat >conftest.$ac_ext <<_ACEOF
15180 #line 15180 "configure"
15181 #include "confdefs.h"
15182 #include <string.h>
15183
15184 _ACEOF
15185 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15186   egrep "memchr" >/dev/null 2>&1; then
15187   :
15188 else
15189   ac_cv_header_stdc=no
15190 fi
15191 rm -rf conftest*
15192
15193 fi
15194
15195 if test $ac_cv_header_stdc = yes; then
15196   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15197   cat >conftest.$ac_ext <<_ACEOF
15198 #line 15198 "configure"
15199 #include "confdefs.h"
15200 #include <stdlib.h>
15201
15202 _ACEOF
15203 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15204   egrep "free" >/dev/null 2>&1; then
15205   :
15206 else
15207   ac_cv_header_stdc=no
15208 fi
15209 rm -rf conftest*
15210
15211 fi
15212
15213 if test $ac_cv_header_stdc = yes; then
15214   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15215   if test "$cross_compiling" = yes; then
15216   :
15217 else
15218   cat >conftest.$ac_ext <<_ACEOF
15219 #line 15219 "configure"
15220 #include "confdefs.h"
15221 #include <ctype.h>
15222 #if ((' ' & 0x0FF) == 0x020)
15223 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15224 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15225 #else
15226 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15227                      || ('j' <= (c) && (c) <= 'r') \
15228                      || ('s' <= (c) && (c) <= 'z'))
15229 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15230 #endif
15231
15232 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15233 int
15234 main ()
15235 {
15236   int i;
15237   for (i = 0; i < 256; i++)
15238     if (XOR (islower (i), ISLOWER (i))
15239         || toupper (i) != TOUPPER (i))
15240       $ac_main_return(2);
15241   $ac_main_return (0);
15242 }
15243 _ACEOF
15244 rm -f conftest$ac_exeext
15245 if { (eval echo "$as_me:15245: \"$ac_link\"") >&5
15246   (eval $ac_link) 2>&5
15247   ac_status=$?
15248   echo "$as_me:15248: \$? = $ac_status" >&5
15249   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15250   { (eval echo "$as_me:15250: \"$ac_try\"") >&5
15251   (eval $ac_try) 2>&5
15252   ac_status=$?
15253   echo "$as_me:15253: \$? = $ac_status" >&5
15254   (exit $ac_status); }; }; then
15255   :
15256 else
15257   echo "$as_me: program exited with status $ac_status" >&5
15258 echo "$as_me: failed program was:" >&5
15259 cat conftest.$ac_ext >&5
15260 ac_cv_header_stdc=no
15261 fi
15262 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15263 fi
15264 fi
15265 fi
15266 echo "$as_me:15266: result: $ac_cv_header_stdc" >&5
15267 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15268 if test $ac_cv_header_stdc = yes; then
15269
15270 cat >>confdefs.h <<\EOF
15271 #define STDC_HEADERS 1
15272 EOF
15273
15274 fi
15275
15276 ac_header_dirent=no
15277 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
15278   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
15279 echo "$as_me:15279: checking for $ac_hdr that defines DIR" >&5
15280 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
15281 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15282   echo $ECHO_N "(cached) $ECHO_C" >&6
15283 else
15284   cat >conftest.$ac_ext <<_ACEOF
15285 #line 15285 "configure"
15286 #include "confdefs.h"
15287 #include <sys/types.h>
15288 #include <$ac_hdr>
15289
15290 int
15291 main ()
15292 {
15293 if ((DIR *) 0)
15294 return 0;
15295   ;
15296   return 0;
15297 }
15298 _ACEOF
15299 rm -f conftest.$ac_objext
15300 if { (eval echo "$as_me:15300: \"$ac_compile\"") >&5
15301   (eval $ac_compile) 2>&5
15302   ac_status=$?
15303   echo "$as_me:15303: \$? = $ac_status" >&5
15304   (exit $ac_status); } &&
15305          { ac_try='test -s conftest.$ac_objext'
15306   { (eval echo "$as_me:15306: \"$ac_try\"") >&5
15307   (eval $ac_try) 2>&5
15308   ac_status=$?
15309   echo "$as_me:15309: \$? = $ac_status" >&5
15310   (exit $ac_status); }; }; then
15311   eval "$as_ac_Header=yes"
15312 else
15313   echo "$as_me: failed program was:" >&5
15314 cat conftest.$ac_ext >&5
15315 eval "$as_ac_Header=no"
15316 fi
15317 rm -f conftest.$ac_objext conftest.$ac_ext
15318 fi
15319 echo "$as_me:15319: result: `eval echo '${'$as_ac_Header'}'`" >&5
15320 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15321 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15322   cat >>confdefs.h <<EOF
15323 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
15324 EOF
15325
15326 ac_header_dirent=$ac_hdr; break
15327 fi
15328
15329 done
15330 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
15331 if test $ac_header_dirent = dirent.h; then
15332   echo "$as_me:15332: checking for opendir in -ldir" >&5
15333 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
15334 if test "${ac_cv_lib_dir_opendir+set}" = set; then
15335   echo $ECHO_N "(cached) $ECHO_C" >&6
15336 else
15337   ac_check_lib_save_LIBS=$LIBS
15338 LIBS="-ldir  $LIBS"
15339 cat >conftest.$ac_ext <<_ACEOF
15340 #line 15340 "configure"
15341 #include "confdefs.h"
15342
15343 /* Override any gcc2 internal prototype to avoid an error.  */
15344 #ifdef __cplusplus
15345 extern "C"
15346 #endif
15347 /* We use char because int might match the return type of a gcc2
15348    builtin and then its argument prototype would still apply.  */
15349 char opendir ();
15350 int
15351 main ()
15352 {
15353 opendir ();
15354   ;
15355   return 0;
15356 }
15357 _ACEOF
15358 rm -f conftest.$ac_objext conftest$ac_exeext
15359 if { (eval echo "$as_me:15359: \"$ac_link\"") >&5
15360   (eval $ac_link) 2>&5
15361   ac_status=$?
15362   echo "$as_me:15362: \$? = $ac_status" >&5
15363   (exit $ac_status); } &&
15364          { ac_try='test -s conftest$ac_exeext'
15365   { (eval echo "$as_me:15365: \"$ac_try\"") >&5
15366   (eval $ac_try) 2>&5
15367   ac_status=$?
15368   echo "$as_me:15368: \$? = $ac_status" >&5
15369   (exit $ac_status); }; }; then
15370   ac_cv_lib_dir_opendir=yes
15371 else
15372   echo "$as_me: failed program was:" >&5
15373 cat conftest.$ac_ext >&5
15374 ac_cv_lib_dir_opendir=no
15375 fi
15376 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15377 LIBS=$ac_check_lib_save_LIBS
15378 fi
15379 echo "$as_me:15379: result: $ac_cv_lib_dir_opendir" >&5
15380 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
15381 if test $ac_cv_lib_dir_opendir = yes; then
15382   LIBS="$LIBS -ldir"
15383 fi
15384
15385 else
15386   echo "$as_me:15386: checking for opendir in -lx" >&5
15387 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
15388 if test "${ac_cv_lib_x_opendir+set}" = set; then
15389   echo $ECHO_N "(cached) $ECHO_C" >&6
15390 else
15391   ac_check_lib_save_LIBS=$LIBS
15392 LIBS="-lx  $LIBS"
15393 cat >conftest.$ac_ext <<_ACEOF
15394 #line 15394 "configure"
15395 #include "confdefs.h"
15396
15397 /* Override any gcc2 internal prototype to avoid an error.  */
15398 #ifdef __cplusplus
15399 extern "C"
15400 #endif
15401 /* We use char because int might match the return type of a gcc2
15402    builtin and then its argument prototype would still apply.  */
15403 char opendir ();
15404 int
15405 main ()
15406 {
15407 opendir ();
15408   ;
15409   return 0;
15410 }
15411 _ACEOF
15412 rm -f conftest.$ac_objext conftest$ac_exeext
15413 if { (eval echo "$as_me:15413: \"$ac_link\"") >&5
15414   (eval $ac_link) 2>&5
15415   ac_status=$?
15416   echo "$as_me:15416: \$? = $ac_status" >&5
15417   (exit $ac_status); } &&
15418          { ac_try='test -s conftest$ac_exeext'
15419   { (eval echo "$as_me:15419: \"$ac_try\"") >&5
15420   (eval $ac_try) 2>&5
15421   ac_status=$?
15422   echo "$as_me:15422: \$? = $ac_status" >&5
15423   (exit $ac_status); }; }; then
15424   ac_cv_lib_x_opendir=yes
15425 else
15426   echo "$as_me: failed program was:" >&5
15427 cat conftest.$ac_ext >&5
15428 ac_cv_lib_x_opendir=no
15429 fi
15430 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15431 LIBS=$ac_check_lib_save_LIBS
15432 fi
15433 echo "$as_me:15433: result: $ac_cv_lib_x_opendir" >&5
15434 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
15435 if test $ac_cv_lib_x_opendir = yes; then
15436   LIBS="$LIBS -lx"
15437 fi
15438
15439 fi
15440
15441 echo "$as_me:15441: checking whether time.h and sys/time.h may both be included" >&5
15442 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15443 if test "${ac_cv_header_time+set}" = set; then
15444   echo $ECHO_N "(cached) $ECHO_C" >&6
15445 else
15446   cat >conftest.$ac_ext <<_ACEOF
15447 #line 15447 "configure"
15448 #include "confdefs.h"
15449 #include <sys/types.h>
15450 #include <sys/time.h>
15451 #include <time.h>
15452
15453 int
15454 main ()
15455 {
15456 if ((struct tm *) 0)
15457 return 0;
15458   ;
15459   return 0;
15460 }
15461 _ACEOF
15462 rm -f conftest.$ac_objext
15463 if { (eval echo "$as_me:15463: \"$ac_compile\"") >&5
15464   (eval $ac_compile) 2>&5
15465   ac_status=$?
15466   echo "$as_me:15466: \$? = $ac_status" >&5
15467   (exit $ac_status); } &&
15468          { ac_try='test -s conftest.$ac_objext'
15469   { (eval echo "$as_me:15469: \"$ac_try\"") >&5
15470   (eval $ac_try) 2>&5
15471   ac_status=$?
15472   echo "$as_me:15472: \$? = $ac_status" >&5
15473   (exit $ac_status); }; }; then
15474   ac_cv_header_time=yes
15475 else
15476   echo "$as_me: failed program was:" >&5
15477 cat conftest.$ac_ext >&5
15478 ac_cv_header_time=no
15479 fi
15480 rm -f conftest.$ac_objext conftest.$ac_ext
15481 fi
15482 echo "$as_me:15482: result: $ac_cv_header_time" >&5
15483 echo "${ECHO_T}$ac_cv_header_time" >&6
15484 if test $ac_cv_header_time = yes; then
15485
15486 cat >>confdefs.h <<\EOF
15487 #define TIME_WITH_SYS_TIME 1
15488 EOF
15489
15490 fi
15491
15492 cf_regex_func=no
15493
15494 cf_regex_libs="regex re"
15495 case $host_os in
15496 (mingw*)
15497         cf_regex_libs="gnurx $cf_regex_libs"
15498         ;;
15499 esac
15500
15501 echo "$as_me:15501: checking for regcomp" >&5
15502 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
15503 if test "${ac_cv_func_regcomp+set}" = set; then
15504   echo $ECHO_N "(cached) $ECHO_C" >&6
15505 else
15506   cat >conftest.$ac_ext <<_ACEOF
15507 #line 15507 "configure"
15508 #include "confdefs.h"
15509 /* System header to define __stub macros and hopefully few prototypes,
15510     which can conflict with char regcomp (); below.  */
15511 #include <assert.h>
15512 /* Override any gcc2 internal prototype to avoid an error.  */
15513 #ifdef __cplusplus
15514 extern "C"
15515 #endif
15516 /* We use char because int might match the return type of a gcc2
15517    builtin and then its argument prototype would still apply.  */
15518 char regcomp ();
15519 char (*f) ();
15520
15521 int
15522 main ()
15523 {
15524 /* The GNU C library defines this for functions which it implements
15525     to always fail with ENOSYS.  Some functions are actually named
15526     something starting with __ and the normal name is an alias.  */
15527 #if defined (__stub_regcomp) || defined (__stub___regcomp)
15528 choke me
15529 #else
15530 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15531 #endif
15532
15533   ;
15534   return 0;
15535 }
15536 _ACEOF
15537 rm -f conftest.$ac_objext conftest$ac_exeext
15538 if { (eval echo "$as_me:15538: \"$ac_link\"") >&5
15539   (eval $ac_link) 2>&5
15540   ac_status=$?
15541   echo "$as_me:15541: \$? = $ac_status" >&5
15542   (exit $ac_status); } &&
15543          { ac_try='test -s conftest$ac_exeext'
15544   { (eval echo "$as_me:15544: \"$ac_try\"") >&5
15545   (eval $ac_try) 2>&5
15546   ac_status=$?
15547   echo "$as_me:15547: \$? = $ac_status" >&5
15548   (exit $ac_status); }; }; then
15549   ac_cv_func_regcomp=yes
15550 else
15551   echo "$as_me: failed program was:" >&5
15552 cat conftest.$ac_ext >&5
15553 ac_cv_func_regcomp=no
15554 fi
15555 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15556 fi
15557 echo "$as_me:15557: result: $ac_cv_func_regcomp" >&5
15558 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
15559 if test $ac_cv_func_regcomp = yes; then
15560   cf_regex_func=regcomp
15561 else
15562
15563         for cf_regex_lib in $cf_regex_libs
15564         do
15565                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
15566 echo "$as_me:15566: checking for regcomp in -l$cf_regex_lib" >&5
15567 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
15568 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
15569   echo $ECHO_N "(cached) $ECHO_C" >&6
15570 else
15571   ac_check_lib_save_LIBS=$LIBS
15572 LIBS="-l$cf_regex_lib  $LIBS"
15573 cat >conftest.$ac_ext <<_ACEOF
15574 #line 15574 "configure"
15575 #include "confdefs.h"
15576
15577 /* Override any gcc2 internal prototype to avoid an error.  */
15578 #ifdef __cplusplus
15579 extern "C"
15580 #endif
15581 /* We use char because int might match the return type of a gcc2
15582    builtin and then its argument prototype would still apply.  */
15583 char regcomp ();
15584 int
15585 main ()
15586 {
15587 regcomp ();
15588   ;
15589   return 0;
15590 }
15591 _ACEOF
15592 rm -f conftest.$ac_objext conftest$ac_exeext
15593 if { (eval echo "$as_me:15593: \"$ac_link\"") >&5
15594   (eval $ac_link) 2>&5
15595   ac_status=$?
15596   echo "$as_me:15596: \$? = $ac_status" >&5
15597   (exit $ac_status); } &&
15598          { ac_try='test -s conftest$ac_exeext'
15599   { (eval echo "$as_me:15599: \"$ac_try\"") >&5
15600   (eval $ac_try) 2>&5
15601   ac_status=$?
15602   echo "$as_me:15602: \$? = $ac_status" >&5
15603   (exit $ac_status); }; }; then
15604   eval "$as_ac_Lib=yes"
15605 else
15606   echo "$as_me: failed program was:" >&5
15607 cat conftest.$ac_ext >&5
15608 eval "$as_ac_Lib=no"
15609 fi
15610 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15611 LIBS=$ac_check_lib_save_LIBS
15612 fi
15613 echo "$as_me:15613: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15614 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15615 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15616
15617 cf_add_libs="-l$cf_regex_lib"
15618 # Filter out duplicates - this happens with badly-designed ".pc" files...
15619 for cf_add_1lib in $LIBS
15620 do
15621         for cf_add_2lib in $cf_add_libs
15622         do
15623                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15624                 then
15625                         cf_add_1lib=
15626                         break
15627                 fi
15628         done
15629         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15630 done
15631 LIBS="$cf_add_libs"
15632
15633                                 cf_regex_func=regcomp
15634                                 break
15635 fi
15636
15637         done
15638
15639 fi
15640
15641 if test "$cf_regex_func" = no ; then
15642         echo "$as_me:15642: checking for compile" >&5
15643 echo $ECHO_N "checking for compile... $ECHO_C" >&6
15644 if test "${ac_cv_func_compile+set}" = set; then
15645   echo $ECHO_N "(cached) $ECHO_C" >&6
15646 else
15647   cat >conftest.$ac_ext <<_ACEOF
15648 #line 15648 "configure"
15649 #include "confdefs.h"
15650 /* System header to define __stub macros and hopefully few prototypes,
15651     which can conflict with char compile (); below.  */
15652 #include <assert.h>
15653 /* Override any gcc2 internal prototype to avoid an error.  */
15654 #ifdef __cplusplus
15655 extern "C"
15656 #endif
15657 /* We use char because int might match the return type of a gcc2
15658    builtin and then its argument prototype would still apply.  */
15659 char compile ();
15660 char (*f) ();
15661
15662 int
15663 main ()
15664 {
15665 /* The GNU C library defines this for functions which it implements
15666     to always fail with ENOSYS.  Some functions are actually named
15667     something starting with __ and the normal name is an alias.  */
15668 #if defined (__stub_compile) || defined (__stub___compile)
15669 choke me
15670 #else
15671 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15672 #endif
15673
15674   ;
15675   return 0;
15676 }
15677 _ACEOF
15678 rm -f conftest.$ac_objext conftest$ac_exeext
15679 if { (eval echo "$as_me:15679: \"$ac_link\"") >&5
15680   (eval $ac_link) 2>&5
15681   ac_status=$?
15682   echo "$as_me:15682: \$? = $ac_status" >&5
15683   (exit $ac_status); } &&
15684          { ac_try='test -s conftest$ac_exeext'
15685   { (eval echo "$as_me:15685: \"$ac_try\"") >&5
15686   (eval $ac_try) 2>&5
15687   ac_status=$?
15688   echo "$as_me:15688: \$? = $ac_status" >&5
15689   (exit $ac_status); }; }; then
15690   ac_cv_func_compile=yes
15691 else
15692   echo "$as_me: failed program was:" >&5
15693 cat conftest.$ac_ext >&5
15694 ac_cv_func_compile=no
15695 fi
15696 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15697 fi
15698 echo "$as_me:15698: result: $ac_cv_func_compile" >&5
15699 echo "${ECHO_T}$ac_cv_func_compile" >&6
15700 if test $ac_cv_func_compile = yes; then
15701   cf_regex_func=compile
15702 else
15703
15704                 echo "$as_me:15704: checking for compile in -lgen" >&5
15705 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15706 if test "${ac_cv_lib_gen_compile+set}" = set; then
15707   echo $ECHO_N "(cached) $ECHO_C" >&6
15708 else
15709   ac_check_lib_save_LIBS=$LIBS
15710 LIBS="-lgen  $LIBS"
15711 cat >conftest.$ac_ext <<_ACEOF
15712 #line 15712 "configure"
15713 #include "confdefs.h"
15714
15715 /* Override any gcc2 internal prototype to avoid an error.  */
15716 #ifdef __cplusplus
15717 extern "C"
15718 #endif
15719 /* We use char because int might match the return type of a gcc2
15720    builtin and then its argument prototype would still apply.  */
15721 char compile ();
15722 int
15723 main ()
15724 {
15725 compile ();
15726   ;
15727   return 0;
15728 }
15729 _ACEOF
15730 rm -f conftest.$ac_objext conftest$ac_exeext
15731 if { (eval echo "$as_me:15731: \"$ac_link\"") >&5
15732   (eval $ac_link) 2>&5
15733   ac_status=$?
15734   echo "$as_me:15734: \$? = $ac_status" >&5
15735   (exit $ac_status); } &&
15736          { ac_try='test -s conftest$ac_exeext'
15737   { (eval echo "$as_me:15737: \"$ac_try\"") >&5
15738   (eval $ac_try) 2>&5
15739   ac_status=$?
15740   echo "$as_me:15740: \$? = $ac_status" >&5
15741   (exit $ac_status); }; }; then
15742   ac_cv_lib_gen_compile=yes
15743 else
15744   echo "$as_me: failed program was:" >&5
15745 cat conftest.$ac_ext >&5
15746 ac_cv_lib_gen_compile=no
15747 fi
15748 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15749 LIBS=$ac_check_lib_save_LIBS
15750 fi
15751 echo "$as_me:15751: result: $ac_cv_lib_gen_compile" >&5
15752 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15753 if test $ac_cv_lib_gen_compile = yes; then
15754
15755 cf_add_libs="-lgen"
15756 # Filter out duplicates - this happens with badly-designed ".pc" files...
15757 for cf_add_1lib in $LIBS
15758 do
15759         for cf_add_2lib in $cf_add_libs
15760         do
15761                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15762                 then
15763                         cf_add_1lib=
15764                         break
15765                 fi
15766         done
15767         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15768 done
15769 LIBS="$cf_add_libs"
15770
15771                                 cf_regex_func=compile
15772 fi
15773
15774 fi
15775
15776 fi
15777
15778 if test "$cf_regex_func" = no ; then
15779         { echo "$as_me:15779: WARNING: cannot find regular expression library" >&5
15780 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15781 fi
15782
15783 echo "$as_me:15783: checking for regular-expression headers" >&5
15784 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15785 if test "${cf_cv_regex_hdrs+set}" = set; then
15786   echo $ECHO_N "(cached) $ECHO_C" >&6
15787 else
15788
15789 cf_cv_regex_hdrs=no
15790 case $cf_regex_func in
15791 (compile)
15792         for cf_regex_hdr in regexp.h regexpr.h
15793         do
15794                 cat >conftest.$ac_ext <<_ACEOF
15795 #line 15795 "configure"
15796 #include "confdefs.h"
15797 #include <$cf_regex_hdr>
15798 int
15799 main ()
15800 {
15801
15802                         char *p = compile("", "", "", 0);
15803                         int x = step("", "");
15804
15805   ;
15806   return 0;
15807 }
15808 _ACEOF
15809 rm -f conftest.$ac_objext conftest$ac_exeext
15810 if { (eval echo "$as_me:15810: \"$ac_link\"") >&5
15811   (eval $ac_link) 2>&5
15812   ac_status=$?
15813   echo "$as_me:15813: \$? = $ac_status" >&5
15814   (exit $ac_status); } &&
15815          { ac_try='test -s conftest$ac_exeext'
15816   { (eval echo "$as_me:15816: \"$ac_try\"") >&5
15817   (eval $ac_try) 2>&5
15818   ac_status=$?
15819   echo "$as_me:15819: \$? = $ac_status" >&5
15820   (exit $ac_status); }; }; then
15821
15822                         cf_cv_regex_hdrs=$cf_regex_hdr
15823                         break
15824
15825 else
15826   echo "$as_me: failed program was:" >&5
15827 cat conftest.$ac_ext >&5
15828 fi
15829 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15830         done
15831         ;;
15832 (*)
15833         for cf_regex_hdr in regex.h
15834         do
15835                 cat >conftest.$ac_ext <<_ACEOF
15836 #line 15836 "configure"
15837 #include "confdefs.h"
15838 #include <sys/types.h>
15839 #include <$cf_regex_hdr>
15840 int
15841 main ()
15842 {
15843
15844                         regex_t *p;
15845                         int x = regcomp(p, "", 0);
15846                         int y = regexec(p, "", 0, 0, 0);
15847                         regfree(p);
15848
15849   ;
15850   return 0;
15851 }
15852 _ACEOF
15853 rm -f conftest.$ac_objext conftest$ac_exeext
15854 if { (eval echo "$as_me:15854: \"$ac_link\"") >&5
15855   (eval $ac_link) 2>&5
15856   ac_status=$?
15857   echo "$as_me:15857: \$? = $ac_status" >&5
15858   (exit $ac_status); } &&
15859          { ac_try='test -s conftest$ac_exeext'
15860   { (eval echo "$as_me:15860: \"$ac_try\"") >&5
15861   (eval $ac_try) 2>&5
15862   ac_status=$?
15863   echo "$as_me:15863: \$? = $ac_status" >&5
15864   (exit $ac_status); }; }; then
15865
15866                         cf_cv_regex_hdrs=$cf_regex_hdr
15867                         break
15868
15869 else
15870   echo "$as_me: failed program was:" >&5
15871 cat conftest.$ac_ext >&5
15872 fi
15873 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15874         done
15875         ;;
15876 esac
15877
15878 fi
15879 echo "$as_me:15879: result: $cf_cv_regex_hdrs" >&5
15880 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15881
15882 case $cf_cv_regex_hdrs in
15883         (no)            { echo "$as_me:15883: WARNING: no regular expression header found" >&5
15884 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
15885         (regex.h)
15886 cat >>confdefs.h <<\EOF
15887 #define HAVE_REGEX_H_FUNCS 1
15888 EOF
15889  ;;
15890         (regexp.h)
15891 cat >>confdefs.h <<\EOF
15892 #define HAVE_REGEXP_H_FUNCS 1
15893 EOF
15894  ;;
15895         (regexpr.h)
15896 cat >>confdefs.h <<\EOF
15897 #define HAVE_REGEXPR_H_FUNCS 1
15898 EOF
15899  ;;
15900 esac
15901
15902 for ac_header in \
15903 fcntl.h \
15904 getopt.h \
15905 limits.h \
15906 locale.h \
15907 math.h \
15908 poll.h \
15909 sys/bsdtypes.h \
15910 sys/ioctl.h \
15911 sys/param.h \
15912 sys/poll.h \
15913 sys/select.h \
15914 sys/time.h \
15915 sys/times.h \
15916 ttyent.h \
15917 unistd.h \
15918 wctype.h \
15919
15920 do
15921 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15922 echo "$as_me:15922: checking for $ac_header" >&5
15923 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15924 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15925   echo $ECHO_N "(cached) $ECHO_C" >&6
15926 else
15927   cat >conftest.$ac_ext <<_ACEOF
15928 #line 15928 "configure"
15929 #include "confdefs.h"
15930 #include <$ac_header>
15931 _ACEOF
15932 if { (eval echo "$as_me:15932: \"$ac_cpp conftest.$ac_ext\"") >&5
15933   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15934   ac_status=$?
15935   egrep -v '^ *\+' conftest.er1 >conftest.err
15936   rm -f conftest.er1
15937   cat conftest.err >&5
15938   echo "$as_me:15938: \$? = $ac_status" >&5
15939   (exit $ac_status); } >/dev/null; then
15940   if test -s conftest.err; then
15941     ac_cpp_err=$ac_c_preproc_warn_flag
15942   else
15943     ac_cpp_err=
15944   fi
15945 else
15946   ac_cpp_err=yes
15947 fi
15948 if test -z "$ac_cpp_err"; then
15949   eval "$as_ac_Header=yes"
15950 else
15951   echo "$as_me: failed program was:" >&5
15952   cat conftest.$ac_ext >&5
15953   eval "$as_ac_Header=no"
15954 fi
15955 rm -f conftest.err conftest.$ac_ext
15956 fi
15957 echo "$as_me:15957: result: `eval echo '${'$as_ac_Header'}'`" >&5
15958 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15959 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15960   cat >>confdefs.h <<EOF
15961 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15962 EOF
15963
15964 fi
15965 done
15966
15967 for ac_header in unistd.h getopt.h
15968 do
15969 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15970 echo "$as_me:15970: checking for $ac_header" >&5
15971 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15972 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15973   echo $ECHO_N "(cached) $ECHO_C" >&6
15974 else
15975   cat >conftest.$ac_ext <<_ACEOF
15976 #line 15976 "configure"
15977 #include "confdefs.h"
15978 #include <$ac_header>
15979 _ACEOF
15980 if { (eval echo "$as_me:15980: \"$ac_cpp conftest.$ac_ext\"") >&5
15981   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15982   ac_status=$?
15983   egrep -v '^ *\+' conftest.er1 >conftest.err
15984   rm -f conftest.er1
15985   cat conftest.err >&5
15986   echo "$as_me:15986: \$? = $ac_status" >&5
15987   (exit $ac_status); } >/dev/null; then
15988   if test -s conftest.err; then
15989     ac_cpp_err=$ac_c_preproc_warn_flag
15990   else
15991     ac_cpp_err=
15992   fi
15993 else
15994   ac_cpp_err=yes
15995 fi
15996 if test -z "$ac_cpp_err"; then
15997   eval "$as_ac_Header=yes"
15998 else
15999   echo "$as_me: failed program was:" >&5
16000   cat conftest.$ac_ext >&5
16001   eval "$as_ac_Header=no"
16002 fi
16003 rm -f conftest.err conftest.$ac_ext
16004 fi
16005 echo "$as_me:16005: result: `eval echo '${'$as_ac_Header'}'`" >&5
16006 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16007 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16008   cat >>confdefs.h <<EOF
16009 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16010 EOF
16011
16012 fi
16013 done
16014
16015 echo "$as_me:16015: checking for header declaring getopt variables" >&5
16016 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
16017 if test "${cf_cv_getopt_header+set}" = set; then
16018   echo $ECHO_N "(cached) $ECHO_C" >&6
16019 else
16020
16021 cf_cv_getopt_header=none
16022 for cf_header in stdio.h stdlib.h unistd.h getopt.h
16023 do
16024 cat >conftest.$ac_ext <<_ACEOF
16025 #line 16025 "configure"
16026 #include "confdefs.h"
16027
16028 #include <$cf_header>
16029 int
16030 main ()
16031 {
16032 int x = optind; char *y = optarg
16033   ;
16034   return 0;
16035 }
16036 _ACEOF
16037 rm -f conftest.$ac_objext
16038 if { (eval echo "$as_me:16038: \"$ac_compile\"") >&5
16039   (eval $ac_compile) 2>&5
16040   ac_status=$?
16041   echo "$as_me:16041: \$? = $ac_status" >&5
16042   (exit $ac_status); } &&
16043          { ac_try='test -s conftest.$ac_objext'
16044   { (eval echo "$as_me:16044: \"$ac_try\"") >&5
16045   (eval $ac_try) 2>&5
16046   ac_status=$?
16047   echo "$as_me:16047: \$? = $ac_status" >&5
16048   (exit $ac_status); }; }; then
16049   cf_cv_getopt_header=$cf_header
16050  break
16051 else
16052   echo "$as_me: failed program was:" >&5
16053 cat conftest.$ac_ext >&5
16054 fi
16055 rm -f conftest.$ac_objext conftest.$ac_ext
16056 done
16057
16058 fi
16059 echo "$as_me:16059: result: $cf_cv_getopt_header" >&5
16060 echo "${ECHO_T}$cf_cv_getopt_header" >&6
16061 if test $cf_cv_getopt_header != none ; then
16062
16063 cat >>confdefs.h <<\EOF
16064 #define HAVE_GETOPT_HEADER 1
16065 EOF
16066
16067 fi
16068 if test $cf_cv_getopt_header = getopt.h ; then
16069
16070 cat >>confdefs.h <<\EOF
16071 #define NEED_GETOPT_H 1
16072 EOF
16073
16074 fi
16075
16076 # check for ISC (this may also define _POSIX_SOURCE)
16077 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
16078 if test "x$ISC" = xyes ; then
16079
16080 echo "$as_me:16080: checking for main in -lcposix" >&5
16081 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
16082 if test "${ac_cv_lib_cposix_main+set}" = set; then
16083   echo $ECHO_N "(cached) $ECHO_C" >&6
16084 else
16085   ac_check_lib_save_LIBS=$LIBS
16086 LIBS="-lcposix  $LIBS"
16087 cat >conftest.$ac_ext <<_ACEOF
16088 #line 16088 "configure"
16089 #include "confdefs.h"
16090
16091 int
16092 main ()
16093 {
16094 main ();
16095   ;
16096   return 0;
16097 }
16098 _ACEOF
16099 rm -f conftest.$ac_objext conftest$ac_exeext
16100 if { (eval echo "$as_me:16100: \"$ac_link\"") >&5
16101   (eval $ac_link) 2>&5
16102   ac_status=$?
16103   echo "$as_me:16103: \$? = $ac_status" >&5
16104   (exit $ac_status); } &&
16105          { ac_try='test -s conftest$ac_exeext'
16106   { (eval echo "$as_me:16106: \"$ac_try\"") >&5
16107   (eval $ac_try) 2>&5
16108   ac_status=$?
16109   echo "$as_me:16109: \$? = $ac_status" >&5
16110   (exit $ac_status); }; }; then
16111   ac_cv_lib_cposix_main=yes
16112 else
16113   echo "$as_me: failed program was:" >&5
16114 cat conftest.$ac_ext >&5
16115 ac_cv_lib_cposix_main=no
16116 fi
16117 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16118 LIBS=$ac_check_lib_save_LIBS
16119 fi
16120 echo "$as_me:16120: result: $ac_cv_lib_cposix_main" >&5
16121 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
16122 if test $ac_cv_lib_cposix_main = yes; then
16123   cat >>confdefs.h <<EOF
16124 #define HAVE_LIBCPOSIX 1
16125 EOF
16126
16127   LIBS="-lcposix $LIBS"
16128
16129 fi
16130
16131         echo "$as_me:16131: checking for bzero in -linet" >&5
16132 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
16133 if test "${ac_cv_lib_inet_bzero+set}" = set; then
16134   echo $ECHO_N "(cached) $ECHO_C" >&6
16135 else
16136   ac_check_lib_save_LIBS=$LIBS
16137 LIBS="-linet  $LIBS"
16138 cat >conftest.$ac_ext <<_ACEOF
16139 #line 16139 "configure"
16140 #include "confdefs.h"
16141
16142 /* Override any gcc2 internal prototype to avoid an error.  */
16143 #ifdef __cplusplus
16144 extern "C"
16145 #endif
16146 /* We use char because int might match the return type of a gcc2
16147    builtin and then its argument prototype would still apply.  */
16148 char bzero ();
16149 int
16150 main ()
16151 {
16152 bzero ();
16153   ;
16154   return 0;
16155 }
16156 _ACEOF
16157 rm -f conftest.$ac_objext conftest$ac_exeext
16158 if { (eval echo "$as_me:16158: \"$ac_link\"") >&5
16159   (eval $ac_link) 2>&5
16160   ac_status=$?
16161   echo "$as_me:16161: \$? = $ac_status" >&5
16162   (exit $ac_status); } &&
16163          { ac_try='test -s conftest$ac_exeext'
16164   { (eval echo "$as_me:16164: \"$ac_try\"") >&5
16165   (eval $ac_try) 2>&5
16166   ac_status=$?
16167   echo "$as_me:16167: \$? = $ac_status" >&5
16168   (exit $ac_status); }; }; then
16169   ac_cv_lib_inet_bzero=yes
16170 else
16171   echo "$as_me: failed program was:" >&5
16172 cat conftest.$ac_ext >&5
16173 ac_cv_lib_inet_bzero=no
16174 fi
16175 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16176 LIBS=$ac_check_lib_save_LIBS
16177 fi
16178 echo "$as_me:16178: result: $ac_cv_lib_inet_bzero" >&5
16179 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
16180 if test $ac_cv_lib_inet_bzero = yes; then
16181
16182 cf_add_libs="-linet"
16183 # Filter out duplicates - this happens with badly-designed ".pc" files...
16184 for cf_add_1lib in $LIBS
16185 do
16186         for cf_add_2lib in $cf_add_libs
16187         do
16188                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16189                 then
16190                         cf_add_1lib=
16191                         break
16192                 fi
16193         done
16194         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16195 done
16196 LIBS="$cf_add_libs"
16197
16198 fi
16199 fi
16200
16201 echo "$as_me:16201: checking if sys/time.h works with sys/select.h" >&5
16202 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
16203 if test "${cf_cv_sys_time_select+set}" = set; then
16204   echo $ECHO_N "(cached) $ECHO_C" >&6
16205 else
16206
16207 cat >conftest.$ac_ext <<_ACEOF
16208 #line 16208 "configure"
16209 #include "confdefs.h"
16210
16211 #include <sys/types.h>
16212 #ifdef HAVE_SYS_TIME_H
16213 #include <sys/time.h>
16214 #endif
16215 #ifdef HAVE_SYS_SELECT_H
16216 #include <sys/select.h>
16217 #endif
16218
16219 int
16220 main ()
16221 {
16222
16223   ;
16224   return 0;
16225 }
16226 _ACEOF
16227 rm -f conftest.$ac_objext
16228 if { (eval echo "$as_me:16228: \"$ac_compile\"") >&5
16229   (eval $ac_compile) 2>&5
16230   ac_status=$?
16231   echo "$as_me:16231: \$? = $ac_status" >&5
16232   (exit $ac_status); } &&
16233          { ac_try='test -s conftest.$ac_objext'
16234   { (eval echo "$as_me:16234: \"$ac_try\"") >&5
16235   (eval $ac_try) 2>&5
16236   ac_status=$?
16237   echo "$as_me:16237: \$? = $ac_status" >&5
16238   (exit $ac_status); }; }; then
16239   cf_cv_sys_time_select=yes
16240 else
16241   echo "$as_me: failed program was:" >&5
16242 cat conftest.$ac_ext >&5
16243 cf_cv_sys_time_select=no
16244 fi
16245 rm -f conftest.$ac_objext conftest.$ac_ext
16246
16247 fi
16248
16249 echo "$as_me:16249: result: $cf_cv_sys_time_select" >&5
16250 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
16251 test "$cf_cv_sys_time_select" = yes &&
16252 cat >>confdefs.h <<\EOF
16253 #define HAVE_SYS_TIME_SELECT 1
16254 EOF
16255
16256 ###     checks for compiler characteristics
16257 ac_ext=c
16258 ac_cpp='$CPP $CPPFLAGS'
16259 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16260 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16261 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16262 ac_main_return=return
16263
16264 echo "$as_me:16264: checking for an ANSI C-conforming const" >&5
16265 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16266 if test "${ac_cv_c_const+set}" = set; then
16267   echo $ECHO_N "(cached) $ECHO_C" >&6
16268 else
16269   cat >conftest.$ac_ext <<_ACEOF
16270 #line 16270 "configure"
16271 #include "confdefs.h"
16272
16273 int
16274 main ()
16275 {
16276 /* FIXME: Include the comments suggested by Paul. */
16277 #ifndef __cplusplus
16278   /* Ultrix mips cc rejects this.  */
16279   typedef int charset[2];
16280   const charset x;
16281   /* SunOS 4.1.1 cc rejects this.  */
16282   char const *const *ccp;
16283   char **p;
16284   /* NEC SVR4.0.2 mips cc rejects this.  */
16285   struct point {int x, y;};
16286   static struct point const zero = {0,0};
16287   /* AIX XL C 1.02.0.0 rejects this.
16288      It does not let you subtract one const X* pointer from another in
16289      an arm of an if-expression whose if-part is not a constant
16290      expression */
16291   const char *g = "string";
16292   ccp = &g + (g ? g-g : 0);
16293   /* HPUX 7.0 cc rejects these. */
16294   ++ccp;
16295   p = (char**) ccp;
16296   ccp = (char const *const *) p;
16297   { /* SCO 3.2v4 cc rejects this.  */
16298     char *t;
16299     char const *s = 0 ? (char *) 0 : (char const *) 0;
16300
16301     *t++ = 0;
16302   }
16303   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
16304     int x[] = {25, 17};
16305     const int *foo = &x[0];
16306     ++foo;
16307   }
16308   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16309     typedef const int *iptr;
16310     iptr p = 0;
16311     ++p;
16312   }
16313   { /* AIX XL C 1.02.0.0 rejects this saying
16314        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16315     struct s { int j; const int *ap[3]; };
16316     struct s *b; b->j = 5;
16317   }
16318   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16319     const int foo = 10;
16320   }
16321 #endif
16322
16323   ;
16324   return 0;
16325 }
16326 _ACEOF
16327 rm -f conftest.$ac_objext
16328 if { (eval echo "$as_me:16328: \"$ac_compile\"") >&5
16329   (eval $ac_compile) 2>&5
16330   ac_status=$?
16331   echo "$as_me:16331: \$? = $ac_status" >&5
16332   (exit $ac_status); } &&
16333          { ac_try='test -s conftest.$ac_objext'
16334   { (eval echo "$as_me:16334: \"$ac_try\"") >&5
16335   (eval $ac_try) 2>&5
16336   ac_status=$?
16337   echo "$as_me:16337: \$? = $ac_status" >&5
16338   (exit $ac_status); }; }; then
16339   ac_cv_c_const=yes
16340 else
16341   echo "$as_me: failed program was:" >&5
16342 cat conftest.$ac_ext >&5
16343 ac_cv_c_const=no
16344 fi
16345 rm -f conftest.$ac_objext conftest.$ac_ext
16346 fi
16347 echo "$as_me:16347: result: $ac_cv_c_const" >&5
16348 echo "${ECHO_T}$ac_cv_c_const" >&6
16349 if test $ac_cv_c_const = no; then
16350
16351 cat >>confdefs.h <<\EOF
16352 #define const
16353 EOF
16354
16355 fi
16356
16357 echo "$as_me:16357: checking for inline" >&5
16358 echo $ECHO_N "checking for inline... $ECHO_C" >&6
16359 if test "${ac_cv_c_inline+set}" = set; then
16360   echo $ECHO_N "(cached) $ECHO_C" >&6
16361 else
16362   ac_cv_c_inline=no
16363 for ac_kw in inline __inline__ __inline; do
16364   cat >conftest.$ac_ext <<_ACEOF
16365 #line 16365 "configure"
16366 #include "confdefs.h"
16367 #ifndef __cplusplus
16368 static $ac_kw int static_foo () {return 0; }
16369 $ac_kw int foo () {return 0; }
16370 #endif
16371
16372 _ACEOF
16373 rm -f conftest.$ac_objext
16374 if { (eval echo "$as_me:16374: \"$ac_compile\"") >&5
16375   (eval $ac_compile) 2>&5
16376   ac_status=$?
16377   echo "$as_me:16377: \$? = $ac_status" >&5
16378   (exit $ac_status); } &&
16379          { ac_try='test -s conftest.$ac_objext'
16380   { (eval echo "$as_me:16380: \"$ac_try\"") >&5
16381   (eval $ac_try) 2>&5
16382   ac_status=$?
16383   echo "$as_me:16383: \$? = $ac_status" >&5
16384   (exit $ac_status); }; }; then
16385   ac_cv_c_inline=$ac_kw; break
16386 else
16387   echo "$as_me: failed program was:" >&5
16388 cat conftest.$ac_ext >&5
16389 fi
16390 rm -f conftest.$ac_objext conftest.$ac_ext
16391 done
16392
16393 fi
16394 echo "$as_me:16394: result: $ac_cv_c_inline" >&5
16395 echo "${ECHO_T}$ac_cv_c_inline" >&6
16396 case $ac_cv_c_inline in
16397   inline | yes) ;;
16398   no)
16399 cat >>confdefs.h <<\EOF
16400 #define inline
16401 EOF
16402  ;;
16403   *)  cat >>confdefs.h <<EOF
16404 #define inline $ac_cv_c_inline
16405 EOF
16406  ;;
16407 esac
16408
16409 NCURSES_INLINE=
16410 if test "$ac_cv_c_inline" != no ; then
16411         NCURSES_INLINE=inline
16412         if test "$INTEL_COMPILER" = yes
16413         then
16414                 :
16415         elif test "$CLANG_COMPILER" = yes
16416         then
16417                 :
16418         elif test "$GCC" = yes
16419         then
16420                 echo "$as_me:16420: checking if $CC supports options to tune inlining" >&5
16421 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
16422 if test "${cf_cv_gcc_inline+set}" = set; then
16423   echo $ECHO_N "(cached) $ECHO_C" >&6
16424 else
16425
16426                 cf_save_CFLAGS=$CFLAGS
16427                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
16428                 cat >conftest.$ac_ext <<_ACEOF
16429 #line 16429 "configure"
16430 #include "confdefs.h"
16431 inline int foo(void) { return 1; }
16432 int
16433 main ()
16434 {
16435 ${cf_cv_main_return:-return} foo()
16436   ;
16437   return 0;
16438 }
16439 _ACEOF
16440 rm -f conftest.$ac_objext
16441 if { (eval echo "$as_me:16441: \"$ac_compile\"") >&5
16442   (eval $ac_compile) 2>&5
16443   ac_status=$?
16444   echo "$as_me:16444: \$? = $ac_status" >&5
16445   (exit $ac_status); } &&
16446          { ac_try='test -s conftest.$ac_objext'
16447   { (eval echo "$as_me:16447: \"$ac_try\"") >&5
16448   (eval $ac_try) 2>&5
16449   ac_status=$?
16450   echo "$as_me:16450: \$? = $ac_status" >&5
16451   (exit $ac_status); }; }; then
16452   cf_cv_gcc_inline=yes
16453 else
16454   echo "$as_me: failed program was:" >&5
16455 cat conftest.$ac_ext >&5
16456 cf_cv_gcc_inline=no
16457 fi
16458 rm -f conftest.$ac_objext conftest.$ac_ext
16459                 CFLAGS=$cf_save_CFLAGS
16460
16461 fi
16462 echo "$as_me:16462: result: $cf_cv_gcc_inline" >&5
16463 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
16464                 if test "$cf_cv_gcc_inline" = yes ; then
16465
16466 cf_fix_cppflags=no
16467 cf_new_cflags=
16468 cf_new_cppflags=
16469 cf_new_extra_cppflags=
16470
16471 for cf_add_cflags in --param max-inline-insns-single=1200
16472 do
16473 case $cf_fix_cppflags in
16474 (no)
16475         case $cf_add_cflags in
16476         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16477                 case $cf_add_cflags in
16478                 (-D*)
16479                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16480
16481                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16482                                 && test -z "${cf_tst_cflags}" \
16483                                 && cf_fix_cppflags=yes
16484
16485                         if test $cf_fix_cppflags = yes ; then
16486                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16487                                 continue
16488                         elif test "${cf_tst_cflags}" = "\"'" ; then
16489                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16490                                 continue
16491                         fi
16492                         ;;
16493                 esac
16494                 case "$CPPFLAGS" in
16495                 (*$cf_add_cflags)
16496                         ;;
16497                 (*)
16498                         case $cf_add_cflags in
16499                         (-D*)
16500                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16501
16502 CPPFLAGS=`echo "$CPPFLAGS" | \
16503         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16504                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16505
16506                                 ;;
16507                         esac
16508                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16509                         ;;
16510                 esac
16511                 ;;
16512         (*)
16513                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16514                 ;;
16515         esac
16516         ;;
16517 (yes)
16518         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16519
16520         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16521
16522         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16523                 && test -z "${cf_tst_cflags}" \
16524                 && cf_fix_cppflags=no
16525         ;;
16526 esac
16527 done
16528
16529 if test -n "$cf_new_cflags" ; then
16530
16531         CFLAGS="$CFLAGS $cf_new_cflags"
16532 fi
16533
16534 if test -n "$cf_new_cppflags" ; then
16535
16536         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16537 fi
16538
16539 if test -n "$cf_new_extra_cppflags" ; then
16540
16541         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16542 fi
16543
16544                 fi
16545         fi
16546 fi
16547
16548 echo "$as_me:16548: checking for signal global datatype" >&5
16549 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
16550 if test "${cf_cv_sig_atomic_t+set}" = set; then
16551   echo $ECHO_N "(cached) $ECHO_C" >&6
16552 else
16553
16554         for cf_type in \
16555                 "volatile sig_atomic_t" \
16556                 "sig_atomic_t" \
16557                 "int"
16558         do
16559         cat >conftest.$ac_ext <<_ACEOF
16560 #line 16560 "configure"
16561 #include "confdefs.h"
16562
16563 #include <sys/types.h>
16564 #include <signal.h>
16565 #include <stdio.h>
16566
16567 extern $cf_type x;
16568 $cf_type x;
16569 static void handler(int sig)
16570 {
16571         x = 5;
16572 }
16573 int
16574 main ()
16575 {
16576 signal(SIGINT, handler);
16577                  x = 1
16578   ;
16579   return 0;
16580 }
16581 _ACEOF
16582 rm -f conftest.$ac_objext
16583 if { (eval echo "$as_me:16583: \"$ac_compile\"") >&5
16584   (eval $ac_compile) 2>&5
16585   ac_status=$?
16586   echo "$as_me:16586: \$? = $ac_status" >&5
16587   (exit $ac_status); } &&
16588          { ac_try='test -s conftest.$ac_objext'
16589   { (eval echo "$as_me:16589: \"$ac_try\"") >&5
16590   (eval $ac_try) 2>&5
16591   ac_status=$?
16592   echo "$as_me:16592: \$? = $ac_status" >&5
16593   (exit $ac_status); }; }; then
16594   cf_cv_sig_atomic_t=$cf_type
16595 else
16596   echo "$as_me: failed program was:" >&5
16597 cat conftest.$ac_ext >&5
16598 cf_cv_sig_atomic_t=no
16599 fi
16600 rm -f conftest.$ac_objext conftest.$ac_ext
16601                 test "$cf_cv_sig_atomic_t" != no && break
16602         done
16603
16604 fi
16605
16606 echo "$as_me:16606: result: $cf_cv_sig_atomic_t" >&5
16607 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
16608 test "$cf_cv_sig_atomic_t" != no &&
16609 cat >>confdefs.h <<EOF
16610 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
16611 EOF
16612
16613 if test $NCURSES_CHTYPE = auto ; then
16614
16615 echo "$as_me:16615: checking for type of chtype" >&5
16616 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
16617 if test "${cf_cv_typeof_chtype+set}" = set; then
16618   echo $ECHO_N "(cached) $ECHO_C" >&6
16619 else
16620
16621                 if test "$cross_compiling" = yes; then
16622   cf_cv_typeof_chtype=long
16623 else
16624   cat >conftest.$ac_ext <<_ACEOF
16625 #line 16625 "configure"
16626 #include "confdefs.h"
16627
16628 #define WANT_BITS 31
16629 #include <stdio.h>
16630 int main(void)
16631 {
16632         FILE *fp = fopen("cf_test.out", "w");
16633         if (fp != 0) {
16634                 char *result = "long";
16635                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
16636                         int n;
16637                         unsigned int x, y;
16638                         for (n = 0; n < WANT_BITS; n++) {
16639                                 x = (1 << n);
16640                                 y = (x >> n);
16641                                 if (y != 1 || x == 0) {
16642                                         x = 0;
16643                                         break;
16644                                 }
16645                         }
16646                         /*
16647                          * If x is nonzero, an int is big enough for the bits
16648                          * that we want.
16649                          */
16650                         result = (x != 0) ? "int" : "long";
16651                 }
16652                 fputs(result, fp);
16653                 fclose(fp);
16654         }
16655         ${cf_cv_main_return:-return}(0);
16656 }
16657
16658 _ACEOF
16659 rm -f conftest$ac_exeext
16660 if { (eval echo "$as_me:16660: \"$ac_link\"") >&5
16661   (eval $ac_link) 2>&5
16662   ac_status=$?
16663   echo "$as_me:16663: \$? = $ac_status" >&5
16664   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16665   { (eval echo "$as_me:16665: \"$ac_try\"") >&5
16666   (eval $ac_try) 2>&5
16667   ac_status=$?
16668   echo "$as_me:16668: \$? = $ac_status" >&5
16669   (exit $ac_status); }; }; then
16670   cf_cv_typeof_chtype=`cat cf_test.out`
16671 else
16672   echo "$as_me: program exited with status $ac_status" >&5
16673 echo "$as_me: failed program was:" >&5
16674 cat conftest.$ac_ext >&5
16675 cf_cv_typeof_chtype=long
16676 fi
16677 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16678 fi
16679                 rm -f cf_test.out
16680
16681 fi
16682
16683 echo "$as_me:16683: result: $cf_cv_typeof_chtype" >&5
16684 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
16685
16686 cat >>confdefs.h <<EOF
16687 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
16688 EOF
16689
16690 else
16691         cf_cv_typeof_chtype=$NCURSES_CHTYPE
16692 fi
16693 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
16694
16695 echo "$as_me:16695: checking if unsigned literals are legal" >&5
16696 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
16697 if test "${cf_cv_unsigned_literals+set}" = set; then
16698   echo $ECHO_N "(cached) $ECHO_C" >&6
16699 else
16700
16701         cat >conftest.$ac_ext <<_ACEOF
16702 #line 16702 "configure"
16703 #include "confdefs.h"
16704
16705 int
16706 main ()
16707 {
16708 long x = 1L + 1UL + 1U + 1
16709   ;
16710   return 0;
16711 }
16712 _ACEOF
16713 rm -f conftest.$ac_objext
16714 if { (eval echo "$as_me:16714: \"$ac_compile\"") >&5
16715   (eval $ac_compile) 2>&5
16716   ac_status=$?
16717   echo "$as_me:16717: \$? = $ac_status" >&5
16718   (exit $ac_status); } &&
16719          { ac_try='test -s conftest.$ac_objext'
16720   { (eval echo "$as_me:16720: \"$ac_try\"") >&5
16721   (eval $ac_try) 2>&5
16722   ac_status=$?
16723   echo "$as_me:16723: \$? = $ac_status" >&5
16724   (exit $ac_status); }; }; then
16725   cf_cv_unsigned_literals=yes
16726 else
16727   echo "$as_me: failed program was:" >&5
16728 cat conftest.$ac_ext >&5
16729 cf_cv_unsigned_literals=no
16730 fi
16731 rm -f conftest.$ac_objext conftest.$ac_ext
16732
16733 fi
16734
16735 echo "$as_me:16735: result: $cf_cv_unsigned_literals" >&5
16736 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16737
16738 cf_cv_1UL="1"
16739 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16740 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
16741
16742 if test $NCURSES_MMASK_T = auto ; then
16743         cf_cv_typeof_mmask_t=long
16744 else
16745         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16746 fi
16747 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16748
16749 ###     Checks for external-data
16750
16751 echo "$as_me:16751: checking if external errno is declared" >&5
16752 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16753 if test "${cf_cv_dcl_errno+set}" = set; then
16754   echo $ECHO_N "(cached) $ECHO_C" >&6
16755 else
16756
16757         cat >conftest.$ac_ext <<_ACEOF
16758 #line 16758 "configure"
16759 #include "confdefs.h"
16760
16761 #ifdef HAVE_STDLIB_H
16762 #include <stdlib.h>
16763 #endif
16764 #include <stdio.h>
16765 #include <sys/types.h>
16766 #include <errno.h>
16767 int
16768 main ()
16769 {
16770 int x = (int) errno
16771   ;
16772   return 0;
16773 }
16774 _ACEOF
16775 rm -f conftest.$ac_objext
16776 if { (eval echo "$as_me:16776: \"$ac_compile\"") >&5
16777   (eval $ac_compile) 2>&5
16778   ac_status=$?
16779   echo "$as_me:16779: \$? = $ac_status" >&5
16780   (exit $ac_status); } &&
16781          { ac_try='test -s conftest.$ac_objext'
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_dcl_errno=yes
16788 else
16789   echo "$as_me: failed program was:" >&5
16790 cat conftest.$ac_ext >&5
16791 cf_cv_dcl_errno=no
16792 fi
16793 rm -f conftest.$ac_objext conftest.$ac_ext
16794
16795 fi
16796 echo "$as_me:16796: result: $cf_cv_dcl_errno" >&5
16797 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16798
16799 if test "$cf_cv_dcl_errno" = no ; then
16800
16801 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16802
16803         cat >>confdefs.h <<EOF
16804 #define $cf_result 1
16805 EOF
16806
16807 fi
16808
16809 # It's possible (for near-UNIX clones) that the data doesn't exist
16810
16811 echo "$as_me:16811: checking if external errno exists" >&5
16812 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16813 if test "${cf_cv_have_errno+set}" = set; then
16814   echo $ECHO_N "(cached) $ECHO_C" >&6
16815 else
16816
16817         cat >conftest.$ac_ext <<_ACEOF
16818 #line 16818 "configure"
16819 #include "confdefs.h"
16820
16821 #undef errno
16822 extern int errno;
16823
16824 int
16825 main ()
16826 {
16827 errno = 2
16828   ;
16829   return 0;
16830 }
16831 _ACEOF
16832 rm -f conftest.$ac_objext conftest$ac_exeext
16833 if { (eval echo "$as_me:16833: \"$ac_link\"") >&5
16834   (eval $ac_link) 2>&5
16835   ac_status=$?
16836   echo "$as_me:16836: \$? = $ac_status" >&5
16837   (exit $ac_status); } &&
16838          { ac_try='test -s conftest$ac_exeext'
16839   { (eval echo "$as_me:16839: \"$ac_try\"") >&5
16840   (eval $ac_try) 2>&5
16841   ac_status=$?
16842   echo "$as_me:16842: \$? = $ac_status" >&5
16843   (exit $ac_status); }; }; then
16844   cf_cv_have_errno=yes
16845 else
16846   echo "$as_me: failed program was:" >&5
16847 cat conftest.$ac_ext >&5
16848 cf_cv_have_errno=no
16849 fi
16850 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16851
16852 fi
16853 echo "$as_me:16853: result: $cf_cv_have_errno" >&5
16854 echo "${ECHO_T}$cf_cv_have_errno" >&6
16855
16856 if test "$cf_cv_have_errno" = yes ; then
16857
16858 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16859
16860         cat >>confdefs.h <<EOF
16861 #define $cf_result 1
16862 EOF
16863
16864 fi
16865
16866 echo "$as_me:16866: checking if data-only library module links" >&5
16867 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16868 if test "${cf_cv_link_dataonly+set}" = set; then
16869   echo $ECHO_N "(cached) $ECHO_C" >&6
16870 else
16871
16872         rm -f conftest.a
16873         cat >conftest.$ac_ext <<EOF
16874 #line 16874 "configure"
16875 int     testdata[3] = { 123, 456, 789 };
16876 EOF
16877         if { (eval echo "$as_me:16877: \"$ac_compile\"") >&5
16878   (eval $ac_compile) 2>&5
16879   ac_status=$?
16880   echo "$as_me:16880: \$? = $ac_status" >&5
16881   (exit $ac_status); } ; then
16882                 mv conftest.o data.o && \
16883                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16884         fi
16885         rm -f conftest.$ac_ext data.o
16886         cat >conftest.$ac_ext <<EOF
16887 #line 16887 "configure"
16888 int     testfunc()
16889 {
16890 #if defined(NeXT)
16891         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16892 #else
16893         extern int testdata[3];
16894         return testdata[0] == 123
16895            &&  testdata[1] == 456
16896            &&  testdata[2] == 789;
16897 #endif
16898 }
16899 EOF
16900         if { (eval echo "$as_me:16900: \"$ac_compile\"") >&5
16901   (eval $ac_compile) 2>&5
16902   ac_status=$?
16903   echo "$as_me:16903: \$? = $ac_status" >&5
16904   (exit $ac_status); }; then
16905                 mv conftest.o func.o && \
16906                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16907         fi
16908         rm -f conftest.$ac_ext func.o
16909         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16910         cf_saveLIBS="$LIBS"
16911         LIBS="conftest.a $LIBS"
16912         if test "$cross_compiling" = yes; then
16913   cf_cv_link_dataonly=unknown
16914 else
16915   cat >conftest.$ac_ext <<_ACEOF
16916 #line 16916 "configure"
16917 #include "confdefs.h"
16918
16919         int main(void)
16920         {
16921                 extern int testfunc();
16922                 ${cf_cv_main_return:-return} (!testfunc());
16923         }
16924
16925 _ACEOF
16926 rm -f conftest$ac_exeext
16927 if { (eval echo "$as_me:16927: \"$ac_link\"") >&5
16928   (eval $ac_link) 2>&5
16929   ac_status=$?
16930   echo "$as_me:16930: \$? = $ac_status" >&5
16931   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16932   { (eval echo "$as_me:16932: \"$ac_try\"") >&5
16933   (eval $ac_try) 2>&5
16934   ac_status=$?
16935   echo "$as_me:16935: \$? = $ac_status" >&5
16936   (exit $ac_status); }; }; then
16937   cf_cv_link_dataonly=yes
16938 else
16939   echo "$as_me: program exited with status $ac_status" >&5
16940 echo "$as_me: failed program was:" >&5
16941 cat conftest.$ac_ext >&5
16942 cf_cv_link_dataonly=no
16943 fi
16944 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16945 fi
16946         LIBS="$cf_saveLIBS"
16947
16948 fi
16949
16950 echo "$as_me:16950: result: $cf_cv_link_dataonly" >&5
16951 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16952
16953 if test "$cf_cv_link_dataonly" = no ; then
16954
16955 cat >>confdefs.h <<\EOF
16956 #define BROKEN_LINKER 1
16957 EOF
16958
16959         BROKEN_LINKER=1
16960 fi
16961
16962 ###     Checks for library functions.
16963
16964 for ac_func in \
16965 getcwd \
16966 getegid \
16967 geteuid \
16968 getopt \
16969 getttynam \
16970 issetugid \
16971 poll \
16972 putenv \
16973 remove \
16974 select \
16975 setbuf \
16976 setbuffer \
16977 setenv \
16978 setvbuf \
16979 sigaction \
16980 sigvec \
16981 strdup \
16982 strstr \
16983 tcgetpgrp \
16984 times \
16985 vsnprintf \
16986
16987 do
16988 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16989 echo "$as_me:16989: checking for $ac_func" >&5
16990 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16991 if eval "test \"\${$as_ac_var+set}\" = set"; then
16992   echo $ECHO_N "(cached) $ECHO_C" >&6
16993 else
16994   cat >conftest.$ac_ext <<_ACEOF
16995 #line 16995 "configure"
16996 #include "confdefs.h"
16997 /* System header to define __stub macros and hopefully few prototypes,
16998     which can conflict with char $ac_func (); below.  */
16999 #include <assert.h>
17000 /* Override any gcc2 internal prototype to avoid an error.  */
17001 #ifdef __cplusplus
17002 extern "C"
17003 #endif
17004 /* We use char because int might match the return type of a gcc2
17005    builtin and then its argument prototype would still apply.  */
17006 char $ac_func ();
17007 char (*f) ();
17008
17009 int
17010 main ()
17011 {
17012 /* The GNU C library defines this for functions which it implements
17013     to always fail with ENOSYS.  Some functions are actually named
17014     something starting with __ and the normal name is an alias.  */
17015 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17016 choke me
17017 #else
17018 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17019 #endif
17020
17021   ;
17022   return 0;
17023 }
17024 _ACEOF
17025 rm -f conftest.$ac_objext conftest$ac_exeext
17026 if { (eval echo "$as_me:17026: \"$ac_link\"") >&5
17027   (eval $ac_link) 2>&5
17028   ac_status=$?
17029   echo "$as_me:17029: \$? = $ac_status" >&5
17030   (exit $ac_status); } &&
17031          { ac_try='test -s conftest$ac_exeext'
17032   { (eval echo "$as_me:17032: \"$ac_try\"") >&5
17033   (eval $ac_try) 2>&5
17034   ac_status=$?
17035   echo "$as_me:17035: \$? = $ac_status" >&5
17036   (exit $ac_status); }; }; then
17037   eval "$as_ac_var=yes"
17038 else
17039   echo "$as_me: failed program was:" >&5
17040 cat conftest.$ac_ext >&5
17041 eval "$as_ac_var=no"
17042 fi
17043 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17044 fi
17045 echo "$as_me:17045: result: `eval echo '${'$as_ac_var'}'`" >&5
17046 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17047 if test `eval echo '${'$as_ac_var'}'` = yes; then
17048   cat >>confdefs.h <<EOF
17049 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17050 EOF
17051
17052 fi
17053 done
17054
17055 if test "x$ac_cv_func_getopt" = xno &&
17056    test "x$cf_with_progs$cf_with_tests" != xnono; then
17057         { { echo "$as_me:17057: error: getopt is required for building programs" >&5
17058 echo "$as_me: error: getopt is required for building programs" >&2;}
17059    { (exit 1); exit 1; }; }
17060 fi
17061
17062 if test "x$with_getcap" = "xyes" ; then
17063
17064 echo "$as_me:17064: checking for terminal-capability database functions" >&5
17065 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
17066 if test "${cf_cv_cgetent+set}" = set; then
17067   echo $ECHO_N "(cached) $ECHO_C" >&6
17068 else
17069
17070 cat >conftest.$ac_ext <<_ACEOF
17071 #line 17071 "configure"
17072 #include "confdefs.h"
17073
17074 #include <stdlib.h>
17075 int
17076 main ()
17077 {
17078
17079         char temp[128];
17080         char *buf = temp;
17081         char *db_array = temp;
17082         cgetent(&buf, &db_array, "vt100");
17083         cgetcap(buf, "tc", '=');
17084         cgetmatch(buf, "tc");
17085
17086   ;
17087   return 0;
17088 }
17089 _ACEOF
17090 rm -f conftest.$ac_objext conftest$ac_exeext
17091 if { (eval echo "$as_me:17091: \"$ac_link\"") >&5
17092   (eval $ac_link) 2>&5
17093   ac_status=$?
17094   echo "$as_me:17094: \$? = $ac_status" >&5
17095   (exit $ac_status); } &&
17096          { ac_try='test -s conftest$ac_exeext'
17097   { (eval echo "$as_me:17097: \"$ac_try\"") >&5
17098   (eval $ac_try) 2>&5
17099   ac_status=$?
17100   echo "$as_me:17100: \$? = $ac_status" >&5
17101   (exit $ac_status); }; }; then
17102   cf_cv_cgetent=yes
17103 else
17104   echo "$as_me: failed program was:" >&5
17105 cat conftest.$ac_ext >&5
17106 cf_cv_cgetent=no
17107 fi
17108 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17109
17110 fi
17111 echo "$as_me:17111: result: $cf_cv_cgetent" >&5
17112 echo "${ECHO_T}$cf_cv_cgetent" >&6
17113
17114 if test "$cf_cv_cgetent" = yes
17115 then
17116
17117 cat >>confdefs.h <<\EOF
17118 #define HAVE_BSD_CGETENT 1
17119 EOF
17120
17121 echo "$as_me:17121: checking if cgetent uses const parameter" >&5
17122 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
17123 if test "${cf_cv_cgetent_const+set}" = set; then
17124   echo $ECHO_N "(cached) $ECHO_C" >&6
17125 else
17126
17127 cat >conftest.$ac_ext <<_ACEOF
17128 #line 17128 "configure"
17129 #include "confdefs.h"
17130
17131 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
17132 #include <stdlib.h>
17133 int
17134 main ()
17135 {
17136
17137         char temp[128];
17138         char *buf = temp;
17139 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
17140         const char *db_array = temp;
17141         cgetent(&buf, &db_array, "vt100");
17142 #endif
17143         cgetcap(buf, "tc", '=');
17144         cgetmatch(buf, "tc");
17145
17146   ;
17147   return 0;
17148 }
17149 _ACEOF
17150 rm -f conftest.$ac_objext conftest$ac_exeext
17151 if { (eval echo "$as_me:17151: \"$ac_link\"") >&5
17152   (eval $ac_link) 2>&5
17153   ac_status=$?
17154   echo "$as_me:17154: \$? = $ac_status" >&5
17155   (exit $ac_status); } &&
17156          { ac_try='test -s conftest$ac_exeext'
17157   { (eval echo "$as_me:17157: \"$ac_try\"") >&5
17158   (eval $ac_try) 2>&5
17159   ac_status=$?
17160   echo "$as_me:17160: \$? = $ac_status" >&5
17161   (exit $ac_status); }; }; then
17162   cf_cv_cgetent_const=yes
17163 else
17164   echo "$as_me: failed program was:" >&5
17165 cat conftest.$ac_ext >&5
17166 cf_cv_cgetent_const=no
17167 fi
17168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17169
17170 fi
17171 echo "$as_me:17171: result: $cf_cv_cgetent_const" >&5
17172 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
17173         if test "$cf_cv_cgetent_const" = yes
17174         then
17175
17176 cat >>confdefs.h <<EOF
17177 #define CGETENT_CONST const
17178 EOF
17179
17180         fi
17181 fi
17182
17183 fi
17184
17185 echo "$as_me:17185: checking for isascii" >&5
17186 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
17187 if test "${cf_cv_have_isascii+set}" = set; then
17188   echo $ECHO_N "(cached) $ECHO_C" >&6
17189 else
17190
17191         cat >conftest.$ac_ext <<_ACEOF
17192 #line 17192 "configure"
17193 #include "confdefs.h"
17194 #include <ctype.h>
17195 int
17196 main ()
17197 {
17198 int x = isascii(' ')
17199   ;
17200   return 0;
17201 }
17202 _ACEOF
17203 rm -f conftest.$ac_objext conftest$ac_exeext
17204 if { (eval echo "$as_me:17204: \"$ac_link\"") >&5
17205   (eval $ac_link) 2>&5
17206   ac_status=$?
17207   echo "$as_me:17207: \$? = $ac_status" >&5
17208   (exit $ac_status); } &&
17209          { ac_try='test -s conftest$ac_exeext'
17210   { (eval echo "$as_me:17210: \"$ac_try\"") >&5
17211   (eval $ac_try) 2>&5
17212   ac_status=$?
17213   echo "$as_me:17213: \$? = $ac_status" >&5
17214   (exit $ac_status); }; }; then
17215   cf_cv_have_isascii=yes
17216 else
17217   echo "$as_me: failed program was:" >&5
17218 cat conftest.$ac_ext >&5
17219 cf_cv_have_isascii=no
17220 fi
17221 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17222
17223 fi
17224 echo "$as_me:17224: result: $cf_cv_have_isascii" >&5
17225 echo "${ECHO_T}$cf_cv_have_isascii" >&6
17226 test "$cf_cv_have_isascii" = yes &&
17227 cat >>confdefs.h <<\EOF
17228 #define HAVE_ISASCII 1
17229 EOF
17230
17231 if test "$ac_cv_func_sigaction" = yes; then
17232 echo "$as_me:17232: checking whether sigaction needs _POSIX_SOURCE" >&5
17233 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
17234 cat >conftest.$ac_ext <<_ACEOF
17235 #line 17235 "configure"
17236 #include "confdefs.h"
17237
17238 #include <sys/types.h>
17239 #include <signal.h>
17240 int
17241 main ()
17242 {
17243 struct sigaction act
17244   ;
17245   return 0;
17246 }
17247 _ACEOF
17248 rm -f conftest.$ac_objext
17249 if { (eval echo "$as_me:17249: \"$ac_compile\"") >&5
17250   (eval $ac_compile) 2>&5
17251   ac_status=$?
17252   echo "$as_me:17252: \$? = $ac_status" >&5
17253   (exit $ac_status); } &&
17254          { ac_try='test -s conftest.$ac_objext'
17255   { (eval echo "$as_me:17255: \"$ac_try\"") >&5
17256   (eval $ac_try) 2>&5
17257   ac_status=$?
17258   echo "$as_me:17258: \$? = $ac_status" >&5
17259   (exit $ac_status); }; }; then
17260   sigact_bad=no
17261 else
17262   echo "$as_me: failed program was:" >&5
17263 cat conftest.$ac_ext >&5
17264
17265 cat >conftest.$ac_ext <<_ACEOF
17266 #line 17266 "configure"
17267 #include "confdefs.h"
17268
17269 #define _POSIX_SOURCE
17270 #include <sys/types.h>
17271 #include <signal.h>
17272 int
17273 main ()
17274 {
17275 struct sigaction act
17276   ;
17277   return 0;
17278 }
17279 _ACEOF
17280 rm -f conftest.$ac_objext
17281 if { (eval echo "$as_me:17281: \"$ac_compile\"") >&5
17282   (eval $ac_compile) 2>&5
17283   ac_status=$?
17284   echo "$as_me:17284: \$? = $ac_status" >&5
17285   (exit $ac_status); } &&
17286          { ac_try='test -s conftest.$ac_objext'
17287   { (eval echo "$as_me:17287: \"$ac_try\"") >&5
17288   (eval $ac_try) 2>&5
17289   ac_status=$?
17290   echo "$as_me:17290: \$? = $ac_status" >&5
17291   (exit $ac_status); }; }; then
17292   sigact_bad=yes
17293
17294 cat >>confdefs.h <<\EOF
17295 #define _POSIX_SOURCE 1
17296 EOF
17297
17298 else
17299   echo "$as_me: failed program was:" >&5
17300 cat conftest.$ac_ext >&5
17301 sigact_bad=unknown
17302 fi
17303 rm -f conftest.$ac_objext conftest.$ac_ext
17304 fi
17305 rm -f conftest.$ac_objext conftest.$ac_ext
17306 echo "$as_me:17306: result: $sigact_bad" >&5
17307 echo "${ECHO_T}$sigact_bad" >&6
17308 fi
17309
17310 echo "$as_me:17310: checking if nanosleep really works" >&5
17311 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
17312 if test "${cf_cv_func_nanosleep+set}" = set; then
17313   echo $ECHO_N "(cached) $ECHO_C" >&6
17314 else
17315
17316 if test "$cross_compiling" = yes; then
17317   cf_cv_func_nanosleep=unknown
17318 else
17319   cat >conftest.$ac_ext <<_ACEOF
17320 #line 17320 "configure"
17321 #include "confdefs.h"
17322
17323 #include <stdio.h>
17324 #include <errno.h>
17325 #include <time.h>
17326
17327 #ifdef HAVE_SYS_TIME_H
17328 #include <sys/time.h>
17329 #endif
17330
17331 int main(void) {
17332         struct timespec ts1, ts2;
17333         int code;
17334         ts1.tv_sec  = 0;
17335         ts1.tv_nsec = 750000000;
17336         ts2.tv_sec  = 0;
17337         ts2.tv_nsec = 0;
17338         errno = 0;
17339         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
17340         ${cf_cv_main_return:-return}(code != 0);
17341 }
17342
17343 _ACEOF
17344 rm -f conftest$ac_exeext
17345 if { (eval echo "$as_me:17345: \"$ac_link\"") >&5
17346   (eval $ac_link) 2>&5
17347   ac_status=$?
17348   echo "$as_me:17348: \$? = $ac_status" >&5
17349   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17350   { (eval echo "$as_me:17350: \"$ac_try\"") >&5
17351   (eval $ac_try) 2>&5
17352   ac_status=$?
17353   echo "$as_me:17353: \$? = $ac_status" >&5
17354   (exit $ac_status); }; }; then
17355   cf_cv_func_nanosleep=yes
17356 else
17357   echo "$as_me: program exited with status $ac_status" >&5
17358 echo "$as_me: failed program was:" >&5
17359 cat conftest.$ac_ext >&5
17360 cf_cv_func_nanosleep=no
17361 fi
17362 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17363 fi
17364 fi
17365 echo "$as_me:17365: result: $cf_cv_func_nanosleep" >&5
17366 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
17367
17368 test "$cf_cv_func_nanosleep" = "yes" &&
17369 cat >>confdefs.h <<\EOF
17370 #define HAVE_NANOSLEEP 1
17371 EOF
17372
17373 for ac_header in \
17374 termio.h \
17375 termios.h \
17376 unistd.h \
17377
17378 do
17379 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17380 echo "$as_me:17380: checking for $ac_header" >&5
17381 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17382 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17383   echo $ECHO_N "(cached) $ECHO_C" >&6
17384 else
17385   cat >conftest.$ac_ext <<_ACEOF
17386 #line 17386 "configure"
17387 #include "confdefs.h"
17388 #include <$ac_header>
17389 _ACEOF
17390 if { (eval echo "$as_me:17390: \"$ac_cpp conftest.$ac_ext\"") >&5
17391   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17392   ac_status=$?
17393   egrep -v '^ *\+' conftest.er1 >conftest.err
17394   rm -f conftest.er1
17395   cat conftest.err >&5
17396   echo "$as_me:17396: \$? = $ac_status" >&5
17397   (exit $ac_status); } >/dev/null; then
17398   if test -s conftest.err; then
17399     ac_cpp_err=$ac_c_preproc_warn_flag
17400   else
17401     ac_cpp_err=
17402   fi
17403 else
17404   ac_cpp_err=yes
17405 fi
17406 if test -z "$ac_cpp_err"; then
17407   eval "$as_ac_Header=yes"
17408 else
17409   echo "$as_me: failed program was:" >&5
17410   cat conftest.$ac_ext >&5
17411   eval "$as_ac_Header=no"
17412 fi
17413 rm -f conftest.err conftest.$ac_ext
17414 fi
17415 echo "$as_me:17415: result: `eval echo '${'$as_ac_Header'}'`" >&5
17416 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17417 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17418   cat >>confdefs.h <<EOF
17419 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17420 EOF
17421
17422 fi
17423 done
17424
17425 if test "$ISC" = yes ; then
17426
17427 for ac_header in sys/termio.h
17428 do
17429 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17430 echo "$as_me:17430: checking for $ac_header" >&5
17431 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17432 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17433   echo $ECHO_N "(cached) $ECHO_C" >&6
17434 else
17435   cat >conftest.$ac_ext <<_ACEOF
17436 #line 17436 "configure"
17437 #include "confdefs.h"
17438 #include <$ac_header>
17439 _ACEOF
17440 if { (eval echo "$as_me:17440: \"$ac_cpp conftest.$ac_ext\"") >&5
17441   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17442   ac_status=$?
17443   egrep -v '^ *\+' conftest.er1 >conftest.err
17444   rm -f conftest.er1
17445   cat conftest.err >&5
17446   echo "$as_me:17446: \$? = $ac_status" >&5
17447   (exit $ac_status); } >/dev/null; then
17448   if test -s conftest.err; then
17449     ac_cpp_err=$ac_c_preproc_warn_flag
17450   else
17451     ac_cpp_err=
17452   fi
17453 else
17454   ac_cpp_err=yes
17455 fi
17456 if test -z "$ac_cpp_err"; then
17457   eval "$as_ac_Header=yes"
17458 else
17459   echo "$as_me: failed program was:" >&5
17460   cat conftest.$ac_ext >&5
17461   eval "$as_ac_Header=no"
17462 fi
17463 rm -f conftest.err conftest.$ac_ext
17464 fi
17465 echo "$as_me:17465: result: `eval echo '${'$as_ac_Header'}'`" >&5
17466 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17467 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17468   cat >>confdefs.h <<EOF
17469 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17470 EOF
17471
17472 fi
17473 done
17474
17475 fi
17476 if test "$ac_cv_header_termios_h" = yes ; then
17477         case "$CFLAGS $CPPFLAGS" in
17478         (*-D_POSIX_SOURCE*)
17479                 termios_bad=dunno ;;
17480         (*)     termios_bad=maybe ;;
17481         esac
17482         if test "$termios_bad" = maybe ; then
17483         echo "$as_me:17483: checking whether termios.h needs _POSIX_SOURCE" >&5
17484 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
17485         cat >conftest.$ac_ext <<_ACEOF
17486 #line 17486 "configure"
17487 #include "confdefs.h"
17488 #include <termios.h>
17489 int
17490 main ()
17491 {
17492 struct termios foo; int x = foo.c_iflag
17493   ;
17494   return 0;
17495 }
17496 _ACEOF
17497 rm -f conftest.$ac_objext
17498 if { (eval echo "$as_me:17498: \"$ac_compile\"") >&5
17499   (eval $ac_compile) 2>&5
17500   ac_status=$?
17501   echo "$as_me:17501: \$? = $ac_status" >&5
17502   (exit $ac_status); } &&
17503          { ac_try='test -s conftest.$ac_objext'
17504   { (eval echo "$as_me:17504: \"$ac_try\"") >&5
17505   (eval $ac_try) 2>&5
17506   ac_status=$?
17507   echo "$as_me:17507: \$? = $ac_status" >&5
17508   (exit $ac_status); }; }; then
17509   termios_bad=no
17510 else
17511   echo "$as_me: failed program was:" >&5
17512 cat conftest.$ac_ext >&5
17513
17514                 cat >conftest.$ac_ext <<_ACEOF
17515 #line 17515 "configure"
17516 #include "confdefs.h"
17517
17518 #define _POSIX_SOURCE
17519 #include <termios.h>
17520 int
17521 main ()
17522 {
17523 struct termios foo; int x = foo.c_iflag
17524   ;
17525   return 0;
17526 }
17527 _ACEOF
17528 rm -f conftest.$ac_objext
17529 if { (eval echo "$as_me:17529: \"$ac_compile\"") >&5
17530   (eval $ac_compile) 2>&5
17531   ac_status=$?
17532   echo "$as_me:17532: \$? = $ac_status" >&5
17533   (exit $ac_status); } &&
17534          { ac_try='test -s conftest.$ac_objext'
17535   { (eval echo "$as_me:17535: \"$ac_try\"") >&5
17536   (eval $ac_try) 2>&5
17537   ac_status=$?
17538   echo "$as_me:17538: \$? = $ac_status" >&5
17539   (exit $ac_status); }; }; then
17540   termios_bad=unknown
17541 else
17542   echo "$as_me: failed program was:" >&5
17543 cat conftest.$ac_ext >&5
17544 termios_bad=yes
17545 cat >>confdefs.h <<\EOF
17546 #define _POSIX_SOURCE 1
17547 EOF
17548
17549 fi
17550 rm -f conftest.$ac_objext conftest.$ac_ext
17551
17552 fi
17553 rm -f conftest.$ac_objext conftest.$ac_ext
17554         echo "$as_me:17554: result: $termios_bad" >&5
17555 echo "${ECHO_T}$termios_bad" >&6
17556         fi
17557 fi
17558
17559 echo "$as_me:17559: checking for tcgetattr" >&5
17560 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
17561 if test "${cf_cv_have_tcgetattr+set}" = set; then
17562   echo $ECHO_N "(cached) $ECHO_C" >&6
17563 else
17564
17565 cat >conftest.$ac_ext <<_ACEOF
17566 #line 17566 "configure"
17567 #include "confdefs.h"
17568
17569 #include <sys/types.h>
17570 #ifdef HAVE_UNISTD_H
17571 #include <unistd.h>
17572 #endif
17573 #ifdef HAVE_TERMIOS_H
17574 #include <termios.h>
17575 #define TTY struct termios
17576 #else
17577 #ifdef HAVE_TERMIO_H
17578 #include <termio.h>
17579 #define TTY struct termio
17580 #endif
17581 #endif
17582
17583 int
17584 main ()
17585 {
17586
17587 TTY foo;
17588 tcgetattr(1, &foo);
17589   ;
17590   return 0;
17591 }
17592 _ACEOF
17593 rm -f conftest.$ac_objext conftest$ac_exeext
17594 if { (eval echo "$as_me:17594: \"$ac_link\"") >&5
17595   (eval $ac_link) 2>&5
17596   ac_status=$?
17597   echo "$as_me:17597: \$? = $ac_status" >&5
17598   (exit $ac_status); } &&
17599          { ac_try='test -s conftest$ac_exeext'
17600   { (eval echo "$as_me:17600: \"$ac_try\"") >&5
17601   (eval $ac_try) 2>&5
17602   ac_status=$?
17603   echo "$as_me:17603: \$? = $ac_status" >&5
17604   (exit $ac_status); }; }; then
17605   cf_cv_have_tcgetattr=yes
17606 else
17607   echo "$as_me: failed program was:" >&5
17608 cat conftest.$ac_ext >&5
17609 cf_cv_have_tcgetattr=no
17610 fi
17611 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17612 fi
17613 echo "$as_me:17613: result: $cf_cv_have_tcgetattr" >&5
17614 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
17615 test "$cf_cv_have_tcgetattr" = yes &&
17616 cat >>confdefs.h <<\EOF
17617 #define HAVE_TCGETATTR 1
17618 EOF
17619
17620 echo "$as_me:17620: checking for vsscanf function or workaround" >&5
17621 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
17622 if test "${cf_cv_func_vsscanf+set}" = set; then
17623   echo $ECHO_N "(cached) $ECHO_C" >&6
17624 else
17625
17626 cat >conftest.$ac_ext <<_ACEOF
17627 #line 17627 "configure"
17628 #include "confdefs.h"
17629
17630 #include <stdarg.h>
17631 #include <stdio.h>
17632 int
17633 main ()
17634 {
17635
17636         va_list ap;
17637         vsscanf("from", "%d", ap)
17638   ;
17639   return 0;
17640 }
17641 _ACEOF
17642 rm -f conftest.$ac_objext conftest$ac_exeext
17643 if { (eval echo "$as_me:17643: \"$ac_link\"") >&5
17644   (eval $ac_link) 2>&5
17645   ac_status=$?
17646   echo "$as_me:17646: \$? = $ac_status" >&5
17647   (exit $ac_status); } &&
17648          { ac_try='test -s conftest$ac_exeext'
17649   { (eval echo "$as_me:17649: \"$ac_try\"") >&5
17650   (eval $ac_try) 2>&5
17651   ac_status=$?
17652   echo "$as_me:17652: \$? = $ac_status" >&5
17653   (exit $ac_status); }; }; then
17654   cf_cv_func_vsscanf=vsscanf
17655 else
17656   echo "$as_me: failed program was:" >&5
17657 cat conftest.$ac_ext >&5
17658
17659 cat >conftest.$ac_ext <<_ACEOF
17660 #line 17660 "configure"
17661 #include "confdefs.h"
17662
17663 #include <stdarg.h>
17664 #include <stdio.h>
17665 int
17666 main ()
17667 {
17668
17669         FILE strbuf;
17670         char *str = "from";
17671
17672         strbuf._flag = _IOREAD;
17673         strbuf._ptr = strbuf._base = (unsigned char *) str;
17674         strbuf._cnt = strlen(str);
17675         strbuf._file = _NFILE;
17676         return (vfscanf(&strbuf, "%d", ap))
17677   ;
17678   return 0;
17679 }
17680 _ACEOF
17681 rm -f conftest.$ac_objext conftest$ac_exeext
17682 if { (eval echo "$as_me:17682: \"$ac_link\"") >&5
17683   (eval $ac_link) 2>&5
17684   ac_status=$?
17685   echo "$as_me:17685: \$? = $ac_status" >&5
17686   (exit $ac_status); } &&
17687          { ac_try='test -s conftest$ac_exeext'
17688   { (eval echo "$as_me:17688: \"$ac_try\"") >&5
17689   (eval $ac_try) 2>&5
17690   ac_status=$?
17691   echo "$as_me:17691: \$? = $ac_status" >&5
17692   (exit $ac_status); }; }; then
17693   cf_cv_func_vsscanf=vfscanf
17694 else
17695   echo "$as_me: failed program was:" >&5
17696 cat conftest.$ac_ext >&5
17697
17698 cat >conftest.$ac_ext <<_ACEOF
17699 #line 17699 "configure"
17700 #include "confdefs.h"
17701
17702 #include <stdarg.h>
17703 #include <stdio.h>
17704 int
17705 main ()
17706 {
17707
17708         FILE strbuf;
17709         char *str = "from";
17710
17711         strbuf._flag = _IOREAD;
17712         strbuf._ptr = strbuf._base = (unsigned char *) str;
17713         strbuf._cnt = strlen(str);
17714         strbuf._file = _NFILE;
17715         return (_doscan(&strbuf, "%d", ap))
17716   ;
17717   return 0;
17718 }
17719 _ACEOF
17720 rm -f conftest.$ac_objext conftest$ac_exeext
17721 if { (eval echo "$as_me:17721: \"$ac_link\"") >&5
17722   (eval $ac_link) 2>&5
17723   ac_status=$?
17724   echo "$as_me:17724: \$? = $ac_status" >&5
17725   (exit $ac_status); } &&
17726          { ac_try='test -s conftest$ac_exeext'
17727   { (eval echo "$as_me:17727: \"$ac_try\"") >&5
17728   (eval $ac_try) 2>&5
17729   ac_status=$?
17730   echo "$as_me:17730: \$? = $ac_status" >&5
17731   (exit $ac_status); }; }; then
17732   cf_cv_func_vsscanf=_doscan
17733 else
17734   echo "$as_me: failed program was:" >&5
17735 cat conftest.$ac_ext >&5
17736
17737 cf_cv_func_vsscanf=no
17738 fi
17739 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17740 fi
17741 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17742 fi
17743 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17744 fi
17745 echo "$as_me:17745: result: $cf_cv_func_vsscanf" >&5
17746 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17747
17748 case $cf_cv_func_vsscanf in
17749 (vsscanf)
17750 cat >>confdefs.h <<\EOF
17751 #define HAVE_VSSCANF 1
17752 EOF
17753 ;;
17754 (vfscanf)
17755 cat >>confdefs.h <<\EOF
17756 #define HAVE_VFSCANF 1
17757 EOF
17758 ;;
17759 (_doscan)
17760 cat >>confdefs.h <<\EOF
17761 #define HAVE__DOSCAN 1
17762 EOF
17763 ;;
17764 esac
17765
17766 for ac_header in \
17767 unistd.h \
17768
17769 do
17770 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17771 echo "$as_me:17771: checking for $ac_header" >&5
17772 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17773 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17774   echo $ECHO_N "(cached) $ECHO_C" >&6
17775 else
17776   cat >conftest.$ac_ext <<_ACEOF
17777 #line 17777 "configure"
17778 #include "confdefs.h"
17779 #include <$ac_header>
17780 _ACEOF
17781 if { (eval echo "$as_me:17781: \"$ac_cpp conftest.$ac_ext\"") >&5
17782   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17783   ac_status=$?
17784   egrep -v '^ *\+' conftest.er1 >conftest.err
17785   rm -f conftest.er1
17786   cat conftest.err >&5
17787   echo "$as_me:17787: \$? = $ac_status" >&5
17788   (exit $ac_status); } >/dev/null; then
17789   if test -s conftest.err; then
17790     ac_cpp_err=$ac_c_preproc_warn_flag
17791   else
17792     ac_cpp_err=
17793   fi
17794 else
17795   ac_cpp_err=yes
17796 fi
17797 if test -z "$ac_cpp_err"; then
17798   eval "$as_ac_Header=yes"
17799 else
17800   echo "$as_me: failed program was:" >&5
17801   cat conftest.$ac_ext >&5
17802   eval "$as_ac_Header=no"
17803 fi
17804 rm -f conftest.err conftest.$ac_ext
17805 fi
17806 echo "$as_me:17806: result: `eval echo '${'$as_ac_Header'}'`" >&5
17807 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17808 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17809   cat >>confdefs.h <<EOF
17810 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17811 EOF
17812
17813 fi
17814 done
17815
17816 echo "$as_me:17816: checking for working mkstemp" >&5
17817 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17818 if test "${cf_cv_func_mkstemp+set}" = set; then
17819   echo $ECHO_N "(cached) $ECHO_C" >&6
17820 else
17821
17822 rm -rf conftest*
17823 if test "$cross_compiling" = yes; then
17824   cf_cv_func_mkstemp=maybe
17825 else
17826   cat >conftest.$ac_ext <<_ACEOF
17827 #line 17827 "configure"
17828 #include "confdefs.h"
17829
17830 #include <sys/types.h>
17831 #ifdef HAVE_UNISTD_H
17832 #include <unistd.h>
17833 #endif
17834 #include <stdlib.h>
17835 #include <stdio.h>
17836 #include <string.h>
17837 #include <sys/stat.h>
17838 int main(void)
17839 {
17840         char *tmpl = "conftestXXXXXX";
17841         char name[2][80];
17842         int n;
17843         int result = 0;
17844         int fd;
17845         struct stat sb;
17846
17847         umask(077);
17848         for (n = 0; n < 2; ++n) {
17849                 strcpy(name[n], tmpl);
17850                 if ((fd = mkstemp(name[n])) >= 0) {
17851                         if (!strcmp(name[n], tmpl)
17852                          || stat(name[n], &sb) != 0
17853                          || (sb.st_mode & S_IFMT) != S_IFREG
17854                          || (sb.st_mode & 077) != 0) {
17855                                 result = 1;
17856                         }
17857                         close(fd);
17858                 }
17859         }
17860         if (result == 0
17861          && !strcmp(name[0], name[1]))
17862                 result = 1;
17863         ${cf_cv_main_return:-return}(result);
17864 }
17865
17866 _ACEOF
17867 rm -f conftest$ac_exeext
17868 if { (eval echo "$as_me:17868: \"$ac_link\"") >&5
17869   (eval $ac_link) 2>&5
17870   ac_status=$?
17871   echo "$as_me:17871: \$? = $ac_status" >&5
17872   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17873   { (eval echo "$as_me:17873: \"$ac_try\"") >&5
17874   (eval $ac_try) 2>&5
17875   ac_status=$?
17876   echo "$as_me:17876: \$? = $ac_status" >&5
17877   (exit $ac_status); }; }; then
17878   cf_cv_func_mkstemp=yes
17879
17880 else
17881   echo "$as_me: program exited with status $ac_status" >&5
17882 echo "$as_me: failed program was:" >&5
17883 cat conftest.$ac_ext >&5
17884 cf_cv_func_mkstemp=no
17885
17886 fi
17887 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17888 fi
17889
17890 fi
17891 echo "$as_me:17891: result: $cf_cv_func_mkstemp" >&5
17892 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17893 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17894         echo "$as_me:17894: checking for mkstemp" >&5
17895 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17896 if test "${ac_cv_func_mkstemp+set}" = set; then
17897   echo $ECHO_N "(cached) $ECHO_C" >&6
17898 else
17899   cat >conftest.$ac_ext <<_ACEOF
17900 #line 17900 "configure"
17901 #include "confdefs.h"
17902 /* System header to define __stub macros and hopefully few prototypes,
17903     which can conflict with char mkstemp (); below.  */
17904 #include <assert.h>
17905 /* Override any gcc2 internal prototype to avoid an error.  */
17906 #ifdef __cplusplus
17907 extern "C"
17908 #endif
17909 /* We use char because int might match the return type of a gcc2
17910    builtin and then its argument prototype would still apply.  */
17911 char mkstemp ();
17912 char (*f) ();
17913
17914 int
17915 main ()
17916 {
17917 /* The GNU C library defines this for functions which it implements
17918     to always fail with ENOSYS.  Some functions are actually named
17919     something starting with __ and the normal name is an alias.  */
17920 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17921 choke me
17922 #else
17923 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17924 #endif
17925
17926   ;
17927   return 0;
17928 }
17929 _ACEOF
17930 rm -f conftest.$ac_objext conftest$ac_exeext
17931 if { (eval echo "$as_me:17931: \"$ac_link\"") >&5
17932   (eval $ac_link) 2>&5
17933   ac_status=$?
17934   echo "$as_me:17934: \$? = $ac_status" >&5
17935   (exit $ac_status); } &&
17936          { ac_try='test -s conftest$ac_exeext'
17937   { (eval echo "$as_me:17937: \"$ac_try\"") >&5
17938   (eval $ac_try) 2>&5
17939   ac_status=$?
17940   echo "$as_me:17940: \$? = $ac_status" >&5
17941   (exit $ac_status); }; }; then
17942   ac_cv_func_mkstemp=yes
17943 else
17944   echo "$as_me: failed program was:" >&5
17945 cat conftest.$ac_ext >&5
17946 ac_cv_func_mkstemp=no
17947 fi
17948 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17949 fi
17950 echo "$as_me:17950: result: $ac_cv_func_mkstemp" >&5
17951 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17952
17953 fi
17954 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17955
17956 cat >>confdefs.h <<\EOF
17957 #define HAVE_MKSTEMP 1
17958 EOF
17959
17960 fi
17961
17962 # setup for prototype of fallback for vsscanf()
17963
17964 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17965         HAVE_VSSCANF=1
17966 else
17967         HAVE_VSSCANF=0
17968 fi
17969
17970 if test "x$cross_compiling" = xyes ; then
17971         { echo "$as_me:17971: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17972 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17973 else
17974         echo "$as_me:17974: checking whether setvbuf arguments are reversed" >&5
17975 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17976 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17977   echo $ECHO_N "(cached) $ECHO_C" >&6
17978 else
17979   if test "$cross_compiling" = yes; then
17980   { { echo "$as_me:17980: error: cannot run test program while cross compiling" >&5
17981 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17982    { (exit 1); exit 1; }; }
17983 else
17984   cat >conftest.$ac_ext <<_ACEOF
17985 #line 17985 "configure"
17986 #include "confdefs.h"
17987 #include <stdio.h>
17988 /* If setvbuf has the reversed format, exit 0. */
17989 int
17990 main ()
17991 {
17992   /* This call has the arguments reversed.
17993      A reversed system may check and see that the address of main
17994      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17995   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17996     $ac_main_return(1);
17997   putc('\r', stdout);
17998   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17999 }
18000 _ACEOF
18001 rm -f conftest$ac_exeext
18002 if { (eval echo "$as_me:18002: \"$ac_link\"") >&5
18003   (eval $ac_link) 2>&5
18004   ac_status=$?
18005   echo "$as_me:18005: \$? = $ac_status" >&5
18006   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18007   { (eval echo "$as_me:18007: \"$ac_try\"") >&5
18008   (eval $ac_try) 2>&5
18009   ac_status=$?
18010   echo "$as_me:18010: \$? = $ac_status" >&5
18011   (exit $ac_status); }; }; then
18012   ac_cv_func_setvbuf_reversed=yes
18013 else
18014   echo "$as_me: program exited with status $ac_status" >&5
18015 echo "$as_me: failed program was:" >&5
18016 cat conftest.$ac_ext >&5
18017 ac_cv_func_setvbuf_reversed=no
18018 fi
18019 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18020 fi
18021 rm -f core core.* *.core
18022 fi
18023 echo "$as_me:18023: result: $ac_cv_func_setvbuf_reversed" >&5
18024 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
18025 if test $ac_cv_func_setvbuf_reversed = yes; then
18026
18027 cat >>confdefs.h <<\EOF
18028 #define SETVBUF_REVERSED 1
18029 EOF
18030
18031 fi
18032
18033 fi
18034 echo "$as_me:18034: checking for intptr_t" >&5
18035 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
18036 if test "${ac_cv_type_intptr_t+set}" = set; then
18037   echo $ECHO_N "(cached) $ECHO_C" >&6
18038 else
18039   cat >conftest.$ac_ext <<_ACEOF
18040 #line 18040 "configure"
18041 #include "confdefs.h"
18042 $ac_includes_default
18043 int
18044 main ()
18045 {
18046 if ((intptr_t *) 0)
18047   return 0;
18048 if (sizeof (intptr_t))
18049   return 0;
18050   ;
18051   return 0;
18052 }
18053 _ACEOF
18054 rm -f conftest.$ac_objext
18055 if { (eval echo "$as_me:18055: \"$ac_compile\"") >&5
18056   (eval $ac_compile) 2>&5
18057   ac_status=$?
18058   echo "$as_me:18058: \$? = $ac_status" >&5
18059   (exit $ac_status); } &&
18060          { ac_try='test -s conftest.$ac_objext'
18061   { (eval echo "$as_me:18061: \"$ac_try\"") >&5
18062   (eval $ac_try) 2>&5
18063   ac_status=$?
18064   echo "$as_me:18064: \$? = $ac_status" >&5
18065   (exit $ac_status); }; }; then
18066   ac_cv_type_intptr_t=yes
18067 else
18068   echo "$as_me: failed program was:" >&5
18069 cat conftest.$ac_ext >&5
18070 ac_cv_type_intptr_t=no
18071 fi
18072 rm -f conftest.$ac_objext conftest.$ac_ext
18073 fi
18074 echo "$as_me:18074: result: $ac_cv_type_intptr_t" >&5
18075 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
18076 if test $ac_cv_type_intptr_t = yes; then
18077   :
18078 else
18079
18080 cat >>confdefs.h <<EOF
18081 #define intptr_t long
18082 EOF
18083
18084 fi
18085
18086 echo "$as_me:18086: checking for ssize_t" >&5
18087 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
18088 if test "${ac_cv_type_ssize_t+set}" = set; then
18089   echo $ECHO_N "(cached) $ECHO_C" >&6
18090 else
18091   cat >conftest.$ac_ext <<_ACEOF
18092 #line 18092 "configure"
18093 #include "confdefs.h"
18094 $ac_includes_default
18095 int
18096 main ()
18097 {
18098 if ((ssize_t *) 0)
18099   return 0;
18100 if (sizeof (ssize_t))
18101   return 0;
18102   ;
18103   return 0;
18104 }
18105 _ACEOF
18106 rm -f conftest.$ac_objext
18107 if { (eval echo "$as_me:18107: \"$ac_compile\"") >&5
18108   (eval $ac_compile) 2>&5
18109   ac_status=$?
18110   echo "$as_me:18110: \$? = $ac_status" >&5
18111   (exit $ac_status); } &&
18112          { ac_try='test -s conftest.$ac_objext'
18113   { (eval echo "$as_me:18113: \"$ac_try\"") >&5
18114   (eval $ac_try) 2>&5
18115   ac_status=$?
18116   echo "$as_me:18116: \$? = $ac_status" >&5
18117   (exit $ac_status); }; }; then
18118   ac_cv_type_ssize_t=yes
18119 else
18120   echo "$as_me: failed program was:" >&5
18121 cat conftest.$ac_ext >&5
18122 ac_cv_type_ssize_t=no
18123 fi
18124 rm -f conftest.$ac_objext conftest.$ac_ext
18125 fi
18126 echo "$as_me:18126: result: $ac_cv_type_ssize_t" >&5
18127 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
18128 if test $ac_cv_type_ssize_t = yes; then
18129   :
18130 else
18131
18132 cat >>confdefs.h <<EOF
18133 #define ssize_t int
18134 EOF
18135
18136 fi
18137
18138 echo "$as_me:18138: checking for type sigaction_t" >&5
18139 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
18140 if test "${cf_cv_type_sigaction+set}" = set; then
18141   echo $ECHO_N "(cached) $ECHO_C" >&6
18142 else
18143
18144         cat >conftest.$ac_ext <<_ACEOF
18145 #line 18145 "configure"
18146 #include "confdefs.h"
18147
18148 #include <signal.h>
18149 int
18150 main ()
18151 {
18152 sigaction_t x
18153   ;
18154   return 0;
18155 }
18156 _ACEOF
18157 rm -f conftest.$ac_objext
18158 if { (eval echo "$as_me:18158: \"$ac_compile\"") >&5
18159   (eval $ac_compile) 2>&5
18160   ac_status=$?
18161   echo "$as_me:18161: \$? = $ac_status" >&5
18162   (exit $ac_status); } &&
18163          { ac_try='test -s conftest.$ac_objext'
18164   { (eval echo "$as_me:18164: \"$ac_try\"") >&5
18165   (eval $ac_try) 2>&5
18166   ac_status=$?
18167   echo "$as_me:18167: \$? = $ac_status" >&5
18168   (exit $ac_status); }; }; then
18169   cf_cv_type_sigaction=yes
18170 else
18171   echo "$as_me: failed program was:" >&5
18172 cat conftest.$ac_ext >&5
18173 cf_cv_type_sigaction=no
18174 fi
18175 rm -f conftest.$ac_objext conftest.$ac_ext
18176 fi
18177
18178 echo "$as_me:18178: result: $cf_cv_type_sigaction" >&5
18179 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
18180 test "$cf_cv_type_sigaction" = yes &&
18181 cat >>confdefs.h <<\EOF
18182 #define HAVE_TYPE_SIGACTION 1
18183 EOF
18184
18185 echo "$as_me:18185: checking declaration of size-change" >&5
18186 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
18187 if test "${cf_cv_sizechange+set}" = set; then
18188   echo $ECHO_N "(cached) $ECHO_C" >&6
18189 else
18190
18191         cf_cv_sizechange=unknown
18192         cf_save_CPPFLAGS="$CPPFLAGS"
18193
18194 for cf_opts in "" "NEED_PTEM_H"
18195 do
18196
18197         CPPFLAGS="$cf_save_CPPFLAGS"
18198         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
18199         cat >conftest.$ac_ext <<_ACEOF
18200 #line 18200 "configure"
18201 #include "confdefs.h"
18202 #include <sys/types.h>
18203 #ifdef HAVE_TERMIOS_H
18204 #include <termios.h>
18205 #else
18206 #ifdef HAVE_TERMIO_H
18207 #include <termio.h>
18208 #endif
18209 #endif
18210 #ifdef NEED_PTEM_H
18211 /* This is a workaround for SCO:  they neglected to define struct winsize in
18212  * termios.h -- it's only in termio.h and ptem.h
18213  */
18214 #include        <sys/stream.h>
18215 #include        <sys/ptem.h>
18216 #endif
18217 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
18218 #include <sys/ioctl.h>
18219 #endif
18220
18221 int
18222 main ()
18223 {
18224
18225 #ifdef TIOCGSIZE
18226         struct ttysize win;     /* FIXME: what system is this? */
18227         int y = win.ts_lines;
18228         int x = win.ts_cols;
18229 #else
18230 #ifdef TIOCGWINSZ
18231         struct winsize win;
18232         int y = win.ws_row;
18233         int x = win.ws_col;
18234 #else
18235         no TIOCGSIZE or TIOCGWINSZ
18236 #endif /* TIOCGWINSZ */
18237 #endif /* TIOCGSIZE */
18238
18239   ;
18240   return 0;
18241 }
18242 _ACEOF
18243 rm -f conftest.$ac_objext
18244 if { (eval echo "$as_me:18244: \"$ac_compile\"") >&5
18245   (eval $ac_compile) 2>&5
18246   ac_status=$?
18247   echo "$as_me:18247: \$? = $ac_status" >&5
18248   (exit $ac_status); } &&
18249          { ac_try='test -s conftest.$ac_objext'
18250   { (eval echo "$as_me:18250: \"$ac_try\"") >&5
18251   (eval $ac_try) 2>&5
18252   ac_status=$?
18253   echo "$as_me:18253: \$? = $ac_status" >&5
18254   (exit $ac_status); }; }; then
18255   cf_cv_sizechange=yes
18256 else
18257   echo "$as_me: failed program was:" >&5
18258 cat conftest.$ac_ext >&5
18259 cf_cv_sizechange=no
18260 fi
18261 rm -f conftest.$ac_objext conftest.$ac_ext
18262
18263         CPPFLAGS="$cf_save_CPPFLAGS"
18264         if test "$cf_cv_sizechange" = yes ; then
18265                 echo "size-change succeeded ($cf_opts)" >&5
18266                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
18267                 break
18268         fi
18269 done
18270
18271 fi
18272 echo "$as_me:18272: result: $cf_cv_sizechange" >&5
18273 echo "${ECHO_T}$cf_cv_sizechange" >&6
18274 if test "$cf_cv_sizechange" != no ; then
18275
18276 cat >>confdefs.h <<\EOF
18277 #define HAVE_SIZECHANGE 1
18278 EOF
18279
18280         case $cf_cv_sizechange in
18281         (NEED*)
18282                 cat >>confdefs.h <<EOF
18283 #define $cf_cv_sizechange  1
18284 EOF
18285
18286                 ;;
18287         esac
18288 fi
18289
18290 echo "$as_me:18290: checking for memmove" >&5
18291 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
18292 if test "${ac_cv_func_memmove+set}" = set; then
18293   echo $ECHO_N "(cached) $ECHO_C" >&6
18294 else
18295   cat >conftest.$ac_ext <<_ACEOF
18296 #line 18296 "configure"
18297 #include "confdefs.h"
18298 /* System header to define __stub macros and hopefully few prototypes,
18299     which can conflict with char memmove (); below.  */
18300 #include <assert.h>
18301 /* Override any gcc2 internal prototype to avoid an error.  */
18302 #ifdef __cplusplus
18303 extern "C"
18304 #endif
18305 /* We use char because int might match the return type of a gcc2
18306    builtin and then its argument prototype would still apply.  */
18307 char memmove ();
18308 char (*f) ();
18309
18310 int
18311 main ()
18312 {
18313 /* The GNU C library defines this for functions which it implements
18314     to always fail with ENOSYS.  Some functions are actually named
18315     something starting with __ and the normal name is an alias.  */
18316 #if defined (__stub_memmove) || defined (__stub___memmove)
18317 choke me
18318 #else
18319 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18320 #endif
18321
18322   ;
18323   return 0;
18324 }
18325 _ACEOF
18326 rm -f conftest.$ac_objext conftest$ac_exeext
18327 if { (eval echo "$as_me:18327: \"$ac_link\"") >&5
18328   (eval $ac_link) 2>&5
18329   ac_status=$?
18330   echo "$as_me:18330: \$? = $ac_status" >&5
18331   (exit $ac_status); } &&
18332          { ac_try='test -s conftest$ac_exeext'
18333   { (eval echo "$as_me:18333: \"$ac_try\"") >&5
18334   (eval $ac_try) 2>&5
18335   ac_status=$?
18336   echo "$as_me:18336: \$? = $ac_status" >&5
18337   (exit $ac_status); }; }; then
18338   ac_cv_func_memmove=yes
18339 else
18340   echo "$as_me: failed program was:" >&5
18341 cat conftest.$ac_ext >&5
18342 ac_cv_func_memmove=no
18343 fi
18344 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18345 fi
18346 echo "$as_me:18346: result: $ac_cv_func_memmove" >&5
18347 echo "${ECHO_T}$ac_cv_func_memmove" >&6
18348 if test $ac_cv_func_memmove = yes; then
18349   :
18350 else
18351
18352 echo "$as_me:18352: checking for bcopy" >&5
18353 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
18354 if test "${ac_cv_func_bcopy+set}" = set; then
18355   echo $ECHO_N "(cached) $ECHO_C" >&6
18356 else
18357   cat >conftest.$ac_ext <<_ACEOF
18358 #line 18358 "configure"
18359 #include "confdefs.h"
18360 /* System header to define __stub macros and hopefully few prototypes,
18361     which can conflict with char bcopy (); below.  */
18362 #include <assert.h>
18363 /* Override any gcc2 internal prototype to avoid an error.  */
18364 #ifdef __cplusplus
18365 extern "C"
18366 #endif
18367 /* We use char because int might match the return type of a gcc2
18368    builtin and then its argument prototype would still apply.  */
18369 char bcopy ();
18370 char (*f) ();
18371
18372 int
18373 main ()
18374 {
18375 /* The GNU C library defines this for functions which it implements
18376     to always fail with ENOSYS.  Some functions are actually named
18377     something starting with __ and the normal name is an alias.  */
18378 #if defined (__stub_bcopy) || defined (__stub___bcopy)
18379 choke me
18380 #else
18381 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18382 #endif
18383
18384   ;
18385   return 0;
18386 }
18387 _ACEOF
18388 rm -f conftest.$ac_objext conftest$ac_exeext
18389 if { (eval echo "$as_me:18389: \"$ac_link\"") >&5
18390   (eval $ac_link) 2>&5
18391   ac_status=$?
18392   echo "$as_me:18392: \$? = $ac_status" >&5
18393   (exit $ac_status); } &&
18394          { ac_try='test -s conftest$ac_exeext'
18395   { (eval echo "$as_me:18395: \"$ac_try\"") >&5
18396   (eval $ac_try) 2>&5
18397   ac_status=$?
18398   echo "$as_me:18398: \$? = $ac_status" >&5
18399   (exit $ac_status); }; }; then
18400   ac_cv_func_bcopy=yes
18401 else
18402   echo "$as_me: failed program was:" >&5
18403 cat conftest.$ac_ext >&5
18404 ac_cv_func_bcopy=no
18405 fi
18406 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18407 fi
18408 echo "$as_me:18408: result: $ac_cv_func_bcopy" >&5
18409 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
18410 if test $ac_cv_func_bcopy = yes; then
18411
18412         echo "$as_me:18412: checking if bcopy does overlapping moves" >&5
18413 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
18414 if test "${cf_cv_good_bcopy+set}" = set; then
18415   echo $ECHO_N "(cached) $ECHO_C" >&6
18416 else
18417
18418                 if test "$cross_compiling" = yes; then
18419   cf_cv_good_bcopy=unknown
18420 else
18421   cat >conftest.$ac_ext <<_ACEOF
18422 #line 18422 "configure"
18423 #include "confdefs.h"
18424
18425 int main(void) {
18426         static char data[] = "abcdefghijklmnopqrstuwwxyz";
18427         char temp[40];
18428         bcopy(data, temp, sizeof(data));
18429         bcopy(temp+10, temp, 15);
18430         bcopy(temp+5, temp+15, 10);
18431         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
18432 }
18433
18434 _ACEOF
18435 rm -f conftest$ac_exeext
18436 if { (eval echo "$as_me:18436: \"$ac_link\"") >&5
18437   (eval $ac_link) 2>&5
18438   ac_status=$?
18439   echo "$as_me:18439: \$? = $ac_status" >&5
18440   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18441   { (eval echo "$as_me:18441: \"$ac_try\"") >&5
18442   (eval $ac_try) 2>&5
18443   ac_status=$?
18444   echo "$as_me:18444: \$? = $ac_status" >&5
18445   (exit $ac_status); }; }; then
18446   cf_cv_good_bcopy=yes
18447 else
18448   echo "$as_me: program exited with status $ac_status" >&5
18449 echo "$as_me: failed program was:" >&5
18450 cat conftest.$ac_ext >&5
18451 cf_cv_good_bcopy=no
18452 fi
18453 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18454 fi
18455
18456 fi
18457 echo "$as_me:18457: result: $cf_cv_good_bcopy" >&5
18458 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
18459
18460 else
18461   cf_cv_good_bcopy=no
18462 fi
18463
18464         if test "$cf_cv_good_bcopy" = yes ; then
18465
18466 cat >>confdefs.h <<\EOF
18467 #define USE_OK_BCOPY 1
18468 EOF
18469
18470         else
18471
18472 cat >>confdefs.h <<\EOF
18473 #define USE_MY_MEMMOVE 1
18474 EOF
18475
18476         fi
18477
18478 fi
18479
18480 tty 2>&1 >/dev/null || {
18481 for ac_func in posix_openpt
18482 do
18483 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18484 echo "$as_me:18484: checking for $ac_func" >&5
18485 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18486 if eval "test \"\${$as_ac_var+set}\" = set"; then
18487   echo $ECHO_N "(cached) $ECHO_C" >&6
18488 else
18489   cat >conftest.$ac_ext <<_ACEOF
18490 #line 18490 "configure"
18491 #include "confdefs.h"
18492 /* System header to define __stub macros and hopefully few prototypes,
18493     which can conflict with char $ac_func (); below.  */
18494 #include <assert.h>
18495 /* Override any gcc2 internal prototype to avoid an error.  */
18496 #ifdef __cplusplus
18497 extern "C"
18498 #endif
18499 /* We use char because int might match the return type of a gcc2
18500    builtin and then its argument prototype would still apply.  */
18501 char $ac_func ();
18502 char (*f) ();
18503
18504 int
18505 main ()
18506 {
18507 /* The GNU C library defines this for functions which it implements
18508     to always fail with ENOSYS.  Some functions are actually named
18509     something starting with __ and the normal name is an alias.  */
18510 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18511 choke me
18512 #else
18513 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18514 #endif
18515
18516   ;
18517   return 0;
18518 }
18519 _ACEOF
18520 rm -f conftest.$ac_objext conftest$ac_exeext
18521 if { (eval echo "$as_me:18521: \"$ac_link\"") >&5
18522   (eval $ac_link) 2>&5
18523   ac_status=$?
18524   echo "$as_me:18524: \$? = $ac_status" >&5
18525   (exit $ac_status); } &&
18526          { ac_try='test -s conftest$ac_exeext'
18527   { (eval echo "$as_me:18527: \"$ac_try\"") >&5
18528   (eval $ac_try) 2>&5
18529   ac_status=$?
18530   echo "$as_me:18530: \$? = $ac_status" >&5
18531   (exit $ac_status); }; }; then
18532   eval "$as_ac_var=yes"
18533 else
18534   echo "$as_me: failed program was:" >&5
18535 cat conftest.$ac_ext >&5
18536 eval "$as_ac_var=no"
18537 fi
18538 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18539 fi
18540 echo "$as_me:18540: result: `eval echo '${'$as_ac_var'}'`" >&5
18541 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18542 if test `eval echo '${'$as_ac_var'}'` = yes; then
18543   cat >>confdefs.h <<EOF
18544 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18545 EOF
18546
18547 fi
18548 done
18549  }
18550 echo "$as_me:18550: checking if poll really works" >&5
18551 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
18552 if test "${cf_cv_working_poll+set}" = set; then
18553   echo $ECHO_N "(cached) $ECHO_C" >&6
18554 else
18555
18556 if test "$cross_compiling" = yes; then
18557   cf_cv_working_poll=unknown
18558 else
18559   cat >conftest.$ac_ext <<_ACEOF
18560 #line 18560 "configure"
18561 #include "confdefs.h"
18562
18563 #include <stdlib.h>
18564 #include <stdio.h>
18565 #include <unistd.h>
18566 #include <fcntl.h>
18567 #ifdef HAVE_POLL_H
18568 #include <poll.h>
18569 #else
18570 #include <sys/poll.h>
18571 #endif
18572 int main(void) {
18573         struct pollfd myfds;
18574         int ret;
18575
18576         /* check for Darwin bug with respect to "devices" */
18577         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
18578         if (myfds.fd < 0)
18579                 myfds.fd = 0;
18580         myfds.events = POLLIN;
18581         myfds.revents = 0;
18582
18583         ret = poll(&myfds, 1, 100);
18584
18585         if (ret < 0 || (myfds.revents & POLLNVAL)) {
18586                 ret = -1;
18587         } else {
18588                 int fd = 0;
18589                 if (!isatty(fd)) {
18590                         fd = open("/dev/tty", 2);       /* O_RDWR */
18591                 }
18592 #ifdef HAVE_POSIX_OPENPT
18593                 if (fd < 0) {
18594                         fd = posix_openpt(O_RDWR);
18595                 }
18596 #endif
18597
18598                 if (fd >= 0) {
18599                         /* also check with standard input */
18600                         myfds.fd = fd;
18601                         myfds.events = POLLIN;
18602                         myfds.revents = 0;
18603                         ret = poll(&myfds, 1, 100);
18604                 } else {
18605                         ret = -1;
18606                 }
18607         }
18608         ${cf_cv_main_return:-return}(ret < 0);
18609 }
18610 _ACEOF
18611 rm -f conftest$ac_exeext
18612 if { (eval echo "$as_me:18612: \"$ac_link\"") >&5
18613   (eval $ac_link) 2>&5
18614   ac_status=$?
18615   echo "$as_me:18615: \$? = $ac_status" >&5
18616   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18617   { (eval echo "$as_me:18617: \"$ac_try\"") >&5
18618   (eval $ac_try) 2>&5
18619   ac_status=$?
18620   echo "$as_me:18620: \$? = $ac_status" >&5
18621   (exit $ac_status); }; }; then
18622   cf_cv_working_poll=yes
18623 else
18624   echo "$as_me: program exited with status $ac_status" >&5
18625 echo "$as_me: failed program was:" >&5
18626 cat conftest.$ac_ext >&5
18627 cf_cv_working_poll=no
18628 fi
18629 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18630 fi
18631 fi
18632 echo "$as_me:18632: result: $cf_cv_working_poll" >&5
18633 echo "${ECHO_T}$cf_cv_working_poll" >&6
18634 test "$cf_cv_working_poll" = "yes" &&
18635 cat >>confdefs.h <<\EOF
18636 #define HAVE_WORKING_POLL 1
18637 EOF
18638
18639 echo "$as_me:18639: checking for va_copy" >&5
18640 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
18641 if test "${cf_cv_have_va_copy+set}" = set; then
18642   echo $ECHO_N "(cached) $ECHO_C" >&6
18643 else
18644
18645 cat >conftest.$ac_ext <<_ACEOF
18646 #line 18646 "configure"
18647 #include "confdefs.h"
18648
18649 #include <stdarg.h>
18650
18651 int
18652 main ()
18653 {
18654
18655         static va_list dst;
18656         static va_list src;
18657         va_copy(dst, src)
18658   ;
18659   return 0;
18660 }
18661 _ACEOF
18662 rm -f conftest.$ac_objext conftest$ac_exeext
18663 if { (eval echo "$as_me:18663: \"$ac_link\"") >&5
18664   (eval $ac_link) 2>&5
18665   ac_status=$?
18666   echo "$as_me:18666: \$? = $ac_status" >&5
18667   (exit $ac_status); } &&
18668          { ac_try='test -s conftest$ac_exeext'
18669   { (eval echo "$as_me:18669: \"$ac_try\"") >&5
18670   (eval $ac_try) 2>&5
18671   ac_status=$?
18672   echo "$as_me:18672: \$? = $ac_status" >&5
18673   (exit $ac_status); }; }; then
18674   cf_cv_have_va_copy=yes
18675 else
18676   echo "$as_me: failed program was:" >&5
18677 cat conftest.$ac_ext >&5
18678 cf_cv_have_va_copy=no
18679 fi
18680 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18681 fi
18682 echo "$as_me:18682: result: $cf_cv_have_va_copy" >&5
18683 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
18684
18685 test "$cf_cv_have_va_copy" = yes &&
18686 cat >>confdefs.h <<\EOF
18687 #define HAVE_VA_COPY 1
18688 EOF
18689
18690 echo "$as_me:18690: checking for __va_copy" >&5
18691 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
18692 if test "${cf_cv_have___va_copy+set}" = set; then
18693   echo $ECHO_N "(cached) $ECHO_C" >&6
18694 else
18695
18696 cat >conftest.$ac_ext <<_ACEOF
18697 #line 18697 "configure"
18698 #include "confdefs.h"
18699
18700 #include <stdarg.h>
18701
18702 int
18703 main ()
18704 {
18705
18706         static va_list dst;
18707         static va_list src;
18708         __va_copy(dst, src)
18709   ;
18710   return 0;
18711 }
18712 _ACEOF
18713 rm -f conftest.$ac_objext conftest$ac_exeext
18714 if { (eval echo "$as_me:18714: \"$ac_link\"") >&5
18715   (eval $ac_link) 2>&5
18716   ac_status=$?
18717   echo "$as_me:18717: \$? = $ac_status" >&5
18718   (exit $ac_status); } &&
18719          { ac_try='test -s conftest$ac_exeext'
18720   { (eval echo "$as_me:18720: \"$ac_try\"") >&5
18721   (eval $ac_try) 2>&5
18722   ac_status=$?
18723   echo "$as_me:18723: \$? = $ac_status" >&5
18724   (exit $ac_status); }; }; then
18725   cf_cv_have___va_copy=yes
18726 else
18727   echo "$as_me: failed program was:" >&5
18728 cat conftest.$ac_ext >&5
18729 cf_cv_have___va_copy=no
18730 fi
18731 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18732 fi
18733 echo "$as_me:18733: result: $cf_cv_have___va_copy" >&5
18734 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
18735
18736 test "$cf_cv_have___va_copy" = yes &&
18737 cat >>confdefs.h <<\EOF
18738 #define HAVE___VA_COPY 1
18739 EOF
18740
18741 echo "$as_me:18741: checking for pid_t" >&5
18742 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
18743 if test "${ac_cv_type_pid_t+set}" = set; then
18744   echo $ECHO_N "(cached) $ECHO_C" >&6
18745 else
18746   cat >conftest.$ac_ext <<_ACEOF
18747 #line 18747 "configure"
18748 #include "confdefs.h"
18749 $ac_includes_default
18750 int
18751 main ()
18752 {
18753 if ((pid_t *) 0)
18754   return 0;
18755 if (sizeof (pid_t))
18756   return 0;
18757   ;
18758   return 0;
18759 }
18760 _ACEOF
18761 rm -f conftest.$ac_objext
18762 if { (eval echo "$as_me:18762: \"$ac_compile\"") >&5
18763   (eval $ac_compile) 2>&5
18764   ac_status=$?
18765   echo "$as_me:18765: \$? = $ac_status" >&5
18766   (exit $ac_status); } &&
18767          { ac_try='test -s conftest.$ac_objext'
18768   { (eval echo "$as_me:18768: \"$ac_try\"") >&5
18769   (eval $ac_try) 2>&5
18770   ac_status=$?
18771   echo "$as_me:18771: \$? = $ac_status" >&5
18772   (exit $ac_status); }; }; then
18773   ac_cv_type_pid_t=yes
18774 else
18775   echo "$as_me: failed program was:" >&5
18776 cat conftest.$ac_ext >&5
18777 ac_cv_type_pid_t=no
18778 fi
18779 rm -f conftest.$ac_objext conftest.$ac_ext
18780 fi
18781 echo "$as_me:18781: result: $ac_cv_type_pid_t" >&5
18782 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
18783 if test $ac_cv_type_pid_t = yes; then
18784   :
18785 else
18786
18787 cat >>confdefs.h <<EOF
18788 #define pid_t int
18789 EOF
18790
18791 fi
18792
18793 for ac_header in unistd.h vfork.h
18794 do
18795 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18796 echo "$as_me:18796: checking for $ac_header" >&5
18797 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18798 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18799   echo $ECHO_N "(cached) $ECHO_C" >&6
18800 else
18801   cat >conftest.$ac_ext <<_ACEOF
18802 #line 18802 "configure"
18803 #include "confdefs.h"
18804 #include <$ac_header>
18805 _ACEOF
18806 if { (eval echo "$as_me:18806: \"$ac_cpp conftest.$ac_ext\"") >&5
18807   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18808   ac_status=$?
18809   egrep -v '^ *\+' conftest.er1 >conftest.err
18810   rm -f conftest.er1
18811   cat conftest.err >&5
18812   echo "$as_me:18812: \$? = $ac_status" >&5
18813   (exit $ac_status); } >/dev/null; then
18814   if test -s conftest.err; then
18815     ac_cpp_err=$ac_c_preproc_warn_flag
18816   else
18817     ac_cpp_err=
18818   fi
18819 else
18820   ac_cpp_err=yes
18821 fi
18822 if test -z "$ac_cpp_err"; then
18823   eval "$as_ac_Header=yes"
18824 else
18825   echo "$as_me: failed program was:" >&5
18826   cat conftest.$ac_ext >&5
18827   eval "$as_ac_Header=no"
18828 fi
18829 rm -f conftest.err conftest.$ac_ext
18830 fi
18831 echo "$as_me:18831: result: `eval echo '${'$as_ac_Header'}'`" >&5
18832 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18833 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18834   cat >>confdefs.h <<EOF
18835 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18836 EOF
18837
18838 fi
18839 done
18840
18841 for ac_func in fork vfork
18842 do
18843 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18844 echo "$as_me:18844: checking for $ac_func" >&5
18845 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18846 if eval "test \"\${$as_ac_var+set}\" = set"; then
18847   echo $ECHO_N "(cached) $ECHO_C" >&6
18848 else
18849   cat >conftest.$ac_ext <<_ACEOF
18850 #line 18850 "configure"
18851 #include "confdefs.h"
18852 /* System header to define __stub macros and hopefully few prototypes,
18853     which can conflict with char $ac_func (); below.  */
18854 #include <assert.h>
18855 /* Override any gcc2 internal prototype to avoid an error.  */
18856 #ifdef __cplusplus
18857 extern "C"
18858 #endif
18859 /* We use char because int might match the return type of a gcc2
18860    builtin and then its argument prototype would still apply.  */
18861 char $ac_func ();
18862 char (*f) ();
18863
18864 int
18865 main ()
18866 {
18867 /* The GNU C library defines this for functions which it implements
18868     to always fail with ENOSYS.  Some functions are actually named
18869     something starting with __ and the normal name is an alias.  */
18870 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18871 choke me
18872 #else
18873 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18874 #endif
18875
18876   ;
18877   return 0;
18878 }
18879 _ACEOF
18880 rm -f conftest.$ac_objext conftest$ac_exeext
18881 if { (eval echo "$as_me:18881: \"$ac_link\"") >&5
18882   (eval $ac_link) 2>&5
18883   ac_status=$?
18884   echo "$as_me:18884: \$? = $ac_status" >&5
18885   (exit $ac_status); } &&
18886          { ac_try='test -s conftest$ac_exeext'
18887   { (eval echo "$as_me:18887: \"$ac_try\"") >&5
18888   (eval $ac_try) 2>&5
18889   ac_status=$?
18890   echo "$as_me:18890: \$? = $ac_status" >&5
18891   (exit $ac_status); }; }; then
18892   eval "$as_ac_var=yes"
18893 else
18894   echo "$as_me: failed program was:" >&5
18895 cat conftest.$ac_ext >&5
18896 eval "$as_ac_var=no"
18897 fi
18898 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18899 fi
18900 echo "$as_me:18900: result: `eval echo '${'$as_ac_var'}'`" >&5
18901 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18902 if test `eval echo '${'$as_ac_var'}'` = yes; then
18903   cat >>confdefs.h <<EOF
18904 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18905 EOF
18906
18907 fi
18908 done
18909
18910 ac_cv_func_fork_works=$ac_cv_func_fork
18911 if test "x$ac_cv_func_fork" = xyes; then
18912   echo "$as_me:18912: checking for working fork" >&5
18913 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18914 if test "${ac_cv_func_fork_works+set}" = set; then
18915   echo $ECHO_N "(cached) $ECHO_C" >&6
18916 else
18917   if test "$cross_compiling" = yes; then
18918   ac_cv_func_fork_works=cross
18919 else
18920   cat >conftest.$ac_ext <<_ACEOF
18921 /* By Rüdiger Kuhlmann. */
18922       #include <sys/types.h>
18923       #if HAVE_UNISTD_H
18924       # include <unistd.h>
18925       #endif
18926       /* Some systems only have a dummy stub for fork() */
18927       int main ()
18928       {
18929         if (fork() < 0)
18930           $ac_main_return (1);
18931         $ac_main_return (0);
18932       }
18933 _ACEOF
18934 rm -f conftest$ac_exeext
18935 if { (eval echo "$as_me:18935: \"$ac_link\"") >&5
18936   (eval $ac_link) 2>&5
18937   ac_status=$?
18938   echo "$as_me:18938: \$? = $ac_status" >&5
18939   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18940   { (eval echo "$as_me:18940: \"$ac_try\"") >&5
18941   (eval $ac_try) 2>&5
18942   ac_status=$?
18943   echo "$as_me:18943: \$? = $ac_status" >&5
18944   (exit $ac_status); }; }; then
18945   ac_cv_func_fork_works=yes
18946 else
18947   echo "$as_me: program exited with status $ac_status" >&5
18948 echo "$as_me: failed program was:" >&5
18949 cat conftest.$ac_ext >&5
18950 ac_cv_func_fork_works=no
18951 fi
18952 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18953 fi
18954 fi
18955 echo "$as_me:18955: result: $ac_cv_func_fork_works" >&5
18956 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18957
18958 fi
18959 if test "x$ac_cv_func_fork_works" = xcross; then
18960   case $host in
18961     *-*-amigaos* | *-*-msdosdjgpp*)
18962       # Override, as these systems have only a dummy fork() stub
18963       ac_cv_func_fork_works=no
18964       ;;
18965     *)
18966       ac_cv_func_fork_works=yes
18967       ;;
18968   esac
18969   { echo "$as_me:18969: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18970 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18971 fi
18972 ac_cv_func_vfork_works=$ac_cv_func_vfork
18973 if test "x$ac_cv_func_vfork" = xyes; then
18974   echo "$as_me:18974: checking for working vfork" >&5
18975 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18976 if test "${ac_cv_func_vfork_works+set}" = set; then
18977   echo $ECHO_N "(cached) $ECHO_C" >&6
18978 else
18979   if test "$cross_compiling" = yes; then
18980   ac_cv_func_vfork_works=cross
18981 else
18982   cat >conftest.$ac_ext <<_ACEOF
18983 #line 18983 "configure"
18984 #include "confdefs.h"
18985 /* Thanks to Paul Eggert for this test.  */
18986 #include <stdio.h>
18987 #include <sys/types.h>
18988 #include <sys/stat.h>
18989 #if HAVE_UNISTD_H
18990 # include <unistd.h>
18991 #endif
18992 #if HAVE_VFORK_H
18993 # include <vfork.h>
18994 #endif
18995 /* On some sparc systems, changes by the child to local and incoming
18996    argument registers are propagated back to the parent.  The compiler
18997    is told about this with #include <vfork.h>, but some compilers
18998    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18999    static variable whose address is put into a register that is
19000    clobbered by the vfork.  */
19001 static
19002 #ifdef __cplusplus
19003 sparc_address_test (int arg)
19004 # else
19005 sparc_address_test (arg) int arg;
19006 #endif
19007 {
19008   static pid_t child;
19009   if (!child) {
19010     child = vfork ();
19011     if (child < 0) {
19012       perror ("vfork");
19013       _exit(2);
19014     }
19015     if (!child) {
19016       arg = getpid();
19017       write(-1, "", 0);
19018       _exit (arg);
19019     }
19020   }
19021 }
19022
19023 int
19024 main ()
19025 {
19026   pid_t parent = getpid ();
19027   pid_t child;
19028
19029   sparc_address_test ();
19030
19031   child = vfork ();
19032
19033   if (child == 0) {
19034     /* Here is another test for sparc vfork register problems.  This
19035        test uses lots of local variables, at least as many local
19036        variables as main has allocated so far including compiler
19037        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
19038        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
19039        reuse the register of parent for one of the local variables,
19040        since it will think that parent can't possibly be used any more
19041        in this routine.  Assigning to the local variable will thus
19042        munge parent in the parent process.  */
19043     pid_t
19044       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
19045       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
19046     /* Convince the compiler that p..p7 are live; otherwise, it might
19047        use the same hardware register for all 8 local variables.  */
19048     if (p != p1 || p != p2 || p != p3 || p != p4
19049         || p != p5 || p != p6 || p != p7)
19050       _exit(1);
19051
19052     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
19053        from child file descriptors.  If the child closes a descriptor
19054        before it execs or exits, this munges the parent's descriptor
19055        as well.  Test for this by closing stdout in the child.  */
19056     _exit(close(fileno(stdout)) != 0);
19057   } else {
19058     int status;
19059     struct stat st;
19060
19061     while (wait(&status) != child)
19062       ;
19063     $ac_main_return(
19064          /* Was there some problem with vforking?  */
19065          child < 0
19066
19067          /* Did the child fail?  (This shouldn't happen.)  */
19068          || status
19069
19070          /* Did the vfork/compiler bug occur?  */
19071          || parent != getpid()
19072
19073          /* Did the file descriptor bug occur?  */
19074          || fstat(fileno(stdout), &st) != 0
19075          );
19076   }
19077 }
19078 _ACEOF
19079 rm -f conftest$ac_exeext
19080 if { (eval echo "$as_me:19080: \"$ac_link\"") >&5
19081   (eval $ac_link) 2>&5
19082   ac_status=$?
19083   echo "$as_me:19083: \$? = $ac_status" >&5
19084   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19085   { (eval echo "$as_me:19085: \"$ac_try\"") >&5
19086   (eval $ac_try) 2>&5
19087   ac_status=$?
19088   echo "$as_me:19088: \$? = $ac_status" >&5
19089   (exit $ac_status); }; }; then
19090   ac_cv_func_vfork_works=yes
19091 else
19092   echo "$as_me: program exited with status $ac_status" >&5
19093 echo "$as_me: failed program was:" >&5
19094 cat conftest.$ac_ext >&5
19095 ac_cv_func_vfork_works=no
19096 fi
19097 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19098 fi
19099 fi
19100 echo "$as_me:19100: result: $ac_cv_func_vfork_works" >&5
19101 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
19102
19103 fi;
19104 if test "x$ac_cv_func_fork_works" = xcross; then
19105   ac_cv_func_vfork_works=ac_cv_func_vfork
19106   { echo "$as_me:19106: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
19107 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
19108 fi
19109
19110 if test "x$ac_cv_func_vfork_works" = xyes; then
19111
19112 cat >>confdefs.h <<\EOF
19113 #define HAVE_WORKING_VFORK 1
19114 EOF
19115
19116 else
19117
19118 cat >>confdefs.h <<\EOF
19119 #define vfork fork
19120 EOF
19121
19122 fi
19123 if test "x$ac_cv_func_fork_works" = xyes; then
19124
19125 cat >>confdefs.h <<\EOF
19126 #define HAVE_WORKING_FORK 1
19127 EOF
19128
19129 fi
19130
19131 # special check for test/ditto.c
19132
19133 echo "$as_me:19133: checking for openpty in -lutil" >&5
19134 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19135 if test "${ac_cv_lib_util_openpty+set}" = set; then
19136   echo $ECHO_N "(cached) $ECHO_C" >&6
19137 else
19138   ac_check_lib_save_LIBS=$LIBS
19139 LIBS="-lutil  $LIBS"
19140 cat >conftest.$ac_ext <<_ACEOF
19141 #line 19141 "configure"
19142 #include "confdefs.h"
19143
19144 /* Override any gcc2 internal prototype to avoid an error.  */
19145 #ifdef __cplusplus
19146 extern "C"
19147 #endif
19148 /* We use char because int might match the return type of a gcc2
19149    builtin and then its argument prototype would still apply.  */
19150 char openpty ();
19151 int
19152 main ()
19153 {
19154 openpty ();
19155   ;
19156   return 0;
19157 }
19158 _ACEOF
19159 rm -f conftest.$ac_objext conftest$ac_exeext
19160 if { (eval echo "$as_me:19160: \"$ac_link\"") >&5
19161   (eval $ac_link) 2>&5
19162   ac_status=$?
19163   echo "$as_me:19163: \$? = $ac_status" >&5
19164   (exit $ac_status); } &&
19165          { ac_try='test -s conftest$ac_exeext'
19166   { (eval echo "$as_me:19166: \"$ac_try\"") >&5
19167   (eval $ac_try) 2>&5
19168   ac_status=$?
19169   echo "$as_me:19169: \$? = $ac_status" >&5
19170   (exit $ac_status); }; }; then
19171   ac_cv_lib_util_openpty=yes
19172 else
19173   echo "$as_me: failed program was:" >&5
19174 cat conftest.$ac_ext >&5
19175 ac_cv_lib_util_openpty=no
19176 fi
19177 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19178 LIBS=$ac_check_lib_save_LIBS
19179 fi
19180 echo "$as_me:19180: result: $ac_cv_lib_util_openpty" >&5
19181 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19182 if test $ac_cv_lib_util_openpty = yes; then
19183   cf_cv_lib_util=yes
19184 else
19185   cf_cv_lib_util=no
19186 fi
19187
19188 echo "$as_me:19188: checking for openpty header" >&5
19189 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19190 if test "${cf_cv_func_openpty+set}" = set; then
19191   echo $ECHO_N "(cached) $ECHO_C" >&6
19192 else
19193
19194         cf_save_LIBS="$LIBS"
19195         test $cf_cv_lib_util = yes && {
19196 cf_add_libs="-lutil"
19197 # Filter out duplicates - this happens with badly-designed ".pc" files...
19198 for cf_add_1lib in $LIBS
19199 do
19200         for cf_add_2lib in $cf_add_libs
19201         do
19202                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19203                 then
19204                         cf_add_1lib=
19205                         break
19206                 fi
19207         done
19208         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19209 done
19210 LIBS="$cf_add_libs"
19211  }
19212         for cf_header in pty.h libutil.h util.h
19213         do
19214         cat >conftest.$ac_ext <<_ACEOF
19215 #line 19215 "configure"
19216 #include "confdefs.h"
19217
19218 #include <$cf_header>
19219
19220 int
19221 main ()
19222 {
19223
19224         int x = openpty((int *)0, (int *)0, (char *)0,
19225                                    (struct termios *)0, (struct winsize *)0);
19226
19227   ;
19228   return 0;
19229 }
19230 _ACEOF
19231 rm -f conftest.$ac_objext conftest$ac_exeext
19232 if { (eval echo "$as_me:19232: \"$ac_link\"") >&5
19233   (eval $ac_link) 2>&5
19234   ac_status=$?
19235   echo "$as_me:19235: \$? = $ac_status" >&5
19236   (exit $ac_status); } &&
19237          { ac_try='test -s conftest$ac_exeext'
19238   { (eval echo "$as_me:19238: \"$ac_try\"") >&5
19239   (eval $ac_try) 2>&5
19240   ac_status=$?
19241   echo "$as_me:19241: \$? = $ac_status" >&5
19242   (exit $ac_status); }; }; then
19243
19244                 cf_cv_func_openpty=$cf_header
19245                 break
19246
19247 else
19248   echo "$as_me: failed program was:" >&5
19249 cat conftest.$ac_ext >&5
19250
19251                 cf_cv_func_openpty=no
19252
19253 fi
19254 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19255         done
19256         LIBS="$cf_save_LIBS"
19257
19258 fi
19259 echo "$as_me:19259: result: $cf_cv_func_openpty" >&5
19260 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19261
19262 if test "$cf_cv_func_openpty" != no ; then
19263
19264 cat >>confdefs.h <<EOF
19265 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19266 EOF
19267
19268 cat >>confdefs.h <<\EOF
19269 #define USE_XTERM_PTY 1
19270 EOF
19271
19272         if test "x$cf_cv_lib_util" = xyes ; then
19273
19274 cf_add_libs="-lutil"
19275 # Filter out duplicates - this happens with badly-designed ".pc" files...
19276 for cf_add_1lib in $TEST_LIBS
19277 do
19278         for cf_add_2lib in $cf_add_libs
19279         do
19280                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19281                 then
19282                         cf_add_1lib=
19283                         break
19284                 fi
19285         done
19286         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19287 done
19288 TEST_LIBS="$cf_add_libs"
19289
19290         fi
19291 fi
19292
19293 if test "$with_hashed_db" != no ; then
19294
19295 cat >>confdefs.h <<\EOF
19296 #define USE_HASHED_DB 1
19297 EOF
19298
19299 case $with_hashed_db in
19300 (yes|*able*)
19301         ;;
19302 (*)
19303         if test -d "$with_hashed_db" ; then
19304
19305 if test -n "$with_hashed_db/include" ; then
19306   for cf_add_incdir in $with_hashed_db/include
19307   do
19308         while test $cf_add_incdir != /usr/include
19309         do
19310           if test -d $cf_add_incdir
19311           then
19312                 cf_have_incdir=no
19313                 if test -n "$CFLAGS$CPPFLAGS" ; then
19314                   # a loop is needed to ensure we can add subdirs of existing dirs
19315                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19316                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19317                           cf_have_incdir=yes; break
19318                         fi
19319                   done
19320                 fi
19321
19322                 if test "$cf_have_incdir" = no ; then
19323                   if test "$cf_add_incdir" = /usr/local/include ; then
19324                         if test "$GCC" = yes
19325                         then
19326                           cf_save_CPPFLAGS=$CPPFLAGS
19327                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19328                           cat >conftest.$ac_ext <<_ACEOF
19329 #line 19329 "configure"
19330 #include "confdefs.h"
19331 #include <stdio.h>
19332 int
19333 main ()
19334 {
19335 printf("Hello")
19336   ;
19337   return 0;
19338 }
19339 _ACEOF
19340 rm -f conftest.$ac_objext
19341 if { (eval echo "$as_me:19341: \"$ac_compile\"") >&5
19342   (eval $ac_compile) 2>&5
19343   ac_status=$?
19344   echo "$as_me:19344: \$? = $ac_status" >&5
19345   (exit $ac_status); } &&
19346          { ac_try='test -s conftest.$ac_objext'
19347   { (eval echo "$as_me:19347: \"$ac_try\"") >&5
19348   (eval $ac_try) 2>&5
19349   ac_status=$?
19350   echo "$as_me:19350: \$? = $ac_status" >&5
19351   (exit $ac_status); }; }; then
19352   :
19353 else
19354   echo "$as_me: failed program was:" >&5
19355 cat conftest.$ac_ext >&5
19356 cf_have_incdir=yes
19357 fi
19358 rm -f conftest.$ac_objext conftest.$ac_ext
19359                           CPPFLAGS=$cf_save_CPPFLAGS
19360                         fi
19361                   fi
19362                 fi
19363
19364                 if test "$cf_have_incdir" = no ; then
19365                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19366
19367 echo "${as_me:-configure}:19367: testing adding $cf_add_incdir to include-path ..." 1>&5
19368
19369                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19370
19371                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19372                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19373                   cf_add_incdir="$cf_top_incdir"
19374                 else
19375                   break
19376                 fi
19377           else
19378                 break
19379           fi
19380         done
19381   done
19382 fi
19383
19384 if test -n "$with_hashed_db/lib" ; then
19385         for cf_add_libdir in $with_hashed_db/lib
19386         do
19387                 if test $cf_add_libdir = /usr/lib ; then
19388                         :
19389                 elif test -d $cf_add_libdir
19390                 then
19391                         cf_have_libdir=no
19392                         if test -n "$LDFLAGS$LIBS" ; then
19393                                 # a loop is needed to ensure we can add subdirs of existing dirs
19394                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19395                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19396                                                 cf_have_libdir=yes; break
19397                                         fi
19398                                 done
19399                         fi
19400                         if test "$cf_have_libdir" = no ; then
19401                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19402
19403 echo "${as_me:-configure}:19403: testing adding $cf_add_libdir to library-path ..." 1>&5
19404
19405                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19406                         fi
19407                 fi
19408         done
19409 fi
19410
19411         else
19412                 case "$with_hashed_db" in
19413                 (./*|../*|/*)
19414                         { echo "$as_me:19414: WARNING: no such directory $with_hashed_db" >&5
19415 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
19416                         ;;
19417                 (*)
19418
19419 cf_search=
19420
19421 test "x$prefix" != "xNONE" && \
19422 test -d "$prefix" && \
19423  {
19424         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
19425         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
19426         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
19427         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
19428         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
19429         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
19430 }
19431
19432 for cf_subdir_prefix in \
19433         /usr \
19434         /usr/local \
19435         /usr/pkg \
19436         /opt \
19437         /opt/local \
19438         $HOME
19439 do
19440
19441 test "x$cf_subdir_prefix" != "x$prefix" && \
19442 test -d "$cf_subdir_prefix" && \
19443 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19444         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
19445         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
19446         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
19447         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
19448         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
19449         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"
19450 }
19451
19452 done
19453
19454         for cf_item in $cf_search
19455         do
19456                 case $cf_item in
19457                 (*/$with_hashed_db)
19458
19459 if test -n "$cf_item" ; then
19460   for cf_add_incdir in $cf_item
19461   do
19462         while test $cf_add_incdir != /usr/include
19463         do
19464           if test -d $cf_add_incdir
19465           then
19466                 cf_have_incdir=no
19467                 if test -n "$CFLAGS$CPPFLAGS" ; then
19468                   # a loop is needed to ensure we can add subdirs of existing dirs
19469                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19470                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19471                           cf_have_incdir=yes; break
19472                         fi
19473                   done
19474                 fi
19475
19476                 if test "$cf_have_incdir" = no ; then
19477                   if test "$cf_add_incdir" = /usr/local/include ; then
19478                         if test "$GCC" = yes
19479                         then
19480                           cf_save_CPPFLAGS=$CPPFLAGS
19481                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19482                           cat >conftest.$ac_ext <<_ACEOF
19483 #line 19483 "configure"
19484 #include "confdefs.h"
19485 #include <stdio.h>
19486 int
19487 main ()
19488 {
19489 printf("Hello")
19490   ;
19491   return 0;
19492 }
19493 _ACEOF
19494 rm -f conftest.$ac_objext
19495 if { (eval echo "$as_me:19495: \"$ac_compile\"") >&5
19496   (eval $ac_compile) 2>&5
19497   ac_status=$?
19498   echo "$as_me:19498: \$? = $ac_status" >&5
19499   (exit $ac_status); } &&
19500          { ac_try='test -s conftest.$ac_objext'
19501   { (eval echo "$as_me:19501: \"$ac_try\"") >&5
19502   (eval $ac_try) 2>&5
19503   ac_status=$?
19504   echo "$as_me:19504: \$? = $ac_status" >&5
19505   (exit $ac_status); }; }; then
19506   :
19507 else
19508   echo "$as_me: failed program was:" >&5
19509 cat conftest.$ac_ext >&5
19510 cf_have_incdir=yes
19511 fi
19512 rm -f conftest.$ac_objext conftest.$ac_ext
19513                           CPPFLAGS=$cf_save_CPPFLAGS
19514                         fi
19515                   fi
19516                 fi
19517
19518                 if test "$cf_have_incdir" = no ; then
19519                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
19520
19521 echo "${as_me:-configure}:19521: testing adding $cf_add_incdir to include-path ..." 1>&5
19522
19523                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19524
19525                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
19526                   test "$cf_top_incdir" = "$cf_add_incdir" && break
19527                   cf_add_incdir="$cf_top_incdir"
19528                 else
19529                   break
19530                 fi
19531           else
19532                 break
19533           fi
19534         done
19535   done
19536 fi
19537
19538                         ;;
19539                 esac
19540         done
19541
19542 cf_search=
19543
19544 test "x$prefix" != "xNONE" && \
19545 test -d "$prefix" && \
19546  {
19547         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
19548         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
19549         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
19550         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
19551         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
19552         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
19553 }
19554
19555 for cf_subdir_prefix in \
19556         /usr \
19557         /usr/local \
19558         /usr/pkg \
19559         /opt \
19560         /opt/local \
19561         $HOME
19562 do
19563
19564 test "x$cf_subdir_prefix" != "x$prefix" && \
19565 test -d "$cf_subdir_prefix" && \
19566 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
19567         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
19568         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
19569         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
19570         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
19571         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
19572         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"
19573 }
19574
19575 done
19576
19577         for cf_item in $cf_search
19578         do
19579                 case $cf_item in
19580                 (*/$with_hashed_db)
19581
19582 if test -n "$cf_item" ; then
19583         for cf_add_libdir in $cf_item
19584         do
19585                 if test $cf_add_libdir = /usr/lib ; then
19586                         :
19587                 elif test -d $cf_add_libdir
19588                 then
19589                         cf_have_libdir=no
19590                         if test -n "$LDFLAGS$LIBS" ; then
19591                                 # a loop is needed to ensure we can add subdirs of existing dirs
19592                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
19593                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19594                                                 cf_have_libdir=yes; break
19595                                         fi
19596                                 done
19597                         fi
19598                         if test "$cf_have_libdir" = no ; then
19599                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
19600
19601 echo "${as_me:-configure}:19601: testing adding $cf_add_libdir to library-path ..." 1>&5
19602
19603                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19604                         fi
19605                 fi
19606         done
19607 fi
19608
19609                         ;;
19610                 esac
19611         done
19612
19613                         ;;
19614                 esac
19615         fi
19616 esac
19617
19618 echo "$as_me:19618: checking for db.h" >&5
19619 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
19620 if test "${ac_cv_header_db_h+set}" = set; then
19621   echo $ECHO_N "(cached) $ECHO_C" >&6
19622 else
19623   cat >conftest.$ac_ext <<_ACEOF
19624 #line 19624 "configure"
19625 #include "confdefs.h"
19626 #include <db.h>
19627 _ACEOF
19628 if { (eval echo "$as_me:19628: \"$ac_cpp conftest.$ac_ext\"") >&5
19629   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19630   ac_status=$?
19631   egrep -v '^ *\+' conftest.er1 >conftest.err
19632   rm -f conftest.er1
19633   cat conftest.err >&5
19634   echo "$as_me:19634: \$? = $ac_status" >&5
19635   (exit $ac_status); } >/dev/null; then
19636   if test -s conftest.err; then
19637     ac_cpp_err=$ac_c_preproc_warn_flag
19638   else
19639     ac_cpp_err=
19640   fi
19641 else
19642   ac_cpp_err=yes
19643 fi
19644 if test -z "$ac_cpp_err"; then
19645   ac_cv_header_db_h=yes
19646 else
19647   echo "$as_me: failed program was:" >&5
19648   cat conftest.$ac_ext >&5
19649   ac_cv_header_db_h=no
19650 fi
19651 rm -f conftest.err conftest.$ac_ext
19652 fi
19653 echo "$as_me:19653: result: $ac_cv_header_db_h" >&5
19654 echo "${ECHO_T}$ac_cv_header_db_h" >&6
19655 if test $ac_cv_header_db_h = yes; then
19656
19657 echo "$as_me:19657: checking for version of db" >&5
19658 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
19659 if test "${cf_cv_hashed_db_version+set}" = set; then
19660   echo $ECHO_N "(cached) $ECHO_C" >&6
19661 else
19662
19663 cf_cv_hashed_db_version=unknown
19664
19665 for cf_db_version in 1 2 3 4 5 6
19666 do
19667
19668 echo "${as_me:-configure}:19668: testing checking for db version $cf_db_version ..." 1>&5
19669
19670         cat >conftest.$ac_ext <<_ACEOF
19671 #line 19671 "configure"
19672 #include "confdefs.h"
19673
19674 $ac_includes_default
19675 #include <db.h>
19676
19677 #ifdef DB_VERSION_MAJOR
19678         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
19679 #if $cf_db_version == DB_VERSION_MAJOR
19680         /* ok */
19681 #else
19682         make an error
19683 #endif
19684 #else
19685 #if $cf_db_version == 1
19686         /* ok: assuming this is DB 1.8.5 */
19687 #else
19688         make an error
19689 #endif
19690 #endif
19691
19692 int
19693 main ()
19694 {
19695 DBT *foo = 0
19696   ;
19697   return 0;
19698 }
19699 _ACEOF
19700 rm -f conftest.$ac_objext
19701 if { (eval echo "$as_me:19701: \"$ac_compile\"") >&5
19702   (eval $ac_compile) 2>&5
19703   ac_status=$?
19704   echo "$as_me:19704: \$? = $ac_status" >&5
19705   (exit $ac_status); } &&
19706          { ac_try='test -s conftest.$ac_objext'
19707   { (eval echo "$as_me:19707: \"$ac_try\"") >&5
19708   (eval $ac_try) 2>&5
19709   ac_status=$?
19710   echo "$as_me:19710: \$? = $ac_status" >&5
19711   (exit $ac_status); }; }; then
19712
19713         cf_cv_hashed_db_version=$cf_db_version
19714         break
19715
19716 else
19717   echo "$as_me: failed program was:" >&5
19718 cat conftest.$ac_ext >&5
19719 fi
19720 rm -f conftest.$ac_objext conftest.$ac_ext
19721 done
19722
19723 fi
19724 echo "$as_me:19724: result: $cf_cv_hashed_db_version" >&5
19725 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
19726
19727 if test "$cf_cv_hashed_db_version" = unknown ; then
19728         { { echo "$as_me:19728: error: Cannot determine version of db" >&5
19729 echo "$as_me: error: Cannot determine version of db" >&2;}
19730    { (exit 1); exit 1; }; }
19731 else
19732
19733 echo "$as_me:19733: checking for db libraries" >&5
19734 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
19735 if test "${cf_cv_hashed_db_libs+set}" = set; then
19736   echo $ECHO_N "(cached) $ECHO_C" >&6
19737 else
19738
19739 cf_cv_hashed_db_libs=unknown
19740 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
19741 do
19742         cf_save_libs="$LIBS"
19743         if test -n "$cf_db_libs"; then
19744
19745 cf_add_libs="-l$cf_db_libs"
19746 # Filter out duplicates - this happens with badly-designed ".pc" files...
19747 for cf_add_1lib in $LIBS
19748 do
19749         for cf_add_2lib in $cf_add_libs
19750         do
19751                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19752                 then
19753                         cf_add_1lib=
19754                         break
19755                 fi
19756         done
19757         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19758 done
19759 LIBS="$cf_add_libs"
19760
19761         fi
19762
19763 echo "${as_me:-configure}:19763: testing checking for library "$cf_db_libs" ..." 1>&5
19764
19765         cat >conftest.$ac_ext <<_ACEOF
19766 #line 19766 "configure"
19767 #include "confdefs.h"
19768
19769 $ac_includes_default
19770 #include <db.h>
19771
19772 int
19773 main ()
19774 {
19775
19776         char *path = "/tmp/foo";
19777 #ifdef DB_VERSION_MAJOR
19778 #if DB_VERSION_MAJOR >= 4
19779         DB *result = 0;
19780         db_create(&result, NULL, 0);
19781         result->open(result,
19782                 NULL,
19783                 path,
19784                 path,
19785                 DB_HASH,
19786                 DB_CREATE,
19787                 0644);
19788 #elif DB_VERSION_MAJOR >= 3
19789         DB *result = 0;
19790         db_create(&result, NULL, 0);
19791         result->open(result,
19792                 path,
19793                 path,
19794                 DB_HASH,
19795                 DB_CREATE,
19796                 0644);
19797 #elif DB_VERSION_MAJOR >= 2
19798         DB *result = 0;
19799         db_open(path,
19800                 DB_HASH,
19801                 DB_CREATE,
19802                 0644,
19803                 (DB_ENV *) 0,
19804                 (DB_INFO *) 0,
19805                 &result);
19806 #endif /* DB_VERSION_MAJOR */
19807 #else
19808         DB *result = dbopen(path,
19809                      2,
19810                      0644,
19811                      DB_HASH,
19812                      0);
19813 #endif
19814         ${cf_cv_main_return:-return}(result != 0)
19815
19816   ;
19817   return 0;
19818 }
19819 _ACEOF
19820 rm -f conftest.$ac_objext conftest$ac_exeext
19821 if { (eval echo "$as_me:19821: \"$ac_link\"") >&5
19822   (eval $ac_link) 2>&5
19823   ac_status=$?
19824   echo "$as_me:19824: \$? = $ac_status" >&5
19825   (exit $ac_status); } &&
19826          { ac_try='test -s conftest$ac_exeext'
19827   { (eval echo "$as_me:19827: \"$ac_try\"") >&5
19828   (eval $ac_try) 2>&5
19829   ac_status=$?
19830   echo "$as_me:19830: \$? = $ac_status" >&5
19831   (exit $ac_status); }; }; then
19832
19833         if test -n "$cf_db_libs" ; then
19834                 cf_cv_hashed_db_libs=$cf_db_libs
19835         else
19836                 cf_cv_hashed_db_libs=default
19837         fi
19838         LIBS="$cf_save_libs"
19839         break
19840
19841 else
19842   echo "$as_me: failed program was:" >&5
19843 cat conftest.$ac_ext >&5
19844 fi
19845 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19846         LIBS="$cf_save_libs"
19847 done
19848
19849 fi
19850 echo "$as_me:19850: result: $cf_cv_hashed_db_libs" >&5
19851 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19852
19853         if test "$cf_cv_hashed_db_libs" = unknown ; then
19854                 { { echo "$as_me:19854: error: Cannot determine library for db" >&5
19855 echo "$as_me: error: Cannot determine library for db" >&2;}
19856    { (exit 1); exit 1; }; }
19857         elif test "$cf_cv_hashed_db_libs" != default ; then
19858
19859 cf_add_libs="-l$cf_cv_hashed_db_libs"
19860 # Filter out duplicates - this happens with badly-designed ".pc" files...
19861 for cf_add_1lib in $LIBS
19862 do
19863         for cf_add_2lib in $cf_add_libs
19864         do
19865                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19866                 then
19867                         cf_add_1lib=
19868                         break
19869                 fi
19870         done
19871         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19872 done
19873 LIBS="$cf_add_libs"
19874
19875         fi
19876 fi
19877
19878 else
19879
19880         { { echo "$as_me:19880: error: Cannot find db.h" >&5
19881 echo "$as_me: error: Cannot find db.h" >&2;}
19882    { (exit 1); exit 1; }; }
19883
19884 fi
19885
19886 fi
19887
19888 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19889         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19890         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19891 fi
19892
19893 # Just in case, check if the C compiler has a bool type.
19894
19895 echo "$as_me:19895: checking if we should include stdbool.h" >&5
19896 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19897
19898 if test "${cf_cv_header_stdbool_h+set}" = set; then
19899   echo $ECHO_N "(cached) $ECHO_C" >&6
19900 else
19901
19902         cat >conftest.$ac_ext <<_ACEOF
19903 #line 19903 "configure"
19904 #include "confdefs.h"
19905
19906 int
19907 main ()
19908 {
19909 bool foo = false
19910   ;
19911   return 0;
19912 }
19913 _ACEOF
19914 rm -f conftest.$ac_objext
19915 if { (eval echo "$as_me:19915: \"$ac_compile\"") >&5
19916   (eval $ac_compile) 2>&5
19917   ac_status=$?
19918   echo "$as_me:19918: \$? = $ac_status" >&5
19919   (exit $ac_status); } &&
19920          { ac_try='test -s conftest.$ac_objext'
19921   { (eval echo "$as_me:19921: \"$ac_try\"") >&5
19922   (eval $ac_try) 2>&5
19923   ac_status=$?
19924   echo "$as_me:19924: \$? = $ac_status" >&5
19925   (exit $ac_status); }; }; then
19926   cf_cv_header_stdbool_h=0
19927 else
19928   echo "$as_me: failed program was:" >&5
19929 cat conftest.$ac_ext >&5
19930 cat >conftest.$ac_ext <<_ACEOF
19931 #line 19931 "configure"
19932 #include "confdefs.h"
19933
19934 #ifndef __BEOS__
19935 #include <stdbool.h>
19936 #endif
19937
19938 int
19939 main ()
19940 {
19941 bool foo = false
19942   ;
19943   return 0;
19944 }
19945 _ACEOF
19946 rm -f conftest.$ac_objext
19947 if { (eval echo "$as_me:19947: \"$ac_compile\"") >&5
19948   (eval $ac_compile) 2>&5
19949   ac_status=$?
19950   echo "$as_me:19950: \$? = $ac_status" >&5
19951   (exit $ac_status); } &&
19952          { ac_try='test -s conftest.$ac_objext'
19953   { (eval echo "$as_me:19953: \"$ac_try\"") >&5
19954   (eval $ac_try) 2>&5
19955   ac_status=$?
19956   echo "$as_me:19956: \$? = $ac_status" >&5
19957   (exit $ac_status); }; }; then
19958   cf_cv_header_stdbool_h=1
19959 else
19960   echo "$as_me: failed program was:" >&5
19961 cat conftest.$ac_ext >&5
19962 cf_cv_header_stdbool_h=0
19963 fi
19964 rm -f conftest.$ac_objext conftest.$ac_ext
19965 fi
19966 rm -f conftest.$ac_objext conftest.$ac_ext
19967 fi
19968
19969 if test "$cf_cv_header_stdbool_h" = 1
19970 then    echo "$as_me:19970: result: yes" >&5
19971 echo "${ECHO_T}yes" >&6
19972 else    echo "$as_me:19972: result: no" >&5
19973 echo "${ECHO_T}no" >&6
19974 fi
19975
19976 echo "$as_me:19976: checking for builtin bool type" >&5
19977 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19978
19979 if test "${cf_cv_cc_bool_type+set}" = set; then
19980   echo $ECHO_N "(cached) $ECHO_C" >&6
19981 else
19982
19983         cat >conftest.$ac_ext <<_ACEOF
19984 #line 19984 "configure"
19985 #include "confdefs.h"
19986
19987 #include <stdio.h>
19988 #include <sys/types.h>
19989
19990 int
19991 main ()
19992 {
19993 bool x = false
19994   ;
19995   return 0;
19996 }
19997 _ACEOF
19998 rm -f conftest.$ac_objext
19999 if { (eval echo "$as_me:19999: \"$ac_compile\"") >&5
20000   (eval $ac_compile) 2>&5
20001   ac_status=$?
20002   echo "$as_me:20002: \$? = $ac_status" >&5
20003   (exit $ac_status); } &&
20004          { ac_try='test -s conftest.$ac_objext'
20005   { (eval echo "$as_me:20005: \"$ac_try\"") >&5
20006   (eval $ac_try) 2>&5
20007   ac_status=$?
20008   echo "$as_me:20008: \$? = $ac_status" >&5
20009   (exit $ac_status); }; }; then
20010   cf_cv_cc_bool_type=1
20011 else
20012   echo "$as_me: failed program was:" >&5
20013 cat conftest.$ac_ext >&5
20014 cf_cv_cc_bool_type=0
20015 fi
20016 rm -f conftest.$ac_objext conftest.$ac_ext
20017
20018 fi
20019
20020 if test "$cf_cv_cc_bool_type" = 1
20021 then    echo "$as_me:20021: result: yes" >&5
20022 echo "${ECHO_T}yes" >&6
20023 else    echo "$as_me:20023: result: no" >&5
20024 echo "${ECHO_T}no" >&6
20025 fi
20026
20027 # Check for C++ compiler characteristics (and ensure that it's there!)
20028 if test -n "$CXX" ; then
20029         ac_ext=cc
20030 ac_cpp='$CXXCPP $CPPFLAGS'
20031 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20032 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20033 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20034 ac_main_return=return
20035
20036 if test -n "$GXX" ; then
20037
20038         cf_save="$LIBS"
20039         LIBS="$LIBS $CXXLIBS"
20040         echo "$as_me:20040: checking if we already have C++ library" >&5
20041 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
20042         cat >conftest.$ac_ext <<_ACEOF
20043 #line 20043 "configure"
20044 #include "confdefs.h"
20045
20046                         #include <iostream>
20047 int
20048 main ()
20049 {
20050
20051                         std::cout << "Hello World!" << std::endl;
20052   ;
20053   return 0;
20054 }
20055 _ACEOF
20056 rm -f conftest.$ac_objext conftest$ac_exeext
20057 if { (eval echo "$as_me:20057: \"$ac_link\"") >&5
20058   (eval $ac_link) 2>&5
20059   ac_status=$?
20060   echo "$as_me:20060: \$? = $ac_status" >&5
20061   (exit $ac_status); } &&
20062          { ac_try='test -s conftest$ac_exeext'
20063   { (eval echo "$as_me:20063: \"$ac_try\"") >&5
20064   (eval $ac_try) 2>&5
20065   ac_status=$?
20066   echo "$as_me:20066: \$? = $ac_status" >&5
20067   (exit $ac_status); }; }; then
20068   cf_have_libstdcpp=yes
20069 else
20070   echo "$as_me: failed program was:" >&5
20071 cat conftest.$ac_ext >&5
20072 cf_have_libstdcpp=no
20073 fi
20074 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20075         echo "$as_me:20075: result: $cf_have_libstdcpp" >&5
20076 echo "${ECHO_T}$cf_have_libstdcpp" >&6
20077         LIBS="$cf_save"
20078
20079         if test $cf_have_libstdcpp != yes
20080         then
20081                 case $cf_cv_system_name in
20082                 (os2*)
20083                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
20084                                 cf_stdcpp_libname=stdcpp
20085                         else
20086                                 cf_stdcpp_libname=stdc++
20087                         fi
20088                         ;;
20089                 (*)
20090                         cf_stdcpp_libname=stdc++
20091                         ;;
20092                 esac
20093
20094                 echo "$as_me:20094: checking for library $cf_stdcpp_libname" >&5
20095 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
20096 if test "${cf_cv_libstdcpp+set}" = set; then
20097   echo $ECHO_N "(cached) $ECHO_C" >&6
20098 else
20099
20100                         cf_save="$LIBS"
20101                         LIBS="$LIBS $CXXLIBS"
20102
20103 cf_add_libs="-l$cf_stdcpp_libname"
20104 # Filter out duplicates - this happens with badly-designed ".pc" files...
20105 for cf_add_1lib in $LIBS
20106 do
20107         for cf_add_2lib in $cf_add_libs
20108         do
20109                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20110                 then
20111                         cf_add_1lib=
20112                         break
20113                 fi
20114         done
20115         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20116 done
20117 LIBS="$cf_add_libs"
20118
20119                 cat >conftest.$ac_ext <<_ACEOF
20120 #line 20120 "configure"
20121 #include "confdefs.h"
20122
20123                                 #include <iostream>
20124 int
20125 main ()
20126 {
20127
20128                                 std::cout << "Hello World!" << std::endl;
20129   ;
20130   return 0;
20131 }
20132 _ACEOF
20133 rm -f conftest.$ac_objext conftest$ac_exeext
20134 if { (eval echo "$as_me:20134: \"$ac_link\"") >&5
20135   (eval $ac_link) 2>&5
20136   ac_status=$?
20137   echo "$as_me:20137: \$? = $ac_status" >&5
20138   (exit $ac_status); } &&
20139          { ac_try='test -s conftest$ac_exeext'
20140   { (eval echo "$as_me:20140: \"$ac_try\"") >&5
20141   (eval $ac_try) 2>&5
20142   ac_status=$?
20143   echo "$as_me:20143: \$? = $ac_status" >&5
20144   (exit $ac_status); }; }; then
20145   cf_cv_libstdcpp=yes
20146 else
20147   echo "$as_me: failed program was:" >&5
20148 cat conftest.$ac_ext >&5
20149 cf_cv_libstdcpp=no
20150 fi
20151 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20152                         LIBS="$cf_save"
20153
20154 fi
20155 echo "$as_me:20155: result: $cf_cv_libstdcpp" >&5
20156 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
20157                 test "$cf_cv_libstdcpp" = yes && {
20158 cf_add_libs="-l$cf_stdcpp_libname"
20159 # Filter out duplicates - this happens with badly-designed ".pc" files...
20160 for cf_add_1lib in $CXXLIBS
20161 do
20162         for cf_add_2lib in $cf_add_libs
20163         do
20164                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20165                 then
20166                         cf_add_1lib=
20167                         break
20168                 fi
20169         done
20170         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20171 done
20172 CXXLIBS="$cf_add_libs"
20173  }
20174         fi
20175 fi
20176
20177         echo "$as_me:20177: checking whether $CXX understands -c and -o together" >&5
20178 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
20179 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
20180   echo $ECHO_N "(cached) $ECHO_C" >&6
20181 else
20182
20183 cat > conftest.$ac_ext <<CF_EOF
20184 int main(void)
20185 {
20186         ${cf_cv_main_return:-return}(0);
20187 }
20188 CF_EOF
20189 # We do the test twice because some compilers refuse to overwrite an
20190 # existing .o file with -o, though they will create one.
20191 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
20192 if { (eval echo "$as_me:20192: \"$ac_try\"") >&5
20193   (eval $ac_try) 2>&5
20194   ac_status=$?
20195   echo "$as_me:20195: \$? = $ac_status" >&5
20196   (exit $ac_status); } &&
20197   test -f conftest2.$ac_objext && { (eval echo "$as_me:20197: \"$ac_try\"") >&5
20198   (eval $ac_try) 2>&5
20199   ac_status=$?
20200   echo "$as_me:20200: \$? = $ac_status" >&5
20201   (exit $ac_status); };
20202 then
20203   eval cf_cv_prog_CXX_c_o=yes
20204 else
20205   eval cf_cv_prog_CXX_c_o=no
20206 fi
20207 rm -rf conftest*
20208
20209 fi
20210 if test $cf_cv_prog_CXX_c_o = yes; then
20211   echo "$as_me:20211: result: yes" >&5
20212 echo "${ECHO_T}yes" >&6
20213 else
20214   echo "$as_me:20214: result: no" >&5
20215 echo "${ECHO_T}no" >&6
20216 fi
20217
20218         case $GXX_VERSION in
20219         (1*|2.0-6*)
20220                 cf_cxx_library=yes
20221                 ;;
20222         (*-2.7*|2.7*)
20223
20224 cf_cxx_library=unknown
20225 case $cf_cv_system_name in
20226 (os2*)
20227         cf_gpp_libname=gpp
20228         ;;
20229 (*)
20230         cf_gpp_libname=g++
20231         ;;
20232 esac
20233 if test "$GXX" = yes; then
20234         echo "$as_me:20234: checking for lib$cf_gpp_libname" >&5
20235 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
20236         cf_save="$LIBS"
20237
20238 cf_add_libs="-l$cf_gpp_libname"
20239 # Filter out duplicates - this happens with badly-designed ".pc" files...
20240 for cf_add_1lib in $LIBS
20241 do
20242         for cf_add_2lib in $cf_add_libs
20243         do
20244                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20245                 then
20246                         cf_add_1lib=
20247                         break
20248                 fi
20249         done
20250         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20251 done
20252 LIBS="$cf_add_libs"
20253
20254         cat >conftest.$ac_ext <<_ACEOF
20255 #line 20255 "configure"
20256 #include "confdefs.h"
20257
20258 #include <$cf_gpp_libname/builtin.h>
20259
20260 int
20261 main ()
20262 {
20263 two_arg_error_handler_t foo2 = lib_error_handler
20264   ;
20265   return 0;
20266 }
20267 _ACEOF
20268 rm -f conftest.$ac_objext conftest$ac_exeext
20269 if { (eval echo "$as_me:20269: \"$ac_link\"") >&5
20270   (eval $ac_link) 2>&5
20271   ac_status=$?
20272   echo "$as_me:20272: \$? = $ac_status" >&5
20273   (exit $ac_status); } &&
20274          { ac_try='test -s conftest$ac_exeext'
20275   { (eval echo "$as_me:20275: \"$ac_try\"") >&5
20276   (eval $ac_try) 2>&5
20277   ac_status=$?
20278   echo "$as_me:20278: \$? = $ac_status" >&5
20279   (exit $ac_status); }; }; then
20280   cf_cxx_library=yes
20281
20282 cf_add_libs="-l$cf_gpp_libname"
20283 # Filter out duplicates - this happens with badly-designed ".pc" files...
20284 for cf_add_1lib in $CXXLIBS
20285 do
20286         for cf_add_2lib in $cf_add_libs
20287         do
20288                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20289                 then
20290                         cf_add_1lib=
20291                         break
20292                 fi
20293         done
20294         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20295 done
20296 CXXLIBS="$cf_add_libs"
20297
20298          if test "$cf_gpp_libname" = cpp ; then
20299
20300 cat >>confdefs.h <<\EOF
20301 #define HAVE_GPP_BUILTIN_H 1
20302 EOF
20303
20304          else
20305
20306 cat >>confdefs.h <<\EOF
20307 #define HAVE_GXX_BUILTIN_H 1
20308 EOF
20309
20310          fi
20311 else
20312   echo "$as_me: failed program was:" >&5
20313 cat conftest.$ac_ext >&5
20314 cat >conftest.$ac_ext <<_ACEOF
20315 #line 20315 "configure"
20316 #include "confdefs.h"
20317
20318 #include <builtin.h>
20319
20320 int
20321 main ()
20322 {
20323 two_arg_error_handler_t foo2 = lib_error_handler
20324   ;
20325   return 0;
20326 }
20327 _ACEOF
20328 rm -f conftest.$ac_objext conftest$ac_exeext
20329 if { (eval echo "$as_me:20329: \"$ac_link\"") >&5
20330   (eval $ac_link) 2>&5
20331   ac_status=$?
20332   echo "$as_me:20332: \$? = $ac_status" >&5
20333   (exit $ac_status); } &&
20334          { ac_try='test -s conftest$ac_exeext'
20335   { (eval echo "$as_me:20335: \"$ac_try\"") >&5
20336   (eval $ac_try) 2>&5
20337   ac_status=$?
20338   echo "$as_me:20338: \$? = $ac_status" >&5
20339   (exit $ac_status); }; }; then
20340   cf_cxx_library=yes
20341
20342 cf_add_libs="-l$cf_gpp_libname"
20343 # Filter out duplicates - this happens with badly-designed ".pc" files...
20344 for cf_add_1lib in $CXXLIBS
20345 do
20346         for cf_add_2lib in $cf_add_libs
20347         do
20348                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20349                 then
20350                         cf_add_1lib=
20351                         break
20352                 fi
20353         done
20354         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20355 done
20356 CXXLIBS="$cf_add_libs"
20357
20358 cat >>confdefs.h <<\EOF
20359 #define HAVE_BUILTIN_H 1
20360 EOF
20361
20362 else
20363   echo "$as_me: failed program was:" >&5
20364 cat conftest.$ac_ext >&5
20365 cf_cxx_library=no
20366 fi
20367 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20368 fi
20369 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20370         LIBS="$cf_save"
20371         echo "$as_me:20371: result: $cf_cxx_library" >&5
20372 echo "${ECHO_T}$cf_cxx_library" >&6
20373 fi
20374
20375                 ;;
20376         (*)
20377                 cf_cxx_library=no
20378                 ;;
20379         esac
20380
20381         ac_ext=cc
20382 ac_cpp='$CXXCPP $CPPFLAGS'
20383 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20384 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20385 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20386 ac_main_return=return
20387 echo "$as_me:20387: checking how to run the C++ preprocessor" >&5
20388 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
20389 if test -z "$CXXCPP"; then
20390   if test "${ac_cv_prog_CXXCPP+set}" = set; then
20391   echo $ECHO_N "(cached) $ECHO_C" >&6
20392 else
20393       # Double quotes because CXXCPP needs to be expanded
20394     for CXXCPP in "$CXX -E" "/lib/cpp"
20395     do
20396       ac_preproc_ok=false
20397 for ac_cxx_preproc_warn_flag in '' yes
20398 do
20399   # Use a header file that comes with gcc, so configuring glibc
20400   # with a fresh cross-compiler works.
20401   # On the NeXT, cc -E runs the code through the compiler's parser,
20402   # not just through cpp. "Syntax error" is here to catch this case.
20403   cat >conftest.$ac_ext <<_ACEOF
20404 #line 20404 "configure"
20405 #include "confdefs.h"
20406 #include <assert.h>
20407                      Syntax error
20408 _ACEOF
20409 if { (eval echo "$as_me:20409: \"$ac_cpp conftest.$ac_ext\"") >&5
20410   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20411   ac_status=$?
20412   egrep -v '^ *\+' conftest.er1 >conftest.err
20413   rm -f conftest.er1
20414   cat conftest.err >&5
20415   echo "$as_me:20415: \$? = $ac_status" >&5
20416   (exit $ac_status); } >/dev/null; then
20417   if test -s conftest.err; then
20418     ac_cpp_err=$ac_cxx_preproc_warn_flag
20419   else
20420     ac_cpp_err=
20421   fi
20422 else
20423   ac_cpp_err=yes
20424 fi
20425 if test -z "$ac_cpp_err"; then
20426   :
20427 else
20428   echo "$as_me: failed program was:" >&5
20429   cat conftest.$ac_ext >&5
20430   # Broken: fails on valid input.
20431 continue
20432 fi
20433 rm -f conftest.err conftest.$ac_ext
20434
20435   # OK, works on sane cases.  Now check whether non-existent headers
20436   # can be detected and how.
20437   cat >conftest.$ac_ext <<_ACEOF
20438 #line 20438 "configure"
20439 #include "confdefs.h"
20440 #include <ac_nonexistent.h>
20441 _ACEOF
20442 if { (eval echo "$as_me:20442: \"$ac_cpp conftest.$ac_ext\"") >&5
20443   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20444   ac_status=$?
20445   egrep -v '^ *\+' conftest.er1 >conftest.err
20446   rm -f conftest.er1
20447   cat conftest.err >&5
20448   echo "$as_me:20448: \$? = $ac_status" >&5
20449   (exit $ac_status); } >/dev/null; then
20450   if test -s conftest.err; then
20451     ac_cpp_err=$ac_cxx_preproc_warn_flag
20452   else
20453     ac_cpp_err=
20454   fi
20455 else
20456   ac_cpp_err=yes
20457 fi
20458 if test -z "$ac_cpp_err"; then
20459   # Broken: success on invalid input.
20460 continue
20461 else
20462   echo "$as_me: failed program was:" >&5
20463   cat conftest.$ac_ext >&5
20464   # Passes both tests.
20465 ac_preproc_ok=:
20466 break
20467 fi
20468 rm -f conftest.err conftest.$ac_ext
20469
20470 done
20471 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20472 rm -f conftest.err conftest.$ac_ext
20473 if $ac_preproc_ok; then
20474   break
20475 fi
20476
20477     done
20478     ac_cv_prog_CXXCPP=$CXXCPP
20479
20480 fi
20481   CXXCPP=$ac_cv_prog_CXXCPP
20482 else
20483   ac_cv_prog_CXXCPP=$CXXCPP
20484 fi
20485 echo "$as_me:20485: result: $CXXCPP" >&5
20486 echo "${ECHO_T}$CXXCPP" >&6
20487 ac_preproc_ok=false
20488 for ac_cxx_preproc_warn_flag in '' yes
20489 do
20490   # Use a header file that comes with gcc, so configuring glibc
20491   # with a fresh cross-compiler works.
20492   # On the NeXT, cc -E runs the code through the compiler's parser,
20493   # not just through cpp. "Syntax error" is here to catch this case.
20494   cat >conftest.$ac_ext <<_ACEOF
20495 #line 20495 "configure"
20496 #include "confdefs.h"
20497 #include <assert.h>
20498                      Syntax error
20499 _ACEOF
20500 if { (eval echo "$as_me:20500: \"$ac_cpp conftest.$ac_ext\"") >&5
20501   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20502   ac_status=$?
20503   egrep -v '^ *\+' conftest.er1 >conftest.err
20504   rm -f conftest.er1
20505   cat conftest.err >&5
20506   echo "$as_me:20506: \$? = $ac_status" >&5
20507   (exit $ac_status); } >/dev/null; then
20508   if test -s conftest.err; then
20509     ac_cpp_err=$ac_cxx_preproc_warn_flag
20510   else
20511     ac_cpp_err=
20512   fi
20513 else
20514   ac_cpp_err=yes
20515 fi
20516 if test -z "$ac_cpp_err"; then
20517   :
20518 else
20519   echo "$as_me: failed program was:" >&5
20520   cat conftest.$ac_ext >&5
20521   # Broken: fails on valid input.
20522 continue
20523 fi
20524 rm -f conftest.err conftest.$ac_ext
20525
20526   # OK, works on sane cases.  Now check whether non-existent headers
20527   # can be detected and how.
20528   cat >conftest.$ac_ext <<_ACEOF
20529 #line 20529 "configure"
20530 #include "confdefs.h"
20531 #include <ac_nonexistent.h>
20532 _ACEOF
20533 if { (eval echo "$as_me:20533: \"$ac_cpp conftest.$ac_ext\"") >&5
20534   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20535   ac_status=$?
20536   egrep -v '^ *\+' conftest.er1 >conftest.err
20537   rm -f conftest.er1
20538   cat conftest.err >&5
20539   echo "$as_me:20539: \$? = $ac_status" >&5
20540   (exit $ac_status); } >/dev/null; then
20541   if test -s conftest.err; then
20542     ac_cpp_err=$ac_cxx_preproc_warn_flag
20543   else
20544     ac_cpp_err=
20545   fi
20546 else
20547   ac_cpp_err=yes
20548 fi
20549 if test -z "$ac_cpp_err"; then
20550   # Broken: success on invalid input.
20551 continue
20552 else
20553   echo "$as_me: failed program was:" >&5
20554   cat conftest.$ac_ext >&5
20555   # Passes both tests.
20556 ac_preproc_ok=:
20557 break
20558 fi
20559 rm -f conftest.err conftest.$ac_ext
20560
20561 done
20562 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
20563 rm -f conftest.err conftest.$ac_ext
20564 if $ac_preproc_ok; then
20565   :
20566 else
20567   { { echo "$as_me:20567: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
20568 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
20569    { (exit 1); exit 1; }; }
20570 fi
20571
20572 ac_ext=cc
20573 ac_cpp='$CXXCPP $CPPFLAGS'
20574 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20575 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20576 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20577 ac_main_return=return
20578
20579 for ac_header in typeinfo
20580 do
20581 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20582 echo "$as_me:20582: checking for $ac_header" >&5
20583 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20584 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20585   echo $ECHO_N "(cached) $ECHO_C" >&6
20586 else
20587   cat >conftest.$ac_ext <<_ACEOF
20588 #line 20588 "configure"
20589 #include "confdefs.h"
20590 #include <$ac_header>
20591 _ACEOF
20592 if { (eval echo "$as_me:20592: \"$ac_cpp conftest.$ac_ext\"") >&5
20593   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20594   ac_status=$?
20595   egrep -v '^ *\+' conftest.er1 >conftest.err
20596   rm -f conftest.er1
20597   cat conftest.err >&5
20598   echo "$as_me:20598: \$? = $ac_status" >&5
20599   (exit $ac_status); } >/dev/null; then
20600   if test -s conftest.err; then
20601     ac_cpp_err=$ac_cxx_preproc_warn_flag
20602   else
20603     ac_cpp_err=
20604   fi
20605 else
20606   ac_cpp_err=yes
20607 fi
20608 if test -z "$ac_cpp_err"; then
20609   eval "$as_ac_Header=yes"
20610 else
20611   echo "$as_me: failed program was:" >&5
20612   cat conftest.$ac_ext >&5
20613   eval "$as_ac_Header=no"
20614 fi
20615 rm -f conftest.err conftest.$ac_ext
20616 fi
20617 echo "$as_me:20617: result: `eval echo '${'$as_ac_Header'}'`" >&5
20618 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20619 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20620   cat >>confdefs.h <<EOF
20621 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20622 EOF
20623
20624 fi
20625 done
20626
20627 for ac_header in iostream
20628 do
20629 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20630 echo "$as_me:20630: checking for $ac_header" >&5
20631 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20632 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20633   echo $ECHO_N "(cached) $ECHO_C" >&6
20634 else
20635   cat >conftest.$ac_ext <<_ACEOF
20636 #line 20636 "configure"
20637 #include "confdefs.h"
20638 #include <$ac_header>
20639 _ACEOF
20640 if { (eval echo "$as_me:20640: \"$ac_cpp conftest.$ac_ext\"") >&5
20641   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20642   ac_status=$?
20643   egrep -v '^ *\+' conftest.er1 >conftest.err
20644   rm -f conftest.er1
20645   cat conftest.err >&5
20646   echo "$as_me:20646: \$? = $ac_status" >&5
20647   (exit $ac_status); } >/dev/null; then
20648   if test -s conftest.err; then
20649     ac_cpp_err=$ac_cxx_preproc_warn_flag
20650   else
20651     ac_cpp_err=
20652   fi
20653 else
20654   ac_cpp_err=yes
20655 fi
20656 if test -z "$ac_cpp_err"; then
20657   eval "$as_ac_Header=yes"
20658 else
20659   echo "$as_me: failed program was:" >&5
20660   cat conftest.$ac_ext >&5
20661   eval "$as_ac_Header=no"
20662 fi
20663 rm -f conftest.err conftest.$ac_ext
20664 fi
20665 echo "$as_me:20665: result: `eval echo '${'$as_ac_Header'}'`" >&5
20666 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20667 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20668   cat >>confdefs.h <<EOF
20669 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20670 EOF
20671
20672 fi
20673 done
20674
20675 if test x"$ac_cv_header_iostream" = xyes ; then
20676         echo "$as_me:20676: checking if iostream uses std-namespace" >&5
20677 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
20678         cat >conftest.$ac_ext <<_ACEOF
20679 #line 20679 "configure"
20680 #include "confdefs.h"
20681
20682 #include <iostream>
20683 using std::endl;
20684 using std::cerr;
20685 int
20686 main ()
20687 {
20688
20689 cerr << "testing" << endl;
20690
20691   ;
20692   return 0;
20693 }
20694 _ACEOF
20695 rm -f conftest.$ac_objext
20696 if { (eval echo "$as_me:20696: \"$ac_compile\"") >&5
20697   (eval $ac_compile) 2>&5
20698   ac_status=$?
20699   echo "$as_me:20699: \$? = $ac_status" >&5
20700   (exit $ac_status); } &&
20701          { ac_try='test -s conftest.$ac_objext'
20702   { (eval echo "$as_me:20702: \"$ac_try\"") >&5
20703   (eval $ac_try) 2>&5
20704   ac_status=$?
20705   echo "$as_me:20705: \$? = $ac_status" >&5
20706   (exit $ac_status); }; }; then
20707   cf_iostream_namespace=yes
20708 else
20709   echo "$as_me: failed program was:" >&5
20710 cat conftest.$ac_ext >&5
20711 cf_iostream_namespace=no
20712 fi
20713 rm -f conftest.$ac_objext conftest.$ac_ext
20714         echo "$as_me:20714: result: $cf_iostream_namespace" >&5
20715 echo "${ECHO_T}$cf_iostream_namespace" >&6
20716         if test "$cf_iostream_namespace" = yes ; then
20717
20718 cat >>confdefs.h <<\EOF
20719 #define IOSTREAM_NAMESPACE 1
20720 EOF
20721
20722         fi
20723 fi
20724
20725 echo "$as_me:20725: checking if we should include stdbool.h" >&5
20726 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20727
20728 if test "${cf_cv_header_stdbool_h+set}" = set; then
20729   echo $ECHO_N "(cached) $ECHO_C" >&6
20730 else
20731
20732         cat >conftest.$ac_ext <<_ACEOF
20733 #line 20733 "configure"
20734 #include "confdefs.h"
20735
20736 int
20737 main ()
20738 {
20739 bool foo = false
20740   ;
20741   return 0;
20742 }
20743 _ACEOF
20744 rm -f conftest.$ac_objext
20745 if { (eval echo "$as_me:20745: \"$ac_compile\"") >&5
20746   (eval $ac_compile) 2>&5
20747   ac_status=$?
20748   echo "$as_me:20748: \$? = $ac_status" >&5
20749   (exit $ac_status); } &&
20750          { ac_try='test -s conftest.$ac_objext'
20751   { (eval echo "$as_me:20751: \"$ac_try\"") >&5
20752   (eval $ac_try) 2>&5
20753   ac_status=$?
20754   echo "$as_me:20754: \$? = $ac_status" >&5
20755   (exit $ac_status); }; }; then
20756   cf_cv_header_stdbool_h=0
20757 else
20758   echo "$as_me: failed program was:" >&5
20759 cat conftest.$ac_ext >&5
20760 cat >conftest.$ac_ext <<_ACEOF
20761 #line 20761 "configure"
20762 #include "confdefs.h"
20763
20764 #ifndef __BEOS__
20765 #include <stdbool.h>
20766 #endif
20767
20768 int
20769 main ()
20770 {
20771 bool foo = false
20772   ;
20773   return 0;
20774 }
20775 _ACEOF
20776 rm -f conftest.$ac_objext
20777 if { (eval echo "$as_me:20777: \"$ac_compile\"") >&5
20778   (eval $ac_compile) 2>&5
20779   ac_status=$?
20780   echo "$as_me:20780: \$? = $ac_status" >&5
20781   (exit $ac_status); } &&
20782          { ac_try='test -s conftest.$ac_objext'
20783   { (eval echo "$as_me:20783: \"$ac_try\"") >&5
20784   (eval $ac_try) 2>&5
20785   ac_status=$?
20786   echo "$as_me:20786: \$? = $ac_status" >&5
20787   (exit $ac_status); }; }; then
20788   cf_cv_header_stdbool_h=1
20789 else
20790   echo "$as_me: failed program was:" >&5
20791 cat conftest.$ac_ext >&5
20792 cf_cv_header_stdbool_h=0
20793 fi
20794 rm -f conftest.$ac_objext conftest.$ac_ext
20795 fi
20796 rm -f conftest.$ac_objext conftest.$ac_ext
20797 fi
20798
20799 if test "$cf_cv_header_stdbool_h" = 1
20800 then    echo "$as_me:20800: result: yes" >&5
20801 echo "${ECHO_T}yes" >&6
20802 else    echo "$as_me:20802: result: no" >&5
20803 echo "${ECHO_T}no" >&6
20804 fi
20805
20806 echo "$as_me:20806: checking for builtin bool type" >&5
20807 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20808
20809 if test "${cf_cv_builtin_bool+set}" = set; then
20810   echo $ECHO_N "(cached) $ECHO_C" >&6
20811 else
20812
20813         cat >conftest.$ac_ext <<_ACEOF
20814 #line 20814 "configure"
20815 #include "confdefs.h"
20816
20817 #include <stdio.h>
20818 #include <sys/types.h>
20819
20820 int
20821 main ()
20822 {
20823 bool x = false
20824   ;
20825   return 0;
20826 }
20827 _ACEOF
20828 rm -f conftest.$ac_objext
20829 if { (eval echo "$as_me:20829: \"$ac_compile\"") >&5
20830   (eval $ac_compile) 2>&5
20831   ac_status=$?
20832   echo "$as_me:20832: \$? = $ac_status" >&5
20833   (exit $ac_status); } &&
20834          { ac_try='test -s conftest.$ac_objext'
20835   { (eval echo "$as_me:20835: \"$ac_try\"") >&5
20836   (eval $ac_try) 2>&5
20837   ac_status=$?
20838   echo "$as_me:20838: \$? = $ac_status" >&5
20839   (exit $ac_status); }; }; then
20840   cf_cv_builtin_bool=1
20841 else
20842   echo "$as_me: failed program was:" >&5
20843 cat conftest.$ac_ext >&5
20844 cf_cv_builtin_bool=0
20845 fi
20846 rm -f conftest.$ac_objext conftest.$ac_ext
20847
20848 fi
20849
20850 if test "$cf_cv_builtin_bool" = 1
20851 then    echo "$as_me:20851: result: yes" >&5
20852 echo "${ECHO_T}yes" >&6
20853 else    echo "$as_me:20853: result: no" >&5
20854 echo "${ECHO_T}no" >&6
20855 fi
20856
20857 echo "$as_me:20857: checking for size of bool" >&5
20858 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20859 if test "${cf_cv_type_of_bool+set}" = set; then
20860   echo $ECHO_N "(cached) $ECHO_C" >&6
20861 else
20862
20863         rm -f cf_test.out
20864         if test "$cross_compiling" = yes; then
20865   cf_cv_type_of_bool=unknown
20866 else
20867   cat >conftest.$ac_ext <<_ACEOF
20868 #line 20868 "configure"
20869 #include "confdefs.h"
20870
20871 #include <stdlib.h>
20872 #include <stdio.h>
20873
20874 #if defined(__cplusplus)
20875
20876 #ifdef HAVE_GXX_BUILTIN_H
20877 #include <g++/builtin.h>
20878 #elif HAVE_GPP_BUILTIN_H
20879 #include <gpp/builtin.h>
20880 #elif HAVE_BUILTIN_H
20881 #include <builtin.h>
20882 #endif
20883
20884 #else
20885
20886 #if $cf_cv_header_stdbool_h
20887 #include <stdbool.h>
20888 #endif
20889
20890 #endif
20891
20892 int main(void)
20893 {
20894         FILE *fp = fopen("cf_test.out", "w");
20895         if (fp != 0) {
20896                 bool x = true;
20897                 if ((bool)(-x) >= 0)
20898                         fputs("unsigned ", fp);
20899                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20900                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20901                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20902                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20903                 fclose(fp);
20904         }
20905         ${cf_cv_main_return:-return}(0);
20906 }
20907
20908 _ACEOF
20909 rm -f conftest$ac_exeext
20910 if { (eval echo "$as_me:20910: \"$ac_link\"") >&5
20911   (eval $ac_link) 2>&5
20912   ac_status=$?
20913   echo "$as_me:20913: \$? = $ac_status" >&5
20914   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20915   { (eval echo "$as_me:20915: \"$ac_try\"") >&5
20916   (eval $ac_try) 2>&5
20917   ac_status=$?
20918   echo "$as_me:20918: \$? = $ac_status" >&5
20919   (exit $ac_status); }; }; then
20920   cf_cv_type_of_bool=`cat cf_test.out`
20921                  if test -z "$cf_cv_type_of_bool"; then
20922                    cf_cv_type_of_bool=unknown
20923                  fi
20924 else
20925   echo "$as_me: program exited with status $ac_status" >&5
20926 echo "$as_me: failed program was:" >&5
20927 cat conftest.$ac_ext >&5
20928 cf_cv_type_of_bool=unknown
20929 fi
20930 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20931 fi
20932
20933 fi
20934
20935         rm -f cf_test.out
20936 echo "$as_me:20936: result: $cf_cv_type_of_bool" >&5
20937 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20938 if test "$cf_cv_type_of_bool" = unknown ; then
20939         case .$NCURSES_BOOL in
20940         (.auto|.) NCURSES_BOOL=unsigned;;
20941         esac
20942         { echo "$as_me:20942: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20943 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20944         cf_cv_type_of_bool=$NCURSES_BOOL
20945 fi
20946
20947 echo "$as_me:20947: checking for special defines needed for etip.h" >&5
20948 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20949 cf_save_CXXFLAGS="$CXXFLAGS"
20950 cf_result="none"
20951
20952 # etip.h includes ncurses.h which includes ncurses_dll.h
20953 # But ncurses_dll.h is generated - fix here.
20954 test -d include || mkdir include
20955 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
20956
20957 for cf_math in "" MATH_H
20958 do
20959 for cf_excp in "" MATH_EXCEPTION
20960 do
20961         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
20962         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20963         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20964 cat >conftest.$ac_ext <<_ACEOF
20965 #line 20965 "configure"
20966 #include "confdefs.h"
20967
20968 #include <etip.h.in>
20969
20970 int
20971 main ()
20972 {
20973
20974   ;
20975   return 0;
20976 }
20977 _ACEOF
20978 rm -f conftest.$ac_objext
20979 if { (eval echo "$as_me:20979: \"$ac_compile\"") >&5
20980   (eval $ac_compile) 2>&5
20981   ac_status=$?
20982   echo "$as_me:20982: \$? = $ac_status" >&5
20983   (exit $ac_status); } &&
20984          { ac_try='test -s conftest.$ac_objext'
20985   { (eval echo "$as_me:20985: \"$ac_try\"") >&5
20986   (eval $ac_try) 2>&5
20987   ac_status=$?
20988   echo "$as_me:20988: \$? = $ac_status" >&5
20989   (exit $ac_status); }; }; then
20990
20991         test -n "$cf_math" && cat >>confdefs.h <<EOF
20992 #define ETIP_NEEDS_${cf_math} 1
20993 EOF
20994
20995         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20996 #define ETIP_NEEDS_${cf_excp} 1
20997 EOF
20998
20999         cf_result="$cf_math $cf_excp"
21000         break 2
21001
21002 else
21003   echo "$as_me: failed program was:" >&5
21004 cat conftest.$ac_ext >&5
21005 fi
21006 rm -f conftest.$ac_objext conftest.$ac_ext
21007 done
21008 done
21009 echo "$as_me:21009: result: $cf_result" >&5
21010 echo "${ECHO_T}$cf_result" >&6
21011 CXXFLAGS="$cf_save_CXXFLAGS"
21012
21013 if test -n "$CXX"; then
21014 echo "$as_me:21014: checking if $CXX accepts parameter initialization" >&5
21015 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
21016 if test "${cf_cv_cpp_param_init+set}" = set; then
21017   echo $ECHO_N "(cached) $ECHO_C" >&6
21018 else
21019
21020         ac_ext=cc
21021 ac_cpp='$CXXCPP $CPPFLAGS'
21022 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21023 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21024 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21025 ac_main_return=return
21026
21027         if test "$cross_compiling" = yes; then
21028   cf_cv_cpp_param_init=unknown
21029 else
21030   cat >conftest.$ac_ext <<_ACEOF
21031 #line 21031 "configure"
21032 #include "confdefs.h"
21033
21034 class TEST {
21035 private:
21036         int value;
21037 public:
21038         TEST(int x = 1);
21039         ~TEST();
21040 };
21041
21042 TEST::TEST(int x = 1)   // some compilers do not like second initializer
21043 {
21044         value = x;
21045 }
21046 int main(void) { }
21047
21048 _ACEOF
21049 rm -f conftest$ac_exeext
21050 if { (eval echo "$as_me:21050: \"$ac_link\"") >&5
21051   (eval $ac_link) 2>&5
21052   ac_status=$?
21053   echo "$as_me:21053: \$? = $ac_status" >&5
21054   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21055   { (eval echo "$as_me:21055: \"$ac_try\"") >&5
21056   (eval $ac_try) 2>&5
21057   ac_status=$?
21058   echo "$as_me:21058: \$? = $ac_status" >&5
21059   (exit $ac_status); }; }; then
21060   cf_cv_cpp_param_init=yes
21061 else
21062   echo "$as_me: program exited with status $ac_status" >&5
21063 echo "$as_me: failed program was:" >&5
21064 cat conftest.$ac_ext >&5
21065 cf_cv_cpp_param_init=no
21066 fi
21067 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21068 fi
21069         ac_ext=cc
21070 ac_cpp='$CXXCPP $CPPFLAGS'
21071 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21072 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21073 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21074 ac_main_return=return
21075
21076 fi
21077 echo "$as_me:21077: result: $cf_cv_cpp_param_init" >&5
21078 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
21079 fi
21080 test "$cf_cv_cpp_param_init" = yes &&
21081 cat >>confdefs.h <<\EOF
21082 #define CPP_HAS_PARAM_INIT 1
21083 EOF
21084
21085 if test -n "$CXX"; then
21086
21087 echo "$as_me:21087: checking if $CXX accepts static_cast" >&5
21088 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
21089 if test "${cf_cv_cpp_static_cast+set}" = set; then
21090   echo $ECHO_N "(cached) $ECHO_C" >&6
21091 else
21092
21093         ac_ext=cc
21094 ac_cpp='$CXXCPP $CPPFLAGS'
21095 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21096 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21097 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21098 ac_main_return=return
21099
21100         cat >conftest.$ac_ext <<_ACEOF
21101 #line 21101 "configure"
21102 #include "confdefs.h"
21103
21104 class NCursesPanel
21105 {
21106 public:
21107   NCursesPanel(int nlines,
21108                int ncols,
21109                int begin_y = 0,
21110                int begin_x = 0)
21111   {
21112   }
21113   NCursesPanel();
21114   ~NCursesPanel();
21115 };
21116
21117 template<class T> class NCursesUserPanel : public NCursesPanel
21118 {
21119 public:
21120   NCursesUserPanel (int nlines,
21121                     int ncols,
21122                     int begin_y = 0,
21123                     int begin_x = 0,
21124                     const T* p_UserData = static_cast<T*>(0))
21125     : NCursesPanel (nlines, ncols, begin_y, begin_x)
21126   {
21127   };
21128   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
21129   {
21130   };
21131
21132   virtual ~NCursesUserPanel() {};
21133 };
21134
21135 int
21136 main ()
21137 {
21138
21139         const char* p_UserData = static_cast<char*>(0)
21140   ;
21141   return 0;
21142 }
21143 _ACEOF
21144 rm -f conftest.$ac_objext
21145 if { (eval echo "$as_me:21145: \"$ac_compile\"") >&5
21146   (eval $ac_compile) 2>&5
21147   ac_status=$?
21148   echo "$as_me:21148: \$? = $ac_status" >&5
21149   (exit $ac_status); } &&
21150          { ac_try='test -s conftest.$ac_objext'
21151   { (eval echo "$as_me:21151: \"$ac_try\"") >&5
21152   (eval $ac_try) 2>&5
21153   ac_status=$?
21154   echo "$as_me:21154: \$? = $ac_status" >&5
21155   (exit $ac_status); }; }; then
21156   cf_cv_cpp_static_cast=yes
21157 else
21158   echo "$as_me: failed program was:" >&5
21159 cat conftest.$ac_ext >&5
21160 cf_cv_cpp_static_cast=no
21161 fi
21162 rm -f conftest.$ac_objext conftest.$ac_ext
21163
21164         ac_ext=cc
21165 ac_cpp='$CXXCPP $CPPFLAGS'
21166 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21167 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21168 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21169 ac_main_return=return
21170
21171 fi
21172 echo "$as_me:21172: result: $cf_cv_cpp_static_cast" >&5
21173 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
21174
21175 fi
21176
21177 test "$cf_cv_cpp_static_cast" = yes &&
21178 cat >>confdefs.h <<\EOF
21179 #define CPP_HAS_STATIC_CAST 1
21180 EOF
21181
21182         CXX_AR='$(AR)'
21183         CXX_ARFLAGS='$(ARFLAGS)'
21184         case $cf_cv_system_name in
21185         (irix*)
21186             if test "$GXX" != yes ; then
21187                 CXX_AR='$(CXX)'
21188                 CXX_ARFLAGS='-ar -o'
21189             fi
21190             ;;
21191         (sco3.2v5*)
21192             CXXLDFLAGS="-u main"
21193             ;;
21194         (solaris2*)
21195             if test "$GXX" != yes ; then
21196                 CXX_AR='$(CXX)'
21197                 CXX_ARFLAGS='-xar -o'
21198             fi
21199             ;;
21200         esac
21201
21202 else
21203         cf_cxx_library=no
21204         cf_cv_builtin_bool=1
21205
21206         # Just because we are not configuring against C++ right now does not
21207         # mean that a user will not want to use C++.  Some distributors disable
21208         # the C++ portion of this configuration as a shortcut (or just to avoid
21209         # compiling the demo in the c++ directory).  So we need a reasonable
21210         # default for the 'bool' type.
21211         #
21212         # Caveat: since the storage of the bool type is not standardized, it
21213         # may change.
21214
21215         if test "$NCURSES_BOOL" != auto ; then
21216                 cf_cv_type_of_bool=$NCURSES_BOOL
21217                 cf_cv_header_stdbool_h=0
21218         else
21219                 if test "$cf_cv_header_stdbool_h" = 1 ; then
21220
21221 echo "$as_me:21221: checking for size of bool" >&5
21222 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21223 if test "${cf_cv_type_of_bool+set}" = set; then
21224   echo $ECHO_N "(cached) $ECHO_C" >&6
21225 else
21226
21227         rm -f cf_test.out
21228         if test "$cross_compiling" = yes; then
21229   cf_cv_type_of_bool=unknown
21230 else
21231   cat >conftest.$ac_ext <<_ACEOF
21232 #line 21232 "configure"
21233 #include "confdefs.h"
21234
21235 #include <stdlib.h>
21236 #include <stdio.h>
21237
21238 #if defined(__cplusplus)
21239
21240 #ifdef HAVE_GXX_BUILTIN_H
21241 #include <g++/builtin.h>
21242 #elif HAVE_GPP_BUILTIN_H
21243 #include <gpp/builtin.h>
21244 #elif HAVE_BUILTIN_H
21245 #include <builtin.h>
21246 #endif
21247
21248 #else
21249
21250 #if $cf_cv_header_stdbool_h
21251 #include <stdbool.h>
21252 #endif
21253
21254 #endif
21255
21256 int main(void)
21257 {
21258         FILE *fp = fopen("cf_test.out", "w");
21259         if (fp != 0) {
21260                 bool x = true;
21261                 if ((bool)(-x) >= 0)
21262                         fputs("unsigned ", fp);
21263                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21264                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21265                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21266                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21267                 fclose(fp);
21268         }
21269         ${cf_cv_main_return:-return}(0);
21270 }
21271
21272 _ACEOF
21273 rm -f conftest$ac_exeext
21274 if { (eval echo "$as_me:21274: \"$ac_link\"") >&5
21275   (eval $ac_link) 2>&5
21276   ac_status=$?
21277   echo "$as_me:21277: \$? = $ac_status" >&5
21278   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21279   { (eval echo "$as_me:21279: \"$ac_try\"") >&5
21280   (eval $ac_try) 2>&5
21281   ac_status=$?
21282   echo "$as_me:21282: \$? = $ac_status" >&5
21283   (exit $ac_status); }; }; then
21284   cf_cv_type_of_bool=`cat cf_test.out`
21285                  if test -z "$cf_cv_type_of_bool"; then
21286                    cf_cv_type_of_bool=unknown
21287                  fi
21288 else
21289   echo "$as_me: program exited with status $ac_status" >&5
21290 echo "$as_me: failed program was:" >&5
21291 cat conftest.$ac_ext >&5
21292 cf_cv_type_of_bool=unknown
21293 fi
21294 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21295 fi
21296
21297 fi
21298
21299         rm -f cf_test.out
21300 echo "$as_me:21300: result: $cf_cv_type_of_bool" >&5
21301 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21302 if test "$cf_cv_type_of_bool" = unknown ; then
21303         case .$NCURSES_BOOL in
21304         (.auto|.) NCURSES_BOOL=unsigned;;
21305         esac
21306         { echo "$as_me:21306: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21307 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21308         cf_cv_type_of_bool=$NCURSES_BOOL
21309 fi
21310
21311                 else
21312                         echo "$as_me:21312: checking for fallback type of bool" >&5
21313 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
21314                         case "$host_cpu" in
21315                         (i?86)  cf_cv_type_of_bool=char ;;
21316                         (*)     cf_cv_type_of_bool=int  ;;
21317                         esac
21318                         echo "$as_me:21318: result: $cf_cv_type_of_bool" >&5
21319 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21320                 fi
21321         fi
21322 fi
21323
21324 # If the C compiler did not declare bool, and we did not determine that the C++
21325 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
21326 # ncurses library use the same type as C++ bool.  Note that this allows one to
21327 # specify the type of bool in a configure-script option and postpone
21328 # integration with the C++ compiler provided that the types are compatible.
21329 USE_CXX_BOOL=1
21330 if test $cf_cv_cc_bool_type = 1
21331 then
21332         # oops: C has a bool.  Unlikely, but C++ could differ.
21333         USE_CXX_BOOL=0
21334 elif test $cf_cv_builtin_bool = 0
21335 then
21336         # C++ has no bool
21337         USE_CXX_BOOL=0
21338 else
21339         # this is the normal case
21340         USE_CXX_BOOL='defined(__cplusplus)'
21341 fi
21342
21343 if test -f "${srcdir}/Ada95/Makefile.in" ; then
21344
21345         if test "$cf_with_ada" != "no" ; then
21346                 if test "$with_libtool" != "no"; then
21347                         { echo "$as_me:21347: WARNING: libtool does not support Ada - disabling feature" >&5
21348 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
21349                         cf_with_ada=no
21350                 fi
21351         fi
21352
21353         if test "$cf_with_ada" != "no" ; then
21354
21355 cf_ada_make=gnatmake
21356 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
21357 set dummy $cf_ada_make; ac_word=$2
21358 echo "$as_me:21358: checking for $ac_word" >&5
21359 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21360 if test "${ac_cv_prog_gnat_exists+set}" = set; then
21361   echo $ECHO_N "(cached) $ECHO_C" >&6
21362 else
21363   if test -n "$gnat_exists"; then
21364   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
21365 else
21366   ac_save_IFS=$IFS; IFS=$ac_path_separator
21367 ac_dummy="$PATH"
21368 for ac_dir in $ac_dummy; do
21369   IFS=$ac_save_IFS
21370   test -z "$ac_dir" && ac_dir=.
21371   $as_executable_p "$ac_dir/$ac_word" || continue
21372 ac_cv_prog_gnat_exists="yes"
21373 echo "$as_me:21373: found $ac_dir/$ac_word" >&5
21374 break
21375 done
21376
21377   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
21378 fi
21379 fi
21380 gnat_exists=$ac_cv_prog_gnat_exists
21381 if test -n "$gnat_exists"; then
21382   echo "$as_me:21382: result: $gnat_exists" >&5
21383 echo "${ECHO_T}$gnat_exists" >&6
21384 else
21385   echo "$as_me:21385: result: no" >&5
21386 echo "${ECHO_T}no" >&6
21387 fi
21388
21389 if test "$ac_cv_prog_gnat_exists" = no; then
21390         cf_ada_make=
21391         cf_cv_prog_gnat_correct=no
21392 else
21393
21394 echo "$as_me:21394: checking for gnat version" >&5
21395 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
21396 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
21397         grep '[0-9].[0-9][0-9]*' |\
21398         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
21399 echo "$as_me:21399: result: $cf_gnat_version" >&5
21400 echo "${ECHO_T}$cf_gnat_version" >&6
21401
21402 case $cf_gnat_version in
21403 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
21404         cf_cv_prog_gnat_correct=yes
21405         ;;
21406 (*)
21407         { echo "$as_me:21407: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
21408 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
21409         cf_cv_prog_gnat_correct=no
21410         ;;
21411 esac
21412
21413         # Extract the first word of "m4", so it can be a program name with args.
21414 set dummy m4; ac_word=$2
21415 echo "$as_me:21415: checking for $ac_word" >&5
21416 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21417 if test "${ac_cv_prog_M4_exists+set}" = set; then
21418   echo $ECHO_N "(cached) $ECHO_C" >&6
21419 else
21420   if test -n "$M4_exists"; then
21421   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
21422 else
21423   ac_save_IFS=$IFS; IFS=$ac_path_separator
21424 ac_dummy="$PATH"
21425 for ac_dir in $ac_dummy; do
21426   IFS=$ac_save_IFS
21427   test -z "$ac_dir" && ac_dir=.
21428   $as_executable_p "$ac_dir/$ac_word" || continue
21429 ac_cv_prog_M4_exists="yes"
21430 echo "$as_me:21430: found $ac_dir/$ac_word" >&5
21431 break
21432 done
21433
21434   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
21435 fi
21436 fi
21437 M4_exists=$ac_cv_prog_M4_exists
21438 if test -n "$M4_exists"; then
21439   echo "$as_me:21439: result: $M4_exists" >&5
21440 echo "${ECHO_T}$M4_exists" >&6
21441 else
21442   echo "$as_me:21442: result: no" >&5
21443 echo "${ECHO_T}no" >&6
21444 fi
21445
21446         if test "$ac_cv_prog_M4_exists" = no; then
21447                 cf_cv_prog_gnat_correct=no
21448                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
21449         fi
21450         if test "$cf_cv_prog_gnat_correct" = yes; then
21451                 echo "$as_me:21451: checking if GNAT works" >&5
21452 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
21453
21454 rm -rf conftest* *~conftest*
21455 cat >>conftest.ads <<CF_EOF
21456 procedure conftest;
21457 CF_EOF
21458 cat >>conftest.adb <<CF_EOF
21459 with Text_IO;
21460 with GNAT.OS_Lib;
21461 procedure conftest is
21462 begin
21463    Text_IO.Put ("Hello World");
21464    Text_IO.New_Line;
21465    GNAT.OS_Lib.OS_Exit (0);
21466 end conftest;
21467 CF_EOF
21468 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21469    if ( ./conftest 1>&5 2>&1 ) ; then
21470       cf_cv_prog_gnat_correct=yes
21471    else
21472       cf_cv_prog_gnat_correct=no
21473    fi
21474 else
21475    cf_cv_prog_gnat_correct=no
21476 fi
21477 rm -rf conftest* *~conftest*
21478
21479                 echo "$as_me:21479: result: $cf_cv_prog_gnat_correct" >&5
21480 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
21481         fi
21482 fi
21483
21484                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
21485
21486         ADAFLAGS="$ADAFLAGS -gnatpn"
21487
21488         echo "$as_me:21488: checking optimization options for ADAFLAGS" >&5
21489 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
21490         case "$CFLAGS" in
21491         (*-g*)
21492
21493         ADAFLAGS="$ADAFLAGS -g"
21494
21495                 ;;
21496         esac
21497         case "$CFLAGS" in
21498         (*-O*)
21499                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
21500
21501         ADAFLAGS="$ADAFLAGS $cf_O_flag"
21502
21503                 ;;
21504         esac
21505         echo "$as_me:21505: result: $ADAFLAGS" >&5
21506 echo "${ECHO_T}$ADAFLAGS" >&6
21507
21508 echo "$as_me:21508: checking if GNATPREP supports -T option" >&5
21509 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
21510 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
21511   echo $ECHO_N "(cached) $ECHO_C" >&6
21512 else
21513
21514 cf_cv_gnatprep_opt_t=no
21515 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
21516
21517 fi
21518 echo "$as_me:21518: result: $cf_cv_gnatprep_opt_t" >&5
21519 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
21520 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
21521
21522 echo "$as_me:21522: checking if GNAT supports generics" >&5
21523 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
21524 case $cf_gnat_version in
21525 (3.[1-9]*|[4-9].*)
21526         cf_gnat_generics=yes
21527         ;;
21528 (*)
21529         cf_gnat_generics=no
21530         ;;
21531 esac
21532 echo "$as_me:21532: result: $cf_gnat_generics" >&5
21533 echo "${ECHO_T}$cf_gnat_generics" >&6
21534
21535 if test "$cf_gnat_generics" = yes
21536 then
21537         cf_compile_generics=generics
21538         cf_generic_objects="\${GENOBJS}"
21539 else
21540         cf_compile_generics=
21541         cf_generic_objects=
21542 fi
21543
21544 echo "$as_me:21544: checking if GNAT supports SIGINT" >&5
21545 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
21546 if test "${cf_cv_gnat_sigint+set}" = set; then
21547   echo $ECHO_N "(cached) $ECHO_C" >&6
21548 else
21549
21550 rm -rf conftest* *~conftest*
21551 cat >>conftest.ads <<CF_EOF
21552 with Ada.Interrupts.Names;
21553
21554 package ConfTest is
21555
21556    pragma Warnings (Off);  --  the next pragma exists since 3.11p
21557    pragma Unreserve_All_Interrupts;
21558    pragma Warnings (On);
21559
21560    protected Process is
21561       procedure Stop;
21562       function Continue return Boolean;
21563       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
21564    private
21565       Done : Boolean := False;
21566    end Process;
21567
21568 end ConfTest;
21569 CF_EOF
21570 cat >>conftest.adb <<CF_EOF
21571 package body ConfTest is
21572    protected body Process is
21573       procedure Stop is
21574       begin
21575          Done := True;
21576       end Stop;
21577       function Continue return Boolean is
21578       begin
21579          return not Done;
21580       end Continue;
21581    end Process;
21582 end ConfTest;
21583 CF_EOF
21584 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
21585       cf_cv_gnat_sigint=yes
21586 else
21587    cf_cv_gnat_sigint=no
21588 fi
21589 rm -rf conftest* *~conftest*
21590
21591 fi
21592 echo "$as_me:21592: result: $cf_cv_gnat_sigint" >&5
21593 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
21594
21595 if test $cf_cv_gnat_sigint = yes ; then
21596         USE_GNAT_SIGINT=""
21597 else
21598         USE_GNAT_SIGINT="#"
21599 fi
21600
21601 cf_gnat_libraries=no
21602 cf_gnat_projects=no
21603
21604 if test "$enable_gnat_projects" != no ; then
21605 echo "$as_me:21605: checking if GNAT supports project files" >&5
21606 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
21607 case $cf_gnat_version in
21608 (3.[0-9]*)
21609         ;;
21610 (*)
21611         case $cf_cv_system_name in
21612         (cygwin*|msys*)
21613                 ;;
21614         (*)
21615                 mkdir conftest.src conftest.bin conftest.lib
21616                 cd conftest.src
21617                 rm -rf conftest* *~conftest*
21618                 cat >>library.gpr <<CF_EOF
21619 project Library is
21620   Kind := External ("LIB_KIND");
21621   for Library_Name use "ConfTest";
21622   for Object_Dir use ".";
21623   for Library_ALI_Dir use External("LIBRARY_DIR");
21624   for Library_Version use External ("SONAME");
21625   for Library_Kind use Kind;
21626   for Library_Dir use External("BUILD_DIR");
21627   Source_Dir := External ("SOURCE_DIR");
21628   for Source_Dirs use (Source_Dir);
21629 end Library;
21630 CF_EOF
21631                 cat >>confpackage.ads <<CF_EOF
21632 package ConfPackage is
21633    procedure conftest;
21634 end ConfPackage;
21635 CF_EOF
21636                 cat >>confpackage.adb <<CF_EOF
21637 with Text_IO;
21638 package body ConfPackage is
21639    procedure conftest is
21640    begin
21641       Text_IO.Put ("Hello World");
21642       Text_IO.New_Line;
21643    end conftest;
21644 end ConfPackage;
21645 CF_EOF
21646                 if ( $cf_ada_make $ADAFLAGS \
21647                                 -Plibrary.gpr \
21648                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
21649                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
21650                                 -XSOURCE_DIR=`pwd` \
21651                                 -XSONAME=libConfTest.so.1 \
21652                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
21653                         cf_gnat_projects=yes
21654                 fi
21655                 cd ..
21656                 if test -f conftest.lib/confpackage.ali
21657                 then
21658                         cf_gnat_libraries=yes
21659                 fi
21660                 rm -rf conftest* *~conftest*
21661                 ;;
21662         esac
21663         ;;
21664 esac
21665 echo "$as_me:21665: result: $cf_gnat_projects" >&5
21666 echo "${ECHO_T}$cf_gnat_projects" >&6
21667 fi # enable_gnat_projects
21668
21669 if test $cf_gnat_projects = yes
21670 then
21671         echo "$as_me:21671: checking if GNAT supports libraries" >&5
21672 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
21673         echo "$as_me:21673: result: $cf_gnat_libraries" >&5
21674 echo "${ECHO_T}$cf_gnat_libraries" >&6
21675 fi
21676
21677 if test "$cf_gnat_projects" = yes
21678 then
21679         USE_OLD_MAKERULES="#"
21680         USE_GNAT_PROJECTS=""
21681 else
21682         USE_OLD_MAKERULES=""
21683         USE_GNAT_PROJECTS="#"
21684 fi
21685
21686 if test "$cf_gnat_libraries" = yes
21687 then
21688         USE_GNAT_LIBRARIES=""
21689 else
21690         USE_GNAT_LIBRARIES="#"
21691 fi
21692
21693 echo "$as_me:21693: checking for ada-compiler" >&5
21694 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
21695
21696 # Check whether --with-ada-compiler or --without-ada-compiler was given.
21697 if test "${with_ada_compiler+set}" = set; then
21698   withval="$with_ada_compiler"
21699   cf_ada_compiler=$withval
21700 else
21701   cf_ada_compiler=gnatmake
21702 fi;
21703
21704 echo "$as_me:21704: result: $cf_ada_compiler" >&5
21705 echo "${ECHO_T}$cf_ada_compiler" >&6
21706
21707                         cf_ada_package=terminal_interface
21708
21709 echo "$as_me:21709: checking for ada-include" >&5
21710 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
21711
21712 # Check whether --with-ada-include or --without-ada-include was given.
21713 if test "${with_ada_include+set}" = set; then
21714   withval="$with_ada_include"
21715
21716 else
21717   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
21718 fi; if test -n "$prefix/share/ada/adainclude" ; then
21719
21720 if test "x$prefix" != xNONE; then
21721         cf_path_syntax="$prefix"
21722 else
21723         cf_path_syntax="$ac_default_prefix"
21724 fi
21725
21726 case ".$withval" in
21727 (.\$\(*\)*|.\'*\'*)
21728         ;;
21729 (..|./*|.\\*)
21730         ;;
21731 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21732         ;;
21733 (.\${*prefix}*|.\${*dir}*)
21734         eval withval="$withval"
21735         case ".$withval" in
21736         (.NONE/*)
21737                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21738                 ;;
21739         esac
21740         ;;
21741 (.no|.NONE/*)
21742         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21743         ;;
21744 (*)
21745         { { echo "$as_me:21745: error: expected a pathname, not \"$withval\"" >&5
21746 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21747    { (exit 1); exit 1; }; }
21748         ;;
21749 esac
21750
21751 fi
21752 eval ADA_INCLUDE="$withval"
21753
21754 echo "$as_me:21754: result: $ADA_INCLUDE" >&5
21755 echo "${ECHO_T}$ADA_INCLUDE" >&6
21756
21757 echo "$as_me:21757: checking for ada-objects" >&5
21758 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
21759
21760 # Check whether --with-ada-objects or --without-ada-objects was given.
21761 if test "${with_ada_objects+set}" = set; then
21762   withval="$with_ada_objects"
21763
21764 else
21765   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
21766 fi; if test -n "$prefix/lib/ada/adalib" ; then
21767
21768 if test "x$prefix" != xNONE; then
21769         cf_path_syntax="$prefix"
21770 else
21771         cf_path_syntax="$ac_default_prefix"
21772 fi
21773
21774 case ".$withval" in
21775 (.\$\(*\)*|.\'*\'*)
21776         ;;
21777 (..|./*|.\\*)
21778         ;;
21779 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21780         ;;
21781 (.\${*prefix}*|.\${*dir}*)
21782         eval withval="$withval"
21783         case ".$withval" in
21784         (.NONE/*)
21785                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21786                 ;;
21787         esac
21788         ;;
21789 (.no|.NONE/*)
21790         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21791         ;;
21792 (*)
21793         { { echo "$as_me:21793: error: expected a pathname, not \"$withval\"" >&5
21794 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21795    { (exit 1); exit 1; }; }
21796         ;;
21797 esac
21798
21799 fi
21800 eval ADA_OBJECTS="$withval"
21801
21802 echo "$as_me:21802: result: $ADA_OBJECTS" >&5
21803 echo "${ECHO_T}$ADA_OBJECTS" >&6
21804
21805 echo "$as_me:21805: checking if an Ada95 shared-library should be built" >&5
21806 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
21807
21808 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
21809 if test "${with_ada_sharedlib+set}" = set; then
21810   withval="$with_ada_sharedlib"
21811   with_ada_sharedlib=$withval
21812 else
21813   with_ada_sharedlib=no
21814 fi;
21815 echo "$as_me:21815: result: $with_ada_sharedlib" >&5
21816 echo "${ECHO_T}$with_ada_sharedlib" >&6
21817
21818 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
21819 MAKE_ADA_SHAREDLIB="#"
21820
21821 if test "x$with_ada_sharedlib" != xno
21822 then
21823         MAKE_ADA_SHAREDLIB=
21824         if test "x$with_ada_sharedlib" != xyes
21825         then
21826                 ADA_SHAREDLIB="$with_ada_sharedlib"
21827         fi
21828 fi
21829
21830                 fi
21831         fi
21832 else
21833         cf_with_ada=no
21834 fi
21835
21836 # do this "late" to avoid conflict with header-checks
21837 if test "x$with_widec" = xyes ; then
21838         echo "$as_me:21838: checking for wchar_t" >&5
21839 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
21840 if test "${ac_cv_type_wchar_t+set}" = set; then
21841   echo $ECHO_N "(cached) $ECHO_C" >&6
21842 else
21843   cat >conftest.$ac_ext <<_ACEOF
21844 #line 21844 "configure"
21845 #include "confdefs.h"
21846 $ac_includes_default
21847 int
21848 main ()
21849 {
21850 if ((wchar_t *) 0)
21851   return 0;
21852 if (sizeof (wchar_t))
21853   return 0;
21854   ;
21855   return 0;
21856 }
21857 _ACEOF
21858 rm -f conftest.$ac_objext
21859 if { (eval echo "$as_me:21859: \"$ac_compile\"") >&5
21860   (eval $ac_compile) 2>&5
21861   ac_status=$?
21862   echo "$as_me:21862: \$? = $ac_status" >&5
21863   (exit $ac_status); } &&
21864          { ac_try='test -s conftest.$ac_objext'
21865   { (eval echo "$as_me:21865: \"$ac_try\"") >&5
21866   (eval $ac_try) 2>&5
21867   ac_status=$?
21868   echo "$as_me:21868: \$? = $ac_status" >&5
21869   (exit $ac_status); }; }; then
21870   ac_cv_type_wchar_t=yes
21871 else
21872   echo "$as_me: failed program was:" >&5
21873 cat conftest.$ac_ext >&5
21874 ac_cv_type_wchar_t=no
21875 fi
21876 rm -f conftest.$ac_objext conftest.$ac_ext
21877 fi
21878 echo "$as_me:21878: result: $ac_cv_type_wchar_t" >&5
21879 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
21880
21881 echo "$as_me:21881: checking size of wchar_t" >&5
21882 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21883 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21884   echo $ECHO_N "(cached) $ECHO_C" >&6
21885 else
21886   if test "$ac_cv_type_wchar_t" = yes; then
21887   if test "$cross_compiling" = yes; then
21888   # Depending upon the size, compute the lo and hi bounds.
21889 cat >conftest.$ac_ext <<_ACEOF
21890 #line 21890 "configure"
21891 #include "confdefs.h"
21892 $ac_includes_default
21893 int
21894 main ()
21895 {
21896 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21897   ;
21898   return 0;
21899 }
21900 _ACEOF
21901 rm -f conftest.$ac_objext
21902 if { (eval echo "$as_me:21902: \"$ac_compile\"") >&5
21903   (eval $ac_compile) 2>&5
21904   ac_status=$?
21905   echo "$as_me:21905: \$? = $ac_status" >&5
21906   (exit $ac_status); } &&
21907          { ac_try='test -s conftest.$ac_objext'
21908   { (eval echo "$as_me:21908: \"$ac_try\"") >&5
21909   (eval $ac_try) 2>&5
21910   ac_status=$?
21911   echo "$as_me:21911: \$? = $ac_status" >&5
21912   (exit $ac_status); }; }; then
21913   ac_lo=0 ac_mid=0
21914   while :; do
21915     cat >conftest.$ac_ext <<_ACEOF
21916 #line 21916 "configure"
21917 #include "confdefs.h"
21918 $ac_includes_default
21919 int
21920 main ()
21921 {
21922 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21923   ;
21924   return 0;
21925 }
21926 _ACEOF
21927 rm -f conftest.$ac_objext
21928 if { (eval echo "$as_me:21928: \"$ac_compile\"") >&5
21929   (eval $ac_compile) 2>&5
21930   ac_status=$?
21931   echo "$as_me:21931: \$? = $ac_status" >&5
21932   (exit $ac_status); } &&
21933          { ac_try='test -s conftest.$ac_objext'
21934   { (eval echo "$as_me:21934: \"$ac_try\"") >&5
21935   (eval $ac_try) 2>&5
21936   ac_status=$?
21937   echo "$as_me:21937: \$? = $ac_status" >&5
21938   (exit $ac_status); }; }; then
21939   ac_hi=$ac_mid; break
21940 else
21941   echo "$as_me: failed program was:" >&5
21942 cat conftest.$ac_ext >&5
21943 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21944 fi
21945 rm -f conftest.$ac_objext conftest.$ac_ext
21946   done
21947 else
21948   echo "$as_me: failed program was:" >&5
21949 cat conftest.$ac_ext >&5
21950 ac_hi=-1 ac_mid=-1
21951   while :; do
21952     cat >conftest.$ac_ext <<_ACEOF
21953 #line 21953 "configure"
21954 #include "confdefs.h"
21955 $ac_includes_default
21956 int
21957 main ()
21958 {
21959 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21960   ;
21961   return 0;
21962 }
21963 _ACEOF
21964 rm -f conftest.$ac_objext
21965 if { (eval echo "$as_me:21965: \"$ac_compile\"") >&5
21966   (eval $ac_compile) 2>&5
21967   ac_status=$?
21968   echo "$as_me:21968: \$? = $ac_status" >&5
21969   (exit $ac_status); } &&
21970          { ac_try='test -s conftest.$ac_objext'
21971   { (eval echo "$as_me:21971: \"$ac_try\"") >&5
21972   (eval $ac_try) 2>&5
21973   ac_status=$?
21974   echo "$as_me:21974: \$? = $ac_status" >&5
21975   (exit $ac_status); }; }; then
21976   ac_lo=$ac_mid; break
21977 else
21978   echo "$as_me: failed program was:" >&5
21979 cat conftest.$ac_ext >&5
21980 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21981 fi
21982 rm -f conftest.$ac_objext conftest.$ac_ext
21983   done
21984 fi
21985 rm -f conftest.$ac_objext conftest.$ac_ext
21986 # Binary search between lo and hi bounds.
21987 while test "x$ac_lo" != "x$ac_hi"; do
21988   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21989   cat >conftest.$ac_ext <<_ACEOF
21990 #line 21990 "configure"
21991 #include "confdefs.h"
21992 $ac_includes_default
21993 int
21994 main ()
21995 {
21996 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21997   ;
21998   return 0;
21999 }
22000 _ACEOF
22001 rm -f conftest.$ac_objext
22002 if { (eval echo "$as_me:22002: \"$ac_compile\"") >&5
22003   (eval $ac_compile) 2>&5
22004   ac_status=$?
22005   echo "$as_me:22005: \$? = $ac_status" >&5
22006   (exit $ac_status); } &&
22007          { ac_try='test -s conftest.$ac_objext'
22008   { (eval echo "$as_me:22008: \"$ac_try\"") >&5
22009   (eval $ac_try) 2>&5
22010   ac_status=$?
22011   echo "$as_me:22011: \$? = $ac_status" >&5
22012   (exit $ac_status); }; }; then
22013   ac_hi=$ac_mid
22014 else
22015   echo "$as_me: failed program was:" >&5
22016 cat conftest.$ac_ext >&5
22017 ac_lo=`expr $ac_mid + 1`
22018 fi
22019 rm -f conftest.$ac_objext conftest.$ac_ext
22020 done
22021 ac_cv_sizeof_wchar_t=$ac_lo
22022 else
22023   if test "$cross_compiling" = yes; then
22024   { { echo "$as_me:22024: error: cannot run test program while cross compiling" >&5
22025 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22026    { (exit 1); exit 1; }; }
22027 else
22028   cat >conftest.$ac_ext <<_ACEOF
22029 #line 22029 "configure"
22030 #include "confdefs.h"
22031 $ac_includes_default
22032 int
22033 main ()
22034 {
22035 FILE *f = fopen ("conftest.val", "w");
22036 if (!f)
22037   $ac_main_return (1);
22038 fprintf (f, "%d", (sizeof (wchar_t)));
22039 fclose (f);
22040   ;
22041   return 0;
22042 }
22043 _ACEOF
22044 rm -f conftest$ac_exeext
22045 if { (eval echo "$as_me:22045: \"$ac_link\"") >&5
22046   (eval $ac_link) 2>&5
22047   ac_status=$?
22048   echo "$as_me:22048: \$? = $ac_status" >&5
22049   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22050   { (eval echo "$as_me:22050: \"$ac_try\"") >&5
22051   (eval $ac_try) 2>&5
22052   ac_status=$?
22053   echo "$as_me:22053: \$? = $ac_status" >&5
22054   (exit $ac_status); }; }; then
22055   ac_cv_sizeof_wchar_t=`cat conftest.val`
22056 else
22057   echo "$as_me: program exited with status $ac_status" >&5
22058 echo "$as_me: failed program was:" >&5
22059 cat conftest.$ac_ext >&5
22060 fi
22061 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22062 fi
22063 fi
22064 rm -f conftest.val
22065 else
22066   ac_cv_sizeof_wchar_t=0
22067 fi
22068 fi
22069 echo "$as_me:22069: result: $ac_cv_sizeof_wchar_t" >&5
22070 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
22071 cat >>confdefs.h <<EOF
22072 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22073 EOF
22074
22075 fi
22076
22077 ### Construct the ncurses library-subsets, if any, from this set of keywords:
22078 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
22079 ###
22080 ### ticlib modules may be a separate library, otherwise contained in termlib.
22081 ### termlib modules may be a separate library, otherwise contained in ncurses.
22082 ###
22083 ### The of "+" or " " between the tokens controls the way the script
22084 ### chooses to split module lists into libraries.
22085 ###
22086 ### (see CF_LIB_RULES).
22087 echo "$as_me:22087: checking for library subsets" >&5
22088 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
22089 LIB_SUBSETS=
22090
22091 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
22092         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
22093         if test "$with_ticlib" != no ; then
22094                 LIB_SUBSETS="${LIB_SUBSETS} "
22095         else
22096                 LIB_SUBSETS="${LIB_SUBSETS}+"
22097         fi
22098 fi
22099
22100 LIB_SUBSETS="${LIB_SUBSETS}termlib"
22101 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
22102
22103 if test "$with_termlib" != no ; then
22104         LIB_SUBSETS="${LIB_SUBSETS} "
22105 else
22106         LIB_SUBSETS="${LIB_SUBSETS}+"
22107 fi
22108
22109 LIB_SUBSETS="${LIB_SUBSETS}base"
22110
22111 # Most term-driver calls are to tinfo, but some like init_pair are to the
22112 # base library (so it resides in base).
22113 if test "$with_term_driver" != no ; then
22114         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
22115         case $cf_cv_system_name in
22116         (*mingw32*|*mingw64*)
22117                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
22118                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
22119                 ;;
22120         (*)
22121                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
22122                 ;;
22123         esac
22124 fi
22125
22126 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
22127 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
22128
22129 echo "$as_me:22129: result: $LIB_SUBSETS" >&5
22130 echo "${ECHO_T}$LIB_SUBSETS" >&6
22131
22132 ### Construct the list of include-directories to be generated
22133
22134 if test "$srcdir" != "."; then
22135         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
22136 fi
22137 CPPFLAGS="-I../include $CPPFLAGS"
22138 if test "$srcdir" != "."; then
22139         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
22140 fi
22141 CPPFLAGS="-I. $CPPFLAGS"
22142
22143 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
22144 if test "$srcdir" != "."; then
22145         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
22146 fi
22147 if test "$GCC" != yes; then
22148         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22149 elif test "$includedir" != "/usr/include"; then
22150         if test "$includedir" = '${prefix}/include' ; then
22151                 if test x$prefix != x/usr ; then
22152                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22153                 fi
22154         else
22155                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22156         fi
22157 fi
22158
22159 ### Build up pieces for makefile rules
22160 echo "$as_me:22160: checking default library suffix" >&5
22161 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
22162
22163         case $DFT_LWR_MODEL in
22164         (libtool) DFT_ARG_SUFFIX=''   ;;
22165         (normal)  DFT_ARG_SUFFIX=''   ;;
22166         (debug)   DFT_ARG_SUFFIX='_g' ;;
22167         (profile) DFT_ARG_SUFFIX='_p' ;;
22168         (shared)  DFT_ARG_SUFFIX=''   ;;
22169         esac
22170         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
22171 echo "$as_me:22171: result: $DFT_ARG_SUFFIX" >&5
22172 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
22173
22174 echo "$as_me:22174: checking default library-dependency suffix" >&5
22175 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
22176
22177         case X$DFT_LWR_MODEL in
22178         (Xlibtool)
22179                 DFT_LIB_SUFFIX='.la'
22180                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22181                 ;;
22182         (Xdebug)
22183                 DFT_LIB_SUFFIX='_g.a'
22184                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22185                 ;;
22186         (Xprofile)
22187                 DFT_LIB_SUFFIX='_p.a'
22188                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22189                 ;;
22190         (Xshared)
22191                 case $cf_cv_system_name in
22192                 (aix[5-7]*)
22193                         DFT_LIB_SUFFIX='.so'
22194                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22195                         ;;
22196                 (cygwin*|msys*|mingw*)
22197                         DFT_LIB_SUFFIX='.dll'
22198                         DFT_DEP_SUFFIX='.dll.a'
22199                         ;;
22200                 (darwin*)
22201                         DFT_LIB_SUFFIX='.dylib'
22202                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22203                         ;;
22204                 (hpux*)
22205                         case $target in
22206                         (ia64*)
22207                                 DFT_LIB_SUFFIX='.so'
22208                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22209                                 ;;
22210                         (*)
22211                                 DFT_LIB_SUFFIX='.sl'
22212                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22213                                 ;;
22214                         esac
22215                         ;;
22216                 (*)
22217                         DFT_LIB_SUFFIX='.so'
22218                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22219                         ;;
22220                 esac
22221                 ;;
22222         (*)
22223                 DFT_LIB_SUFFIX='.a'
22224                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22225                 ;;
22226         esac
22227         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22228         then
22229                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
22230                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
22231         fi
22232 echo "$as_me:22232: result: $DFT_DEP_SUFFIX" >&5
22233 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
22234
22235 echo "$as_me:22235: checking default object directory" >&5
22236 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
22237
22238         case $DFT_LWR_MODEL in
22239         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
22240         (normal)  DFT_OBJ_SUBDIR='objects' ;;
22241         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
22242         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
22243         (shared)
22244                 case $cf_cv_system_name in
22245                 (cygwin|msys)
22246                         DFT_OBJ_SUBDIR='objects' ;;
22247                 (*)
22248                         DFT_OBJ_SUBDIR='obj_s' ;;
22249                 esac
22250         esac
22251 echo "$as_me:22251: result: $DFT_OBJ_SUBDIR" >&5
22252 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
22253
22254 if test "x$cf_with_cxx" = xyes ; then
22255 echo "$as_me:22255: checking c++ library-dependency suffix" >&5
22256 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
22257 if test "$with_libtool" != "no"; then
22258         # libtool thinks it can make c++ shared libraries (perhaps only g++)
22259         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22260 elif test "$with_shared_cxx" != "no"; then
22261         # also for g++ users...
22262         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
22263 else
22264         # we normally make a static library because C/C++ library rules differ
22265
22266         case Xnormal in
22267         (Xlibtool)
22268                 CXX_LIB_SUFFIX='.la'
22269                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22270                 ;;
22271         (Xdebug)
22272                 CXX_LIB_SUFFIX='_g.a'
22273                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22274                 ;;
22275         (Xprofile)
22276                 CXX_LIB_SUFFIX='_p.a'
22277                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22278                 ;;
22279         (Xshared)
22280                 case $cf_cv_system_name in
22281                 (aix[5-7]*)
22282                         CXX_LIB_SUFFIX='.so'
22283                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22284                         ;;
22285                 (cygwin*|msys*|mingw*)
22286                         CXX_LIB_SUFFIX='.dll'
22287                         CXX_DEP_SUFFIX='.dll.a'
22288                         ;;
22289                 (darwin*)
22290                         CXX_LIB_SUFFIX='.dylib'
22291                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22292                         ;;
22293                 (hpux*)
22294                         case $target in
22295                         (ia64*)
22296                                 CXX_LIB_SUFFIX='.so'
22297                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22298                                 ;;
22299                         (*)
22300                                 CXX_LIB_SUFFIX='.sl'
22301                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22302                                 ;;
22303                         esac
22304                         ;;
22305                 (*)
22306                         CXX_LIB_SUFFIX='.so'
22307                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22308                         ;;
22309                 esac
22310                 ;;
22311         (*)
22312                 CXX_LIB_SUFFIX='.a'
22313                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
22314                 ;;
22315         esac
22316         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
22317         then
22318                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
22319                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
22320         fi
22321
22322 fi
22323 echo "$as_me:22323: result: $CXX_LIB_SUFFIX" >&5
22324 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
22325
22326 fi
22327
22328 # do not want -ldl in build except as needed for -lncurses dependency
22329 if test "x$with_dlsym" = xyes ; then
22330 if test $DFT_LWR_MODEL = shared || \
22331    test $DFT_LWR_MODEL = libtool ; then
22332
22333 # remove dl library from $LIBS
22334 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
22335
22336 fi
22337 fi
22338 ### Set up low-level terminfo dependencies for makefiles.
22339
22340 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
22341 # do not need libdl
22342 TICS_LIST=
22343 if test "x$with_dlsym" = xyes ; then
22344
22345 # remove dl library from $SHLIB_LIST
22346 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
22347
22348 fi
22349
22350 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
22351 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
22352 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
22353 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
22354 then
22355         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
22356 fi
22357
22358 if test "$with_ticlib" != no ; then
22359
22360         if test "x$with_ticlib" != xyes ; then
22361                 TICS_NAME=$with_ticlib
22362                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22363                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22364                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22365                 TICS_LIB_SUFFIX="${with_ticlib}"
22366         else
22367                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
22368                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
22369                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
22370                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
22371         fi
22372         TICS_LDFLAGS="-L${LIB_DIR}"
22373         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
22374 else
22375         TICS_SUFFIX=${DFT_LIB_SUFFIX}
22376         TICS_LDFLAGS="-L${LIB_DIR}"
22377         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22378 fi
22379
22380 if test "$with_termlib" != no ; then
22381
22382         if test "x$with_termlib" != xyes ; then
22383                 TINFO_NAME=$with_termlib
22384                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
22385                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22386                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
22387                 TINFO_LIB_SUFFIX="${with_termlib}"
22388         else
22389                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22390                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
22391                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
22392                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
22393         fi
22394
22395         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22396         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
22397         if test "$DFT_LWR_MODEL" = "libtool"; then
22398                 TEST_ARGS="${TEST_DEPS}"
22399                 TEST_ARG2="${TEST_DEP2}"
22400                 TINFO_LDFLAGS="-L${LIB_DIR}"
22401                 TINFO_LIBS="$TEST_ARGS"
22402                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
22403                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
22404         else
22405                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
22406                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
22407                 if test "x$with_term_driver" != xno ; then
22408                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22409                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
22410                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22411                 else
22412                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22413                         TINFO_LIBS="$TEST_ARGS"
22414                 fi
22415                 TINFO_LDFLAGS="-L${LIB_DIR}"
22416                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
22417         fi
22418 else
22419         # the next lines are needed for linking libtic over libncurses
22420         TINFO_NAME=${LIB_NAME}
22421         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
22422         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
22423         if test "x$with_tic_depends" = xyes ; then
22424                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
22425         else
22426                 TICS_LIST="$SHLIB_LIST"
22427         fi
22428
22429         TINFO_LDFLAGS="-L${LIB_DIR}"
22430         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
22431 fi
22432
22433 if test "$DFT_LWR_MODEL" = shared ; then
22434         case $cf_cv_system_name in
22435         (cygwin*|msys*)
22436                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
22437                 TINFO_SUFFIX=.dll
22438                 ;;
22439         esac
22440 fi
22441
22442 if test "x$with_dlsym" = xyes ; then
22443
22444 # remove dl library from $TICS_LIST
22445 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
22446
22447 fi
22448
22449 if test "$DFT_LWR_MODEL" = "libtool"; then
22450         OBJEXT=lo
22451 fi
22452
22453 # needed for Ada95
22454 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
22455
22456 case $DFT_LWR_MODEL in
22457 (normal|debug|profile)
22458
22459 if test "$GCC" = yes ; then
22460         case $cf_cv_system_name in
22461         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
22462                 LDFLAGS_STATIC=
22463                 LDFLAGS_SHARED=
22464                 ;;
22465         (*)     # normally, except when broken
22466                 LDFLAGS_STATIC=-static
22467                 LDFLAGS_SHARED=-dynamic
22468                 ;;
22469         esac
22470 else
22471         case $cf_cv_system_name in
22472         (aix[4-7]*)     # from ld manpage
22473                 LDFLAGS_STATIC=-bstatic
22474                 LDFLAGS_SHARED=-bdynamic
22475                 ;;
22476         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
22477                 # We could also use just "archive" and "shared".
22478                 LDFLAGS_STATIC=-Wl,-a,archive_shared
22479                 LDFLAGS_SHARED=-Wl,-a,shared_archive
22480                 ;;
22481         (irix*)         # from ld manpage IRIX64
22482                 LDFLAGS_STATIC=-Bstatic
22483                 LDFLAGS_SHARED=-Bdynamic
22484                 ;;
22485         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
22486                 # alternative "-oldstyle_liblookup" (not in cc manpage)
22487                 LDFLAGS_STATIC=-noso
22488                 LDFLAGS_SHARED=-so_archive
22489                 ;;
22490         (solaris2*)
22491                 LDFLAGS_STATIC=-Bstatic
22492                 LDFLAGS_SHARED=-Bdynamic
22493                 ;;
22494         esac
22495 fi
22496
22497 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
22498 then
22499         echo "$as_me:22499: checking if linker supports switching between static/dynamic" >&5
22500 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
22501
22502         rm -f libconftest.a
22503         cat >conftest.$ac_ext <<EOF
22504 #line 22504 "configure"
22505 #include <stdio.h>
22506 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
22507 EOF
22508         if { (eval echo "$as_me:22508: \"$ac_compile\"") >&5
22509   (eval $ac_compile) 2>&5
22510   ac_status=$?
22511   echo "$as_me:22511: \$? = $ac_status" >&5
22512   (exit $ac_status); } ; then
22513                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
22514                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
22515         fi
22516         rm -f conftest.*
22517
22518         cf_save_LIBS="$LIBS"
22519
22520         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
22521         cat >conftest.$ac_ext <<_ACEOF
22522 #line 22522 "configure"
22523 #include "confdefs.h"
22524
22525 #line 22525 "configure"
22526 #include <stdio.h>
22527 int cf_ldflags_static(FILE *fp);
22528
22529 int
22530 main ()
22531 {
22532
22533         return cf_ldflags_static(stdin);
22534
22535   ;
22536   return 0;
22537 }
22538 _ACEOF
22539 rm -f conftest.$ac_objext conftest$ac_exeext
22540 if { (eval echo "$as_me:22540: \"$ac_link\"") >&5
22541   (eval $ac_link) 2>&5
22542   ac_status=$?
22543   echo "$as_me:22543: \$? = $ac_status" >&5
22544   (exit $ac_status); } &&
22545          { ac_try='test -s conftest$ac_exeext'
22546   { (eval echo "$as_me:22546: \"$ac_try\"") >&5
22547   (eval $ac_try) 2>&5
22548   ac_status=$?
22549   echo "$as_me:22549: \$? = $ac_status" >&5
22550   (exit $ac_status); }; }; then
22551
22552         # some linkers simply ignore the -dynamic
22553         case x`file conftest$ac_exeext 2>/dev/null` in
22554         (*static*)
22555                 cf_ldflags_static=no
22556                 ;;
22557         (*)
22558                 cf_ldflags_static=yes
22559                 ;;
22560         esac
22561
22562 else
22563   echo "$as_me: failed program was:" >&5
22564 cat conftest.$ac_ext >&5
22565 cf_ldflags_static=no
22566 fi
22567 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22568
22569         rm -f libconftest.*
22570         LIBS="$cf_save_LIBS"
22571
22572         echo "$as_me:22572: result: $cf_ldflags_static" >&5
22573 echo "${ECHO_T}$cf_ldflags_static" >&6
22574
22575         if test $cf_ldflags_static != yes
22576         then
22577                 LDFLAGS_STATIC=
22578                 LDFLAGS_SHARED=
22579         fi
22580 else
22581         LDFLAGS_STATIC=
22582         LDFLAGS_SHARED=
22583 fi
22584
22585         ;;
22586 esac
22587
22588 echo "$as_me:22588: checking where we will install curses.h" >&5
22589 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
22590
22591 includesubdir=
22592 if test "$with_overwrite" = no && \
22593  ( test "x$includedir" = 'x${prefix}/include' || \
22594    test "x$includedir" = "x${prefix}/include" )
22595 then
22596         includesubdir="/ncurses${USE_LIB_SUFFIX}"
22597 fi
22598 echo "$as_me:22598: result: ${includedir}${includesubdir}" >&5
22599 echo "${ECHO_T}${includedir}${includesubdir}" >&6
22600
22601 ### Resolve a conflict between normal and wide-curses by forcing applications
22602 ### that will need libutf8 to add it to their configure script.
22603 if test "$with_overwrite" != no ; then
22604 if test "$NCURSES_LIBUTF8" = 1 ; then
22605         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
22606         { echo "$as_me:22606: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
22607 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
22608 fi
22609 fi
22610 WITH_OVERWRITE=$with_overwrite
22611
22612 # used to separate tack out of the tree
22613 NCURSES_TREE=
22614
22615 ### predefined stuff for the test programs
22616
22617 cat >>confdefs.h <<\EOF
22618 #define HAVE_SLK_COLOR 1
22619 EOF
22620
22621 ### Construct the list of subdirectories for which we'll customize makefiles
22622 ### with the appropriate compile-rules.
22623
22624 echo "$as_me:22624: checking for src modules" >&5
22625 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
22626
22627 # dependencies and linker-arguments for test-programs
22628 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
22629 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
22630 if test "$DFT_LWR_MODEL" = "libtool"; then
22631         TEST_ARGS="${TEST_DEPS}"
22632         TEST_ARG2="${TEST_DEP2}"
22633 else
22634         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
22635         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
22636 fi
22637
22638 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
22639 cf_cv_src_modules=
22640 for cf_dir in $modules_to_build
22641 do
22642         if test -f $srcdir/$cf_dir/modules; then
22643
22644                 # We may/may not have tack in the distribution, though the
22645                 # makefile is.
22646                 if test $cf_dir = tack ; then
22647                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
22648                                 continue
22649                         fi
22650                 fi
22651
22652                 if test -z "$cf_cv_src_modules"; then
22653                         cf_cv_src_modules=$cf_dir
22654                 else
22655                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
22656                 fi
22657
22658                 # Make the ncurses_cfg.h file record the library interface files as
22659                 # well.  These are header files that are the same name as their
22660                 # directory.  Ncurses is the only library that does not follow
22661                 # that pattern.
22662                 if test $cf_dir = tack ; then
22663                         continue
22664                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
22665
22666 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22667
22668                         cat >>confdefs.h <<EOF
22669 #define HAVE_${cf_have_include}_H 1
22670 EOF
22671
22672                         cat >>confdefs.h <<EOF
22673 #define HAVE_LIB${cf_have_include} 1
22674 EOF
22675
22676                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
22677                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
22678                         if test "$DFT_LWR_MODEL" = "libtool"; then
22679                                 TEST_ARGS="${TEST_DEPS}"
22680                                 TEST_ARG2="${TEST_DEP2}"
22681                         else
22682                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
22683                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
22684                         fi
22685                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
22686                 fi
22687         fi
22688 done
22689 echo "$as_me:22689: result: $cf_cv_src_modules" >&5
22690 echo "${ECHO_T}$cf_cv_src_modules" >&6
22691
22692 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
22693 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
22694
22695 SRC_SUBDIRS=
22696 if test "x$cf_with_manpages" != xno ; then
22697         SRC_SUBDIRS="$SRC_SUBDIRS man"
22698 fi
22699 SRC_SUBDIRS="$SRC_SUBDIRS include"
22700 for cf_dir in $cf_cv_src_modules
22701 do
22702         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
22703 done
22704 if test "x$cf_with_tests" != "xno" ; then
22705         SRC_SUBDIRS="$SRC_SUBDIRS test"
22706 fi
22707 # always make this, to install the ncurses-config script
22708 SRC_SUBDIRS="$SRC_SUBDIRS misc"
22709 if test "$cf_with_cxx_binding" != no; then
22710         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
22711         SRC_SUBDIRS="$SRC_SUBDIRS c++"
22712 fi
22713
22714 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
22715 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
22716
22717 ADA_SUBDIRS=
22718 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
22719         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
22720         ADA_SUBDIRS="gen src"
22721         if test "x$cf_with_tests" != "xno" ; then
22722                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
22723         fi
22724 fi
22725
22726 SUB_MAKEFILES=
22727 for cf_dir in $SRC_SUBDIRS
22728 do
22729         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
22730 done
22731
22732 if test -n "$ADA_SUBDIRS"; then
22733         for cf_dir in $ADA_SUBDIRS
22734         do
22735                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
22736         done
22737
22738 fi
22739
22740 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22741    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
22742    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
22743 fi
22744
22745 DIRS_TO_MAKE="lib"
22746 for cf_item in $cf_list_models
22747 do
22748
22749         case $cf_item in
22750         (libtool) cf_subdir='obj_lo'  ;;
22751         (normal)  cf_subdir='objects' ;;
22752         (debug)   cf_subdir='obj_g' ;;
22753         (profile) cf_subdir='obj_p' ;;
22754         (shared)
22755                 case $cf_cv_system_name in
22756                 (cygwin|msys)
22757                         cf_subdir='objects' ;;
22758                 (*)
22759                         cf_subdir='obj_s' ;;
22760                 esac
22761         esac
22762
22763         for cf_item2 in $DIRS_TO_MAKE
22764         do
22765                 test $cf_item2 = $cf_subdir && break
22766         done
22767         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
22768 done
22769 for cf_dir in $DIRS_TO_MAKE
22770 do
22771         test ! -d $cf_dir && mkdir $cf_dir
22772 done
22773
22774 # symbols that differ when compiling Ada95 by itself.
22775 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
22776
22777 # values to use as strings
22778
22779 cat >>confdefs.h <<EOF
22780 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
22781 EOF
22782
22783 cat >>confdefs.h <<EOF
22784 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
22785 EOF
22786
22787 ### Now that we're done running tests, add the compiler-warnings, if any
22788
22789 cf_fix_cppflags=no
22790 cf_new_cflags=
22791 cf_new_cppflags=
22792 cf_new_extra_cppflags=
22793
22794 for cf_add_cflags in $EXTRA_CFLAGS
22795 do
22796 case $cf_fix_cppflags in
22797 (no)
22798         case $cf_add_cflags in
22799         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22800                 case $cf_add_cflags in
22801                 (-D*)
22802                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22803
22804                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22805                                 && test -z "${cf_tst_cflags}" \
22806                                 && cf_fix_cppflags=yes
22807
22808                         if test $cf_fix_cppflags = yes ; then
22809                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22810                                 continue
22811                         elif test "${cf_tst_cflags}" = "\"'" ; then
22812                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22813                                 continue
22814                         fi
22815                         ;;
22816                 esac
22817                 case "$CPPFLAGS" in
22818                 (*$cf_add_cflags)
22819                         ;;
22820                 (*)
22821                         case $cf_add_cflags in
22822                         (-D*)
22823                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22824
22825 CPPFLAGS=`echo "$CPPFLAGS" | \
22826         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
22827                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
22828
22829                                 ;;
22830                         esac
22831                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
22832                         ;;
22833                 esac
22834                 ;;
22835         (*)
22836                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
22837                 ;;
22838         esac
22839         ;;
22840 (yes)
22841         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22842
22843         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22844
22845         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22846                 && test -z "${cf_tst_cflags}" \
22847                 && cf_fix_cppflags=no
22848         ;;
22849 esac
22850 done
22851
22852 if test -n "$cf_new_cflags" ; then
22853
22854         CFLAGS="$CFLAGS $cf_new_cflags"
22855 fi
22856
22857 if test -n "$cf_new_cppflags" ; then
22858
22859         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
22860 fi
22861
22862 if test -n "$cf_new_extra_cppflags" ; then
22863
22864         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
22865 fi
22866
22867 ### Define substitutions for header files to avoid name-pollution
22868
22869 if test "x$cf_cv_have_tcgetattr" = xyes ; then
22870         HAVE_TCGETATTR=1
22871 else
22872         HAVE_TCGETATTR=0
22873 fi
22874
22875 if test "x$ac_cv_header_stdint_h" = xyes ; then
22876         HAVE_STDINT_H=1
22877 else
22878         HAVE_STDINT_H=0
22879 fi
22880
22881 if test "x$ac_cv_header_termio_h" = xyes ; then
22882         HAVE_TERMIO_H=1
22883 else
22884         HAVE_TERMIO_H=0
22885 fi
22886
22887 if test "x$ac_cv_header_termios_h" = xyes ; then
22888         HAVE_TERMIOS_H=1
22889 else
22890         HAVE_TERMIOS_H=0
22891 fi
22892
22893 ################################################################################
22894 test "x$use_database" = xyes && \
22895 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
22896
22897 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
22898 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
22899
22900 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
22901 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22902 fi
22903
22904 # Extract the first word of "tic", so it can be a program name with args.
22905 set dummy tic; ac_word=$2
22906 echo "$as_me:22906: checking for $ac_word" >&5
22907 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22908 if test "${ac_cv_path_TIC_PATH+set}" = set; then
22909   echo $ECHO_N "(cached) $ECHO_C" >&6
22910 else
22911   case $TIC_PATH in
22912   [\\/]* | ?:[\\/]*)
22913   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22914   ;;
22915   *)
22916   ac_save_IFS=$IFS; IFS=$ac_path_separator
22917 ac_dummy="$PATH:/usr/local/ncurses/bin"
22918 for ac_dir in $ac_dummy; do
22919   IFS=$ac_save_IFS
22920   test -z "$ac_dir" && ac_dir=.
22921   if $as_executable_p "$ac_dir/$ac_word"; then
22922    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
22923    echo "$as_me:22923: found $ac_dir/$ac_word" >&5
22924    break
22925 fi
22926 done
22927
22928   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22929   ;;
22930 esac
22931 fi
22932 TIC_PATH=$ac_cv_path_TIC_PATH
22933
22934 if test -n "$TIC_PATH"; then
22935   echo "$as_me:22935: result: $TIC_PATH" >&5
22936 echo "${ECHO_T}$TIC_PATH" >&6
22937 else
22938   echo "$as_me:22938: result: no" >&5
22939 echo "${ECHO_T}no" >&6
22940 fi
22941
22942 if test -n "$FALLBACK_LIST"
22943 then
22944         if test "$TIC_PATH" = unknown
22945         then
22946                 { echo "$as_me:22946: WARNING: no tic program found for fallbacks" >&5
22947 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22948         fi
22949 fi
22950
22951 if test "x$cf_with_tests" != xno ; then
22952         MAKE_TESTS=
22953 else
22954         MAKE_TESTS="#"
22955 fi
22956
22957 ADAHTML_DIR=../../doc/html/ada
22958
22959 # these could be configurable, but are not currently
22960 PANEL_NAME=panel
22961 MENU_NAME=menu
22962 FORM_NAME=form
22963 CXX_NAME=ncurses++
22964
22965 # workaround for OS/2 (20151017)
22966 case $cf_cv_system_name in
22967 (os2*)
22968         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
22969         ;;
22970 (*)
22971         LIBTOOL_OPTS_CXX=
22972         ;;
22973 esac
22974
22975 # workaround for g++ versus Solaris (20131116)
22976 case $cf_cv_system_name in
22977 (solaris2*)
22978         case "x$CPPFLAGS" in
22979         (*-D_XOPEN_SOURCE_EXTENDED*)
22980                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
22981
22982 echo "${as_me:-configure}:22982: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22983
22984                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22985                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22986                 ;;
22987         esac
22988         ;;
22989 esac
22990
22991 # Help to automatically enable the extended curses features when using either
22992 # the *-config or the ".pc" files by adding defines.
22993 echo "$as_me:22993: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
22994 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
22995 PKG_CFLAGS=
22996 for cf_loop1 in $CPPFLAGS_after_XOPEN
22997 do
22998         cf_found=no
22999         for cf_loop2 in $CPPFLAGS_before_XOPEN
23000         do
23001                 if test "x$cf_loop1" = "x$cf_loop2"
23002                 then
23003                         cf_found=yes
23004                         break
23005                 fi
23006         done
23007         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
23008 done
23009 echo "$as_me:23009: result: $PKG_CFLAGS" >&5
23010 echo "${ECHO_T}$PKG_CFLAGS" >&6
23011
23012 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
23013 case "x$NCURSES_OSPEED" in
23014 (*short*)
23015         cf_compatible=1
23016         ;;
23017 (*)
23018         cf_compatible=0
23019         ;;
23020 esac
23021
23022 cat >>confdefs.h <<EOF
23023 #define NCURSES_OSPEED_COMPAT $cf_compatible
23024 EOF
23025
23026 case "x$cf_cv_typeof_chtype" in
23027 (xshort|xint|xlong)
23028         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
23029         ;;
23030 esac
23031
23032 case "x$cf_cv_typeof_mmask_t" in
23033 (xshort|xint|xlong)
23034         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
23035         ;;
23036 esac
23037
23038 # substitute into misc/Makefile to suppress
23039 # (un)install.data from the
23040 # (un)install rules.
23041 if test "x$cf_with_db_install" = "xno"; then
23042         MISC_INSTALL_DATA=
23043         MISC_UNINSTALL_DATA=
23044 else
23045         MISC_INSTALL_DATA=install.data
23046         MISC_UNINSTALL_DATA=uninstall.data
23047 fi
23048
23049 SUB_SCRIPTS=
23050
23051 if test -n "$PACKAGE"
23052 then
23053         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
23054         export PACKAGE
23055         echo "package: $PACKAGE"
23056 fi
23057
23058 UNALTERED_SYMS=
23059 cf_filter_syms=no
23060
23061 if test -n "$RESULTING_SYMS"
23062 then
23063         cf_filter_syms=$cf_dft_filter_syms
23064         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
23065
23066 echo "${as_me:-configure}:23066: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
23067
23068 fi
23069
23070 if test "x$WILDCARD_SYMS" = xno
23071 then
23072         cf_filter_syms=yes
23073 fi
23074
23075 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
23076
23077 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
23078 if test $cf_filter_syms = yes
23079 then
23080         RESULTING_SYMS=resulting.map
23081 fi
23082
23083 if test "x$cross_compiling" = xyes ; then
23084         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
23085 else
23086         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
23087 fi
23088
23089 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"
23090 ac_config_commands="$ac_config_commands default"
23091 cat >confcache <<\_ACEOF
23092 # This file is a shell script that caches the results of configure
23093 # tests run on this system so they can be shared between configure
23094 # scripts and configure runs, see configure's option --config-cache.
23095 # It is not useful on other systems.  If it contains results you don't
23096 # want to keep, you may remove or edit it.
23097 #
23098 # config.status only pays attention to the cache file if you give it
23099 # the --recheck option to rerun configure.
23100 #
23101 # `ac_cv_env_foo' variables (set or unset) will be overriden when
23102 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23103 # following values.
23104
23105 _ACEOF
23106
23107 # The following way of writing the cache mishandles newlines in values,
23108 # but we know of no workaround that is simple, portable, and efficient.
23109 # So, don't put newlines in cache variables' values.
23110 # Ultrix sh set writes to stderr and can't be redirected directly,
23111 # and sets the high bit in the cache file unless we assign to the vars.
23112 {
23113   (set) 2>&1 |
23114     case `(ac_space=' '; set | grep ac_space) 2>&1` in
23115     *ac_space=\ *)
23116       # `set' does not quote correctly, so add quotes (double-quote
23117       # substitution turns \\\\ into \\, and sed turns \\ into \).
23118       sed -n \
23119         "s/'/'\\\\''/g;
23120           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23121       ;;
23122     *)
23123       # `set' quotes correctly as required by POSIX, so do not add quotes.
23124       sed -n \
23125         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23126       ;;
23127     esac;
23128 } |
23129   sed '
23130      t clear
23131      : clear
23132      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23133      t end
23134      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23135      : end' >>confcache
23136 if cmp -s $cache_file confcache; then :; else
23137   if test -w $cache_file; then
23138     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23139     cat confcache >$cache_file
23140   else
23141     echo "not updating unwritable cache $cache_file"
23142   fi
23143 fi
23144 rm -f confcache
23145
23146 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23147 # Let make expand exec_prefix.
23148 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23149
23150 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23151 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23152 # trailing colons and then remove the whole line if VPATH becomes empty
23153 # (actually we leave an empty line to preserve line numbers).
23154 if test "x$srcdir" = x.; then
23155   ac_vpsub='/^[         ]*VPATH[        ]*=/{
23156 s/:*\$(srcdir):*/:/;
23157 s/:*\${srcdir}:*/:/;
23158 s/:*@srcdir@:*/:/;
23159 s/^\([^=]*=[    ]*\):*/\1/;
23160 s/:*$//;
23161 s/^[^=]*=[      ]*$//;
23162 }'
23163 fi
23164
23165 DEFS=-DHAVE_CONFIG_H
23166
23167 : ${CONFIG_STATUS=./config.status}
23168 ac_clean_files_save=$ac_clean_files
23169 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23170 { echo "$as_me:23170: creating $CONFIG_STATUS" >&5
23171 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23172 cat >$CONFIG_STATUS <<_ACEOF
23173 #! $SHELL
23174 # Generated automatically by configure.
23175 # Run this file to recreate the current configuration.
23176 # Compiler output produced by configure, useful for debugging
23177 # configure, is in config.log if it exists.
23178
23179 debug=false
23180 SHELL=\${CONFIG_SHELL-$SHELL}
23181 ac_cs_invocation="\$0 \$@"
23182
23183 _ACEOF
23184
23185 cat >>$CONFIG_STATUS <<\_ACEOF
23186 # Be Bourne compatible
23187 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23188   emulate sh
23189   NULLCMD=:
23190 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23191   set -o posix
23192 fi
23193
23194 # Name of the executable.
23195 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23196
23197 if expr a : '\(a\)' >/dev/null 2>&1; then
23198   as_expr=expr
23199 else
23200   as_expr=false
23201 fi
23202
23203 rm -f conf$$ conf$$.exe conf$$.file
23204 echo >conf$$.file
23205 if ln -s conf$$.file conf$$ 2>/dev/null; then
23206   # We could just check for DJGPP; but this test a) works b) is more generic
23207   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23208   if test -f conf$$.exe; then
23209     # Don't use ln at all; we don't have any links
23210     as_ln_s='cp -p'
23211   else
23212     as_ln_s='ln -s'
23213   fi
23214 elif ln conf$$.file conf$$ 2>/dev/null; then
23215   as_ln_s=ln
23216 else
23217   as_ln_s='cp -p'
23218 fi
23219 rm -f conf$$ conf$$.exe conf$$.file
23220
23221 as_executable_p="test -f"
23222
23223 # Support unset when possible.
23224 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23225   as_unset=unset
23226 else
23227   as_unset=false
23228 fi
23229
23230 # NLS nuisances.
23231 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23232 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23233 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23234 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23235 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23236 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23237 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23238 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23239
23240 # IFS
23241 # We need space, tab and new line, in precisely that order.
23242 as_nl='
23243 '
23244 IFS="   $as_nl"
23245
23246 # CDPATH.
23247 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23248
23249 exec 6>&1
23250
23251 _ACEOF
23252
23253 # Files that config.status was made for.
23254 if test -n "$ac_config_files"; then
23255   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23256 fi
23257
23258 if test -n "$ac_config_headers"; then
23259   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23260 fi
23261
23262 if test -n "$ac_config_links"; then
23263   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23264 fi
23265
23266 if test -n "$ac_config_commands"; then
23267   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23268 fi
23269
23270 cat >>$CONFIG_STATUS <<\EOF
23271
23272 ac_cs_usage="\
23273 \`$as_me' instantiates files from templates according to the
23274 current configuration.
23275
23276 Usage: $0 [OPTIONS] [FILE]...
23277
23278   -h, --help       print this help, then exit
23279   -V, --version    print version number, then exit
23280   -d, --debug      don't remove temporary files
23281       --recheck    update $as_me by reconfiguring in the same conditions
23282   --file=FILE[:TEMPLATE]
23283                    instantiate the configuration file FILE
23284   --header=FILE[:TEMPLATE]
23285                    instantiate the configuration header FILE
23286
23287 Configuration files:
23288 $config_files
23289
23290 Configuration headers:
23291 $config_headers
23292
23293 Configuration commands:
23294 $config_commands
23295
23296 Report bugs to <dickey@invisible-island.net>."
23297 EOF
23298
23299 cat >>$CONFIG_STATUS <<EOF
23300 ac_cs_version="\\
23301 config.status
23302 configured by $0, generated by GNU Autoconf 2.52.20150926,
23303   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23304
23305 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
23306 Free Software Foundation, Inc.
23307 This config.status script is free software; the Free Software Foundation
23308 gives unlimited permission to copy, distribute and modify it."
23309 srcdir=$srcdir
23310 INSTALL="$INSTALL"
23311 EOF
23312
23313 cat >>$CONFIG_STATUS <<\EOF
23314 # If no file are specified by the user, then we need to provide default
23315 # value.  By we need to know if files were specified by the user.
23316 ac_need_defaults=:
23317 while test $# != 0
23318 do
23319   case $1 in
23320   --*=*)
23321     ac_option=`expr "x$1" : 'x\([^=]*\)='`
23322     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
23323     shift
23324     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
23325     shift
23326     ;;
23327   -*);;
23328   *) # This is not an option, so the user has probably given explicit
23329      # arguments.
23330      ac_need_defaults=false;;
23331   esac
23332
23333   case $1 in
23334   # Handling of the options.
23335 EOF
23336 cat >>$CONFIG_STATUS <<EOF
23337   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23338     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
23339     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
23340 EOF
23341 cat >>$CONFIG_STATUS <<\EOF
23342   --version | --vers* | -V )
23343     echo "$ac_cs_version"; exit 0 ;;
23344   --he | --h)
23345     # Conflict between --help and --header
23346     { { echo "$as_me:23346: error: ambiguous option: $1
23347 Try \`$0 --help' for more information." >&5
23348 echo "$as_me: error: ambiguous option: $1
23349 Try \`$0 --help' for more information." >&2;}
23350    { (exit 1); exit 1; }; };;
23351   --help | --hel | -h )
23352     echo "$ac_cs_usage"; exit 0 ;;
23353   --debug | --d* | -d )
23354     debug=: ;;
23355   --file | --fil | --fi | --f )
23356     shift
23357     CONFIG_FILES="$CONFIG_FILES $1"
23358     ac_need_defaults=false;;
23359   --header | --heade | --head | --hea )
23360     shift
23361     CONFIG_HEADERS="$CONFIG_HEADERS $1"
23362     ac_need_defaults=false;;
23363
23364   # This is an error.
23365   -*) { { echo "$as_me:23365: error: unrecognized option: $1
23366 Try \`$0 --help' for more information." >&5
23367 echo "$as_me: error: unrecognized option: $1
23368 Try \`$0 --help' for more information." >&2;}
23369    { (exit 1); exit 1; }; } ;;
23370
23371   *) ac_config_targets="$ac_config_targets $1" ;;
23372
23373   esac
23374   shift
23375 done
23376
23377 exec 5>>config.log
23378 cat >&5 << _ACEOF
23379
23380 ## ----------------------- ##
23381 ## Running config.status.  ##
23382 ## ----------------------- ##
23383
23384 This file was extended by $as_me 2.52.20150926, executed with
23385   CONFIG_FILES    = $CONFIG_FILES
23386   CONFIG_HEADERS  = $CONFIG_HEADERS
23387   CONFIG_LINKS    = $CONFIG_LINKS
23388   CONFIG_COMMANDS = $CONFIG_COMMANDS
23389   > $ac_cs_invocation
23390 on `(hostname || uname -n) 2>/dev/null | sed 1q`
23391
23392 _ACEOF
23393 EOF
23394
23395 cat >>$CONFIG_STATUS <<EOF
23396 #
23397 # INIT-COMMANDS section.
23398 #
23399
23400 ### Special initialization commands, used to pass information from the
23401 ### configuration-run into config.status
23402
23403 AWK="$AWK"
23404 ALTERNATE_SYMS="$ALTERNATE_SYMS"
23405 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
23406 DFT_LWR_MODEL="$DFT_LWR_MODEL"
23407 ECHO_LD="$ECHO_LD"
23408 EXTRA_SUFFIX="$EXTRA_SUFFIX"
23409 LDCONFIG="$LDCONFIG"
23410 LIBTOOL_VERSION="$LIBTOOL_VERSION"
23411 LIB_NAME="$LIB_NAME"
23412 LIB_PREFIX="$LIB_PREFIX"
23413 LIB_SUBSETS="$LIB_SUBSETS"
23414 LIB_SUFFIX="$LIB_SUFFIX"
23415 LIB_TRACING="$LIB_TRACING"
23416 LN_S="$LN_S"
23417 MAKE_TERMINFO="$MAKE_TERMINFO"
23418 NCURSES_MAJOR="$NCURSES_MAJOR"
23419 NCURSES_MINOR="$NCURSES_MINOR"
23420 NCURSES_OSPEED="$NCURSES_OSPEED"
23421 NCURSES_PATCH="$NCURSES_PATCH"
23422 SRC_SUBDIRS="$SRC_SUBDIRS"
23423 TERMINFO="$TERMINFO"
23424 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
23425 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
23426 TICS_NAME="$TICS_NAME"
23427 TICS_SUFFIX="$TICS_SUFFIX"
23428 TIC_PATH="$TIC_PATH"
23429 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
23430 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
23431 TINFO_NAME="$TINFO_NAME"
23432 TINFO_SUFFIX="$TINFO_SUFFIX"
23433 UNALTERED_SYMS="$UNALTERED_SYMS"
23434 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
23435 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
23436 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
23437 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
23438 WILDCARD_SYMS="$WILDCARD_SYMS"
23439 WITH_CURSES_H="$with_curses_h"
23440 WITH_ECHO="${enable_echo:=yes}"
23441 WITH_OVERWRITE="$with_overwrite"
23442 cf_LIST_MODELS="$cf_list_models"
23443 cf_cv_abi_version="$cf_cv_abi_version"
23444 cf_cv_do_relink="$cf_cv_do_relink"
23445 cf_cv_do_symlinks="$cf_cv_do_symlinks"
23446 cf_cv_enable_lp64="$cf_cv_enable_lp64"
23447 cf_cv_enable_opaque="$cf_cv_enable_opaque"
23448 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
23449 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
23450 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
23451 cf_cv_rel_version="$cf_cv_rel_version"
23452 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
23453 cf_cv_shared_soname='$cf_cv_shared_soname'
23454 cf_cv_shlib_version="$cf_cv_shlib_version"
23455 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
23456 cf_cv_system_name="$cf_cv_system_name"
23457 cf_cv_term_driver="$with_term_driver"
23458 cf_with_ada="$cf_with_ada"
23459 cf_with_cxx_binding="$cf_with_cxx_binding"
23460 cf_with_db_install="$cf_with_db_install"
23461 cf_with_manpages="$cf_with_manpages"
23462 cf_with_tests="$cf_with_tests"
23463 host="$host"
23464 target="$target"
23465 with_shared_cxx="$with_shared_cxx"
23466
23467 EOF
23468
23469 cat >>$CONFIG_STATUS <<\EOF
23470 for ac_config_target in $ac_config_targets
23471 do
23472   case "$ac_config_target" in
23473   # Handling of arguments.
23474   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
23475   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
23476   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
23477   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
23478   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
23479   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
23480   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
23481   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23482   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23483   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
23484   *) { { echo "$as_me:23484: error: invalid argument: $ac_config_target" >&5
23485 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23486    { (exit 1); exit 1; }; };;
23487   esac
23488 done
23489
23490 # If the user did not use the arguments to specify the items to instantiate,
23491 # then the envvar interface is used.  Set only those that are not.
23492 # We use the long form for the default assignment because of an extremely
23493 # bizarre bug on SunOS 4.1.3.
23494 if $ac_need_defaults; then
23495   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23496   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23497   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
23498 fi
23499
23500 # Create a temporary directory, and hook for its removal unless debugging.
23501 $debug ||
23502 {
23503   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
23504   trap '{ (exit 1); exit 1; }' 1 2 13 15
23505 }
23506
23507 # Create a (secure) tmp directory for tmp files.
23508 : ${TMPDIR=/tmp}
23509 {
23510   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
23511   test -n "$tmp" && test -d "$tmp"
23512 }  ||
23513 {
23514   tmp=$TMPDIR/cs$$-$RANDOM
23515   (umask 077 && mkdir $tmp)
23516 } ||
23517 {
23518    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
23519    { (exit 1); exit 1; }
23520 }
23521
23522 EOF
23523
23524 cat >>$CONFIG_STATUS <<EOF
23525
23526 #
23527 # CONFIG_FILES section.
23528 #
23529
23530 # No need to generate the scripts if there are no CONFIG_FILES.
23531 # This happens for instance when ./config.status config.h
23532 if test -n "\$CONFIG_FILES"; then
23533   # Protect against being on the right side of a sed subst in config.status.
23534   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23535    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23536 s,@SHELL@,$SHELL,;t t
23537 s,@exec_prefix@,$exec_prefix,;t t
23538 s,@prefix@,$prefix,;t t
23539 s,@program_transform_name@,$program_transform_name,;t t
23540 s,@bindir@,$bindir,;t t
23541 s,@sbindir@,$sbindir,;t t
23542 s,@libexecdir@,$libexecdir,;t t
23543 s,@datarootdir@,$datarootdir,;t t
23544 s,@datadir@,$datadir,;t t
23545 s,@sysconfdir@,$sysconfdir,;t t
23546 s,@sharedstatedir@,$sharedstatedir,;t t
23547 s,@localstatedir@,$localstatedir,;t t
23548 s,@libdir@,$libdir,;t t
23549 s,@includedir@,$includedir,;t t
23550 s,@oldincludedir@,$oldincludedir,;t t
23551 s,@infodir@,$infodir,;t t
23552 s,@mandir@,$mandir,;t t
23553 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23554 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23555 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23556 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23557 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23558 s,@build_alias@,$build_alias,;t t
23559 s,@host_alias@,$host_alias,;t t
23560 s,@target_alias@,$target_alias,;t t
23561 s,@ECHO_C@,$ECHO_C,;t t
23562 s,@ECHO_N@,$ECHO_N,;t t
23563 s,@ECHO_T@,$ECHO_T,;t t
23564 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23565 s,@DEFS@,$DEFS,;t t
23566 s,@LIBS@,$LIBS,;t t
23567 s,@top_builddir@,$top_builddir,;t t
23568 s,@EGREP@,$EGREP,;t t
23569 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
23570 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
23571 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
23572 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
23573 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
23574 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
23575 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
23576 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
23577 s,@VERSION@,$VERSION,;t t
23578 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
23579 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
23580 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
23581 s,@PACKAGE@,$PACKAGE,;t t
23582 s,@build@,$build,;t t
23583 s,@build_cpu@,$build_cpu,;t t
23584 s,@build_vendor@,$build_vendor,;t t
23585 s,@build_os@,$build_os,;t t
23586 s,@host@,$host,;t t
23587 s,@host_cpu@,$host_cpu,;t t
23588 s,@host_vendor@,$host_vendor,;t t
23589 s,@host_os@,$host_os,;t t
23590 s,@target@,$target,;t t
23591 s,@target_cpu@,$target_cpu,;t t
23592 s,@target_vendor@,$target_vendor,;t t
23593 s,@target_os@,$target_os,;t t
23594 s,@CC@,$CC,;t t
23595 s,@CFLAGS@,$CFLAGS,;t t
23596 s,@LDFLAGS@,$LDFLAGS,;t t
23597 s,@CPPFLAGS@,$CPPFLAGS,;t t
23598 s,@ac_ct_CC@,$ac_ct_CC,;t t
23599 s,@EXEEXT@,$EXEEXT,;t t
23600 s,@OBJEXT@,$OBJEXT,;t t
23601 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
23602 s,@CPP@,$CPP,;t t
23603 s,@LDCONFIG@,$LDCONFIG,;t t
23604 s,@CXX@,$CXX,;t t
23605 s,@CXXFLAGS@,$CXXFLAGS,;t t
23606 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
23607 s,@AWK@,$AWK,;t t
23608 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23609 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23610 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23611 s,@LINT@,$LINT,;t t
23612 s,@LINT_OPTS@,$LINT_OPTS,;t t
23613 s,@LN_S@,$LN_S,;t t
23614 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
23615 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
23616 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
23617 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
23618 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
23619 s,@SET_MAKE@,$SET_MAKE,;t t
23620 s,@CTAGS@,$CTAGS,;t t
23621 s,@ETAGS@,$ETAGS,;t t
23622 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
23623 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
23624 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
23625 s,@RANLIB@,$RANLIB,;t t
23626 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23627 s,@LD@,$LD,;t t
23628 s,@ac_ct_LD@,$ac_ct_LD,;t t
23629 s,@AR@,$AR,;t t
23630 s,@ac_ct_AR@,$ac_ct_AR,;t t
23631 s,@NM@,$NM,;t t
23632 s,@ac_ct_NM@,$ac_ct_NM,;t t
23633 s,@ARFLAGS@,$ARFLAGS,;t t
23634 s,@DESTDIR@,$DESTDIR,;t t
23635 s,@BUILD_CC@,$BUILD_CC,;t t
23636 s,@BUILD_CPP@,$BUILD_CPP,;t t
23637 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
23638 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
23639 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
23640 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
23641 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
23642 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
23643 s,@cf_list_models@,$cf_list_models,;t t
23644 s,@ABI_VERSION@,$ABI_VERSION,;t t
23645 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
23646 s,@LIBTOOL@,$LIBTOOL,;t t
23647 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
23648 s,@LT_UNDEF@,$LT_UNDEF,;t t
23649 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
23650 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23651 s,@LIB_CREATE@,$LIB_CREATE,;t t
23652 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
23653 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
23654 s,@LIB_PREP@,$LIB_PREP,;t t
23655 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23656 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23657 s,@LIB_LINK@,$LIB_LINK,;t t
23658 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
23659 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
23660 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
23661 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23662 s,@TICS_NAME@,$TICS_NAME,;t t
23663 s,@TINFO_NAME@,$TINFO_NAME,;t t
23664 s,@LIB_NAME@,$LIB_NAME,;t t
23665 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
23666 s,@CC_G_OPT@,$CC_G_OPT,;t t
23667 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
23668 s,@LD_MODEL@,$LD_MODEL,;t t
23669 s,@shlibdir@,$shlibdir,;t t
23670 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
23671 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23672 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
23673 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23674 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
23675 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
23676 s,@LINK_PROGS@,$LINK_PROGS,;t t
23677 s,@LINK_TESTS@,$LINK_TESTS,;t t
23678 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
23679 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23680 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
23681 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
23682 s,@RPATH_LIST@,$RPATH_LIST,;t t
23683 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
23684 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
23685 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
23686 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
23687 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
23688 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
23689 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
23690 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
23691 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
23692 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
23693 s,@XTERM_KBS@,$XTERM_KBS,;t t
23694 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
23695 s,@TERMINFO@,$TERMINFO,;t t
23696 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
23697 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
23698 s,@TERMPATH@,$TERMPATH,;t t
23699 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
23700 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
23701 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
23702 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
23703 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
23704 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
23705 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
23706 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
23707 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
23708 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
23709 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
23710 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
23711 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
23712 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
23713 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
23714 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
23715 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
23716 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
23717 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
23718 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
23719 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
23720 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
23721 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
23722 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
23723 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
23724 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
23725 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
23726 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
23727 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
23728 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
23729 s,@PTHREAD@,$PTHREAD,;t t
23730 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
23731 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
23732 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
23733 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
23734 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23735 s,@ECHO_LT@,$ECHO_LT,;t t
23736 s,@ECHO_LD@,$ECHO_LD,;t t
23737 s,@RULE_CC@,$RULE_CC,;t t
23738 s,@SHOW_CC@,$SHOW_CC,;t t
23739 s,@ECHO_CC@,$ECHO_CC,;t t
23740 s,@ECHO_LINK@,$ECHO_LINK,;t t
23741 s,@ADAFLAGS@,$ADAFLAGS,;t t
23742 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23743 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
23744 s,@ADA_TRACE@,$ADA_TRACE,;t t
23745 s,@MATH_LIB@,$MATH_LIB,;t t
23746 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
23747 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
23748 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
23749 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
23750 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
23751 s,@TEST_LIBS@,$TEST_LIBS,;t t
23752 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
23753 s,@CXXCPP@,$CXXCPP,;t t
23754 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
23755 s,@CXX_AR@,$CXX_AR,;t t
23756 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
23757 s,@CXXLIBS@,$CXXLIBS,;t t
23758 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
23759 s,@gnat_exists@,$gnat_exists,;t t
23760 s,@M4_exists@,$M4_exists,;t t
23761 s,@cf_ada_make@,$cf_ada_make,;t t
23762 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
23763 s,@cf_compile_generics@,$cf_compile_generics,;t t
23764 s,@cf_generic_objects@,$cf_generic_objects,;t t
23765 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
23766 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
23767 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
23768 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
23769 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
23770 s,@cf_ada_package@,$cf_ada_package,;t t
23771 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
23772 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
23773 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
23774 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
23775 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
23776 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
23777 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23778 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23779 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
23780 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
23781 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
23782 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
23783 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
23784 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
23785 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
23786 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
23787 s,@TICS_LIBS@,$TICS_LIBS,;t t
23788 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
23789 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
23790 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
23791 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23792 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23793 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
23794 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23795 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23796 s,@includesubdir@,$includesubdir,;t t
23797 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
23798 s,@TICS_LIST@,$TICS_LIST,;t t
23799 s,@TINFO_LIST@,$TINFO_LIST,;t t
23800 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
23801 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
23802 s,@TEST_ARGS@,$TEST_ARGS,;t t
23803 s,@TEST_DEPS@,$TEST_DEPS,;t t
23804 s,@TEST_ARG2@,$TEST_ARG2,;t t
23805 s,@TEST_DEP2@,$TEST_DEP2,;t t
23806 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
23807 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
23808 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
23809 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
23810 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
23811 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
23812 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
23813 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
23814 s,@cross_compiling@,$cross_compiling,;t t
23815 s,@TIC_PATH@,$TIC_PATH,;t t
23816 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
23817 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
23818 s,@PANEL_NAME@,$PANEL_NAME,;t t
23819 s,@MENU_NAME@,$MENU_NAME,;t t
23820 s,@FORM_NAME@,$FORM_NAME,;t t
23821 s,@CXX_NAME@,$CXX_NAME,;t t
23822 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
23823 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
23824 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
23825 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
23826 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
23827 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
23828 CEOF
23829
23830 EOF
23831
23832   cat >>$CONFIG_STATUS <<\EOF
23833   # Split the substitutions into bite-sized pieces for seds with
23834   # small command number limits, like on Digital OSF/1 and HP-UX.
23835   ac_max_sed_lines=48
23836   ac_sed_frag=1 # Number of current file.
23837   ac_beg=1 # First line for current file.
23838   ac_end=$ac_max_sed_lines # Line after last line for current file.
23839   ac_more_lines=:
23840   ac_sed_cmds=
23841   while $ac_more_lines; do
23842     if test $ac_beg -gt 1; then
23843       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23844     else
23845       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23846     fi
23847     if test ! -s $tmp/subs.frag; then
23848       ac_more_lines=false
23849     else
23850       # The purpose of the label and of the branching condition is to
23851       # speed up the sed processing (if there are no `@' at all, there
23852       # is no need to browse any of the substitutions).
23853       # These are the two extra sed commands mentioned above.
23854       (echo ':t
23855   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23856       # It is possible to make a multiline substitution using escaped newlines.
23857       # Ensure that we do not split the substitution between script fragments.
23858       ac_BEG=$ac_end
23859       ac_END=`expr $ac_end + $ac_max_sed_lines`
23860       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
23861       if test -s $tmp/subs.next; then
23862         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
23863         if test ! -s $tmp/subs.edit; then
23864           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
23865           if test ! -s $tmp/subs.edit; then
23866             if test $ac_beg -gt 1; then
23867               ac_end=`expr $ac_end - 1`
23868               continue
23869             fi
23870           fi
23871         fi
23872       fi
23873
23874       if test -z "$ac_sed_cmds"; then
23875         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23876       else
23877         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23878       fi
23879       ac_sed_frag=`expr $ac_sed_frag + 1`
23880       ac_beg=$ac_end
23881       ac_end=`expr $ac_end + $ac_max_sed_lines`
23882     fi
23883   done
23884   if test -z "$ac_sed_cmds"; then
23885     ac_sed_cmds=cat
23886   fi
23887 fi # test -n "$CONFIG_FILES"
23888
23889 EOF
23890 cat >>$CONFIG_STATUS <<\EOF
23891 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23892   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23893   case $ac_file in
23894   - | *:- | *:-:* ) # input from stdin
23895         cat >$tmp/stdin
23896         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23897         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23898   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23899         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23900   * )   ac_file_in=$ac_file.in ;;
23901   esac
23902
23903   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23904   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23905          X"$ac_file" : 'X\(//\)[^/]' \| \
23906          X"$ac_file" : 'X\(//\)$' \| \
23907          X"$ac_file" : 'X\(/\)' \| \
23908          .     : '\(.\)' 2>/dev/null ||
23909 echo X"$ac_file" |
23910     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23911           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23912           /^X\(\/\/\)$/{ s//\1/; q; }
23913           /^X\(\/\).*/{ s//\1/; q; }
23914           s/.*/./; q'`
23915   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23916     { case "$ac_dir" in
23917   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23918   *)                      as_incr_dir=.;;
23919 esac
23920 as_dummy="$ac_dir"
23921 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23922   case $as_mkdir_dir in
23923     # Skip DOS drivespec
23924     ?:) as_incr_dir=$as_mkdir_dir ;;
23925     *)
23926       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23927       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23928     ;;
23929   esac
23930 done; }
23931
23932     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23933     # A "../" for each directory in $ac_dir_suffix.
23934     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23935   else
23936     ac_dir_suffix= ac_dots=
23937   fi
23938
23939   case $srcdir in
23940   .)  ac_srcdir=.
23941       if test -z "$ac_dots"; then
23942          ac_top_srcdir=.
23943       else
23944          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23945       fi ;;
23946   [\\/]* | ?:[\\/]* )
23947       ac_srcdir=$srcdir$ac_dir_suffix;
23948       ac_top_srcdir=$srcdir ;;
23949   *) # Relative path.
23950     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23951     ac_top_srcdir=$ac_dots$srcdir ;;
23952   esac
23953
23954   case $INSTALL in
23955   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23956   *) ac_INSTALL=$ac_dots$INSTALL ;;
23957   esac
23958
23959   if test x"$ac_file" != x-; then
23960     { echo "$as_me:23960: creating $ac_file" >&5
23961 echo "$as_me: creating $ac_file" >&6;}
23962     rm -f "$ac_file"
23963   fi
23964   # Let's still pretend it is `configure' which instantiates (i.e., don't
23965   # use $as_me), people would be surprised to read:
23966   #    /* config.h.  Generated automatically by config.status.  */
23967   configure_input="Generated automatically from `echo $ac_file_in |
23968                                                  sed 's,.*/,,'` by configure."
23969
23970   # First look for the input files in the build tree, otherwise in the
23971   # src tree.
23972   ac_file_inputs=`IFS=:
23973     for f in $ac_file_in; do
23974       case $f in
23975       -) echo $tmp/stdin ;;
23976       [\\/$]*)
23977          # Absolute (can't be DOS-style, as IFS=:)
23978          test -f "$f" || { { echo "$as_me:23978: error: cannot find input file: $f" >&5
23979 echo "$as_me: error: cannot find input file: $f" >&2;}
23980    { (exit 1); exit 1; }; }
23981          echo $f;;
23982       *) # Relative
23983          if test -f "$f"; then
23984            # Build tree
23985            echo $f
23986          elif test -f "$srcdir/$f"; then
23987            # Source tree
23988            echo $srcdir/$f
23989          else
23990            # /dev/null tree
23991            { { echo "$as_me:23991: error: cannot find input file: $f" >&5
23992 echo "$as_me: error: cannot find input file: $f" >&2;}
23993    { (exit 1); exit 1; }; }
23994          fi;;
23995       esac
23996     done` || { (exit 1); exit 1; }
23997 EOF
23998 cat >>$CONFIG_STATUS <<\EOF
23999   ac_warn_datarootdir=no
24000   if test x"$ac_file" != x-; then
24001     for ac_item in $ac_file_inputs
24002     do
24003       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
24004       if test -n "$ac_seen"; then
24005         ac_used=`grep '@datarootdir@' $ac_item`
24006         if test -z "$ac_used"; then
24007           { echo "$as_me:24007: WARNING: datarootdir was used implicitly but not set:
24008 $ac_seen" >&5
24009 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
24010 $ac_seen" >&2;}
24011           ac_warn_datarootdir=yes
24012         fi
24013       fi
24014       ac_seen=`grep '${datarootdir}' $ac_item`
24015       if test -n "$ac_seen"; then
24016         { echo "$as_me:24016: WARNING: datarootdir was used explicitly but not set:
24017 $ac_seen" >&5
24018 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
24019 $ac_seen" >&2;}
24020         ac_warn_datarootdir=yes
24021       fi
24022     done
24023   fi
24024
24025 if test "x$ac_warn_datarootdir" = xyes; then
24026   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
24027 fi
24028
24029 EOF
24030 cat >>$CONFIG_STATUS <<EOF
24031   sed "$ac_vpsub
24032 $extrasub
24033 EOF
24034 cat >>$CONFIG_STATUS <<\EOF
24035 :t
24036 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24037 s,@configure_input@,$configure_input,;t t
24038 s,@srcdir@,$ac_srcdir,;t t
24039 s,@top_srcdir@,$ac_top_srcdir,;t t
24040 s,@INSTALL@,$ac_INSTALL,;t t
24041 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
24042   rm -f $tmp/stdin
24043   if test x"$ac_file" != x-; then
24044     cp $tmp/out $ac_file
24045
24046     for ac_name in prefix exec_prefix datarootdir
24047     do
24048         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
24049         if test -n "$ac_seen"; then
24050             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
24051             if test -z "$ac_init"; then
24052               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
24053               { echo "$as_me:24053: WARNING: Variable $ac_name is used but was not set:
24054 $ac_seen" >&5
24055 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
24056 $ac_seen" >&2;}
24057             fi
24058         fi
24059     done
24060     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
24061     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
24062     if test -s $tmp/out; then
24063       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
24064       { echo "$as_me:24064: WARNING: Some variables may not be substituted:
24065 $ac_seen" >&5
24066 echo "$as_me: WARNING: Some variables may not be substituted:
24067 $ac_seen" >&2;}
24068     fi
24069   else
24070     cat $tmp/out
24071   fi
24072   rm -f $tmp/out
24073
24074 done
24075 EOF
24076 cat >>$CONFIG_STATUS <<\EOF
24077
24078 #
24079 # CONFIG_HEADER section.
24080 #
24081
24082 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24083 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24084 #
24085 # ac_d sets the value in "#define NAME VALUE" lines.
24086 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24087 ac_dB='[        ].*$,\1#\2'
24088 ac_dC=' '
24089 ac_dD=',;t'
24090 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24091 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24092 ac_iB='\([      ]\),\1#\2define\3'
24093 ac_iC=' '
24094 ac_iD='\4,;t'
24095 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24096 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24097 ac_uB='$,\1#\2define\3'
24098 ac_uC=' '
24099 ac_uD=',;t'
24100
24101 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24102   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24103   case $ac_file in
24104   - | *:- | *:-:* ) # input from stdin
24105         cat >$tmp/stdin
24106         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24107         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24108   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24109         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24110   * )   ac_file_in=$ac_file.in ;;
24111   esac
24112
24113   test x"$ac_file" != x- && { echo "$as_me:24113: creating $ac_file" >&5
24114 echo "$as_me: creating $ac_file" >&6;}
24115
24116   # First look for the input files in the build tree, otherwise in the
24117   # src tree.
24118   ac_file_inputs=`IFS=:
24119     for f in $ac_file_in; do
24120       case $f in
24121       -) echo $tmp/stdin ;;
24122       [\\/$]*)
24123          # Absolute (can't be DOS-style, as IFS=:)
24124          test -f "$f" || { { echo "$as_me:24124: error: cannot find input file: $f" >&5
24125 echo "$as_me: error: cannot find input file: $f" >&2;}
24126    { (exit 1); exit 1; }; }
24127          echo $f;;
24128       *) # Relative
24129          if test -f "$f"; then
24130            # Build tree
24131            echo $f
24132          elif test -f "$srcdir/$f"; then
24133            # Source tree
24134            echo $srcdir/$f
24135          else
24136            # /dev/null tree
24137            { { echo "$as_me:24137: error: cannot find input file: $f" >&5
24138 echo "$as_me: error: cannot find input file: $f" >&2;}
24139    { (exit 1); exit 1; }; }
24140          fi;;
24141       esac
24142     done` || { (exit 1); exit 1; }
24143   # Remove the trailing spaces.
24144   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
24145
24146 EOF
24147
24148 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
24149 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
24150 # be either 'cat' or 'sort'.
24151 cat confdefs.h | uniq >conftest.vals
24152
24153 # Break up conftest.vals because some shells have a limit on
24154 # the size of here documents, and old seds have small limits too.
24155
24156 rm -f conftest.tail
24157 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
24158 while grep . conftest.vals >/dev/null
24159 do
24160   # Write chunks of a limited-size here document to conftest.frag.
24161   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
24162   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
24163   echo 'CEOF' >> $CONFIG_STATUS
24164   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24165   rm -f conftest.vals
24166   mv conftest.tail conftest.vals
24167 done
24168 rm -f conftest.vals
24169
24170 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
24171 # marker @DEFS@.
24172 echo '  cat >> conftest.edit <<CEOF
24173 /@DEFS@/r conftest.frag
24174 /@DEFS@/d
24175 CEOF
24176 sed -f conftest.edit $tmp/in > $tmp/out
24177 rm -f $tmp/in
24178 mv $tmp/out $tmp/in
24179 rm -f conftest.edit conftest.frag
24180 ' >> $CONFIG_STATUS
24181
24182 cat >>$CONFIG_STATUS <<\EOF
24183   # Let's still pretend it is `configure' which instantiates (i.e., don't
24184   # use $as_me), people would be surprised to read:
24185   #    /* config.h.  Generated automatically by config.status.  */
24186   if test x"$ac_file" = x-; then
24187     echo "/* Generated automatically by configure.  */" >$tmp/config.h
24188   else
24189     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
24190   fi
24191   cat $tmp/in >>$tmp/config.h
24192   rm -f $tmp/in
24193   if test x"$ac_file" != x-; then
24194     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
24195       { echo "$as_me:24195: $ac_file is unchanged" >&5
24196 echo "$as_me: $ac_file is unchanged" >&6;}
24197     else
24198       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24199          X"$ac_file" : 'X\(//\)[^/]' \| \
24200          X"$ac_file" : 'X\(//\)$' \| \
24201          X"$ac_file" : 'X\(/\)' \| \
24202          .     : '\(.\)' 2>/dev/null ||
24203 echo X"$ac_file" |
24204     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24205           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24206           /^X\(\/\/\)$/{ s//\1/; q; }
24207           /^X\(\/\).*/{ s//\1/; q; }
24208           s/.*/./; q'`
24209       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24210         { case "$ac_dir" in
24211   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24212   *)                      as_incr_dir=.;;
24213 esac
24214 as_dummy="$ac_dir"
24215 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24216   case $as_mkdir_dir in
24217     # Skip DOS drivespec
24218     ?:) as_incr_dir=$as_mkdir_dir ;;
24219     *)
24220       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24221       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24222     ;;
24223   esac
24224 done; }
24225
24226       fi
24227       rm -f $ac_file
24228       mv $tmp/config.h $ac_file
24229     fi
24230   else
24231     cat $tmp/config.h
24232     rm -f $tmp/config.h
24233   fi
24234 done
24235 EOF
24236 cat >>$CONFIG_STATUS <<\EOF
24237 #
24238 # CONFIG_COMMANDS section.
24239 #
24240 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24241   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24242   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24243
24244   case $ac_dest in
24245     default )
24246 if test "x$cf_with_tests" != xno ; then
24247
24248 for cf_dir in test
24249 do
24250         if test ! -d $srcdir/$cf_dir; then
24251                 continue
24252         elif test -f $srcdir/$cf_dir/programs; then
24253                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
24254         fi
24255 done
24256
24257 fi
24258
24259 cf_prefix=$LIB_PREFIX
24260
24261 case $cf_cv_shlib_version in
24262 (cygdll|msysdll|mingw)
24263         TINFO_NAME=$TINFO_ARG_SUFFIX
24264         TINFO_SUFFIX=.dll
24265         ;;
24266 esac
24267
24268 if test -n "$TINFO_SUFFIX" ; then
24269         case $TINFO_SUFFIX in
24270         (tw*)
24271                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
24272                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
24273                 ;;
24274         (t*)
24275                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
24276                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
24277                 ;;
24278         (w*)
24279                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
24280                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
24281                 ;;
24282         esac
24283 fi
24284
24285 for cf_dir in $SRC_SUBDIRS
24286 do
24287         if test ! -d $srcdir/$cf_dir ; then
24288                 continue
24289         elif test -f $srcdir/$cf_dir/modules; then
24290
24291                 SHARED_LIB=
24292                 Libs_To_Make=
24293                 cf_awk_program=
24294                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
24295                 then
24296                         cf_awk_program="$cf_awk_program\
24297 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
24298 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
24299 "
24300                 fi
24301
24302                 if test "x$WILDCARD_SYMS" = xno
24303                 then
24304                         cf_awk_program="$cf_awk_program\
24305 /[      ]_\\*;/ { skip=1; next; }\
24306 "
24307                 fi
24308
24309                 if test "x$cf_awk_program" != "x"
24310                 then
24311                         cat >>$cf_dir/Makefile <<CF_EOF
24312
24313 # Generated by CF_LIB_RULES
24314 resulting.map: $UNALTERED_SYMS
24315         $AWK 'BEGIN { skip = 1; last=""; } \
24316 $cf_awk_program \
24317 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
24318  skip = 0; last = \$\$0; } \
24319 END { print last; }' < $UNALTERED_SYMS >\$@
24320
24321 distclean::
24322         rm -f resulting.map
24323 CF_EOF
24324                 fi
24325
24326                 for cf_item in $cf_LIST_MODELS
24327                 do
24328
24329         case X$cf_item in
24330         (Xlibtool)
24331                 cf_suffix='.la'
24332                 cf_depsuf=$cf_suffix
24333                 ;;
24334         (Xdebug)
24335                 cf_suffix='_g.a'
24336                 cf_depsuf=$cf_suffix
24337                 ;;
24338         (Xprofile)
24339                 cf_suffix='_p.a'
24340                 cf_depsuf=$cf_suffix
24341                 ;;
24342         (Xshared)
24343                 case $cf_cv_system_name in
24344                 (aix[5-7]*)
24345                         cf_suffix='.so'
24346                         cf_depsuf=$cf_suffix
24347                         ;;
24348                 (cygwin*|msys*|mingw*)
24349                         cf_suffix='.dll'
24350                         cf_depsuf='.dll.a'
24351                         ;;
24352                 (darwin*)
24353                         cf_suffix='.dylib'
24354                         cf_depsuf=$cf_suffix
24355                         ;;
24356                 (hpux*)
24357                         case $target in
24358                         (ia64*)
24359                                 cf_suffix='.so'
24360                                 cf_depsuf=$cf_suffix
24361                                 ;;
24362                         (*)
24363                                 cf_suffix='.sl'
24364                                 cf_depsuf=$cf_suffix
24365                                 ;;
24366                         esac
24367                         ;;
24368                 (*)
24369                         cf_suffix='.so'
24370                         cf_depsuf=$cf_suffix
24371                         ;;
24372                 esac
24373                 ;;
24374         (*)
24375                 cf_suffix='.a'
24376                 cf_depsuf=$cf_suffix
24377                 ;;
24378         esac
24379         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24380         then
24381                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24382                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24383         fi
24384
24385                         cf_libname=$cf_dir
24386                         test "$cf_dir" = c++ && cf_libname=ncurses++
24387                         if test $cf_item = shared ; then
24388                                 if test -n "${LIB_SUFFIX}"
24389                                 then
24390                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24391                                 else
24392                                         cf_shared_suffix="$cf_suffix"
24393                                 fi
24394                                 if test "$cf_cv_do_symlinks" = yes ; then
24395                                         cf_version_name=
24396
24397                                         case "$cf_cv_shlib_version" in
24398                                         (rel)
24399                                                 cf_version_name=REL_VERSION
24400                                                 ;;
24401                                         (abi)
24402                                                 cf_version_name=ABI_VERSION
24403                                                 ;;
24404                                         esac
24405
24406                                         if test -n "$cf_version_name"
24407                                         then
24408                                                 case "$cf_cv_system_name" in
24409                                                 (darwin*)
24410                                                         # "w", etc?
24411                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
24412                                                         ;;
24413                                                 (*)
24414                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
24415                                                         ;;
24416                                                 esac
24417                                         fi
24418                                         if test -n "${USE_LIB_SUFFIX}"
24419                                         then
24420                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
24421                                         else
24422                                                 cf_shared_suffix="$cf_suffix"
24423                                         fi
24424                                 fi
24425                                 # cygwin needs import library, and has unique naming convention
24426                                 # use autodetected ${cf_prefix} for import lib and static lib, but
24427                                 # use 'cyg' prefix for shared lib.
24428                                 case $cf_cv_shlib_version in
24429                                 (cygdll)
24430                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24431                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
24432                                         ;;
24433                                 (msysdll)
24434                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24435                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
24436                                         ;;
24437                                 (mingw)
24438                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
24439                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
24440                                         ;;
24441                                 (*)
24442                                         cf_add_lib=
24443                                         ;;
24444                                 esac
24445                                 if test -n "$cf_add_lib"
24446                                 then
24447                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24448                                         continue
24449                                 fi
24450                         fi
24451                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
24452                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
24453                 done
24454
24455                 if test $cf_dir = ncurses ; then
24456                         cf_subsets="$LIB_SUBSETS"
24457                         cf_r_parts="$cf_subsets"
24458                         cf_liblist="$Libs_To_Make"
24459
24460                         while test -n "$cf_r_parts"
24461                         do
24462                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
24463                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
24464                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
24465                                         cf_add_lib=
24466                                         case $cf_l_parts in
24467                                         (*termlib*)
24468                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
24469                                                 ;;
24470                                         (*ticlib*)
24471                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
24472                                                 ;;
24473                                         (*)
24474                                                 break
24475                                                 ;;
24476                                         esac
24477                                         if test -n "$cf_add_lib"; then
24478                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
24479                                         fi
24480                                 else
24481                                         break
24482                                 fi
24483                         done
24484                 else
24485                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
24486                 fi
24487
24488                 if test $cf_dir = c++; then
24489                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
24490                                 cf_list=
24491                                 for cf_item in $Libs_To_Make
24492                                 do
24493                                         case $cf_item in
24494                                         (*.a)
24495                                                 ;;
24496                                         (*)
24497                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
24498                                                 ;;
24499                                         esac
24500                                         for cf_test in $cf_list
24501                                         do
24502                                                 if test "$cf_test" = "$cf_item"
24503                                                 then
24504                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
24505                                                         cf_item=
24506                                                         break
24507                                                 fi
24508                                         done
24509                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
24510                                 done
24511                                 Libs_To_Make="$cf_list"
24512                         fi
24513                 fi
24514
24515                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
24516                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
24517                         $cf_dir/Makefile >$cf_dir/Makefile.out
24518                 mv $cf_dir/Makefile.out $cf_dir/Makefile
24519
24520                 $AWK -f $srcdir/mk-0th.awk \
24521                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
24522                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24523
24524                 for cf_subset in $cf_subsets
24525                 do
24526                         cf_subdirs=
24527                         for cf_item in $cf_LIST_MODELS
24528                         do
24529
24530                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
24531
24532 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24533
24534                         CXX_MODEL=$cf_ITEM
24535                         if test "$CXX_MODEL" = SHARED; then
24536                                 case $cf_cv_shlib_version in
24537                                 (cygdll|msysdll|mingw)
24538                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
24539
24540 echo "${as_me:-configure}:24540: testing overriding CXX_MODEL to SHARED ..." 1>&5
24541
24542                                         with_shared_cxx=yes
24543                                         ;;
24544                                 (*)
24545                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
24546                                         ;;
24547                                 esac
24548                         fi
24549
24550         case X$cf_item in
24551         (Xlibtool)
24552                 cf_suffix='.la'
24553                 cf_depsuf=$cf_suffix
24554                 ;;
24555         (Xdebug)
24556                 cf_suffix='_g.a'
24557                 cf_depsuf=$cf_suffix
24558                 ;;
24559         (Xprofile)
24560                 cf_suffix='_p.a'
24561                 cf_depsuf=$cf_suffix
24562                 ;;
24563         (Xshared)
24564                 case $cf_cv_system_name in
24565                 (aix[5-7]*)
24566                         cf_suffix='.so'
24567                         cf_depsuf=$cf_suffix
24568                         ;;
24569                 (cygwin*|msys*|mingw*)
24570                         cf_suffix='.dll'
24571                         cf_depsuf='.dll.a'
24572                         ;;
24573                 (darwin*)
24574                         cf_suffix='.dylib'
24575                         cf_depsuf=$cf_suffix
24576                         ;;
24577                 (hpux*)
24578                         case $target in
24579                         (ia64*)
24580                                 cf_suffix='.so'
24581                                 cf_depsuf=$cf_suffix
24582                                 ;;
24583                         (*)
24584                                 cf_suffix='.sl'
24585                                 cf_depsuf=$cf_suffix
24586                                 ;;
24587                         esac
24588                         ;;
24589                 (*)
24590                         cf_suffix='.so'
24591                         cf_depsuf=$cf_suffix
24592                         ;;
24593                 esac
24594                 ;;
24595         (*)
24596                 cf_suffix='.a'
24597                 cf_depsuf=$cf_suffix
24598                 ;;
24599         esac
24600         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24601         then
24602                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
24603                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
24604         fi
24605
24606         case $cf_item in
24607         (libtool) cf_subdir='obj_lo'  ;;
24608         (normal)  cf_subdir='objects' ;;
24609         (debug)   cf_subdir='obj_g' ;;
24610         (profile) cf_subdir='obj_p' ;;
24611         (shared)
24612                 case $cf_cv_system_name in
24613                 (cygwin|msys)
24614                         cf_subdir='objects' ;;
24615                 (*)
24616                         cf_subdir='obj_s' ;;
24617                 esac
24618         esac
24619
24620                         # Test for case where we build libtinfo with a different name.
24621                         cf_libname=$cf_dir
24622                         if test $cf_dir = ncurses ; then
24623                                 case $cf_subset in
24624                                 (*base*)
24625                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
24626                                         ;;
24627                                 (*termlib*)
24628                                         cf_libname=$TINFO_LIB_SUFFIX
24629                                         ;;
24630                                 (ticlib*)
24631                                         cf_libname=$TICS_LIB_SUFFIX
24632                                         ;;
24633                                 esac
24634                         elif test $cf_dir = c++ ; then
24635                                 cf_libname=ncurses++$USE_LIB_SUFFIX
24636                         else
24637                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
24638                         fi
24639                         if test -n "${USE_ARG_SUFFIX}" ; then
24640                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
24641                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
24642                         fi
24643
24644                         # These dependencies really are for development, not
24645                         # builds, but they are useful in porting, too.
24646                         cf_depend="../include/ncurses_cfg.h"
24647                         if test "$srcdir" = "."; then
24648                                 cf_reldir="."
24649                         else
24650                                 cf_reldir="\${srcdir}"
24651                         fi
24652
24653                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
24654                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
24655                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
24656                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
24657                         fi
24658
24659                         cf_dir_suffix=
24660                         old_cf_suffix="$cf_suffix"
24661                         if test "$cf_cv_shlib_version_infix" = yes ; then
24662                         if test -n "$USE_LIB_SUFFIX" ; then
24663                                 case $USE_LIB_SUFFIX in
24664                                 (tw*)
24665                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
24666                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
24667                                         cf_dir_suffix=tw$EXTRA_SUFFIX
24668                                         ;;
24669                                 (t*)
24670                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
24671                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
24672                                         cf_dir_suffix=t$EXTRA_SUFFIX
24673                                         ;;
24674                                 (w*)
24675                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
24676                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
24677                                         cf_dir_suffix=w$EXTRA_SUFFIX
24678                                         ;;
24679                                 (*)
24680                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
24681                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
24682                                         cf_dir_suffix=$EXTRA_SUFFIX
24683                                         ;;
24684                                 esac
24685                         fi
24686                         fi
24687
24688                         $AWK -f $srcdir/mk-1st.awk \
24689                                 name=${cf_libname}${cf_dir_suffix} \
24690                                 traces=$LIB_TRACING \
24691                                 MODEL=$cf_ITEM \
24692                                 CXX_MODEL=$CXX_MODEL \
24693                                 model=$cf_subdir \
24694                                 prefix=$cf_prefix \
24695                                 suffix=$cf_suffix \
24696                                 subset=$cf_subset \
24697                                 driver=$cf_cv_term_driver \
24698                                 SymLink="$LN_S" \
24699                                 TermlibRoot=$TINFO_NAME \
24700                                 TermlibSuffix=$TINFO_SUFFIX \
24701                                 ShlibVer=$cf_cv_shlib_version \
24702                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
24703                                 ReLink=${cf_cv_do_relink:-no} \
24704                                 DoLinks=$cf_cv_do_symlinks \
24705                                 rmSoLocs=$cf_cv_rm_so_locs \
24706                                 ldconfig="$LDCONFIG" \
24707                                 overwrite=$WITH_OVERWRITE \
24708                                 depend="$cf_depend" \
24709                                 host="$host" \
24710                                 libtool_version="$LIBTOOL_VERSION" \
24711                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24712
24713                         cf_suffix="$old_cf_suffix"
24714
24715                         for cf_subdir2 in $cf_subdirs lib
24716                         do
24717                                 test $cf_subdir = $cf_subdir2 && break
24718                         done
24719                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
24720                         $AWK -f $srcdir/mk-2nd.awk \
24721                                 name=$cf_dir \
24722                                 traces=$LIB_TRACING \
24723                                 MODEL=$cf_ITEM \
24724                                 model=$cf_subdir \
24725                                 subset=$cf_subset \
24726                                 srcdir=$srcdir \
24727                                 echo=$WITH_ECHO \
24728                                 crenames=$cf_cv_prog_CC_c_o \
24729                                 cxxrenames=$cf_cv_prog_CXX_c_o \
24730                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24731                         cf_subdirs="$cf_subdirs $cf_subdir"
24732                         done
24733                 done
24734         fi
24735
24736         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
24737 done
24738
24739 for cf_dir in $SRC_SUBDIRS
24740 do
24741         if test ! -d $srcdir/$cf_dir ; then
24742                 continue
24743         fi
24744
24745         if test -f $cf_dir/Makefile ; then
24746                 case "$cf_dir" in
24747                 (Ada95)
24748                         echo 'libs \' >> Makefile
24749                         echo 'install.libs \' >> Makefile
24750                         echo 'uninstall.libs ::' >> Makefile
24751                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
24752                         ;;
24753                 esac
24754         fi
24755
24756         if test -f $srcdir/$cf_dir/modules; then
24757                 echo >> Makefile
24758                 if test -f $srcdir/$cf_dir/headers; then
24759 cat >> Makefile <<CF_EOF
24760 install.includes \\
24761 uninstall.includes \\
24762 CF_EOF
24763                 fi
24764 if test "$cf_dir" != "c++" ; then
24765 echo 'lint \' >> Makefile
24766 fi
24767 cat >> Makefile <<CF_EOF
24768 libs \\
24769 lintlib \\
24770 install.libs \\
24771 uninstall.libs \\
24772 install.$cf_dir \\
24773 uninstall.$cf_dir ::
24774         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24775 CF_EOF
24776         elif test -f $srcdir/$cf_dir/headers; then
24777 cat >> Makefile <<CF_EOF
24778
24779 libs \\
24780 install.libs \\
24781 uninstall.libs \\
24782 install.includes \\
24783 uninstall.includes ::
24784         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24785 CF_EOF
24786 fi
24787 done
24788
24789 if test "x$cf_with_db_install" = xyes; then
24790 cat >> Makefile <<CF_EOF
24791
24792 install.libs uninstall.libs \\
24793 install.data uninstall.data ::
24794 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24795 CF_EOF
24796 else
24797 cat >> Makefile <<CF_EOF
24798
24799 install.libs uninstall.libs ::
24800         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24801 CF_EOF
24802 fi
24803
24804 if test "x$cf_with_manpages" = xyes; then
24805 cat >> Makefile <<CF_EOF
24806
24807 install.man \\
24808 uninstall.man ::
24809         cd man && \${MAKE} \${TOP_MFLAGS} \$@
24810 CF_EOF
24811 fi
24812
24813 cat >> Makefile <<CF_EOF
24814
24815 distclean ::
24816         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
24817         rm -f headers.sh headers.sed mk_shared_lib.sh
24818         rm -f edit_man.* man_alias.*
24819         rm -rf \${DIRS_TO_MAKE}
24820 CF_EOF
24821
24822 # Special case: tack's manpage lives in its own directory.
24823 if test "x$cf_with_manpages" = xyes; then
24824 if test -d tack ; then
24825 if test -f $srcdir/$tack.h; then
24826 cat >> Makefile <<CF_EOF
24827
24828 install.man \\
24829 uninstall.man ::
24830         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
24831 CF_EOF
24832 fi
24833 fi
24834 fi
24835
24836 rm -f headers.sed headers.sh
24837
24838 echo creating headers.sh
24839 cat >headers.sh <<CF_EOF
24840 #! $SHELL
24841 # This shell script is generated by the 'configure' script.  It is invoked in a
24842 # subdirectory of the build tree.  It generates a sed-script in the parent
24843 # directory that is used to adjust includes for header files that reside in a
24844 # subdirectory of /usr/include, etc.
24845 PRG=""
24846 while test \$# != 3
24847 do
24848 PRG="\$PRG \$1"; shift
24849 done
24850 DST=\$1
24851 REF=\$2
24852 SRC=\$3
24853 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
24854 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
24855 echo installing \$SRC in \$DST
24856 CF_EOF
24857
24858 if test $WITH_CURSES_H = yes; then
24859         cat >>headers.sh <<CF_EOF
24860 case \$DST in
24861 (/*/include/*)
24862         END=\`basename \$DST\`
24863         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24864         do
24865                 NAME=\`basename \$i\`
24866                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24867         done
24868         ;;
24869 (*)
24870         echo "" >> \$TMPSED
24871         ;;
24872 esac
24873 CF_EOF
24874
24875 else
24876         cat >>headers.sh <<CF_EOF
24877 case \$DST in
24878 (/*/include/*)
24879         END=\`basename \$DST\`
24880         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24881         do
24882                 NAME=\`basename \$i\`
24883                 if test "\$NAME" = "curses.h"
24884                 then
24885                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24886                         NAME=ncurses.h
24887                 fi
24888                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24889         done
24890         ;;
24891 (*)
24892         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24893         ;;
24894 esac
24895 CF_EOF
24896 fi
24897 cat >>headers.sh <<CF_EOF
24898 rm -f \$TMPSRC
24899 sed -f \$TMPSED \$SRC > \$TMPSRC
24900 NAME=\`basename \$SRC\`
24901 CF_EOF
24902 if test $WITH_CURSES_H != yes; then
24903         cat >>headers.sh <<CF_EOF
24904 test "\$NAME" = "curses.h" && NAME=ncurses.h
24905 CF_EOF
24906 fi
24907 cat >>headers.sh <<CF_EOF
24908 # Just in case someone gzip'd manpages, remove the conflicting copy.
24909 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
24910
24911 eval \$PRG \$TMPSRC \$DST/\$NAME
24912 rm -f \$TMPSRC \$TMPSED
24913 CF_EOF
24914
24915 chmod 0755 headers.sh
24916
24917 for cf_dir in $SRC_SUBDIRS
24918 do
24919         if test ! -d $srcdir/$cf_dir ; then
24920                 continue
24921         fi
24922
24923         if test -f $srcdir/$cf_dir/headers; then
24924                 $AWK -f $srcdir/mk-hdr.awk \
24925                         subset="$LIB_SUBSETS" \
24926                         compat="$WITH_CURSES_H" \
24927                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
24928         fi
24929
24930         if test -f $srcdir/$cf_dir/modules; then
24931                 if test "$cf_dir" != "c++" ; then
24932                         cat >>$cf_dir/Makefile <<"CF_EOF"
24933 depend : ${AUTO_SRC}
24934         makedepend -- ${CPPFLAGS} -- ${C_SRC}
24935
24936 # DO NOT DELETE THIS LINE -- make depend depends on it.
24937 CF_EOF
24938                 fi
24939         fi
24940 done
24941
24942 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24943 if test -z "$USE_OLD_MAKERULES" ; then
24944         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
24945 fi
24946 fi
24947  ;;
24948   esac
24949 done
24950 EOF
24951
24952 cat >>$CONFIG_STATUS <<\EOF
24953
24954 { (exit 0); exit 0; }
24955 EOF
24956 chmod +x $CONFIG_STATUS
24957 ac_clean_files=$ac_clean_files_save
24958
24959 # configure is writing to config.log, and then calls config.status.
24960 # config.status does its own redirection, appending to config.log.
24961 # Unfortunately, on DOS this fails, as config.log is still kept open
24962 # by configure, so config.status won't be able to write to it; its
24963 # output is simply discarded.  So we exec the FD to /dev/null,
24964 # effectively closing config.log, so it can be properly (re)opened and
24965 # appended to by config.status.  When coming back to configure, we
24966 # need to make the FD available again.
24967 if test "$no_create" != yes; then
24968   ac_cs_success=:
24969   exec 5>/dev/null
24970   $SHELL $CONFIG_STATUS || ac_cs_success=false
24971   exec 5>>config.log
24972   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24973   # would make configure fail if this is the last instruction.
24974   $ac_cs_success || { (exit 1); exit 1; }
24975 fi
24976 ${MAKE:-make} preinstall