]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.1 - patch 20180616
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.659 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20170501.
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-tack          suppress build/install with tack program
713   --without-tests         suppress build/install with test-programs
714   --without-curses-h      install curses.h as ncurses.h only
715   --with-config-suffix=X  suffixes ncursesXX-config file
716   --with-pkg-config{=path} enable/disable use of pkg-config
717   --with-pkg-config-libdir=XXX use given directory for installing pc-files
718   --enable-pc-files       generate and install .pc files for pkg-config
719   --with-pc-suffix        suffixes pc-files
720   --enable-mixed-case     tic should assume mixed-case filenames
721   --with-install-prefix   prefixes actual install-location ($DESTDIR)
722 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
723   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
724   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
725   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
726   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
727   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
728   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
729 Options to Specify the Libraries Built/Used:
730   --disable-libtool-version  enable to use libtool's incompatible naming scheme
731   --with-libtool          generate libraries with libtool
732   --with-shared           generate shared-libraries
733   --with-normal           generate normal-libraries (default)
734   --with-debug            generate debug-libraries (default)
735   --with-profile          generate profile-libraries
736   --with-cxx-shared       generate C++ shared-libraries
737   --with-lib-prefix       override library-prefix
738   --with-termlib          generate separate terminfo library
739   --with-ticlib           generate separate tic library
740   --enable-rpath          use rpath option when generating shared libraries
741   --disable-relink        relink shared libraries during install
742   --with-shlib-version=X  Specify rel or abi version for shared libs
743   --with-libtool-opts=XXX specify additional libtool options
744   --with-export-syms=XXX  limit exported symbols using libtool
745   --with-versioned-syms=X markup versioned symbols using ld
746   --with-gpm              use Alessandro Rubini's GPM library
747   --without-dlsym         do not use dlsym() to load GPM dynamically
748   --with-sysmouse         use sysmouse (FreeBSD console)
749   --disable-lib-suffixes  disable library suffixes
750   --disable-rpath-hack    don't add rpath options for additional libraries
751 Fine-Tuning Your Configuration:
752   --with-extra-suffix=X   append extra suffix to header/library paths
753   --disable-overwrite     put headers in subdir, omit link to -lcurses
754   --disable-database      do not use terminfo, only fallbacks/termcap
755   --with-database=XXX     specify terminfo source to install
756   --with-hashed-db        specify hashed-database library
757   --with-fallbacks=XXX    specify list of fallback terminal descriptions
758   --without-xterm-new     specify if xterm terminfo should be old version
759   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
760   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
761   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
762   --disable-big-core      assume machine has little memory
763   --disable-big-strings   assume compiler has only standard-size strings
764   --enable-termcap        compile in termcap fallback support
765   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
766   --enable-getcap         fast termcap load, no xrefs to terminfo
767   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
768   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
769   --disable-root-environ  restrict environment when running as root
770   --enable-symlinks       make tic use symbolic links not hard links
771   --enable-broken_linker  compile with broken-linker support code
772   --enable-bsdpad         recognize BSD-style prefix padding
773   --enable-widec          compile with wide-char/UTF-8 code
774   --disable-lp64          allow chtype to be long (ignore _LP64)
775   --disable-largefile     omit support for large files
776   --disable-tparm-varargs compile tparm() without varargs interface
777   --disable-tic-depends   link tic library without explicit dependency on ncurses library
778   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
779   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
780   --with-bool=TYPE        override fallback type of bool variable
781   --with-caps=alt         compile with alternate Caps file
782   --with-chtype=TYPE      override type of chtype
783   --with-ospeed=TYPE      override type of ospeed variable
784   --with-mmask-t=TYPE     override type of mmask_t
785   --with-ccharw-max=XXX   override size CCHARW_MAX
786   --enable-signed-char    compile using signed Boolean's in term.h
787   --with-tparm-arg=TYPE   override parameter type of tparm
788   --with-rcs-ids          compile-in RCS identifiers
789 Options to Specify How Manpages are Installed:
790   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
791                           optionally formatted/catonly, e.g., gzip,formatted
792   --with-manpage-renames  specify manpage-renaming
793   --with-manpage-aliases  specify manpage-aliases using .so
794   --with-manpage-symlinks specify manpage-aliases using symlinks
795   --with-manpage-tbl      specify manpage processing with tbl
796 Extensions:
797   --disable-ext-funcs     disable function-extensions
798   --enable-sp-funcs       enable SCREEN-extensions
799   --enable-term-driver    enable terminal-driver
800   --enable-const          compile with extra/non-standard const
801   --enable-ext-colors     compile for 256-color support
802   --enable-ext-mouse      compile for extended mouse-encoding
803   --enable-ext-putwin     compile with extended putwin/screendump
804   --enable-no-padding     compile with $NCURSES_NO_PADDING code
805   --enable-sigwinch       compile with SIGWINCH handler
806   --enable-tcap-names     compile with user-definable terminal capabilities
807 Reentrant Code:
808   --with-pthread          use POSIX thread library
809   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
810   --enable-weak-symbols   enable weak-symbols for pthreads
811   --enable-reentrant      compile with reentrant code
812   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
813   --enable-opaque-form    make form-library structures "opaque"
814   --enable-opaque-menu    make menu-library structures "opaque"
815   --enable-opaque-panel   make panel-library structures "opaque"
816   --with-wrap-prefix=XXX  override prefix used for public variables
817 Development Code:
818   --without-develop       disable development options
819   --enable-hard-tabs      compile with hard-tabs code
820   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
821 Experimental Code:
822   --disable-assumed-color do not assume anything about default-colors
823   --disable-hashmap       compile without hashmap scrolling-optimization
824   --enable-colorfgbg      compile-in experimental $COLORFGBG code
825   --enable-interop        compile-in interop bindings
826   --enable-safe-sprintf   compile with experimental safe-sprintf code
827   --disable-scroll-hints  compile without scroll-hints code
828   --enable-wgetch-events  compile with wgetch-events code
829 Testing/development Options:
830   --disable-echo          do not display "compiling" commands
831   --disable-stripping     do not strip installed executables
832   --enable-warnings       build: turn on GCC compiler warnings
833   --enable-string-hacks   work around bogus compiler/loader warnings
834   --enable-assertions     test: turn on generation of assertion code
835   --with-dmalloc          test: use Gray Watson's dmalloc library
836   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
837   --with-valgrind         test: use valgrind
838   --disable-leaks         test: free permanent memory, analyze leaks
839   --enable-expanded       test: generate functions for certain macros
840   --disable-macros        test: use functions rather than macros
841   --with-trace            test: add trace() function to all models of ncurses
842   --disable-gnat-projects test: disable GNAT projects even if usable
843 Ada95 Binding Options:
844   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
845   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
846   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
847   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
848
849 Some influential environment variables:
850   CC          C compiler command
851   CFLAGS      C compiler flags
852   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
853               nonstandard directory <lib dir>
854   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
855               headers in a nonstandard directory <include dir>
856   CPP         C preprocessor
857   CXX         C++ compiler command
858   CXXFLAGS    C++ compiler flags
859   CXXCPP      C++ preprocessor
860
861 Use these variables to override the choices made by `configure' or to help
862 it to find libraries and programs with nonstandard names/locations.
863
864 EOF
865 fi
866
867 if test "$ac_init_help" = "recursive"; then
868   # If there are subdirs, report their specific --help.
869   ac_popdir=`pwd`
870   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
871     cd $ac_subdir
872     # A "../" for each directory in /$ac_subdir.
873     ac_dots=`echo $ac_subdir |
874              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
875
876     case $srcdir in
877     .) # No --srcdir option.  We are building in place.
878       ac_sub_srcdir=$srcdir ;;
879     [\\/]* | ?:[\\/]* ) # Absolute path.
880       ac_sub_srcdir=$srcdir/$ac_subdir ;;
881     *) # Relative path.
882       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
883     esac
884
885     # Check for guested configure; otherwise get Cygnus style configure.
886     if test -f $ac_sub_srcdir/configure.gnu; then
887       echo
888       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
889     elif test -f $ac_sub_srcdir/configure; then
890       echo
891       $SHELL $ac_sub_srcdir/configure  --help=recursive
892     elif test -f $ac_sub_srcdir/configure.ac ||
893            test -f $ac_sub_srcdir/configure.in; then
894       echo
895       $ac_configure --help
896     else
897       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
898     fi
899     cd $ac_popdir
900   done
901 fi
902
903 test -n "$ac_init_help" && exit 0
904 if $ac_init_version; then
905   cat <<\EOF
906
907 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
908 Free Software Foundation, Inc.
909 This configure script is free software; the Free Software Foundation
910 gives unlimited permission to copy, distribute and modify it.
911 EOF
912   exit 0
913 fi
914 exec 5>config.log
915 cat >&5 <<EOF
916 This file contains any messages produced by compilers while
917 running configure, to aid debugging if configure makes a mistake.
918
919 It was created by $as_me, which was
920 generated by GNU Autoconf 2.52.20170501.  Invocation command line was
921
922   $ $0 $@
923
924 EOF
925 {
926 cat <<_ASUNAME
927 ## ---------- ##
928 ## Platform.  ##
929 ## ---------- ##
930
931 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
932 uname -m = `(uname -m) 2>/dev/null || echo unknown`
933 uname -r = `(uname -r) 2>/dev/null || echo unknown`
934 uname -s = `(uname -s) 2>/dev/null || echo unknown`
935 uname -v = `(uname -v) 2>/dev/null || echo unknown`
936
937 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
938 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
939
940 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
941 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
942 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
943 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
944 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
945 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
946 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
947
948 PATH = $PATH
949
950 _ASUNAME
951 } >&5
952
953 cat >&5 <<EOF
954 ## ------------ ##
955 ## Core tests.  ##
956 ## ------------ ##
957
958 EOF
959
960 # Keep a trace of the command line.
961 # Strip out --no-create and --no-recursion so they do not pile up.
962 # Also quote any args containing shell meta-characters.
963 ac_configure_args=
964 ac_sep=
965 for ac_arg
966 do
967   case $ac_arg in
968   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
969   | --no-cr | --no-c) ;;
970   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
971   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
972   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
973     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
974     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
975     ac_sep=" " ;;
976   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
977      ac_sep=" " ;;
978   esac
979   # Get rid of the leading space.
980 done
981
982 # When interrupted or exit'd, cleanup temporary files, and complete
983 # config.log.  We remove comments because anyway the quotes in there
984 # would cause problems or look ugly.
985 trap 'exit_status=$?
986   # Save into config.log some information that might help in debugging.
987   echo >&5
988   echo "## ----------------- ##" >&5
989   echo "## Cache variables.  ##" >&5
990   echo "## ----------------- ##" >&5
991   echo >&5
992   # The following way of writing the cache mishandles newlines in values,
993 {
994   (set) 2>&1 |
995     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
996     *ac_space=\ *)
997       sed -n \
998         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
999           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1000       ;;
1001     *)
1002       sed -n \
1003         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1004       ;;
1005     esac;
1006 } >&5
1007   sed "/^$/d" confdefs.h >conftest.log
1008   if test -s conftest.log; then
1009     echo >&5
1010     echo "## ------------ ##" >&5
1011     echo "## confdefs.h.  ##" >&5
1012     echo "## ------------ ##" >&5
1013     echo >&5
1014     cat conftest.log >&5
1015   fi
1016   (echo; echo) >&5
1017   test "$ac_signal" != 0 &&
1018     echo "$as_me: caught signal $ac_signal" >&5
1019   echo "$as_me: exit $exit_status" >&5
1020   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1021     exit $exit_status
1022      ' 0
1023 for ac_signal in 1 2 13 15; do
1024   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1025 done
1026 ac_signal=0
1027
1028 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1029 rm -rf conftest* confdefs.h
1030 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1031 echo >confdefs.h
1032
1033 # Let the site file select an alternate cache file if it wants to.
1034 # Prefer explicitly selected file to automatically selected ones.
1035 if test -z "$CONFIG_SITE"; then
1036   if test "x$prefix" != xNONE; then
1037     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1038   else
1039     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1040   fi
1041 fi
1042 for ac_site_file in $CONFIG_SITE; do
1043   if test -r "$ac_site_file"; then
1044     { echo "$as_me:1044: loading site script $ac_site_file" >&5
1045 echo "$as_me: loading site script $ac_site_file" >&6;}
1046     cat "$ac_site_file" >&5
1047     . "$ac_site_file"
1048   fi
1049 done
1050
1051 if test -r "$cache_file"; then
1052   # Some versions of bash will fail to source /dev/null (special
1053   # files actually), so we avoid doing that.
1054   if test -f "$cache_file"; then
1055     { echo "$as_me:1055: loading cache $cache_file" >&5
1056 echo "$as_me: loading cache $cache_file" >&6;}
1057     case $cache_file in
1058       [\\/]* | ?:[\\/]* ) . $cache_file;;
1059       *)                      . ./$cache_file;;
1060     esac
1061   fi
1062 else
1063   { echo "$as_me:1063: creating cache $cache_file" >&5
1064 echo "$as_me: creating cache $cache_file" >&6;}
1065   >$cache_file
1066 fi
1067
1068 # Check that the precious variables saved in the cache have kept the same
1069 # value.
1070 ac_cache_corrupted=false
1071 for ac_var in `(set) 2>&1 |
1072                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1073   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1074   eval ac_new_set=\$ac_env_${ac_var}_set
1075   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1076   eval ac_new_val="\$ac_env_${ac_var}_value"
1077   case $ac_old_set,$ac_new_set in
1078     set,)
1079       { echo "$as_me:1079: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1080 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1081       ac_cache_corrupted=: ;;
1082     ,set)
1083       { echo "$as_me:1083: error: \`$ac_var' was not set in the previous run" >&5
1084 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1085       ac_cache_corrupted=: ;;
1086     ,);;
1087     *)
1088       if test "x$ac_old_val" != "x$ac_new_val"; then
1089         { echo "$as_me:1089: error: \`$ac_var' has changed since the previous run:" >&5
1090 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1091         { echo "$as_me:1091:   former value:  $ac_old_val" >&5
1092 echo "$as_me:   former value:  $ac_old_val" >&2;}
1093         { echo "$as_me:1093:   current value: $ac_new_val" >&5
1094 echo "$as_me:   current value: $ac_new_val" >&2;}
1095         ac_cache_corrupted=:
1096       fi;;
1097   esac
1098   # Pass precious variables to config.status.  It doesn't matter if
1099   # we pass some twice (in addition to the command line arguments).
1100   if test "$ac_new_set" = set; then
1101     case $ac_new_val in
1102     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1103       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1104       ac_configure_args="$ac_configure_args '$ac_arg'"
1105       ;;
1106     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1107        ;;
1108     esac
1109   fi
1110 done
1111 if $ac_cache_corrupted; then
1112   { echo "$as_me:1112: error: changes in the environment can compromise the build" >&5
1113 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1114   { { echo "$as_me:1114: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1115 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1116    { (exit 1); exit 1; }; }
1117 fi
1118
1119 ac_ext=c
1120 ac_cpp='$CPP $CPPFLAGS'
1121 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1122 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1123 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1124 ac_main_return=return
1125
1126 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1127   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1128                    ECHO_T='     ' ;;
1129   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1130   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1131 esac
1132 echo "#! $SHELL" >conftest.sh
1133 echo  "exit 0"   >>conftest.sh
1134 chmod +x conftest.sh
1135 if { (echo "$as_me:1135: PATH=\".;.\"; conftest.sh") >&5
1136   (PATH=".;."; conftest.sh) 2>&5
1137   ac_status=$?
1138   echo "$as_me:1138: \$? = $ac_status" >&5
1139   (exit $ac_status); }; then
1140   ac_path_separator=';'
1141 else
1142   ac_path_separator=:
1143 fi
1144 PATH_SEPARATOR="$ac_path_separator"
1145 rm -f conftest.sh
1146
1147 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1148
1149 top_builddir=`pwd`
1150
1151 echo "$as_me:1151: checking for egrep" >&5
1152 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1153 if test "${ac_cv_prog_egrep+set}" = set; then
1154   echo $ECHO_N "(cached) $ECHO_C" >&6
1155 else
1156   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1157                 then ac_cv_prog_egrep='grep -E'
1158                 else ac_cv_prog_egrep='egrep'
1159         fi
1160 fi
1161 echo "$as_me:1161: result: $ac_cv_prog_egrep" >&5
1162 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1163         EGREP=$ac_cv_prog_egrep
1164
1165         test -z "$EGREP" && { { echo "$as_me:1165: error: No egrep program found" >&5
1166 echo "$as_me: error: No egrep program found" >&2;}
1167    { (exit 1); exit 1; }; }
1168
1169 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1170 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1171 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1172 cf_cv_abi_version=${NCURSES_MAJOR}
1173 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1174 cf_cv_timestamp=`date`
1175 echo "$as_me:1175: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1176 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1177
1178 if test -f $srcdir/VERSION ; then
1179         echo "$as_me:1179: checking for package version" >&5
1180 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1181
1182         # if there are not enough fields, cut returns the last one...
1183         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1184         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1185         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1186
1187         # this is how CF_BUNDLED_INTL uses $VERSION:
1188         VERSION="$cf_field1"
1189
1190         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1191         test -z "$VERSION_MAJOR" && { { echo "$as_me:1191: error: missing major-version" >&5
1192 echo "$as_me: error: missing major-version" >&2;}
1193    { (exit 1); exit 1; }; }
1194
1195         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1196         test -z "$VERSION_MINOR" && { { echo "$as_me:1196: error: missing minor-version" >&5
1197 echo "$as_me: error: missing minor-version" >&2;}
1198    { (exit 1); exit 1; }; }
1199
1200         echo "$as_me:1200: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1201 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1202
1203         echo "$as_me:1203: checking for package patch date" >&5
1204 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1205         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1206         case .$VERSION_PATCH in
1207         (.)
1208                 { { echo "$as_me:1208: error: missing patch-date $VERSION_PATCH" >&5
1209 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1210    { (exit 1); exit 1; }; }
1211                 ;;
1212         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1213                 ;;
1214         (*)
1215                 { { echo "$as_me:1215: error: illegal patch-date $VERSION_PATCH" >&5
1216 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1217    { (exit 1); exit 1; }; }
1218                 ;;
1219         esac
1220         echo "$as_me:1220: result: $VERSION_PATCH" >&5
1221 echo "${ECHO_T}$VERSION_PATCH" >&6
1222 else
1223         { { echo "$as_me:1223: error: did not find $srcdir/VERSION" >&5
1224 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1225    { (exit 1); exit 1; }; }
1226 fi
1227
1228 # show the actual data that we have for versions:
1229 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1230
1231 echo "${as_me:-configure}:1231: testing ABI VERSION $VERSION ..." 1>&5
1232
1233 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1234
1235 echo "${as_me:-configure}:1235: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1236
1237 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1238
1239 echo "${as_me:-configure}:1239: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1240
1241 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1242
1243 echo "${as_me:-configure}:1243: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1244
1245         cf_PACKAGE=NCURSES
1246         PACKAGE=ncurses
1247
1248 cat >>confdefs.h <<EOF
1249 #define PACKAGE "$PACKAGE"
1250 EOF
1251
1252 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1253
1254         cat >>confdefs.h <<EOF
1255 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1256 EOF
1257
1258         cat >>confdefs.h <<EOF
1259 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1260 EOF
1261
1262 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1263
1264 # Check whether --with-rel-version or --without-rel-version was given.
1265 if test "${with_rel_version+set}" = set; then
1266   withval="$with_rel_version"
1267   { echo "$as_me:1267: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1268 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1269  cf_cv_rel_version=$withval
1270 fi;
1271
1272  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1273  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1274
1275 if test -n "$NCURSES_MAJOR" ; then
1276   case $NCURSES_MAJOR in
1277   ([0-9]*)
1278         ;;
1279   (*)
1280         { { echo "$as_me:1280: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1281 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1282    { (exit 1); exit 1; }; }
1283         ;;
1284   esac
1285 else
1286   { { echo "$as_me:1286: error: Release major-version value is empty" >&5
1287 echo "$as_me: error: Release major-version value is empty" >&2;}
1288    { (exit 1); exit 1; }; }
1289 fi
1290
1291 if test -n "$NCURSES_MINOR" ; then
1292   case $NCURSES_MINOR in
1293   ([0-9]*)
1294         ;;
1295   (*)
1296         { { echo "$as_me:1296: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1297 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1298    { (exit 1); exit 1; }; }
1299         ;;
1300   esac
1301 else
1302   { { echo "$as_me:1302: error: Release minor-version value is empty" >&5
1303 echo "$as_me: error: Release minor-version value is empty" >&2;}
1304    { (exit 1); exit 1; }; }
1305 fi
1306
1307 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1308
1309 # Check whether --with-abi-version or --without-abi-version was given.
1310 if test "${with_abi_version+set}" = set; then
1311   withval="$with_abi_version"
1312
1313         if test "x$cf_cv_abi_version" != "x$withval"
1314         then
1315                 { echo "$as_me:1315: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1316 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1317                 case $cf_cv_rel_version in
1318                 (5.*)
1319                         cf_cv_rel_version=$withval.0
1320                         ;;
1321                 (6.*)
1322                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1323                         ;;
1324                 esac
1325         fi
1326         cf_cv_abi_version=$withval
1327 fi;
1328
1329 if test -n "$cf_cv_abi_version" ; then
1330   case $cf_cv_abi_version in
1331   ([0-9]*)
1332         ;;
1333   (*)
1334         { { echo "$as_me:1334: error: ABI version is not a number: $cf_cv_abi_version" >&5
1335 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1336    { (exit 1); exit 1; }; }
1337         ;;
1338   esac
1339 else
1340   { { echo "$as_me:1340: error: ABI version value is empty" >&5
1341 echo "$as_me: error: ABI version value is empty" >&2;}
1342    { (exit 1); exit 1; }; }
1343 fi
1344
1345 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1346 then
1347         case $cf_cv_rel_version in
1348         (5.*)
1349                 cf_cv_rel_version=$with_abi_version.0
1350                 ;;
1351         esac
1352 fi
1353
1354 ac_aux_dir=
1355 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1356   if test -f $ac_dir/install-sh; then
1357     ac_aux_dir=$ac_dir
1358     ac_install_sh="$ac_aux_dir/install-sh -c"
1359     break
1360   elif test -f $ac_dir/install.sh; then
1361     ac_aux_dir=$ac_dir
1362     ac_install_sh="$ac_aux_dir/install.sh -c"
1363     break
1364   elif test -f $ac_dir/shtool; then
1365     ac_aux_dir=$ac_dir
1366     ac_install_sh="$ac_aux_dir/shtool install -c"
1367     break
1368   fi
1369 done
1370 if test -z "$ac_aux_dir"; then
1371   { { echo "$as_me:1371: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1372 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1373    { (exit 1); exit 1; }; }
1374 fi
1375 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1376 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1377 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1378
1379 # Make sure we can run config.sub.
1380 $ac_config_sub sun4 >/dev/null 2>&1 ||
1381   { { echo "$as_me:1381: error: cannot run $ac_config_sub" >&5
1382 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1383    { (exit 1); exit 1; }; }
1384
1385 echo "$as_me:1385: checking build system type" >&5
1386 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1387 if test "${ac_cv_build+set}" = set; then
1388   echo $ECHO_N "(cached) $ECHO_C" >&6
1389 else
1390   ac_cv_build_alias=$build_alias
1391 test -z "$ac_cv_build_alias" &&
1392   ac_cv_build_alias=`$ac_config_guess`
1393 test -z "$ac_cv_build_alias" &&
1394   { { echo "$as_me:1394: error: cannot guess build type; you must specify one" >&5
1395 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1396    { (exit 1); exit 1; }; }
1397 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1398   { { echo "$as_me:1398: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1399 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1400    { (exit 1); exit 1; }; }
1401
1402 fi
1403 echo "$as_me:1403: result: $ac_cv_build" >&5
1404 echo "${ECHO_T}$ac_cv_build" >&6
1405 build=$ac_cv_build
1406 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1407 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1408 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1409
1410 echo "$as_me:1410: checking host system type" >&5
1411 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1412 if test "${ac_cv_host+set}" = set; then
1413   echo $ECHO_N "(cached) $ECHO_C" >&6
1414 else
1415   ac_cv_host_alias=$host_alias
1416 test -z "$ac_cv_host_alias" &&
1417   ac_cv_host_alias=$ac_cv_build_alias
1418 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1419   { { echo "$as_me:1419: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1420 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1421    { (exit 1); exit 1; }; }
1422
1423 fi
1424 echo "$as_me:1424: result: $ac_cv_host" >&5
1425 echo "${ECHO_T}$ac_cv_host" >&6
1426 host=$ac_cv_host
1427 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1428 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1429 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1430
1431 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1432         echo "$as_me:1432: checking target system type" >&5
1433 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1434 if test "${ac_cv_target+set}" = set; then
1435   echo $ECHO_N "(cached) $ECHO_C" >&6
1436 else
1437   ac_cv_target_alias=$target_alias
1438 test "x$ac_cv_target_alias" = "x" &&
1439   ac_cv_target_alias=$ac_cv_host_alias
1440 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1441   { { echo "$as_me:1441: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1442 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1443    { (exit 1); exit 1; }; }
1444
1445 fi
1446 echo "$as_me:1446: result: $ac_cv_target" >&5
1447 echo "${ECHO_T}$ac_cv_target" >&6
1448 target=$ac_cv_target
1449 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1450 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1451 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1452
1453 # The aliases save the names the user supplied, while $host etc.
1454 # will get canonicalized.
1455 test -n "$target_alias" &&
1456   test "$program_prefix$program_suffix$program_transform_name" = \
1457     NONENONEs,x,x, &&
1458   program_prefix=${target_alias}-
1459         system_name="$host_os"
1460 else
1461         system_name="`(uname -s -r) 2>/dev/null`"
1462         if test -z "$system_name" ; then
1463                 system_name="`(hostname) 2>/dev/null`"
1464         fi
1465 fi
1466 test -n "$system_name" &&
1467 cat >>confdefs.h <<EOF
1468 #define SYSTEM_NAME "$system_name"
1469 EOF
1470
1471 if test "${cf_cv_system_name+set}" = set; then
1472   echo $ECHO_N "(cached) $ECHO_C" >&6
1473 else
1474   cf_cv_system_name="$system_name"
1475 fi
1476
1477 test -z "$system_name" && system_name="$cf_cv_system_name"
1478 test -n "$cf_cv_system_name" && echo "$as_me:1478: result: Configuring for $cf_cv_system_name" >&5
1479 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1480
1481 if test ".$system_name" != ".$cf_cv_system_name" ; then
1482         echo "$as_me:1482: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1483 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1484         { { echo "$as_me:1484: error: \"Please remove config.cache and try again.\"" >&5
1485 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1486    { (exit 1); exit 1; }; }
1487 fi
1488
1489 # Check whether --with-system-type or --without-system-type was given.
1490 if test "${with_system_type+set}" = set; then
1491   withval="$with_system_type"
1492   { echo "$as_me:1492: WARNING: overriding system type to $withval" >&5
1493 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1494         cf_cv_system_name=$withval
1495         host_os=$withval
1496
1497 fi;
1498
1499 ###     Save the given $CFLAGS to allow user-override.
1500 cf_user_CFLAGS="$CFLAGS"
1501
1502 ###     Default install-location
1503
1504 echo "$as_me:1504: checking for prefix" >&5
1505 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1506 if test "x$prefix" = "xNONE" ; then
1507         case "$cf_cv_system_name" in
1508                 # non-vendor systems don't have a conflict
1509         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1510                 prefix=/usr
1511                 ;;
1512         (*)     prefix=$ac_default_prefix
1513                 ;;
1514         esac
1515 fi
1516 echo "$as_me:1516: result: $prefix" >&5
1517 echo "${ECHO_T}$prefix" >&6
1518
1519 if test "x$prefix" = "xNONE" ; then
1520 echo "$as_me:1520: checking for default include-directory" >&5
1521 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1522 test -n "$verbose" && echo 1>&6
1523 for cf_symbol in \
1524         $includedir \
1525         $includedir/ncurses \
1526         $prefix/include \
1527         $prefix/include/ncurses \
1528         /usr/local/include \
1529         /usr/local/include/ncurses \
1530         /usr/include \
1531         /usr/include/ncurses
1532 do
1533         cf_dir=`eval echo $cf_symbol`
1534         if test -f $cf_dir/curses.h ; then
1535         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1536                 includedir="$cf_symbol"
1537                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1538                 break
1539         fi
1540         fi
1541         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1542 done
1543 echo "$as_me:1543: result: $includedir" >&5
1544 echo "${ECHO_T}$includedir" >&6
1545 fi
1546
1547 ### Defaults for ncurses ABI
1548
1549 case x$cf_cv_abi_version in
1550 (x[6789])
1551         cf_dft_ext_colors=yes
1552         cf_dft_ext_const=yes
1553         cf_dft_ext_mouse=yes
1554         cf_dft_ext_putwin=yes
1555         cf_dft_ext_spfuncs=yes
1556         cf_dft_filter_syms=yes
1557         cf_dft_chtype=uint32_t
1558         cf_dft_mmask_t=uint32_t
1559         cf_dft_interop=yes
1560         cf_dft_tparm_arg=intptr_t
1561         cf_dft_with_lp64=yes
1562         ;;
1563 (*)
1564         cf_dft_ext_colors=no
1565         cf_dft_ext_const=no
1566         cf_dft_ext_mouse=no
1567         cf_dft_ext_putwin=no
1568         cf_dft_ext_spfuncs=no
1569         cf_dft_filter_syms=no
1570         cf_dft_chtype=auto
1571         cf_dft_mmask_t=auto
1572         cf_dft_interop=no
1573         cf_dft_tparm_arg=long
1574         cf_dft_with_lp64=no
1575         ;;
1576 esac
1577
1578 ###     Checks for programs.
1579
1580 # Check whether --with-ada or --without-ada was given.
1581 if test "${with_ada+set}" = set; then
1582   withval="$with_ada"
1583   cf_with_ada=$withval
1584 else
1585   cf_with_ada=yes
1586 fi;
1587 if test "x$cf_with_ada" = xyes
1588 then
1589         cf_PROG_CC="gnatgcc gcc cc"
1590 else
1591         cf_PROG_CC="gcc cc"
1592 fi
1593
1594 ac_ext=c
1595 ac_cpp='$CPP $CPPFLAGS'
1596 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1597 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1598 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1599 ac_main_return=return
1600 if test -n "$ac_tool_prefix"; then
1601   for ac_prog in $cf_PROG_CC
1602   do
1603     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1604 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1605 echo "$as_me:1605: checking for $ac_word" >&5
1606 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1607 if test "${ac_cv_prog_CC+set}" = set; then
1608   echo $ECHO_N "(cached) $ECHO_C" >&6
1609 else
1610   if test -n "$CC"; then
1611   ac_cv_prog_CC="$CC" # Let the user override the test.
1612 else
1613   ac_save_IFS=$IFS; IFS=$ac_path_separator
1614 ac_dummy="$PATH"
1615 for ac_dir in $ac_dummy; do
1616   IFS=$ac_save_IFS
1617   test -z "$ac_dir" && ac_dir=.
1618   $as_executable_p "$ac_dir/$ac_word" || continue
1619 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1620 echo "$as_me:1620: found $ac_dir/$ac_word" >&5
1621 break
1622 done
1623
1624 fi
1625 fi
1626 CC=$ac_cv_prog_CC
1627 if test -n "$CC"; then
1628   echo "$as_me:1628: result: $CC" >&5
1629 echo "${ECHO_T}$CC" >&6
1630 else
1631   echo "$as_me:1631: result: no" >&5
1632 echo "${ECHO_T}no" >&6
1633 fi
1634
1635     test -n "$CC" && break
1636   done
1637 fi
1638 if test -z "$CC"; then
1639   ac_ct_CC=$CC
1640   for ac_prog in $cf_PROG_CC
1641 do
1642   # Extract the first word of "$ac_prog", so it can be a program name with args.
1643 set dummy $ac_prog; ac_word=$2
1644 echo "$as_me:1644: checking for $ac_word" >&5
1645 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1646 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1647   echo $ECHO_N "(cached) $ECHO_C" >&6
1648 else
1649   if test -n "$ac_ct_CC"; then
1650   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1651 else
1652   ac_save_IFS=$IFS; IFS=$ac_path_separator
1653 ac_dummy="$PATH"
1654 for ac_dir in $ac_dummy; do
1655   IFS=$ac_save_IFS
1656   test -z "$ac_dir" && ac_dir=.
1657   $as_executable_p "$ac_dir/$ac_word" || continue
1658 ac_cv_prog_ac_ct_CC="$ac_prog"
1659 echo "$as_me:1659: found $ac_dir/$ac_word" >&5
1660 break
1661 done
1662
1663 fi
1664 fi
1665 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1666 if test -n "$ac_ct_CC"; then
1667   echo "$as_me:1667: result: $ac_ct_CC" >&5
1668 echo "${ECHO_T}$ac_ct_CC" >&6
1669 else
1670   echo "$as_me:1670: result: no" >&5
1671 echo "${ECHO_T}no" >&6
1672 fi
1673
1674   test -n "$ac_ct_CC" && break
1675 done
1676
1677   CC=$ac_ct_CC
1678 fi
1679
1680 test -z "$CC" && { { echo "$as_me:1680: error: no acceptable cc found in \$PATH" >&5
1681 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1682    { (exit 1); exit 1; }; }
1683
1684 # Provide some information about the compiler.
1685 echo "$as_me:1685:" \
1686      "checking for C compiler version" >&5
1687 ac_compiler=`set X $ac_compile; echo $2`
1688 { (eval echo "$as_me:1688: \"$ac_compiler --version </dev/null >&5\"") >&5
1689   (eval $ac_compiler --version </dev/null >&5) 2>&5
1690   ac_status=$?
1691   echo "$as_me:1691: \$? = $ac_status" >&5
1692   (exit $ac_status); }
1693 { (eval echo "$as_me:1693: \"$ac_compiler -v </dev/null >&5\"") >&5
1694   (eval $ac_compiler -v </dev/null >&5) 2>&5
1695   ac_status=$?
1696   echo "$as_me:1696: \$? = $ac_status" >&5
1697   (exit $ac_status); }
1698 { (eval echo "$as_me:1698: \"$ac_compiler -V </dev/null >&5\"") >&5
1699   (eval $ac_compiler -V </dev/null >&5) 2>&5
1700   ac_status=$?
1701   echo "$as_me:1701: \$? = $ac_status" >&5
1702   (exit $ac_status); }
1703
1704 cat >conftest.$ac_ext <<_ACEOF
1705 #line 1705 "configure"
1706 #include "confdefs.h"
1707
1708 int
1709 main (void)
1710 {
1711
1712   ;
1713   return 0;
1714 }
1715 _ACEOF
1716 ac_clean_files_save=$ac_clean_files
1717 ac_clean_files="$ac_clean_files a.out a.exe"
1718 # Try to create an executable without -o first, disregard a.out.
1719 # It will help us diagnose broken compilers, and finding out an intuition
1720 # of exeext.
1721 echo "$as_me:1721: checking for C compiler default output" >&5
1722 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1723 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1724 if { (eval echo "$as_me:1724: \"$ac_link_default\"") >&5
1725   (eval $ac_link_default) 2>&5
1726   ac_status=$?
1727   echo "$as_me:1727: \$? = $ac_status" >&5
1728   (exit $ac_status); }; then
1729   # Find the output, starting from the most likely.  This scheme is
1730 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1731 # resort.
1732 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1733                 ls a.out conftest 2>/dev/null;
1734                 ls a.* conftest.* 2>/dev/null`; do
1735   case $ac_file in
1736     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1737     a.out ) # We found the default executable, but exeext='' is most
1738             # certainly right.
1739             break;;
1740     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1741           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1742           export ac_cv_exeext
1743           break;;
1744     * ) break;;
1745   esac
1746 done
1747 else
1748   echo "$as_me: failed program was:" >&5
1749 cat conftest.$ac_ext >&5
1750 { { echo "$as_me:1750: error: C compiler cannot create executables" >&5
1751 echo "$as_me: error: C compiler cannot create executables" >&2;}
1752    { (exit 77); exit 77; }; }
1753 fi
1754
1755 ac_exeext=$ac_cv_exeext
1756 echo "$as_me:1756: result: $ac_file" >&5
1757 echo "${ECHO_T}$ac_file" >&6
1758
1759 # Check the compiler produces executables we can run.  If not, either
1760 # the compiler is broken, or we cross compile.
1761 echo "$as_me:1761: checking whether the C compiler works" >&5
1762 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1763 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1764 # If not cross compiling, check that we can run a simple program.
1765 if test "$cross_compiling" != yes; then
1766   if { ac_try='./$ac_file'
1767   { (eval echo "$as_me:1767: \"$ac_try\"") >&5
1768   (eval $ac_try) 2>&5
1769   ac_status=$?
1770   echo "$as_me:1770: \$? = $ac_status" >&5
1771   (exit $ac_status); }; }; then
1772     cross_compiling=no
1773   else
1774     if test "$cross_compiling" = maybe; then
1775         cross_compiling=yes
1776     else
1777         { { echo "$as_me:1777: error: cannot run C compiled programs.
1778 If you meant to cross compile, use \`--host'." >&5
1779 echo "$as_me: error: cannot run C compiled programs.
1780 If you meant to cross compile, use \`--host'." >&2;}
1781    { (exit 1); exit 1; }; }
1782     fi
1783   fi
1784 fi
1785 echo "$as_me:1785: result: yes" >&5
1786 echo "${ECHO_T}yes" >&6
1787
1788 rm -f a.out a.exe conftest$ac_cv_exeext
1789 ac_clean_files=$ac_clean_files_save
1790 # Check the compiler produces executables we can run.  If not, either
1791 # the compiler is broken, or we cross compile.
1792 echo "$as_me:1792: checking whether we are cross compiling" >&5
1793 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1794 echo "$as_me:1794: result: $cross_compiling" >&5
1795 echo "${ECHO_T}$cross_compiling" >&6
1796
1797 echo "$as_me:1797: checking for executable suffix" >&5
1798 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1799 if { (eval echo "$as_me:1799: \"$ac_link\"") >&5
1800   (eval $ac_link) 2>&5
1801   ac_status=$?
1802   echo "$as_me:1802: \$? = $ac_status" >&5
1803   (exit $ac_status); }; then
1804   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1805 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1806 # work properly (i.e., refer to `conftest.exe'), while it won't with
1807 # `rm'.
1808 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1809   case $ac_file in
1810     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1811     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1812           export ac_cv_exeext
1813           break;;
1814     * ) break;;
1815   esac
1816 done
1817 else
1818   { { echo "$as_me:1818: error: cannot compute EXEEXT: cannot compile and link" >&5
1819 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1820    { (exit 1); exit 1; }; }
1821 fi
1822
1823 rm -f conftest$ac_cv_exeext
1824 echo "$as_me:1824: result: $ac_cv_exeext" >&5
1825 echo "${ECHO_T}$ac_cv_exeext" >&6
1826
1827 rm -f conftest.$ac_ext
1828 EXEEXT=$ac_cv_exeext
1829 ac_exeext=$EXEEXT
1830 echo "$as_me:1830: checking for object suffix" >&5
1831 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1832 if test "${ac_cv_objext+set}" = set; then
1833   echo $ECHO_N "(cached) $ECHO_C" >&6
1834 else
1835   cat >conftest.$ac_ext <<_ACEOF
1836 #line 1836 "configure"
1837 #include "confdefs.h"
1838
1839 int
1840 main (void)
1841 {
1842
1843   ;
1844   return 0;
1845 }
1846 _ACEOF
1847 rm -f conftest.o conftest.obj
1848 if { (eval echo "$as_me:1848: \"$ac_compile\"") >&5
1849   (eval $ac_compile) 2>&5
1850   ac_status=$?
1851   echo "$as_me:1851: \$? = $ac_status" >&5
1852   (exit $ac_status); }; then
1853   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1854   case $ac_file in
1855     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1856     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1857        break;;
1858   esac
1859 done
1860 else
1861   echo "$as_me: failed program was:" >&5
1862 cat conftest.$ac_ext >&5
1863 { { echo "$as_me:1863: error: cannot compute OBJEXT: cannot compile" >&5
1864 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1865    { (exit 1); exit 1; }; }
1866 fi
1867
1868 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1869 fi
1870 echo "$as_me:1870: result: $ac_cv_objext" >&5
1871 echo "${ECHO_T}$ac_cv_objext" >&6
1872 OBJEXT=$ac_cv_objext
1873 ac_objext=$OBJEXT
1874 echo "$as_me:1874: checking whether we are using the GNU C compiler" >&5
1875 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1876 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1877   echo $ECHO_N "(cached) $ECHO_C" >&6
1878 else
1879   cat >conftest.$ac_ext <<_ACEOF
1880 #line 1880 "configure"
1881 #include "confdefs.h"
1882
1883 int
1884 main (void)
1885 {
1886 #ifndef __GNUC__
1887        choke me
1888 #endif
1889
1890   ;
1891   return 0;
1892 }
1893 _ACEOF
1894 rm -f conftest.$ac_objext
1895 if { (eval echo "$as_me:1895: \"$ac_compile\"") >&5
1896   (eval $ac_compile) 2>&5
1897   ac_status=$?
1898   echo "$as_me:1898: \$? = $ac_status" >&5
1899   (exit $ac_status); } &&
1900          { ac_try='test -s conftest.$ac_objext'
1901   { (eval echo "$as_me:1901: \"$ac_try\"") >&5
1902   (eval $ac_try) 2>&5
1903   ac_status=$?
1904   echo "$as_me:1904: \$? = $ac_status" >&5
1905   (exit $ac_status); }; }; then
1906   ac_compiler_gnu=yes
1907 else
1908   echo "$as_me: failed program was:" >&5
1909 cat conftest.$ac_ext >&5
1910 ac_compiler_gnu=no
1911 fi
1912 rm -f conftest.$ac_objext conftest.$ac_ext
1913 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1914
1915 fi
1916 echo "$as_me:1916: result: $ac_cv_c_compiler_gnu" >&5
1917 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1918 GCC=`test $ac_compiler_gnu = yes && echo yes`
1919 ac_test_CFLAGS=${CFLAGS+set}
1920 ac_save_CFLAGS=$CFLAGS
1921 CFLAGS="-g"
1922 echo "$as_me:1922: checking whether $CC accepts -g" >&5
1923 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1924 if test "${ac_cv_prog_cc_g+set}" = set; then
1925   echo $ECHO_N "(cached) $ECHO_C" >&6
1926 else
1927   cat >conftest.$ac_ext <<_ACEOF
1928 #line 1928 "configure"
1929 #include "confdefs.h"
1930
1931 int
1932 main (void)
1933 {
1934
1935   ;
1936   return 0;
1937 }
1938 _ACEOF
1939 rm -f conftest.$ac_objext
1940 if { (eval echo "$as_me:1940: \"$ac_compile\"") >&5
1941   (eval $ac_compile) 2>&5
1942   ac_status=$?
1943   echo "$as_me:1943: \$? = $ac_status" >&5
1944   (exit $ac_status); } &&
1945          { ac_try='test -s conftest.$ac_objext'
1946   { (eval echo "$as_me:1946: \"$ac_try\"") >&5
1947   (eval $ac_try) 2>&5
1948   ac_status=$?
1949   echo "$as_me:1949: \$? = $ac_status" >&5
1950   (exit $ac_status); }; }; then
1951   ac_cv_prog_cc_g=yes
1952 else
1953   echo "$as_me: failed program was:" >&5
1954 cat conftest.$ac_ext >&5
1955 ac_cv_prog_cc_g=no
1956 fi
1957 rm -f conftest.$ac_objext conftest.$ac_ext
1958 fi
1959 echo "$as_me:1959: result: $ac_cv_prog_cc_g" >&5
1960 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1961 if test "$ac_test_CFLAGS" = set; then
1962   CFLAGS=$ac_save_CFLAGS
1963 elif test $ac_cv_prog_cc_g = yes; then
1964   if test "$GCC" = yes; then
1965     CFLAGS="-g -O2"
1966   else
1967     CFLAGS="-g"
1968   fi
1969 else
1970   if test "$GCC" = yes; then
1971     CFLAGS="-O2"
1972   else
1973     CFLAGS=
1974   fi
1975 fi
1976 # Some people use a C++ compiler to compile C.  Since we use `exit',
1977 # in C++ we need to declare it.  In case someone uses the same compiler
1978 # for both compiling C and C++ we need to have the C++ compiler decide
1979 # the declaration of exit, since it's the most demanding environment.
1980 cat >conftest.$ac_ext <<_ACEOF
1981 #ifndef __cplusplus
1982   choke me
1983 #endif
1984 _ACEOF
1985 rm -f conftest.$ac_objext
1986 if { (eval echo "$as_me:1986: \"$ac_compile\"") >&5
1987   (eval $ac_compile) 2>&5
1988   ac_status=$?
1989   echo "$as_me:1989: \$? = $ac_status" >&5
1990   (exit $ac_status); } &&
1991          { ac_try='test -s conftest.$ac_objext'
1992   { (eval echo "$as_me:1992: \"$ac_try\"") >&5
1993   (eval $ac_try) 2>&5
1994   ac_status=$?
1995   echo "$as_me:1995: \$? = $ac_status" >&5
1996   (exit $ac_status); }; }; then
1997   for ac_declaration in \
1998    ''\
1999    '#include <stdlib.h>' \
2000    'extern "C" void std::exit (int) throw (); using std::exit;' \
2001    'extern "C" void std::exit (int); using std::exit;' \
2002    'extern "C" void exit (int) throw ();' \
2003    'extern "C" void exit (int);' \
2004    'void exit (int);'
2005 do
2006   cat >conftest.$ac_ext <<_ACEOF
2007 #line 2007 "configure"
2008 #include "confdefs.h"
2009 #include <stdlib.h>
2010 $ac_declaration
2011 int
2012 main (void)
2013 {
2014 exit (42);
2015   ;
2016   return 0;
2017 }
2018 _ACEOF
2019 rm -f conftest.$ac_objext
2020 if { (eval echo "$as_me:2020: \"$ac_compile\"") >&5
2021   (eval $ac_compile) 2>&5
2022   ac_status=$?
2023   echo "$as_me:2023: \$? = $ac_status" >&5
2024   (exit $ac_status); } &&
2025          { ac_try='test -s conftest.$ac_objext'
2026   { (eval echo "$as_me:2026: \"$ac_try\"") >&5
2027   (eval $ac_try) 2>&5
2028   ac_status=$?
2029   echo "$as_me:2029: \$? = $ac_status" >&5
2030   (exit $ac_status); }; }; then
2031   :
2032 else
2033   echo "$as_me: failed program was:" >&5
2034 cat conftest.$ac_ext >&5
2035 continue
2036 fi
2037 rm -f conftest.$ac_objext conftest.$ac_ext
2038   cat >conftest.$ac_ext <<_ACEOF
2039 #line 2039 "configure"
2040 #include "confdefs.h"
2041 $ac_declaration
2042 int
2043 main (void)
2044 {
2045 exit (42);
2046   ;
2047   return 0;
2048 }
2049 _ACEOF
2050 rm -f conftest.$ac_objext
2051 if { (eval echo "$as_me:2051: \"$ac_compile\"") >&5
2052   (eval $ac_compile) 2>&5
2053   ac_status=$?
2054   echo "$as_me:2054: \$? = $ac_status" >&5
2055   (exit $ac_status); } &&
2056          { ac_try='test -s conftest.$ac_objext'
2057   { (eval echo "$as_me:2057: \"$ac_try\"") >&5
2058   (eval $ac_try) 2>&5
2059   ac_status=$?
2060   echo "$as_me:2060: \$? = $ac_status" >&5
2061   (exit $ac_status); }; }; then
2062   break
2063 else
2064   echo "$as_me: failed program was:" >&5
2065 cat conftest.$ac_ext >&5
2066 fi
2067 rm -f conftest.$ac_objext conftest.$ac_ext
2068 done
2069 rm -rf conftest*
2070 if test -n "$ac_declaration"; then
2071   echo '#ifdef __cplusplus' >>confdefs.h
2072   echo $ac_declaration      >>confdefs.h
2073   echo '#endif'             >>confdefs.h
2074 fi
2075
2076 else
2077   echo "$as_me: failed program was:" >&5
2078 cat conftest.$ac_ext >&5
2079 fi
2080 rm -f conftest.$ac_objext conftest.$ac_ext
2081 ac_ext=c
2082 ac_cpp='$CPP $CPPFLAGS'
2083 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2084 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2085 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2086 ac_main_return=return
2087
2088 GCC_VERSION=none
2089 if test "$GCC" = yes ; then
2090         echo "$as_me:2090: checking version of $CC" >&5
2091 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2092         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.].*//'`"
2093         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2094         echo "$as_me:2094: result: $GCC_VERSION" >&5
2095 echo "${ECHO_T}$GCC_VERSION" >&6
2096 fi
2097
2098 echo "$as_me:2098: checking for $CC option to accept ANSI C" >&5
2099 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2100 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2101   echo $ECHO_N "(cached) $ECHO_C" >&6
2102 else
2103   ac_cv_prog_cc_stdc=no
2104 ac_save_CC=$CC
2105 cat >conftest.$ac_ext <<_ACEOF
2106 #line 2106 "configure"
2107 #include "confdefs.h"
2108 #include <stdarg.h>
2109 #include <stdio.h>
2110 #include <sys/types.h>
2111 #include <sys/stat.h>
2112 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2113 struct buf { int x; };
2114 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2115 static char *e (p, i)
2116      char **p;
2117      int i;
2118 {
2119   return p[i];
2120 }
2121 static char *f (char * (*g) (char **, int), char **p, ...)
2122 {
2123   char *s;
2124   va_list v;
2125   va_start (v,p);
2126   s = g (p, va_arg (v,int));
2127   va_end (v);
2128   return s;
2129 }
2130 int test (int i, double x);
2131 struct s1 {int (*f) (int a);};
2132 struct s2 {int (*f) (double a);};
2133 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2134 int argc;
2135 char **argv;
2136 int
2137 main (void)
2138 {
2139 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2140   ;
2141   return 0;
2142 }
2143 _ACEOF
2144 # Don't try gcc -ansi; that turns off useful extensions and
2145 # breaks some systems' header files.
2146 # AIX                   -qlanglvl=ansi
2147 # Ultrix and OSF/1      -std1
2148 # HP-UX 10.20 and later -Ae
2149 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2150 # SVR4                  -Xc -D__EXTENSIONS__
2151 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2152 do
2153   CC="$ac_save_CC $ac_arg"
2154   rm -f conftest.$ac_objext
2155 if { (eval echo "$as_me:2155: \"$ac_compile\"") >&5
2156   (eval $ac_compile) 2>&5
2157   ac_status=$?
2158   echo "$as_me:2158: \$? = $ac_status" >&5
2159   (exit $ac_status); } &&
2160          { ac_try='test -s conftest.$ac_objext'
2161   { (eval echo "$as_me:2161: \"$ac_try\"") >&5
2162   (eval $ac_try) 2>&5
2163   ac_status=$?
2164   echo "$as_me:2164: \$? = $ac_status" >&5
2165   (exit $ac_status); }; }; then
2166   ac_cv_prog_cc_stdc=$ac_arg
2167 break
2168 else
2169   echo "$as_me: failed program was:" >&5
2170 cat conftest.$ac_ext >&5
2171 fi
2172 rm -f conftest.$ac_objext
2173 done
2174 rm -f conftest.$ac_ext conftest.$ac_objext
2175 CC=$ac_save_CC
2176
2177 fi
2178
2179 case "x$ac_cv_prog_cc_stdc" in
2180   x|xno)
2181     echo "$as_me:2181: result: none needed" >&5
2182 echo "${ECHO_T}none needed" >&6 ;;
2183   *)
2184     echo "$as_me:2184: result: $ac_cv_prog_cc_stdc" >&5
2185 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2186     CC="$CC $ac_cv_prog_cc_stdc" ;;
2187 esac
2188
2189 # This should have been defined by AC_PROG_CC
2190 : ${CC:=cc}
2191
2192 echo "$as_me:2192: checking \$CC variable" >&5
2193 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2194 case "$CC" in
2195 (*[\ \  ]-*)
2196         echo "$as_me:2196: result: broken" >&5
2197 echo "${ECHO_T}broken" >&6
2198         { echo "$as_me:2198: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2199 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2200         # humor him...
2201         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2202         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2203         CC="$cf_prog"
2204         for cf_arg in $cf_flags
2205         do
2206                 case "x$cf_arg" in
2207                 (x-[IUDfgOW]*)
2208
2209 cf_fix_cppflags=no
2210 cf_new_cflags=
2211 cf_new_cppflags=
2212 cf_new_extra_cppflags=
2213
2214 for cf_add_cflags in $cf_arg
2215 do
2216 case $cf_fix_cppflags in
2217 (no)
2218         case $cf_add_cflags in
2219         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2220                 case $cf_add_cflags in
2221                 (-D*)
2222                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2223
2224                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2225                                 && test -z "${cf_tst_cflags}" \
2226                                 && cf_fix_cppflags=yes
2227
2228                         if test $cf_fix_cppflags = yes ; then
2229
2230         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2231         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2232
2233                                 continue
2234                         elif test "${cf_tst_cflags}" = "\"'" ; then
2235
2236         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2237         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2238
2239                                 continue
2240                         fi
2241                         ;;
2242                 esac
2243                 case "$CPPFLAGS" in
2244                 (*$cf_add_cflags)
2245                         ;;
2246                 (*)
2247                         case $cf_add_cflags in
2248                         (-D*)
2249                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2250
2251 CPPFLAGS=`echo "$CPPFLAGS" | \
2252         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2253                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2254
2255                                 ;;
2256                         esac
2257
2258         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2259         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2260
2261                         ;;
2262                 esac
2263                 ;;
2264         (*)
2265
2266         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2267         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2268
2269                 ;;
2270         esac
2271         ;;
2272 (yes)
2273
2274         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2275         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2276
2277         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2278
2279         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2280                 && test -z "${cf_tst_cflags}" \
2281                 && cf_fix_cppflags=no
2282         ;;
2283 esac
2284 done
2285
2286 if test -n "$cf_new_cflags" ; then
2287
2288         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2289         CFLAGS="${CFLAGS}$cf_new_cflags"
2290
2291 fi
2292
2293 if test -n "$cf_new_cppflags" ; then
2294
2295         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2296         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2297
2298 fi
2299
2300 if test -n "$cf_new_extra_cppflags" ; then
2301
2302         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2303         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2304
2305 fi
2306
2307                         ;;
2308                 (*)
2309                         CC="$CC $cf_arg"
2310                         ;;
2311                 esac
2312         done
2313         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2314
2315 echo "${as_me:-configure}:2315: testing resulting CC: '$CC' ..." 1>&5
2316
2317         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2318
2319 echo "${as_me:-configure}:2319: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2320
2321         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2322
2323 echo "${as_me:-configure}:2323: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2324
2325         ;;
2326 (*)
2327         echo "$as_me:2327: result: ok" >&5
2328 echo "${ECHO_T}ok" >&6
2329         ;;
2330 esac
2331
2332 ac_ext=c
2333 ac_cpp='$CPP $CPPFLAGS'
2334 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2335 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2336 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2337 ac_main_return=return
2338 echo "$as_me:2338: checking how to run the C preprocessor" >&5
2339 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2340 # On Suns, sometimes $CPP names a directory.
2341 if test -n "$CPP" && test -d "$CPP"; then
2342   CPP=
2343 fi
2344 if test -z "$CPP"; then
2345   if test "${ac_cv_prog_CPP+set}" = set; then
2346   echo $ECHO_N "(cached) $ECHO_C" >&6
2347 else
2348       # Double quotes because CPP needs to be expanded
2349     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2350     do
2351       ac_preproc_ok=false
2352 for ac_c_preproc_warn_flag in '' yes
2353 do
2354   # Use a header file that comes with gcc, so configuring glibc
2355   # with a fresh cross-compiler works.
2356   # On the NeXT, cc -E runs the code through the compiler's parser,
2357   # not just through cpp. "Syntax error" is here to catch this case.
2358   cat >conftest.$ac_ext <<_ACEOF
2359 #line 2359 "configure"
2360 #include "confdefs.h"
2361 #include <assert.h>
2362                      Syntax error
2363 _ACEOF
2364 if { (eval echo "$as_me:2364: \"$ac_cpp conftest.$ac_ext\"") >&5
2365   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2366   ac_status=$?
2367   egrep -v '^ *\+' conftest.er1 >conftest.err
2368   rm -f conftest.er1
2369   cat conftest.err >&5
2370   echo "$as_me:2370: \$? = $ac_status" >&5
2371   (exit $ac_status); } >/dev/null; then
2372   if test -s conftest.err; then
2373     ac_cpp_err=$ac_c_preproc_warn_flag
2374   else
2375     ac_cpp_err=
2376   fi
2377 else
2378   ac_cpp_err=yes
2379 fi
2380 if test -z "$ac_cpp_err"; then
2381   :
2382 else
2383   echo "$as_me: failed program was:" >&5
2384   cat conftest.$ac_ext >&5
2385   # Broken: fails on valid input.
2386 continue
2387 fi
2388 rm -f conftest.err conftest.$ac_ext
2389
2390   # OK, works on sane cases.  Now check whether non-existent headers
2391   # can be detected and how.
2392   cat >conftest.$ac_ext <<_ACEOF
2393 #line 2393 "configure"
2394 #include "confdefs.h"
2395 #include <ac_nonexistent.h>
2396 _ACEOF
2397 if { (eval echo "$as_me:2397: \"$ac_cpp conftest.$ac_ext\"") >&5
2398   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2399   ac_status=$?
2400   egrep -v '^ *\+' conftest.er1 >conftest.err
2401   rm -f conftest.er1
2402   cat conftest.err >&5
2403   echo "$as_me:2403: \$? = $ac_status" >&5
2404   (exit $ac_status); } >/dev/null; then
2405   if test -s conftest.err; then
2406     ac_cpp_err=$ac_c_preproc_warn_flag
2407   else
2408     ac_cpp_err=
2409   fi
2410 else
2411   ac_cpp_err=yes
2412 fi
2413 if test -z "$ac_cpp_err"; then
2414   # Broken: success on invalid input.
2415 continue
2416 else
2417   echo "$as_me: failed program was:" >&5
2418   cat conftest.$ac_ext >&5
2419   # Passes both tests.
2420 ac_preproc_ok=:
2421 break
2422 fi
2423 rm -f conftest.err conftest.$ac_ext
2424
2425 done
2426 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2427 rm -f conftest.err conftest.$ac_ext
2428 if $ac_preproc_ok; then
2429   break
2430 fi
2431
2432     done
2433     ac_cv_prog_CPP=$CPP
2434
2435 fi
2436   CPP=$ac_cv_prog_CPP
2437 else
2438   ac_cv_prog_CPP=$CPP
2439 fi
2440 echo "$as_me:2440: result: $CPP" >&5
2441 echo "${ECHO_T}$CPP" >&6
2442 ac_preproc_ok=false
2443 for ac_c_preproc_warn_flag in '' yes
2444 do
2445   # Use a header file that comes with gcc, so configuring glibc
2446   # with a fresh cross-compiler works.
2447   # On the NeXT, cc -E runs the code through the compiler's parser,
2448   # not just through cpp. "Syntax error" is here to catch this case.
2449   cat >conftest.$ac_ext <<_ACEOF
2450 #line 2450 "configure"
2451 #include "confdefs.h"
2452 #include <assert.h>
2453                      Syntax error
2454 _ACEOF
2455 if { (eval echo "$as_me:2455: \"$ac_cpp conftest.$ac_ext\"") >&5
2456   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2457   ac_status=$?
2458   egrep -v '^ *\+' conftest.er1 >conftest.err
2459   rm -f conftest.er1
2460   cat conftest.err >&5
2461   echo "$as_me:2461: \$? = $ac_status" >&5
2462   (exit $ac_status); } >/dev/null; then
2463   if test -s conftest.err; then
2464     ac_cpp_err=$ac_c_preproc_warn_flag
2465   else
2466     ac_cpp_err=
2467   fi
2468 else
2469   ac_cpp_err=yes
2470 fi
2471 if test -z "$ac_cpp_err"; then
2472   :
2473 else
2474   echo "$as_me: failed program was:" >&5
2475   cat conftest.$ac_ext >&5
2476   # Broken: fails on valid input.
2477 continue
2478 fi
2479 rm -f conftest.err conftest.$ac_ext
2480
2481   # OK, works on sane cases.  Now check whether non-existent headers
2482   # can be detected and how.
2483   cat >conftest.$ac_ext <<_ACEOF
2484 #line 2484 "configure"
2485 #include "confdefs.h"
2486 #include <ac_nonexistent.h>
2487 _ACEOF
2488 if { (eval echo "$as_me:2488: \"$ac_cpp conftest.$ac_ext\"") >&5
2489   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2490   ac_status=$?
2491   egrep -v '^ *\+' conftest.er1 >conftest.err
2492   rm -f conftest.er1
2493   cat conftest.err >&5
2494   echo "$as_me:2494: \$? = $ac_status" >&5
2495   (exit $ac_status); } >/dev/null; then
2496   if test -s conftest.err; then
2497     ac_cpp_err=$ac_c_preproc_warn_flag
2498   else
2499     ac_cpp_err=
2500   fi
2501 else
2502   ac_cpp_err=yes
2503 fi
2504 if test -z "$ac_cpp_err"; then
2505   # Broken: success on invalid input.
2506 continue
2507 else
2508   echo "$as_me: failed program was:" >&5
2509   cat conftest.$ac_ext >&5
2510   # Passes both tests.
2511 ac_preproc_ok=:
2512 break
2513 fi
2514 rm -f conftest.err conftest.$ac_ext
2515
2516 done
2517 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2518 rm -f conftest.err conftest.$ac_ext
2519 if $ac_preproc_ok; then
2520   :
2521 else
2522   { { echo "$as_me:2522: error: C preprocessor \"$CPP\" fails sanity check" >&5
2523 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2524    { (exit 1); exit 1; }; }
2525 fi
2526
2527 ac_ext=c
2528 ac_cpp='$CPP $CPPFLAGS'
2529 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2530 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2531 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2532 ac_main_return=return
2533
2534 if test $ac_cv_c_compiler_gnu = yes; then
2535     echo "$as_me:2535: checking whether $CC needs -traditional" >&5
2536 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2537 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2538   echo $ECHO_N "(cached) $ECHO_C" >&6
2539 else
2540     ac_pattern="Autoconf.*'x'"
2541   cat >conftest.$ac_ext <<_ACEOF
2542 #line 2542 "configure"
2543 #include "confdefs.h"
2544 #include <sgtty.h>
2545 int Autoconf = TIOCGETP;
2546 _ACEOF
2547 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2548   egrep "$ac_pattern" >/dev/null 2>&1; then
2549   ac_cv_prog_gcc_traditional=yes
2550 else
2551   ac_cv_prog_gcc_traditional=no
2552 fi
2553 rm -rf conftest*
2554
2555   if test $ac_cv_prog_gcc_traditional = no; then
2556     cat >conftest.$ac_ext <<_ACEOF
2557 #line 2557 "configure"
2558 #include "confdefs.h"
2559 #include <termio.h>
2560 int Autoconf = TCGETA;
2561 _ACEOF
2562 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2563   egrep "$ac_pattern" >/dev/null 2>&1; then
2564   ac_cv_prog_gcc_traditional=yes
2565 fi
2566 rm -rf conftest*
2567
2568   fi
2569 fi
2570 echo "$as_me:2570: result: $ac_cv_prog_gcc_traditional" >&5
2571 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2572   if test $ac_cv_prog_gcc_traditional = yes; then
2573     CC="$CC -traditional"
2574   fi
2575 fi
2576
2577 echo "$as_me:2577: checking whether $CC understands -c and -o together" >&5
2578 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2579 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2580   echo $ECHO_N "(cached) $ECHO_C" >&6
2581 else
2582
2583 cat > conftest.$ac_ext <<CF_EOF
2584 int main(void)
2585 {
2586         ${cf_cv_main_return:-return}(0);
2587 }
2588 CF_EOF
2589 # We do the test twice because some compilers refuse to overwrite an
2590 # existing .o file with -o, though they will create one.
2591 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2592 if { (eval echo "$as_me:2592: \"$ac_try\"") >&5
2593   (eval $ac_try) 2>&5
2594   ac_status=$?
2595   echo "$as_me:2595: \$? = $ac_status" >&5
2596   (exit $ac_status); } &&
2597   test -f conftest2.$ac_objext && { (eval echo "$as_me:2597: \"$ac_try\"") >&5
2598   (eval $ac_try) 2>&5
2599   ac_status=$?
2600   echo "$as_me:2600: \$? = $ac_status" >&5
2601   (exit $ac_status); };
2602 then
2603   eval cf_cv_prog_CC_c_o=yes
2604 else
2605   eval cf_cv_prog_CC_c_o=no
2606 fi
2607 rm -rf conftest*
2608
2609 fi
2610 if test $cf_cv_prog_CC_c_o = yes; then
2611   echo "$as_me:2611: result: yes" >&5
2612 echo "${ECHO_T}yes" >&6
2613 else
2614   echo "$as_me:2614: result: no" >&5
2615 echo "${ECHO_T}no" >&6
2616 fi
2617
2618 if test "$cross_compiling" = yes ; then
2619         LDCONFIG=:
2620 else
2621         case "$cf_cv_system_name" in
2622         (dragonfly*|mirbsd*|freebsd*)
2623                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2624                 ;;
2625         (*) LDPATH=$PATH:/sbin:/usr/sbin
2626                 # Extract the first word of "ldconfig", so it can be a program name with args.
2627 set dummy ldconfig; ac_word=$2
2628 echo "$as_me:2628: checking for $ac_word" >&5
2629 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2630 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2631   echo $ECHO_N "(cached) $ECHO_C" >&6
2632 else
2633   case $LDCONFIG in
2634   [\\/]* | ?:[\\/]*)
2635   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2636   ;;
2637   *)
2638   ac_save_IFS=$IFS; IFS=$ac_path_separator
2639 ac_dummy="$LDPATH"
2640 for ac_dir in $ac_dummy; do
2641   IFS=$ac_save_IFS
2642   test -z "$ac_dir" && ac_dir=.
2643   if $as_executable_p "$ac_dir/$ac_word"; then
2644    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2645    echo "$as_me:2645: found $ac_dir/$ac_word" >&5
2646    break
2647 fi
2648 done
2649
2650   ;;
2651 esac
2652 fi
2653 LDCONFIG=$ac_cv_path_LDCONFIG
2654
2655 if test -n "$LDCONFIG"; then
2656   echo "$as_me:2656: result: $LDCONFIG" >&5
2657 echo "${ECHO_T}$LDCONFIG" >&6
2658 else
2659   echo "$as_me:2659: result: no" >&5
2660 echo "${ECHO_T}no" >&6
2661 fi
2662
2663                 ;;
2664         esac
2665 fi
2666
2667 echo "$as_me:2667: checking if you want to ensure bool is consistent with C++" >&5
2668 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2669
2670 # Check whether --with-cxx or --without-cxx was given.
2671 if test "${with_cxx+set}" = set; then
2672   withval="$with_cxx"
2673   cf_with_cxx=$withval
2674 else
2675   cf_with_cxx=yes
2676 fi;
2677 echo "$as_me:2677: result: $cf_with_cxx" >&5
2678 echo "${ECHO_T}$cf_with_cxx" >&6
2679 if test "X$cf_with_cxx" = Xno ; then
2680         CXX=""
2681         GXX=""
2682 else
2683         # with autoconf 2.13, we can change the error to a warning:
2684                 ac_ext=cc
2685 ac_cpp='$CXXCPP $CPPFLAGS'
2686 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2687 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2688 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2689 ac_main_return=return
2690 if test -n "$ac_tool_prefix"; then
2691   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2692   do
2693     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2694 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2695 echo "$as_me:2695: checking for $ac_word" >&5
2696 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2697 if test "${ac_cv_prog_CXX+set}" = set; then
2698   echo $ECHO_N "(cached) $ECHO_C" >&6
2699 else
2700   if test -n "$CXX"; then
2701   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2702 else
2703   ac_save_IFS=$IFS; IFS=$ac_path_separator
2704 ac_dummy="$PATH"
2705 for ac_dir in $ac_dummy; do
2706   IFS=$ac_save_IFS
2707   test -z "$ac_dir" && ac_dir=.
2708   $as_executable_p "$ac_dir/$ac_word" || continue
2709 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2710 echo "$as_me:2710: found $ac_dir/$ac_word" >&5
2711 break
2712 done
2713
2714 fi
2715 fi
2716 CXX=$ac_cv_prog_CXX
2717 if test -n "$CXX"; then
2718   echo "$as_me:2718: result: $CXX" >&5
2719 echo "${ECHO_T}$CXX" >&6
2720 else
2721   echo "$as_me:2721: result: no" >&5
2722 echo "${ECHO_T}no" >&6
2723 fi
2724
2725     test -n "$CXX" && break
2726   done
2727 fi
2728 if test -z "$CXX"; then
2729   ac_ct_CXX=$CXX
2730   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2731 do
2732   # Extract the first word of "$ac_prog", so it can be a program name with args.
2733 set dummy $ac_prog; ac_word=$2
2734 echo "$as_me:2734: checking for $ac_word" >&5
2735 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2736 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2737   echo $ECHO_N "(cached) $ECHO_C" >&6
2738 else
2739   if test -n "$ac_ct_CXX"; then
2740   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2741 else
2742   ac_save_IFS=$IFS; IFS=$ac_path_separator
2743 ac_dummy="$PATH"
2744 for ac_dir in $ac_dummy; do
2745   IFS=$ac_save_IFS
2746   test -z "$ac_dir" && ac_dir=.
2747   $as_executable_p "$ac_dir/$ac_word" || continue
2748 ac_cv_prog_ac_ct_CXX="$ac_prog"
2749 echo "$as_me:2749: found $ac_dir/$ac_word" >&5
2750 break
2751 done
2752
2753 fi
2754 fi
2755 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2756 if test -n "$ac_ct_CXX"; then
2757   echo "$as_me:2757: result: $ac_ct_CXX" >&5
2758 echo "${ECHO_T}$ac_ct_CXX" >&6
2759 else
2760   echo "$as_me:2760: result: no" >&5
2761 echo "${ECHO_T}no" >&6
2762 fi
2763
2764   test -n "$ac_ct_CXX" && break
2765 done
2766 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2767
2768   CXX=$ac_ct_CXX
2769 fi
2770
2771 # Provide some information about the compiler.
2772 echo "$as_me:2772:" \
2773      "checking for C++ compiler version" >&5
2774 ac_compiler=`set X $ac_compile; echo $2`
2775 { (eval echo "$as_me:2775: \"$ac_compiler --version </dev/null >&5\"") >&5
2776   (eval $ac_compiler --version </dev/null >&5) 2>&5
2777   ac_status=$?
2778   echo "$as_me:2778: \$? = $ac_status" >&5
2779   (exit $ac_status); }
2780 { (eval echo "$as_me:2780: \"$ac_compiler -v </dev/null >&5\"") >&5
2781   (eval $ac_compiler -v </dev/null >&5) 2>&5
2782   ac_status=$?
2783   echo "$as_me:2783: \$? = $ac_status" >&5
2784   (exit $ac_status); }
2785 { (eval echo "$as_me:2785: \"$ac_compiler -V </dev/null >&5\"") >&5
2786   (eval $ac_compiler -V </dev/null >&5) 2>&5
2787   ac_status=$?
2788   echo "$as_me:2788: \$? = $ac_status" >&5
2789   (exit $ac_status); }
2790
2791 echo "$as_me:2791: checking whether we are using the GNU C++ compiler" >&5
2792 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2793 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2794   echo $ECHO_N "(cached) $ECHO_C" >&6
2795 else
2796   cat >conftest.$ac_ext <<_ACEOF
2797 #line 2797 "configure"
2798 #include "confdefs.h"
2799
2800 int
2801 main (void)
2802 {
2803 #ifndef __GNUC__
2804        choke me
2805 #endif
2806
2807   ;
2808   return 0;
2809 }
2810 _ACEOF
2811 rm -f conftest.$ac_objext
2812 if { (eval echo "$as_me:2812: \"$ac_compile\"") >&5
2813   (eval $ac_compile) 2>&5
2814   ac_status=$?
2815   echo "$as_me:2815: \$? = $ac_status" >&5
2816   (exit $ac_status); } &&
2817          { ac_try='test -s conftest.$ac_objext'
2818   { (eval echo "$as_me:2818: \"$ac_try\"") >&5
2819   (eval $ac_try) 2>&5
2820   ac_status=$?
2821   echo "$as_me:2821: \$? = $ac_status" >&5
2822   (exit $ac_status); }; }; then
2823   ac_compiler_gnu=yes
2824 else
2825   echo "$as_me: failed program was:" >&5
2826 cat conftest.$ac_ext >&5
2827 ac_compiler_gnu=no
2828 fi
2829 rm -f conftest.$ac_objext conftest.$ac_ext
2830 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2831
2832 fi
2833 echo "$as_me:2833: result: $ac_cv_cxx_compiler_gnu" >&5
2834 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2835 GXX=`test $ac_compiler_gnu = yes && echo yes`
2836 ac_test_CXXFLAGS=${CXXFLAGS+set}
2837 ac_save_CXXFLAGS=$CXXFLAGS
2838 CXXFLAGS="-g"
2839 echo "$as_me:2839: checking whether $CXX accepts -g" >&5
2840 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2841 if test "${ac_cv_prog_cxx_g+set}" = set; then
2842   echo $ECHO_N "(cached) $ECHO_C" >&6
2843 else
2844   cat >conftest.$ac_ext <<_ACEOF
2845 #line 2845 "configure"
2846 #include "confdefs.h"
2847
2848 int
2849 main (void)
2850 {
2851
2852   ;
2853   return 0;
2854 }
2855 _ACEOF
2856 rm -f conftest.$ac_objext
2857 if { (eval echo "$as_me:2857: \"$ac_compile\"") >&5
2858   (eval $ac_compile) 2>&5
2859   ac_status=$?
2860   echo "$as_me:2860: \$? = $ac_status" >&5
2861   (exit $ac_status); } &&
2862          { ac_try='test -s conftest.$ac_objext'
2863   { (eval echo "$as_me:2863: \"$ac_try\"") >&5
2864   (eval $ac_try) 2>&5
2865   ac_status=$?
2866   echo "$as_me:2866: \$? = $ac_status" >&5
2867   (exit $ac_status); }; }; then
2868   ac_cv_prog_cxx_g=yes
2869 else
2870   echo "$as_me: failed program was:" >&5
2871 cat conftest.$ac_ext >&5
2872 ac_cv_prog_cxx_g=no
2873 fi
2874 rm -f conftest.$ac_objext conftest.$ac_ext
2875 fi
2876 echo "$as_me:2876: result: $ac_cv_prog_cxx_g" >&5
2877 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2878 if test "$ac_test_CXXFLAGS" = set; then
2879   CXXFLAGS=$ac_save_CXXFLAGS
2880 elif test $ac_cv_prog_cxx_g = yes; then
2881   if test "$GXX" = yes; then
2882     CXXFLAGS="-g -O2"
2883   else
2884     CXXFLAGS="-g"
2885   fi
2886 else
2887   if test "$GXX" = yes; then
2888     CXXFLAGS="-O2"
2889   else
2890     CXXFLAGS=
2891   fi
2892 fi
2893 for ac_declaration in \
2894    ''\
2895    '#include <stdlib.h>' \
2896    'extern "C" void std::exit (int) throw (); using std::exit;' \
2897    'extern "C" void std::exit (int); using std::exit;' \
2898    'extern "C" void exit (int) throw ();' \
2899    'extern "C" void exit (int);' \
2900    'void exit (int);'
2901 do
2902   cat >conftest.$ac_ext <<_ACEOF
2903 #line 2903 "configure"
2904 #include "confdefs.h"
2905 #include <stdlib.h>
2906 $ac_declaration
2907 int
2908 main (void)
2909 {
2910 exit (42);
2911   ;
2912   return 0;
2913 }
2914 _ACEOF
2915 rm -f conftest.$ac_objext
2916 if { (eval echo "$as_me:2916: \"$ac_compile\"") >&5
2917   (eval $ac_compile) 2>&5
2918   ac_status=$?
2919   echo "$as_me:2919: \$? = $ac_status" >&5
2920   (exit $ac_status); } &&
2921          { ac_try='test -s conftest.$ac_objext'
2922   { (eval echo "$as_me:2922: \"$ac_try\"") >&5
2923   (eval $ac_try) 2>&5
2924   ac_status=$?
2925   echo "$as_me:2925: \$? = $ac_status" >&5
2926   (exit $ac_status); }; }; then
2927   :
2928 else
2929   echo "$as_me: failed program was:" >&5
2930 cat conftest.$ac_ext >&5
2931 continue
2932 fi
2933 rm -f conftest.$ac_objext conftest.$ac_ext
2934   cat >conftest.$ac_ext <<_ACEOF
2935 #line 2935 "configure"
2936 #include "confdefs.h"
2937 $ac_declaration
2938 int
2939 main (void)
2940 {
2941 exit (42);
2942   ;
2943   return 0;
2944 }
2945 _ACEOF
2946 rm -f conftest.$ac_objext
2947 if { (eval echo "$as_me:2947: \"$ac_compile\"") >&5
2948   (eval $ac_compile) 2>&5
2949   ac_status=$?
2950   echo "$as_me:2950: \$? = $ac_status" >&5
2951   (exit $ac_status); } &&
2952          { ac_try='test -s conftest.$ac_objext'
2953   { (eval echo "$as_me:2953: \"$ac_try\"") >&5
2954   (eval $ac_try) 2>&5
2955   ac_status=$?
2956   echo "$as_me:2956: \$? = $ac_status" >&5
2957   (exit $ac_status); }; }; then
2958   break
2959 else
2960   echo "$as_me: failed program was:" >&5
2961 cat conftest.$ac_ext >&5
2962 fi
2963 rm -f conftest.$ac_objext conftest.$ac_ext
2964 done
2965 rm -rf conftest*
2966 if test -n "$ac_declaration"; then
2967   echo '#ifdef __cplusplus' >>confdefs.h
2968   echo $ac_declaration      >>confdefs.h
2969   echo '#endif'             >>confdefs.h
2970 fi
2971
2972 ac_ext=c
2973 ac_cpp='$CPP $CPPFLAGS'
2974 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2975 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2976 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2977 ac_main_return=return
2978
2979         ac_ext=cc
2980 ac_cpp='$CXXCPP $CPPFLAGS'
2981 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2982 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2983 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2984 ac_main_return=return
2985
2986         if test "x$cf_with_cxx" != xno
2987         then
2988                 # Several of the C++ configurations do not work, particularly when
2989                 # cross-compiling (20140913 -TD)
2990                 echo "$as_me:2990: checking if $CXX works" >&5
2991 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2992
2993                 save_CPPFLAGS="$CPPFLAGS"
2994                 eval cf_includedir=${includedir}
2995                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2996
2997 cat >conftest.$ac_ext <<_ACEOF
2998 #line 2998 "configure"
2999 #include "confdefs.h"
3000
3001 #include <stdlib.h>
3002 #include <stdio.h>
3003
3004 int
3005 main (void)
3006 {
3007
3008                 printf("Hello world!\n")
3009
3010   ;
3011   return 0;
3012 }
3013 _ACEOF
3014 rm -f conftest.$ac_objext
3015 if { (eval echo "$as_me:3015: \"$ac_compile\"") >&5
3016   (eval $ac_compile) 2>&5
3017   ac_status=$?
3018   echo "$as_me:3018: \$? = $ac_status" >&5
3019   (exit $ac_status); } &&
3020          { ac_try='test -s conftest.$ac_objext'
3021   { (eval echo "$as_me:3021: \"$ac_try\"") >&5
3022   (eval $ac_try) 2>&5
3023   ac_status=$?
3024   echo "$as_me:3024: \$? = $ac_status" >&5
3025   (exit $ac_status); }; }; then
3026   cf_cxx_works=yes
3027 else
3028   echo "$as_me: failed program was:" >&5
3029 cat conftest.$ac_ext >&5
3030 cf_cxx_works=no
3031 fi
3032 rm -f conftest.$ac_objext conftest.$ac_ext
3033                 CPPFLAGS="$save_CPPFLAGS"
3034
3035                 echo "$as_me:3035: result: $cf_cxx_works" >&5
3036 echo "${ECHO_T}$cf_cxx_works" >&6
3037                 if test "x$cf_cxx_works" = xno
3038                 then
3039                         { echo "$as_me:3039: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3040 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3041                         cf_with_cxx=no; CXX=""; GXX="";
3042                 fi
3043         fi
3044         ac_ext=c
3045 ac_cpp='$CPP $CPPFLAGS'
3046 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3047 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3048 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3049 ac_main_return=return
3050
3051         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3052         if test "$CXX" = "g++" ; then
3053                 # Extract the first word of "g++", so it can be a program name with args.
3054 set dummy g++; ac_word=$2
3055 echo "$as_me:3055: checking for $ac_word" >&5
3056 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3057 if test "${ac_cv_path_CXX+set}" = set; then
3058   echo $ECHO_N "(cached) $ECHO_C" >&6
3059 else
3060   case $CXX in
3061   [\\/]* | ?:[\\/]*)
3062   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3063   ;;
3064   *)
3065   ac_save_IFS=$IFS; IFS=$ac_path_separator
3066 ac_dummy="$PATH"
3067 for ac_dir in $ac_dummy; do
3068   IFS=$ac_save_IFS
3069   test -z "$ac_dir" && ac_dir=.
3070   if $as_executable_p "$ac_dir/$ac_word"; then
3071    ac_cv_path_CXX="$ac_dir/$ac_word"
3072    echo "$as_me:3072: found $ac_dir/$ac_word" >&5
3073    break
3074 fi
3075 done
3076
3077   ;;
3078 esac
3079 fi
3080 CXX=$ac_cv_path_CXX
3081
3082 if test -n "$CXX"; then
3083   echo "$as_me:3083: result: $CXX" >&5
3084 echo "${ECHO_T}$CXX" >&6
3085 else
3086   echo "$as_me:3086: result: no" >&5
3087 echo "${ECHO_T}no" >&6
3088 fi
3089
3090         fi
3091         case "x$CXX" in
3092         (x|xg++)
3093                 { echo "$as_me:3093: WARNING: You don't have any C++ compiler, too bad" >&5
3094 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3095                 cf_with_cxx=no; CXX=""; GXX="";
3096                 ;;
3097         esac
3098 fi
3099
3100 GXX_VERSION=none
3101 if test "$GXX" = yes; then
3102         echo "$as_me:3102: checking version of ${CXX:-g++}" >&5
3103 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3104         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3105         if test -z "$GXX_VERSION"
3106         then
3107                 GXX_VERSION=unknown
3108                 GXX=no
3109         fi
3110         echo "$as_me:3110: result: $GXX_VERSION" >&5
3111 echo "${ECHO_T}$GXX_VERSION" >&6
3112 fi
3113
3114 case $GXX_VERSION in
3115 (1*|2.[0-6]*)
3116         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3117         # cf_cxx_library=no
3118         { echo "$as_me:3118: WARNING: templates do not work" >&5
3119 echo "$as_me: WARNING: templates do not work" >&2;}
3120         ;;
3121 esac
3122
3123 echo "$as_me:3123: checking if you want to build C++ binding and demo" >&5
3124 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3125
3126 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3127 if test "${with_cxx_binding+set}" = set; then
3128   withval="$with_cxx_binding"
3129   cf_with_cxx_binding=$withval
3130 else
3131   cf_with_cxx_binding=$cf_with_cxx
3132 fi;
3133 echo "$as_me:3133: result: $cf_with_cxx_binding" >&5
3134 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3135
3136 echo "$as_me:3136: checking if you want to build with Ada95" >&5
3137 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3138 echo "$as_me:3138: result: $cf_with_ada" >&5
3139 echo "${ECHO_T}$cf_with_ada" >&6
3140
3141 echo "$as_me:3141: checking if you want to install terminal database" >&5
3142 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3143
3144 # Check whether --enable-db-install or --disable-db-install was given.
3145 if test "${enable_db_install+set}" = set; then
3146   enableval="$enable_db_install"
3147   cf_with_db_install=$enableval
3148 else
3149   cf_with_db_install=yes
3150 fi;
3151 echo "$as_me:3151: result: $cf_with_db_install" >&5
3152 echo "${ECHO_T}$cf_with_db_install" >&6
3153
3154 echo "$as_me:3154: checking if you want to install manpages" >&5
3155 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3156
3157 # Check whether --with-manpages or --without-manpages was given.
3158 if test "${with_manpages+set}" = set; then
3159   withval="$with_manpages"
3160   cf_with_manpages=$withval
3161 else
3162   cf_with_manpages=yes
3163 fi;
3164 echo "$as_me:3164: result: $cf_with_manpages" >&5
3165 echo "${ECHO_T}$cf_with_manpages" >&6
3166
3167 echo "$as_me:3167: checking if you want to build programs such as tic" >&5
3168 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3169
3170 # Check whether --with-progs or --without-progs was given.
3171 if test "${with_progs+set}" = set; then
3172   withval="$with_progs"
3173   cf_with_progs=$withval
3174 else
3175   cf_with_progs=yes
3176 fi;
3177 echo "$as_me:3177: result: $cf_with_progs" >&5
3178 echo "${ECHO_T}$cf_with_progs" >&6
3179
3180 if test -f $srcdir/tack/tack.h; then
3181         if test "x$cross_compiling" = xyes ; then
3182                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3183
3184 echo "${as_me:-configure}:3184: testing ignoring tack because we are cross-compiling ..." 1>&5
3185
3186                 cf_with_tack=no
3187         else
3188                 echo "$as_me:3188: checking if you want to build the tack program" >&5
3189 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3190
3191 # Check whether --with-tack or --without-tack was given.
3192 if test "${with_tack+set}" = set; then
3193   withval="$with_tack"
3194   cf_with_tack=$withval
3195 else
3196   cf_with_tack=$cf_with_progs
3197 fi;
3198                 echo "$as_me:3198: result: $cf_with_tack" >&5
3199 echo "${ECHO_T}$cf_with_tack" >&6
3200         fi
3201 else
3202         cf_with_tack=no
3203 fi
3204
3205 echo "$as_me:3205: checking if you want to build test-programs" >&5
3206 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3207
3208 # Check whether --with-tests or --without-tests was given.
3209 if test "${with_tests+set}" = set; then
3210   withval="$with_tests"
3211   cf_with_tests=$withval
3212 else
3213   cf_with_tests=yes
3214 fi;
3215 echo "$as_me:3215: result: $cf_with_tests" >&5
3216 echo "${ECHO_T}$cf_with_tests" >&6
3217
3218 echo "$as_me:3218: checking if you wish to install curses.h" >&5
3219 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3220
3221 # Check whether --with-curses-h or --without-curses-h was given.
3222 if test "${with_curses_h+set}" = set; then
3223   withval="$with_curses_h"
3224   with_curses_h=$withval
3225 else
3226   with_curses_h=yes
3227 fi;
3228 echo "$as_me:3228: result: $with_curses_h" >&5
3229 echo "${ECHO_T}$with_curses_h" >&6
3230
3231 modules_to_build="ncurses"
3232 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3233 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3234 modules_to_build="$modules_to_build panel menu form"
3235
3236 test "$program_prefix" != NONE &&
3237   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3238 # Use a double $ so make ignores it.
3239 test "$program_suffix" != NONE &&
3240   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3241 # Double any \ or $.  echo might interpret backslashes.
3242 # By default was `s,x,x', remove it if useless.
3243 cat <<\_ACEOF >conftest.sed
3244 s/[\\$]/&&/g;s/;s,x,x,$//
3245 _ACEOF
3246 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3247 rm conftest.sed
3248
3249 for ac_prog in mawk gawk nawk awk
3250 do
3251   # Extract the first word of "$ac_prog", so it can be a program name with args.
3252 set dummy $ac_prog; ac_word=$2
3253 echo "$as_me:3253: checking for $ac_word" >&5
3254 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3255 if test "${ac_cv_prog_AWK+set}" = set; then
3256   echo $ECHO_N "(cached) $ECHO_C" >&6
3257 else
3258   if test -n "$AWK"; then
3259   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3260 else
3261   ac_save_IFS=$IFS; IFS=$ac_path_separator
3262 ac_dummy="$PATH"
3263 for ac_dir in $ac_dummy; do
3264   IFS=$ac_save_IFS
3265   test -z "$ac_dir" && ac_dir=.
3266   $as_executable_p "$ac_dir/$ac_word" || continue
3267 ac_cv_prog_AWK="$ac_prog"
3268 echo "$as_me:3268: found $ac_dir/$ac_word" >&5
3269 break
3270 done
3271
3272 fi
3273 fi
3274 AWK=$ac_cv_prog_AWK
3275 if test -n "$AWK"; then
3276   echo "$as_me:3276: result: $AWK" >&5
3277 echo "${ECHO_T}$AWK" >&6
3278 else
3279   echo "$as_me:3279: result: no" >&5
3280 echo "${ECHO_T}no" >&6
3281 fi
3282
3283   test -n "$AWK" && break
3284 done
3285
3286 test -z "$AWK" && { { echo "$as_me:3286: error: No awk program found" >&5
3287 echo "$as_me: error: No awk program found" >&2;}
3288    { (exit 1); exit 1; }; }
3289
3290 echo "$as_me:3290: checking for egrep" >&5
3291 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3292 if test "${ac_cv_prog_egrep+set}" = set; then
3293   echo $ECHO_N "(cached) $ECHO_C" >&6
3294 else
3295   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3296                 then ac_cv_prog_egrep='grep -E'
3297                 else ac_cv_prog_egrep='egrep'
3298         fi
3299 fi
3300 echo "$as_me:3300: result: $ac_cv_prog_egrep" >&5
3301 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3302         EGREP=$ac_cv_prog_egrep
3303
3304         test -z "$EGREP" && { { echo "$as_me:3304: error: No egrep program found" >&5
3305 echo "$as_me: error: No egrep program found" >&2;}
3306    { (exit 1); exit 1; }; }
3307
3308 # Find a good install program.  We prefer a C program (faster),
3309 # so one script is as good as another.  But avoid the broken or
3310 # incompatible versions:
3311 # SysV /etc/install, /usr/sbin/install
3312 # SunOS /usr/etc/install
3313 # IRIX /sbin/install
3314 # AIX /bin/install
3315 # AmigaOS /C/install, which installs bootblocks on floppy discs
3316 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3317 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3318 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3319 # ./install, which can be erroneously created by make from ./install.sh.
3320 echo "$as_me:3320: checking for a BSD compatible install" >&5
3321 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3322 if test -z "$INSTALL"; then
3323 if test "${ac_cv_path_install+set}" = set; then
3324   echo $ECHO_N "(cached) $ECHO_C" >&6
3325 else
3326     ac_save_IFS=$IFS; IFS=$ac_path_separator
3327   for ac_dir in $PATH; do
3328     IFS=$ac_save_IFS
3329     # Account for people who put trailing slashes in PATH elements.
3330     case $ac_dir/ in
3331     / | ./ | .// | /cC/* \
3332     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3333     | /usr/ucb/* ) ;;
3334     *)
3335       # OSF1 and SCO ODT 3.0 have their own names for install.
3336       # Don't use installbsd from OSF since it installs stuff as root
3337       # by default.
3338       for ac_prog in ginstall scoinst install; do
3339         if $as_executable_p "$ac_dir/$ac_prog"; then
3340           if test $ac_prog = install &&
3341             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3342             # AIX install.  It has an incompatible calling convention.
3343             :
3344           elif test $ac_prog = install &&
3345             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3346             # program-specific install script used by HP pwplus--don't use.
3347             :
3348           else
3349             ac_cv_path_install="$ac_dir/$ac_prog -c"
3350             break 2
3351           fi
3352         fi
3353       done
3354       ;;
3355     esac
3356   done
3357
3358 fi
3359   if test "${ac_cv_path_install+set}" = set; then
3360     INSTALL=$ac_cv_path_install
3361   else
3362     # As a last resort, use the slow shell script.  We don't cache a
3363     # path for INSTALL within a source directory, because that will
3364     # break other packages using the cache if that directory is
3365     # removed, or if the path is relative.
3366     INSTALL=$ac_install_sh
3367   fi
3368 fi
3369 echo "$as_me:3369: result: $INSTALL" >&5
3370 echo "${ECHO_T}$INSTALL" >&6
3371
3372 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3373 # It thinks the first close brace ends the variable substitution.
3374 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3375
3376 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3377
3378 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3379
3380 case $INSTALL in
3381 (/*)
3382         ;;
3383 (*)
3384         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3385         test -z "$cf_dir" && cf_dir=.
3386         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3387         ;;
3388 esac
3389
3390 for ac_prog in lint cppcheck splint
3391 do
3392   # Extract the first word of "$ac_prog", so it can be a program name with args.
3393 set dummy $ac_prog; ac_word=$2
3394 echo "$as_me:3394: checking for $ac_word" >&5
3395 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3396 if test "${ac_cv_prog_LINT+set}" = set; then
3397   echo $ECHO_N "(cached) $ECHO_C" >&6
3398 else
3399   if test -n "$LINT"; then
3400   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3401 else
3402   ac_save_IFS=$IFS; IFS=$ac_path_separator
3403 ac_dummy="$PATH"
3404 for ac_dir in $ac_dummy; do
3405   IFS=$ac_save_IFS
3406   test -z "$ac_dir" && ac_dir=.
3407   $as_executable_p "$ac_dir/$ac_word" || continue
3408 ac_cv_prog_LINT="$ac_prog"
3409 echo "$as_me:3409: found $ac_dir/$ac_word" >&5
3410 break
3411 done
3412
3413 fi
3414 fi
3415 LINT=$ac_cv_prog_LINT
3416 if test -n "$LINT"; then
3417   echo "$as_me:3417: result: $LINT" >&5
3418 echo "${ECHO_T}$LINT" >&6
3419 else
3420   echo "$as_me:3420: result: no" >&5
3421 echo "${ECHO_T}no" >&6
3422 fi
3423
3424   test -n "$LINT" && break
3425 done
3426
3427 echo "$as_me:3427: checking whether ln -s works" >&5
3428 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3429 LN_S=$as_ln_s
3430 if test "$LN_S" = "ln -s"; then
3431   echo "$as_me:3431: result: yes" >&5
3432 echo "${ECHO_T}yes" >&6
3433 else
3434   echo "$as_me:3434: result: no, using $LN_S" >&5
3435 echo "${ECHO_T}no, using $LN_S" >&6
3436 fi
3437
3438 echo "$as_me:3438: checking if $LN_S -f options work" >&5
3439 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3440
3441 rm -f conf$$.src conf$$dst
3442 echo >conf$$.dst
3443 echo first >conf$$.src
3444 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3445         cf_prog_ln_sf=yes
3446 else
3447         cf_prog_ln_sf=no
3448 fi
3449 rm -f conf$$.dst conf$$src
3450 echo "$as_me:3450: result: $cf_prog_ln_sf" >&5
3451 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3452
3453 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3454
3455 echo "$as_me:3455: checking for long file names" >&5
3456 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3457 if test "${ac_cv_sys_long_file_names+set}" = set; then
3458   echo $ECHO_N "(cached) $ECHO_C" >&6
3459 else
3460   ac_cv_sys_long_file_names=yes
3461 # Test for long file names in all the places we know might matter:
3462 #      .                the current directory, where building will happen
3463 #      $prefix/lib      where we will be installing things
3464 #      $exec_prefix/lib likewise
3465 # eval it to expand exec_prefix.
3466 #      $TMPDIR          if set, where it might want to write temporary files
3467 # if $TMPDIR is not set:
3468 #      /tmp             where it might want to write temporary files
3469 #      /var/tmp         likewise
3470 #      /usr/tmp         likewise
3471 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3472   ac_tmpdirs=$TMPDIR
3473 else
3474   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3475 fi
3476 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3477   test -d $ac_dir || continue
3478   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3479   ac_xdir=$ac_dir/cf$$
3480   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3481   ac_tf1=$ac_xdir/conftest9012345
3482   ac_tf2=$ac_xdir/conftest9012346
3483   (echo 1 >$ac_tf1) 2>/dev/null
3484   (echo 2 >$ac_tf2) 2>/dev/null
3485   ac_val=`cat $ac_tf1 2>/dev/null`
3486   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3487     ac_cv_sys_long_file_names=no
3488     rm -rf $ac_xdir 2>/dev/null
3489     break
3490   fi
3491   rm -rf $ac_xdir 2>/dev/null
3492 done
3493 fi
3494 echo "$as_me:3494: result: $ac_cv_sys_long_file_names" >&5
3495 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3496 if test $ac_cv_sys_long_file_names = yes; then
3497
3498 cat >>confdefs.h <<\EOF
3499 #define HAVE_LONG_FILE_NAMES 1
3500 EOF
3501
3502 fi
3503
3504 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3505 # of package conflict.
3506 cf_config_suffix=
3507
3508 # Check whether --with-config-suffix or --without-config-suffix was given.
3509 if test "${with_config_suffix+set}" = set; then
3510   withval="$with_config_suffix"
3511   case "x$withval" in
3512         (xyes|xno)
3513                 { echo "$as_me:3513: WARNING: expected a value for config-suffix option" >&5
3514 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3515                 ;;
3516         (*)     cf_config_suffix="$withval"
3517                 ;;
3518         esac
3519 fi;
3520
3521 # If we find pkg-config, check if we should install the ".pc" files.
3522
3523 echo "$as_me:3523: checking if you want to use pkg-config" >&5
3524 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3525
3526 # Check whether --with-pkg-config or --without-pkg-config was given.
3527 if test "${with_pkg_config+set}" = set; then
3528   withval="$with_pkg_config"
3529   cf_pkg_config=$withval
3530 else
3531   cf_pkg_config=yes
3532 fi;
3533 echo "$as_me:3533: result: $cf_pkg_config" >&5
3534 echo "${ECHO_T}$cf_pkg_config" >&6
3535
3536 case $cf_pkg_config in
3537 (no)
3538         PKG_CONFIG=none
3539         ;;
3540 (yes)
3541
3542 if test -n "$ac_tool_prefix"; then
3543   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3544 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3545 echo "$as_me:3545: checking for $ac_word" >&5
3546 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3547 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3548   echo $ECHO_N "(cached) $ECHO_C" >&6
3549 else
3550   case $PKG_CONFIG in
3551   [\\/]* | ?:[\\/]*)
3552   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3553   ;;
3554   *)
3555   ac_save_IFS=$IFS; IFS=$ac_path_separator
3556 ac_dummy="$PATH"
3557 for ac_dir in $ac_dummy; do
3558   IFS=$ac_save_IFS
3559   test -z "$ac_dir" && ac_dir=.
3560   if $as_executable_p "$ac_dir/$ac_word"; then
3561    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3562    echo "$as_me:3562: found $ac_dir/$ac_word" >&5
3563    break
3564 fi
3565 done
3566
3567   ;;
3568 esac
3569 fi
3570 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3571
3572 if test -n "$PKG_CONFIG"; then
3573   echo "$as_me:3573: result: $PKG_CONFIG" >&5
3574 echo "${ECHO_T}$PKG_CONFIG" >&6
3575 else
3576   echo "$as_me:3576: result: no" >&5
3577 echo "${ECHO_T}no" >&6
3578 fi
3579
3580 fi
3581 if test -z "$ac_cv_path_PKG_CONFIG"; then
3582   ac_pt_PKG_CONFIG=$PKG_CONFIG
3583   # Extract the first word of "pkg-config", so it can be a program name with args.
3584 set dummy pkg-config; ac_word=$2
3585 echo "$as_me:3585: checking for $ac_word" >&5
3586 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3587 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3588   echo $ECHO_N "(cached) $ECHO_C" >&6
3589 else
3590   case $ac_pt_PKG_CONFIG in
3591   [\\/]* | ?:[\\/]*)
3592   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3593   ;;
3594   *)
3595   ac_save_IFS=$IFS; IFS=$ac_path_separator
3596 ac_dummy="$PATH"
3597 for ac_dir in $ac_dummy; do
3598   IFS=$ac_save_IFS
3599   test -z "$ac_dir" && ac_dir=.
3600   if $as_executable_p "$ac_dir/$ac_word"; then
3601    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3602    echo "$as_me:3602: found $ac_dir/$ac_word" >&5
3603    break
3604 fi
3605 done
3606
3607   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3608   ;;
3609 esac
3610 fi
3611 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3612
3613 if test -n "$ac_pt_PKG_CONFIG"; then
3614   echo "$as_me:3614: result: $ac_pt_PKG_CONFIG" >&5
3615 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3616 else
3617   echo "$as_me:3617: result: no" >&5
3618 echo "${ECHO_T}no" >&6
3619 fi
3620
3621   PKG_CONFIG=$ac_pt_PKG_CONFIG
3622 else
3623   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3624 fi
3625
3626         ;;
3627 (*)
3628         PKG_CONFIG=$withval
3629         ;;
3630 esac
3631
3632 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3633 if test "$PKG_CONFIG" != none ; then
3634
3635 if test "x$prefix" != xNONE; then
3636         cf_path_syntax="$prefix"
3637 else
3638         cf_path_syntax="$ac_default_prefix"
3639 fi
3640
3641 case ".$PKG_CONFIG" in
3642 (.\$\(*\)*|.\'*\'*)
3643         ;;
3644 (..|./*|.\\*)
3645         ;;
3646 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3647         ;;
3648 (.\${*prefix}*|.\${*dir}*)
3649         eval PKG_CONFIG="$PKG_CONFIG"
3650         case ".$PKG_CONFIG" in
3651         (.NONE/*)
3652                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3653                 ;;
3654         esac
3655         ;;
3656 (.no|.NONE/*)
3657         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3658         ;;
3659 (*)
3660         { { echo "$as_me:3660: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3661 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3662    { (exit 1); exit 1; }; }
3663         ;;
3664 esac
3665
3666 elif test "x$cf_pkg_config" != xno ; then
3667         { echo "$as_me:3667: WARNING: pkg-config is not installed" >&5
3668 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3669 fi
3670
3671 case $PKG_CONFIG in
3672 (no|none|yes)
3673         echo "$as_me:3673: checking for pkg-config library directory" >&5
3674 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3675         ;;
3676 (*)
3677         echo "$as_me:3677: checking for $PKG_CONFIG library directory" >&5
3678 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3679         ;;
3680 esac
3681
3682 PKG_CONFIG_LIBDIR=no
3683
3684 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3685 if test "${with_pkg_config_libdir+set}" = set; then
3686   withval="$with_pkg_config_libdir"
3687   PKG_CONFIG_LIBDIR=$withval
3688 else
3689   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3690 fi;
3691
3692 case x$PKG_CONFIG_LIBDIR in
3693 (x/*)
3694         ;;
3695 (xyes)
3696         # Look for the library directory using the same prefix as the executable
3697         if test "x$PKG_CONFIG" = xnone
3698         then
3699                 cf_path=$prefix
3700         else
3701                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3702         fi
3703
3704         # If you don't like using the default architecture, you have to specify the
3705         # intended library directory and corresponding compiler/linker options.
3706         #
3707         # This case allows for Debian's 2014-flavor of multiarch, along with the
3708         # most common variations before that point.  Some other variants spell the
3709         # directory differently, e.g., "pkg-config", and put it in unusual places.
3710         # pkg-config has always been poorly standardized, which is ironic...
3711         case x`(arch) 2>/dev/null` in
3712         (*64)
3713                 cf_search_path="\
3714                         $cf_path/lib/*64-linux-gnu \
3715                         $cf_path/share \
3716                         $cf_path/lib64 \
3717                         $cf_path/lib32 \
3718                         $cf_path/lib"
3719                 ;;
3720         (*)
3721                 cf_search_path="\
3722                         $cf_path/lib/*-linux-gnu \
3723                         $cf_path/share \
3724                         $cf_path/lib32 \
3725                         $cf_path/lib \
3726                         $cf_path/libdata"
3727                 ;;
3728         esac
3729
3730         test -n "$verbose" && echo "    list..." 1>&6
3731
3732 echo "${as_me:-configure}:3732: testing list... ..." 1>&5
3733
3734         for cf_config in $cf_search_path
3735         do
3736                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3737
3738 echo "${as_me:-configure}:3738: testing checking $cf_config/pkgconfig ..." 1>&5
3739
3740                 if test -d $cf_config/pkgconfig
3741                 then
3742                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3743                         echo "$as_me:3743: checking done" >&5
3744 echo $ECHO_N "checking done... $ECHO_C" >&6
3745                         break
3746                 fi
3747         done
3748         ;;
3749 (*)
3750         ;;
3751 esac
3752
3753 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3754         echo "$as_me:3754: result: $PKG_CONFIG_LIBDIR" >&5
3755 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3756 fi
3757
3758 if test "x$PKG_CONFIG" != xnone
3759 then
3760         echo "$as_me:3760: checking if we should install .pc files for $PKG_CONFIG" >&5
3761 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3762 else
3763         echo "$as_me:3763: checking if we should install .pc files" >&5
3764 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3765 fi
3766
3767 # Check whether --enable-pc-files or --disable-pc-files was given.
3768 if test "${enable_pc_files+set}" = set; then
3769   enableval="$enable_pc_files"
3770   enable_pc_files=$enableval
3771 else
3772   enable_pc_files=no
3773 fi;
3774 echo "$as_me:3774: result: $enable_pc_files" >&5
3775 echo "${ECHO_T}$enable_pc_files" >&6
3776
3777 if test "x$enable_pc_files" != xno
3778 then
3779         MAKE_PC_FILES=
3780         case "x$PKG_CONFIG_LIBDIR" in
3781         (xno|xyes)
3782                 { echo "$as_me:3782: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3783 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3784                 ;;
3785         (*)
3786
3787 if test "x$prefix" != xNONE; then
3788         cf_path_syntax="$prefix"
3789 else
3790         cf_path_syntax="$ac_default_prefix"
3791 fi
3792
3793 case ".$PKG_CONFIG_LIBDIR" in
3794 (.\$\(*\)*|.\'*\'*)
3795         ;;
3796 (..|./*|.\\*)
3797         ;;
3798 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3799         ;;
3800 (.\${*prefix}*|.\${*dir}*)
3801         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3802         case ".$PKG_CONFIG_LIBDIR" in
3803         (.NONE/*)
3804                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3805                 ;;
3806         esac
3807         ;;
3808 (.no|.NONE/*)
3809         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3810         ;;
3811 (*)
3812         { { echo "$as_me:3812: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3813 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3814    { (exit 1); exit 1; }; }
3815         ;;
3816 esac
3817
3818                 ;;
3819         esac
3820 else
3821         MAKE_PC_FILES="#"
3822 fi
3823
3824 if test -z "$MAKE_PC_FILES"
3825 then
3826         echo "$as_me:3826: checking for suffix to add to pc-files" >&5
3827 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3828
3829 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3830 if test "${with_pc_suffix+set}" = set; then
3831   withval="$with_pc_suffix"
3832   case "x$withval" in
3833         (xyes|xno)
3834                 PC_MODULE_SUFFIX=
3835                 ;;
3836         (*)     PC_MODULE_SUFFIX="$withval"
3837                 ;;
3838         esac
3839 fi;
3840         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3841         echo "$as_me:3841: result: $PC_MODULE_SUFFIX" >&5
3842 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3843         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3844
3845 fi
3846
3847 echo "$as_me:3847: checking if we should assume mixed-case filenames" >&5
3848 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3849
3850 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3851 if test "${enable_mixed_case+set}" = set; then
3852   enableval="$enable_mixed_case"
3853   enable_mixedcase=$enableval
3854 else
3855   enable_mixedcase=auto
3856 fi;
3857 echo "$as_me:3857: result: $enable_mixedcase" >&5
3858 echo "${ECHO_T}$enable_mixedcase" >&6
3859 if test "$enable_mixedcase" = "auto" ; then
3860
3861 echo "$as_me:3861: checking if filesystem supports mixed-case filenames" >&5
3862 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3863 if test "${cf_cv_mixedcase+set}" = set; then
3864   echo $ECHO_N "(cached) $ECHO_C" >&6
3865 else
3866
3867 if test "$cross_compiling" = yes ; then
3868         case $target_alias in
3869         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3870                 cf_cv_mixedcase=no
3871                 ;;
3872         (*)
3873                 cf_cv_mixedcase=yes
3874                 ;;
3875         esac
3876 else
3877         rm -f conftest CONFTEST
3878         echo test >conftest
3879         if test -f CONFTEST ; then
3880                 cf_cv_mixedcase=no
3881         else
3882                 cf_cv_mixedcase=yes
3883         fi
3884         rm -f conftest CONFTEST
3885 fi
3886
3887 fi
3888 echo "$as_me:3888: result: $cf_cv_mixedcase" >&5
3889 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3890 test "$cf_cv_mixedcase" = yes &&
3891 cat >>confdefs.h <<\EOF
3892 #define MIXEDCASE_FILENAMES 1
3893 EOF
3894
3895 else
3896         cf_cv_mixedcase=$enable_mixedcase
3897         if test "x$enable_mixedcase" = "xyes" ; then
3898
3899 cat >>confdefs.h <<\EOF
3900 #define MIXEDCASE_FILENAMES 1
3901 EOF
3902
3903         fi
3904 fi
3905
3906 # do this after mixed-case option (tags/TAGS is not as important as tic).
3907 echo "$as_me:3907: checking whether ${MAKE-make} sets \${MAKE}" >&5
3908 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3909 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3910 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3911   echo $ECHO_N "(cached) $ECHO_C" >&6
3912 else
3913   cat >conftest.make <<\EOF
3914 all:
3915         @echo 'ac_maketemp="${MAKE}"'
3916 EOF
3917 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3918 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3919 if test -n "$ac_maketemp"; then
3920   eval ac_cv_prog_make_${ac_make}_set=yes
3921 else
3922   eval ac_cv_prog_make_${ac_make}_set=no
3923 fi
3924 rm -f conftest.make
3925 fi
3926 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3927   echo "$as_me:3927: result: yes" >&5
3928 echo "${ECHO_T}yes" >&6
3929   SET_MAKE=
3930 else
3931   echo "$as_me:3931: result: no" >&5
3932 echo "${ECHO_T}no" >&6
3933   SET_MAKE="MAKE=${MAKE-make}"
3934 fi
3935
3936 for ac_prog in exctags ctags
3937 do
3938   # Extract the first word of "$ac_prog", so it can be a program name with args.
3939 set dummy $ac_prog; ac_word=$2
3940 echo "$as_me:3940: checking for $ac_word" >&5
3941 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3942 if test "${ac_cv_prog_CTAGS+set}" = set; then
3943   echo $ECHO_N "(cached) $ECHO_C" >&6
3944 else
3945   if test -n "$CTAGS"; then
3946   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3947 else
3948   ac_save_IFS=$IFS; IFS=$ac_path_separator
3949 ac_dummy="$PATH"
3950 for ac_dir in $ac_dummy; do
3951   IFS=$ac_save_IFS
3952   test -z "$ac_dir" && ac_dir=.
3953   $as_executable_p "$ac_dir/$ac_word" || continue
3954 ac_cv_prog_CTAGS="$ac_prog"
3955 echo "$as_me:3955: found $ac_dir/$ac_word" >&5
3956 break
3957 done
3958
3959 fi
3960 fi
3961 CTAGS=$ac_cv_prog_CTAGS
3962 if test -n "$CTAGS"; then
3963   echo "$as_me:3963: result: $CTAGS" >&5
3964 echo "${ECHO_T}$CTAGS" >&6
3965 else
3966   echo "$as_me:3966: result: no" >&5
3967 echo "${ECHO_T}no" >&6
3968 fi
3969
3970   test -n "$CTAGS" && break
3971 done
3972
3973 for ac_prog in exetags etags
3974 do
3975   # Extract the first word of "$ac_prog", so it can be a program name with args.
3976 set dummy $ac_prog; ac_word=$2
3977 echo "$as_me:3977: checking for $ac_word" >&5
3978 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3979 if test "${ac_cv_prog_ETAGS+set}" = set; then
3980   echo $ECHO_N "(cached) $ECHO_C" >&6
3981 else
3982   if test -n "$ETAGS"; then
3983   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3984 else
3985   ac_save_IFS=$IFS; IFS=$ac_path_separator
3986 ac_dummy="$PATH"
3987 for ac_dir in $ac_dummy; do
3988   IFS=$ac_save_IFS
3989   test -z "$ac_dir" && ac_dir=.
3990   $as_executable_p "$ac_dir/$ac_word" || continue
3991 ac_cv_prog_ETAGS="$ac_prog"
3992 echo "$as_me:3992: found $ac_dir/$ac_word" >&5
3993 break
3994 done
3995
3996 fi
3997 fi
3998 ETAGS=$ac_cv_prog_ETAGS
3999 if test -n "$ETAGS"; then
4000   echo "$as_me:4000: result: $ETAGS" >&5
4001 echo "${ECHO_T}$ETAGS" >&6
4002 else
4003   echo "$as_me:4003: result: no" >&5
4004 echo "${ECHO_T}no" >&6
4005 fi
4006
4007   test -n "$ETAGS" && break
4008 done
4009
4010 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4011 set dummy ${CTAGS:-ctags}; ac_word=$2
4012 echo "$as_me:4012: checking for $ac_word" >&5
4013 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4014 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4015   echo $ECHO_N "(cached) $ECHO_C" >&6
4016 else
4017   if test -n "$MAKE_LOWER_TAGS"; then
4018   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4019 else
4020   ac_save_IFS=$IFS; IFS=$ac_path_separator
4021 ac_dummy="$PATH"
4022 for ac_dir in $ac_dummy; do
4023   IFS=$ac_save_IFS
4024   test -z "$ac_dir" && ac_dir=.
4025   $as_executable_p "$ac_dir/$ac_word" || continue
4026 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4027 echo "$as_me:4027: found $ac_dir/$ac_word" >&5
4028 break
4029 done
4030
4031   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4032 fi
4033 fi
4034 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4035 if test -n "$MAKE_LOWER_TAGS"; then
4036   echo "$as_me:4036: result: $MAKE_LOWER_TAGS" >&5
4037 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4038 else
4039   echo "$as_me:4039: result: no" >&5
4040 echo "${ECHO_T}no" >&6
4041 fi
4042
4043 if test "$cf_cv_mixedcase" = yes ; then
4044         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4045 set dummy ${ETAGS:-etags}; ac_word=$2
4046 echo "$as_me:4046: checking for $ac_word" >&5
4047 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4048 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4049   echo $ECHO_N "(cached) $ECHO_C" >&6
4050 else
4051   if test -n "$MAKE_UPPER_TAGS"; then
4052   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4053 else
4054   ac_save_IFS=$IFS; IFS=$ac_path_separator
4055 ac_dummy="$PATH"
4056 for ac_dir in $ac_dummy; do
4057   IFS=$ac_save_IFS
4058   test -z "$ac_dir" && ac_dir=.
4059   $as_executable_p "$ac_dir/$ac_word" || continue
4060 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4061 echo "$as_me:4061: found $ac_dir/$ac_word" >&5
4062 break
4063 done
4064
4065   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4066 fi
4067 fi
4068 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4069 if test -n "$MAKE_UPPER_TAGS"; then
4070   echo "$as_me:4070: result: $MAKE_UPPER_TAGS" >&5
4071 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4072 else
4073   echo "$as_me:4073: result: no" >&5
4074 echo "${ECHO_T}no" >&6
4075 fi
4076
4077 else
4078         MAKE_UPPER_TAGS=no
4079 fi
4080
4081 if test "$MAKE_UPPER_TAGS" = yes ; then
4082         MAKE_UPPER_TAGS=
4083 else
4084         MAKE_UPPER_TAGS="#"
4085 fi
4086
4087 if test "$MAKE_LOWER_TAGS" = yes ; then
4088         MAKE_LOWER_TAGS=
4089 else
4090         MAKE_LOWER_TAGS="#"
4091 fi
4092
4093 echo "$as_me:4093: checking for makeflags variable" >&5
4094 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4095 if test "${cf_cv_makeflags+set}" = set; then
4096   echo $ECHO_N "(cached) $ECHO_C" >&6
4097 else
4098
4099         cf_cv_makeflags=''
4100         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4101         do
4102                 cat >cf_makeflags.tmp <<CF_EOF
4103 SHELL = $SHELL
4104 all :
4105         @ echo '.$cf_option'
4106 CF_EOF
4107                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4108                 case "$cf_result" in
4109                 (.*k|.*kw)
4110                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4111                         case "$cf_result" in
4112                         (.*CC=*)        cf_cv_makeflags=
4113                                 ;;
4114                         (*)     cf_cv_makeflags=$cf_option
4115                                 ;;
4116                         esac
4117                         break
4118                         ;;
4119                 (.-)
4120                         ;;
4121                 (*)
4122
4123 echo "${as_me:-configure}:4123: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4124
4125                         ;;
4126                 esac
4127         done
4128         rm -f cf_makeflags.tmp
4129
4130 fi
4131 echo "$as_me:4131: result: $cf_cv_makeflags" >&5
4132 echo "${ECHO_T}$cf_cv_makeflags" >&6
4133
4134 if test -n "$ac_tool_prefix"; then
4135   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4136 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4137 echo "$as_me:4137: checking for $ac_word" >&5
4138 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4139 if test "${ac_cv_prog_RANLIB+set}" = set; then
4140   echo $ECHO_N "(cached) $ECHO_C" >&6
4141 else
4142   if test -n "$RANLIB"; then
4143   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4144 else
4145   ac_save_IFS=$IFS; IFS=$ac_path_separator
4146 ac_dummy="$PATH"
4147 for ac_dir in $ac_dummy; do
4148   IFS=$ac_save_IFS
4149   test -z "$ac_dir" && ac_dir=.
4150   $as_executable_p "$ac_dir/$ac_word" || continue
4151 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4152 echo "$as_me:4152: found $ac_dir/$ac_word" >&5
4153 break
4154 done
4155
4156 fi
4157 fi
4158 RANLIB=$ac_cv_prog_RANLIB
4159 if test -n "$RANLIB"; then
4160   echo "$as_me:4160: result: $RANLIB" >&5
4161 echo "${ECHO_T}$RANLIB" >&6
4162 else
4163   echo "$as_me:4163: result: no" >&5
4164 echo "${ECHO_T}no" >&6
4165 fi
4166
4167 fi
4168 if test -z "$ac_cv_prog_RANLIB"; then
4169   ac_ct_RANLIB=$RANLIB
4170   # Extract the first word of "ranlib", so it can be a program name with args.
4171 set dummy ranlib; ac_word=$2
4172 echo "$as_me:4172: checking for $ac_word" >&5
4173 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4174 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4175   echo $ECHO_N "(cached) $ECHO_C" >&6
4176 else
4177   if test -n "$ac_ct_RANLIB"; then
4178   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4179 else
4180   ac_save_IFS=$IFS; IFS=$ac_path_separator
4181 ac_dummy="$PATH"
4182 for ac_dir in $ac_dummy; do
4183   IFS=$ac_save_IFS
4184   test -z "$ac_dir" && ac_dir=.
4185   $as_executable_p "$ac_dir/$ac_word" || continue
4186 ac_cv_prog_ac_ct_RANLIB="ranlib"
4187 echo "$as_me:4187: found $ac_dir/$ac_word" >&5
4188 break
4189 done
4190
4191   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4192 fi
4193 fi
4194 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4195 if test -n "$ac_ct_RANLIB"; then
4196   echo "$as_me:4196: result: $ac_ct_RANLIB" >&5
4197 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4198 else
4199   echo "$as_me:4199: result: no" >&5
4200 echo "${ECHO_T}no" >&6
4201 fi
4202
4203   RANLIB=$ac_ct_RANLIB
4204 else
4205   RANLIB="$ac_cv_prog_RANLIB"
4206 fi
4207
4208 if test -n "$ac_tool_prefix"; then
4209   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4210 set dummy ${ac_tool_prefix}ld; ac_word=$2
4211 echo "$as_me:4211: checking for $ac_word" >&5
4212 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4213 if test "${ac_cv_prog_LD+set}" = set; then
4214   echo $ECHO_N "(cached) $ECHO_C" >&6
4215 else
4216   if test -n "$LD"; then
4217   ac_cv_prog_LD="$LD" # Let the user override the test.
4218 else
4219   ac_save_IFS=$IFS; IFS=$ac_path_separator
4220 ac_dummy="$PATH"
4221 for ac_dir in $ac_dummy; do
4222   IFS=$ac_save_IFS
4223   test -z "$ac_dir" && ac_dir=.
4224   $as_executable_p "$ac_dir/$ac_word" || continue
4225 ac_cv_prog_LD="${ac_tool_prefix}ld"
4226 echo "$as_me:4226: found $ac_dir/$ac_word" >&5
4227 break
4228 done
4229
4230 fi
4231 fi
4232 LD=$ac_cv_prog_LD
4233 if test -n "$LD"; then
4234   echo "$as_me:4234: result: $LD" >&5
4235 echo "${ECHO_T}$LD" >&6
4236 else
4237   echo "$as_me:4237: result: no" >&5
4238 echo "${ECHO_T}no" >&6
4239 fi
4240
4241 fi
4242 if test -z "$ac_cv_prog_LD"; then
4243   ac_ct_LD=$LD
4244   # Extract the first word of "ld", so it can be a program name with args.
4245 set dummy ld; ac_word=$2
4246 echo "$as_me:4246: checking for $ac_word" >&5
4247 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4248 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4249   echo $ECHO_N "(cached) $ECHO_C" >&6
4250 else
4251   if test -n "$ac_ct_LD"; then
4252   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4253 else
4254   ac_save_IFS=$IFS; IFS=$ac_path_separator
4255 ac_dummy="$PATH"
4256 for ac_dir in $ac_dummy; do
4257   IFS=$ac_save_IFS
4258   test -z "$ac_dir" && ac_dir=.
4259   $as_executable_p "$ac_dir/$ac_word" || continue
4260 ac_cv_prog_ac_ct_LD="ld"
4261 echo "$as_me:4261: found $ac_dir/$ac_word" >&5
4262 break
4263 done
4264
4265   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4266 fi
4267 fi
4268 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4269 if test -n "$ac_ct_LD"; then
4270   echo "$as_me:4270: result: $ac_ct_LD" >&5
4271 echo "${ECHO_T}$ac_ct_LD" >&6
4272 else
4273   echo "$as_me:4273: result: no" >&5
4274 echo "${ECHO_T}no" >&6
4275 fi
4276
4277   LD=$ac_ct_LD
4278 else
4279   LD="$ac_cv_prog_LD"
4280 fi
4281
4282 if test -n "$ac_tool_prefix"; then
4283   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4284 set dummy ${ac_tool_prefix}ar; ac_word=$2
4285 echo "$as_me:4285: checking for $ac_word" >&5
4286 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4287 if test "${ac_cv_prog_AR+set}" = set; then
4288   echo $ECHO_N "(cached) $ECHO_C" >&6
4289 else
4290   if test -n "$AR"; then
4291   ac_cv_prog_AR="$AR" # Let the user override the test.
4292 else
4293   ac_save_IFS=$IFS; IFS=$ac_path_separator
4294 ac_dummy="$PATH"
4295 for ac_dir in $ac_dummy; do
4296   IFS=$ac_save_IFS
4297   test -z "$ac_dir" && ac_dir=.
4298   $as_executable_p "$ac_dir/$ac_word" || continue
4299 ac_cv_prog_AR="${ac_tool_prefix}ar"
4300 echo "$as_me:4300: found $ac_dir/$ac_word" >&5
4301 break
4302 done
4303
4304 fi
4305 fi
4306 AR=$ac_cv_prog_AR
4307 if test -n "$AR"; then
4308   echo "$as_me:4308: result: $AR" >&5
4309 echo "${ECHO_T}$AR" >&6
4310 else
4311   echo "$as_me:4311: result: no" >&5
4312 echo "${ECHO_T}no" >&6
4313 fi
4314
4315 fi
4316 if test -z "$ac_cv_prog_AR"; then
4317   ac_ct_AR=$AR
4318   # Extract the first word of "ar", so it can be a program name with args.
4319 set dummy ar; ac_word=$2
4320 echo "$as_me:4320: checking for $ac_word" >&5
4321 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4322 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4323   echo $ECHO_N "(cached) $ECHO_C" >&6
4324 else
4325   if test -n "$ac_ct_AR"; then
4326   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4327 else
4328   ac_save_IFS=$IFS; IFS=$ac_path_separator
4329 ac_dummy="$PATH"
4330 for ac_dir in $ac_dummy; do
4331   IFS=$ac_save_IFS
4332   test -z "$ac_dir" && ac_dir=.
4333   $as_executable_p "$ac_dir/$ac_word" || continue
4334 ac_cv_prog_ac_ct_AR="ar"
4335 echo "$as_me:4335: found $ac_dir/$ac_word" >&5
4336 break
4337 done
4338
4339   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4340 fi
4341 fi
4342 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4343 if test -n "$ac_ct_AR"; then
4344   echo "$as_me:4344: result: $ac_ct_AR" >&5
4345 echo "${ECHO_T}$ac_ct_AR" >&6
4346 else
4347   echo "$as_me:4347: result: no" >&5
4348 echo "${ECHO_T}no" >&6
4349 fi
4350
4351   AR=$ac_ct_AR
4352 else
4353   AR="$ac_cv_prog_AR"
4354 fi
4355
4356 if test -n "$ac_tool_prefix"; then
4357   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4358 set dummy ${ac_tool_prefix}nm; ac_word=$2
4359 echo "$as_me:4359: checking for $ac_word" >&5
4360 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4361 if test "${ac_cv_prog_NM+set}" = set; then
4362   echo $ECHO_N "(cached) $ECHO_C" >&6
4363 else
4364   if test -n "$NM"; then
4365   ac_cv_prog_NM="$NM" # Let the user override the test.
4366 else
4367   ac_save_IFS=$IFS; IFS=$ac_path_separator
4368 ac_dummy="$PATH"
4369 for ac_dir in $ac_dummy; do
4370   IFS=$ac_save_IFS
4371   test -z "$ac_dir" && ac_dir=.
4372   $as_executable_p "$ac_dir/$ac_word" || continue
4373 ac_cv_prog_NM="${ac_tool_prefix}nm"
4374 echo "$as_me:4374: found $ac_dir/$ac_word" >&5
4375 break
4376 done
4377
4378 fi
4379 fi
4380 NM=$ac_cv_prog_NM
4381 if test -n "$NM"; then
4382   echo "$as_me:4382: result: $NM" >&5
4383 echo "${ECHO_T}$NM" >&6
4384 else
4385   echo "$as_me:4385: result: no" >&5
4386 echo "${ECHO_T}no" >&6
4387 fi
4388
4389 fi
4390 if test -z "$ac_cv_prog_NM"; then
4391   ac_ct_NM=$NM
4392   # Extract the first word of "nm", so it can be a program name with args.
4393 set dummy nm; ac_word=$2
4394 echo "$as_me:4394: checking for $ac_word" >&5
4395 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4396 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4397   echo $ECHO_N "(cached) $ECHO_C" >&6
4398 else
4399   if test -n "$ac_ct_NM"; then
4400   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4401 else
4402   ac_save_IFS=$IFS; IFS=$ac_path_separator
4403 ac_dummy="$PATH"
4404 for ac_dir in $ac_dummy; do
4405   IFS=$ac_save_IFS
4406   test -z "$ac_dir" && ac_dir=.
4407   $as_executable_p "$ac_dir/$ac_word" || continue
4408 ac_cv_prog_ac_ct_NM="nm"
4409 echo "$as_me:4409: found $ac_dir/$ac_word" >&5
4410 break
4411 done
4412
4413   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4414 fi
4415 fi
4416 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4417 if test -n "$ac_ct_NM"; then
4418   echo "$as_me:4418: result: $ac_ct_NM" >&5
4419 echo "${ECHO_T}$ac_ct_NM" >&6
4420 else
4421   echo "$as_me:4421: result: no" >&5
4422 echo "${ECHO_T}no" >&6
4423 fi
4424
4425   NM=$ac_ct_NM
4426 else
4427   NM="$ac_cv_prog_NM"
4428 fi
4429
4430 if test -n "$ac_tool_prefix"; then
4431   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4432 set dummy ${ac_tool_prefix}ar; ac_word=$2
4433 echo "$as_me:4433: checking for $ac_word" >&5
4434 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4435 if test "${ac_cv_prog_AR+set}" = set; then
4436   echo $ECHO_N "(cached) $ECHO_C" >&6
4437 else
4438   if test -n "$AR"; then
4439   ac_cv_prog_AR="$AR" # Let the user override the test.
4440 else
4441   ac_save_IFS=$IFS; IFS=$ac_path_separator
4442 ac_dummy="$PATH"
4443 for ac_dir in $ac_dummy; do
4444   IFS=$ac_save_IFS
4445   test -z "$ac_dir" && ac_dir=.
4446   $as_executable_p "$ac_dir/$ac_word" || continue
4447 ac_cv_prog_AR="${ac_tool_prefix}ar"
4448 echo "$as_me:4448: found $ac_dir/$ac_word" >&5
4449 break
4450 done
4451
4452 fi
4453 fi
4454 AR=$ac_cv_prog_AR
4455 if test -n "$AR"; then
4456   echo "$as_me:4456: result: $AR" >&5
4457 echo "${ECHO_T}$AR" >&6
4458 else
4459   echo "$as_me:4459: result: no" >&5
4460 echo "${ECHO_T}no" >&6
4461 fi
4462
4463 fi
4464 if test -z "$ac_cv_prog_AR"; then
4465   ac_ct_AR=$AR
4466   # Extract the first word of "ar", so it can be a program name with args.
4467 set dummy ar; ac_word=$2
4468 echo "$as_me:4468: checking for $ac_word" >&5
4469 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4470 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4471   echo $ECHO_N "(cached) $ECHO_C" >&6
4472 else
4473   if test -n "$ac_ct_AR"; then
4474   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4475 else
4476   ac_save_IFS=$IFS; IFS=$ac_path_separator
4477 ac_dummy="$PATH"
4478 for ac_dir in $ac_dummy; do
4479   IFS=$ac_save_IFS
4480   test -z "$ac_dir" && ac_dir=.
4481   $as_executable_p "$ac_dir/$ac_word" || continue
4482 ac_cv_prog_ac_ct_AR="ar"
4483 echo "$as_me:4483: found $ac_dir/$ac_word" >&5
4484 break
4485 done
4486
4487   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4488 fi
4489 fi
4490 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4491 if test -n "$ac_ct_AR"; then
4492   echo "$as_me:4492: result: $ac_ct_AR" >&5
4493 echo "${ECHO_T}$ac_ct_AR" >&6
4494 else
4495   echo "$as_me:4495: result: no" >&5
4496 echo "${ECHO_T}no" >&6
4497 fi
4498
4499   AR=$ac_ct_AR
4500 else
4501   AR="$ac_cv_prog_AR"
4502 fi
4503
4504 echo "$as_me:4504: checking for options to update archives" >&5
4505 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4506 if test "${cf_cv_ar_flags+set}" = set; then
4507   echo $ECHO_N "(cached) $ECHO_C" >&6
4508 else
4509
4510         cf_cv_ar_flags=unknown
4511         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4512         do
4513
4514                 # check if $ARFLAGS already contains this choice
4515                 if test "x$ARFLAGS" != "x" ; then
4516                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4517                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4518                                 cf_cv_ar_flags=
4519                                 break
4520                         fi
4521                 fi
4522
4523                 rm -f conftest.$ac_cv_objext
4524                 rm -f conftest.a
4525
4526                 cat >conftest.$ac_ext <<EOF
4527 #line 4527 "configure"
4528 int     testdata[3] = { 123, 456, 789 };
4529 EOF
4530                 if { (eval echo "$as_me:4530: \"$ac_compile\"") >&5
4531   (eval $ac_compile) 2>&5
4532   ac_status=$?
4533   echo "$as_me:4533: \$? = $ac_status" >&5
4534   (exit $ac_status); } ; then
4535                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4536                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4537                         if test -f conftest.a ; then
4538                                 cf_cv_ar_flags=$cf_ar_flags
4539                                 break
4540                         fi
4541                 else
4542                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4543
4544 echo "${as_me:-configure}:4544: testing cannot compile test-program ..." 1>&5
4545
4546                         break
4547                 fi
4548         done
4549         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4550
4551 fi
4552 echo "$as_me:4552: result: $cf_cv_ar_flags" >&5
4553 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4554
4555 if test -n "$ARFLAGS" ; then
4556         if test -n "$cf_cv_ar_flags" ; then
4557                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4558         fi
4559 else
4560         ARFLAGS=$cf_cv_ar_flags
4561 fi
4562
4563 echo "$as_me:4563: checking if you have specified an install-prefix" >&5
4564 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4565
4566 # Check whether --with-install-prefix or --without-install-prefix was given.
4567 if test "${with_install_prefix+set}" = set; then
4568   withval="$with_install_prefix"
4569   case "x$withval" in
4570         (xyes|xno)
4571                 ;;
4572         (*)     DESTDIR="$withval"
4573                 ;;
4574         esac
4575 fi;
4576 echo "$as_me:4576: result: $DESTDIR" >&5
4577 echo "${ECHO_T}$DESTDIR" >&6
4578
4579 ###############################################################################
4580
4581 # If we're cross-compiling, allow the user to override the tools and their
4582 # options.  The configure script is oriented toward identifying the host
4583 # compiler, etc., but we need a build compiler to generate parts of the source.
4584
4585 if test "$cross_compiling" = yes ; then
4586
4587         # defaults that we might want to override
4588         : ${BUILD_CFLAGS:=''}
4589         : ${BUILD_CPPFLAGS:=''}
4590         : ${BUILD_LDFLAGS:=''}
4591         : ${BUILD_LIBS:=''}
4592         : ${BUILD_EXEEXT:='$x'}
4593         : ${BUILD_OBJEXT:='o'}
4594
4595 # Check whether --with-build-cc or --without-build-cc was given.
4596 if test "${with_build_cc+set}" = set; then
4597   withval="$with_build_cc"
4598   BUILD_CC="$withval"
4599 else
4600   for ac_prog in gcc clang c99 c89 cc cl
4601 do
4602   # Extract the first word of "$ac_prog", so it can be a program name with args.
4603 set dummy $ac_prog; ac_word=$2
4604 echo "$as_me:4604: checking for $ac_word" >&5
4605 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4606 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4607   echo $ECHO_N "(cached) $ECHO_C" >&6
4608 else
4609   if test -n "$BUILD_CC"; then
4610   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4611 else
4612   ac_save_IFS=$IFS; IFS=$ac_path_separator
4613 ac_dummy="$PATH"
4614 for ac_dir in $ac_dummy; do
4615   IFS=$ac_save_IFS
4616   test -z "$ac_dir" && ac_dir=.
4617   $as_executable_p "$ac_dir/$ac_word" || continue
4618 ac_cv_prog_BUILD_CC="$ac_prog"
4619 echo "$as_me:4619: found $ac_dir/$ac_word" >&5
4620 break
4621 done
4622
4623 fi
4624 fi
4625 BUILD_CC=$ac_cv_prog_BUILD_CC
4626 if test -n "$BUILD_CC"; then
4627   echo "$as_me:4627: result: $BUILD_CC" >&5
4628 echo "${ECHO_T}$BUILD_CC" >&6
4629 else
4630   echo "$as_me:4630: result: no" >&5
4631 echo "${ECHO_T}no" >&6
4632 fi
4633
4634   test -n "$BUILD_CC" && break
4635 done
4636 test -n "$BUILD_CC" || BUILD_CC="none"
4637
4638 fi;
4639         echo "$as_me:4639: checking for native build C compiler" >&5
4640 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4641         echo "$as_me:4641: result: $BUILD_CC" >&5
4642 echo "${ECHO_T}$BUILD_CC" >&6
4643
4644         echo "$as_me:4644: checking for native build C preprocessor" >&5
4645 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4646
4647 # Check whether --with-build-cpp or --without-build-cpp was given.
4648 if test "${with_build_cpp+set}" = set; then
4649   withval="$with_build_cpp"
4650   BUILD_CPP="$withval"
4651 else
4652   BUILD_CPP='${BUILD_CC} -E'
4653 fi;
4654         echo "$as_me:4654: result: $BUILD_CPP" >&5
4655 echo "${ECHO_T}$BUILD_CPP" >&6
4656
4657         echo "$as_me:4657: checking for native build C flags" >&5
4658 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4659
4660 # Check whether --with-build-cflags or --without-build-cflags was given.
4661 if test "${with_build_cflags+set}" = set; then
4662   withval="$with_build_cflags"
4663   BUILD_CFLAGS="$withval"
4664 fi;
4665         echo "$as_me:4665: result: $BUILD_CFLAGS" >&5
4666 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4667
4668         echo "$as_me:4668: checking for native build C preprocessor-flags" >&5
4669 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4670
4671 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4672 if test "${with_build_cppflags+set}" = set; then
4673   withval="$with_build_cppflags"
4674   BUILD_CPPFLAGS="$withval"
4675 fi;
4676         echo "$as_me:4676: result: $BUILD_CPPFLAGS" >&5
4677 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4678
4679         echo "$as_me:4679: checking for native build linker-flags" >&5
4680 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4681
4682 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4683 if test "${with_build_ldflags+set}" = set; then
4684   withval="$with_build_ldflags"
4685   BUILD_LDFLAGS="$withval"
4686 fi;
4687         echo "$as_me:4687: result: $BUILD_LDFLAGS" >&5
4688 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4689
4690         echo "$as_me:4690: checking for native build linker-libraries" >&5
4691 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4692
4693 # Check whether --with-build-libs or --without-build-libs was given.
4694 if test "${with_build_libs+set}" = set; then
4695   withval="$with_build_libs"
4696   BUILD_LIBS="$withval"
4697 fi;
4698         echo "$as_me:4698: result: $BUILD_LIBS" >&5
4699 echo "${ECHO_T}$BUILD_LIBS" >&6
4700
4701         # this assumes we're on Unix.
4702         BUILD_EXEEXT=
4703         BUILD_OBJEXT=o
4704
4705         : ${BUILD_CC:='${CC}'}
4706
4707         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4708                 { { echo "$as_me:4708: error: Cross-build requires two compilers.
4709 Use --with-build-cc to specify the native compiler." >&5
4710 echo "$as_me: error: Cross-build requires two compilers.
4711 Use --with-build-cc to specify the native compiler." >&2;}
4712    { (exit 1); exit 1; }; }
4713         fi
4714
4715 else
4716         : ${BUILD_CC:='${CC}'}
4717         : ${BUILD_CPP:='${CPP}'}
4718         : ${BUILD_CFLAGS:='${CFLAGS}'}
4719         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4720         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4721         : ${BUILD_LIBS:='${LIBS}'}
4722         : ${BUILD_EXEEXT:='$x'}
4723         : ${BUILD_OBJEXT:='o'}
4724 fi
4725
4726 ###############################################################################
4727
4728 ### Options to allow the user to specify the set of libraries which are used.
4729 ### Use "--without-normal --with-shared" to allow the default model to be
4730 ### shared, for example.
4731 cf_list_models=""
4732
4733 echo "$as_me:4733: checking if libtool -version-number should be used" >&5
4734 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4735
4736 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4737 if test "${enable_libtool_version+set}" = set; then
4738   enableval="$enable_libtool_version"
4739   test "$enableval" != no && enableval=yes
4740         if test "$enableval" != "yes" ; then
4741     cf_libtool_version=no
4742         else
4743                 cf_libtool_version=yes
4744         fi
4745 else
4746   enableval=yes
4747         cf_libtool_version=yes
4748
4749 fi;
4750 echo "$as_me:4750: result: $cf_libtool_version" >&5
4751 echo "${ECHO_T}$cf_libtool_version" >&6
4752
4753 if test "$cf_libtool_version" = yes ; then
4754         LIBTOOL_VERSION="-version-number"
4755 else
4756         LIBTOOL_VERSION="-version-info"
4757         case "x$VERSION" in
4758         (x)
4759                 { echo "$as_me:4759: WARNING: VERSION was not set" >&5
4760 echo "$as_me: WARNING: VERSION was not set" >&2;}
4761                 ;;
4762         (x*.*.*)
4763                 ABI_VERSION="$VERSION"
4764                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4765
4766 echo "${as_me:-configure}:4766: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4767
4768                 ;;
4769         (x*:*:*)
4770                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4771                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4772
4773 echo "${as_me:-configure}:4773: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4774
4775                 ;;
4776         (*)
4777                 { echo "$as_me:4777: WARNING: unexpected VERSION value: $VERSION" >&5
4778 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4779                 ;;
4780         esac
4781 fi
4782
4783 LIBTOOL=
4784
4785 # common library maintenance symbols that are convenient for libtool scripts:
4786 LIB_CREATE='${AR} -cr'
4787 LIB_OBJECT='${OBJECTS}'
4788 LIB_SUFFIX=.a
4789 LIB_PREP="$RANLIB"
4790
4791 # symbols used to prop libtool up to enable it to determine what it should be
4792 # doing:
4793 LIB_CLEAN=
4794 LIB_COMPILE=
4795 LIB_LINK='${CC}'
4796 LIB_INSTALL=
4797 LIB_UNINSTALL=
4798
4799 echo "$as_me:4799: checking if you want to build libraries with libtool" >&5
4800 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4801
4802 # Check whether --with-libtool or --without-libtool was given.
4803 if test "${with_libtool+set}" = set; then
4804   withval="$with_libtool"
4805   with_libtool=$withval
4806 else
4807   with_libtool=no
4808 fi;
4809 echo "$as_me:4809: result: $with_libtool" >&5
4810 echo "${ECHO_T}$with_libtool" >&6
4811 if test "$with_libtool" != "no"; then
4812
4813         if test "$with_libtool" != "yes" ; then
4814
4815 if test "x$prefix" != xNONE; then
4816         cf_path_syntax="$prefix"
4817 else
4818         cf_path_syntax="$ac_default_prefix"
4819 fi
4820
4821 case ".$with_libtool" in
4822 (.\$\(*\)*|.\'*\'*)
4823         ;;
4824 (..|./*|.\\*)
4825         ;;
4826 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4827         ;;
4828 (.\${*prefix}*|.\${*dir}*)
4829         eval with_libtool="$with_libtool"
4830         case ".$with_libtool" in
4831         (.NONE/*)
4832                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4833                 ;;
4834         esac
4835         ;;
4836 (.no|.NONE/*)
4837         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4838         ;;
4839 (*)
4840         { { echo "$as_me:4840: error: expected a pathname, not \"$with_libtool\"" >&5
4841 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4842    { (exit 1); exit 1; }; }
4843         ;;
4844 esac
4845
4846                 LIBTOOL=$with_libtool
4847         else
4848                 if test -n "$ac_tool_prefix"; then
4849   for ac_prog in libtool glibtool
4850   do
4851     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4852 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4853 echo "$as_me:4853: checking for $ac_word" >&5
4854 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4855 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4856   echo $ECHO_N "(cached) $ECHO_C" >&6
4857 else
4858   if test -n "$LIBTOOL"; then
4859   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4860 else
4861   ac_save_IFS=$IFS; IFS=$ac_path_separator
4862 ac_dummy="$PATH"
4863 for ac_dir in $ac_dummy; do
4864   IFS=$ac_save_IFS
4865   test -z "$ac_dir" && ac_dir=.
4866   $as_executable_p "$ac_dir/$ac_word" || continue
4867 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4868 echo "$as_me:4868: found $ac_dir/$ac_word" >&5
4869 break
4870 done
4871
4872 fi
4873 fi
4874 LIBTOOL=$ac_cv_prog_LIBTOOL
4875 if test -n "$LIBTOOL"; then
4876   echo "$as_me:4876: result: $LIBTOOL" >&5
4877 echo "${ECHO_T}$LIBTOOL" >&6
4878 else
4879   echo "$as_me:4879: result: no" >&5
4880 echo "${ECHO_T}no" >&6
4881 fi
4882
4883     test -n "$LIBTOOL" && break
4884   done
4885 fi
4886 if test -z "$LIBTOOL"; then
4887   ac_ct_LIBTOOL=$LIBTOOL
4888   for ac_prog in libtool glibtool
4889 do
4890   # Extract the first word of "$ac_prog", so it can be a program name with args.
4891 set dummy $ac_prog; ac_word=$2
4892 echo "$as_me:4892: checking for $ac_word" >&5
4893 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4894 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4895   echo $ECHO_N "(cached) $ECHO_C" >&6
4896 else
4897   if test -n "$ac_ct_LIBTOOL"; then
4898   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4899 else
4900   ac_save_IFS=$IFS; IFS=$ac_path_separator
4901 ac_dummy="$PATH"
4902 for ac_dir in $ac_dummy; do
4903   IFS=$ac_save_IFS
4904   test -z "$ac_dir" && ac_dir=.
4905   $as_executable_p "$ac_dir/$ac_word" || continue
4906 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4907 echo "$as_me:4907: found $ac_dir/$ac_word" >&5
4908 break
4909 done
4910
4911 fi
4912 fi
4913 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4914 if test -n "$ac_ct_LIBTOOL"; then
4915   echo "$as_me:4915: result: $ac_ct_LIBTOOL" >&5
4916 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4917 else
4918   echo "$as_me:4918: result: no" >&5
4919 echo "${ECHO_T}no" >&6
4920 fi
4921
4922   test -n "$ac_ct_LIBTOOL" && break
4923 done
4924 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4925
4926   LIBTOOL=$ac_ct_LIBTOOL
4927 fi
4928
4929 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4930 then
4931         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.].*//'`
4932 else
4933         cf_cv_libtool_version=
4934 fi
4935 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4936
4937                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4938                 then
4939
4940 unset ac_cv_prog_ac_ct_LIBTOOL
4941 unset ac_ct_LIBTOOL
4942 unset LIBTOOL
4943
4944                         if test -n "$ac_tool_prefix"; then
4945   for ac_prog in glibtool
4946   do
4947     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4948 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4949 echo "$as_me:4949: checking for $ac_word" >&5
4950 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4951 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4952   echo $ECHO_N "(cached) $ECHO_C" >&6
4953 else
4954   if test -n "$LIBTOOL"; then
4955   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4956 else
4957   ac_save_IFS=$IFS; IFS=$ac_path_separator
4958 ac_dummy="$PATH"
4959 for ac_dir in $ac_dummy; do
4960   IFS=$ac_save_IFS
4961   test -z "$ac_dir" && ac_dir=.
4962   $as_executable_p "$ac_dir/$ac_word" || continue
4963 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4964 echo "$as_me:4964: found $ac_dir/$ac_word" >&5
4965 break
4966 done
4967
4968 fi
4969 fi
4970 LIBTOOL=$ac_cv_prog_LIBTOOL
4971 if test -n "$LIBTOOL"; then
4972   echo "$as_me:4972: result: $LIBTOOL" >&5
4973 echo "${ECHO_T}$LIBTOOL" >&6
4974 else
4975   echo "$as_me:4975: result: no" >&5
4976 echo "${ECHO_T}no" >&6
4977 fi
4978
4979     test -n "$LIBTOOL" && break
4980   done
4981 fi
4982 if test -z "$LIBTOOL"; then
4983   ac_ct_LIBTOOL=$LIBTOOL
4984   for ac_prog in glibtool
4985 do
4986   # Extract the first word of "$ac_prog", so it can be a program name with args.
4987 set dummy $ac_prog; ac_word=$2
4988 echo "$as_me:4988: checking for $ac_word" >&5
4989 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4990 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4991   echo $ECHO_N "(cached) $ECHO_C" >&6
4992 else
4993   if test -n "$ac_ct_LIBTOOL"; then
4994   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4995 else
4996   ac_save_IFS=$IFS; IFS=$ac_path_separator
4997 ac_dummy="$PATH"
4998 for ac_dir in $ac_dummy; do
4999   IFS=$ac_save_IFS
5000   test -z "$ac_dir" && ac_dir=.
5001   $as_executable_p "$ac_dir/$ac_word" || continue
5002 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5003 echo "$as_me:5003: found $ac_dir/$ac_word" >&5
5004 break
5005 done
5006
5007 fi
5008 fi
5009 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5010 if test -n "$ac_ct_LIBTOOL"; then
5011   echo "$as_me:5011: result: $ac_ct_LIBTOOL" >&5
5012 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5013 else
5014   echo "$as_me:5014: result: no" >&5
5015 echo "${ECHO_T}no" >&6
5016 fi
5017
5018   test -n "$ac_ct_LIBTOOL" && break
5019 done
5020 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5021
5022   LIBTOOL=$ac_ct_LIBTOOL
5023 fi
5024
5025 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5026 then
5027         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.].*//'`
5028 else
5029         cf_cv_libtool_version=
5030 fi
5031 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5032
5033                 fi
5034         fi
5035         if test -z "$LIBTOOL" ; then
5036                 { { echo "$as_me:5036: error: Cannot find libtool" >&5
5037 echo "$as_me: error: Cannot find libtool" >&2;}
5038    { (exit 1); exit 1; }; }
5039         fi
5040         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5041         LIB_OBJECT='${OBJECTS:.o=.lo}'
5042         LIB_SUFFIX=.la
5043         LIB_CLEAN='${LIBTOOL} --mode=clean'
5044         LIB_COMPILE='${LIBTOOL} --mode=compile'
5045         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5046         LIB_INSTALL='${LIBTOOL} --mode=install'
5047         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5048         LIB_PREP=:
5049
5050 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5051 then
5052         echo "$as_me:5052: checking version of $LIBTOOL" >&5
5053 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5054
5055 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5056 then
5057         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.].*//'`
5058 else
5059         cf_cv_libtool_version=
5060 fi
5061 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5062
5063         echo "$as_me:5063: result: $cf_cv_libtool_version" >&5
5064 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5065         if test -z "$cf_cv_libtool_version" ; then
5066                 { { echo "$as_me:5066: error: This is not GNU libtool" >&5
5067 echo "$as_me: error: This is not GNU libtool" >&2;}
5068    { (exit 1); exit 1; }; }
5069         fi
5070 else
5071         { { echo "$as_me:5071: error: GNU libtool has not been found" >&5
5072 echo "$as_me: error: GNU libtool has not been found" >&2;}
5073    { (exit 1); exit 1; }; }
5074 fi
5075
5076         # special hack to add -no-undefined (which libtool should do for itself)
5077         LT_UNDEF=
5078         case "$cf_cv_system_name" in
5079         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5080                 LT_UNDEF=-no-undefined
5081                 ;;
5082         esac
5083
5084         # special hack to add --tag option for C++ compiler
5085         case $cf_cv_libtool_version in
5086         (1.[5-9]*|[2-9].[0-9.a-z]*)
5087                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5088                 LIBTOOL="$LIBTOOL --tag=CC"
5089                 ;;
5090         (*)
5091                 LIBTOOL_CXX="$LIBTOOL"
5092                 ;;
5093         esac
5094 else
5095         LIBTOOL=""
5096         LIBTOOL_CXX=""
5097 fi
5098
5099 test -z "$LIBTOOL" && ECHO_LT=
5100
5101 if test "$with_libtool" != "no" ; then
5102
5103 cf_list_models="$cf_list_models libtool"
5104
5105 else
5106
5107 echo "$as_me:5107: checking if you want to build shared libraries" >&5
5108 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5109
5110 # Check whether --with-shared or --without-shared was given.
5111 if test "${with_shared+set}" = set; then
5112   withval="$with_shared"
5113   with_shared=$withval
5114 else
5115   with_shared=no
5116 fi;
5117 echo "$as_me:5117: result: $with_shared" >&5
5118 echo "${ECHO_T}$with_shared" >&6
5119 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5120
5121 echo "$as_me:5121: checking if you want to build static libraries" >&5
5122 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5123
5124 # Check whether --with-normal or --without-normal was given.
5125 if test "${with_normal+set}" = set; then
5126   withval="$with_normal"
5127   with_normal=$withval
5128 else
5129   with_normal=yes
5130 fi;
5131 echo "$as_me:5131: result: $with_normal" >&5
5132 echo "${ECHO_T}$with_normal" >&6
5133 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5134
5135 echo "$as_me:5135: checking if you want to build debug libraries" >&5
5136 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5137
5138 # Check whether --with-debug or --without-debug was given.
5139 if test "${with_debug+set}" = set; then
5140   withval="$with_debug"
5141   with_debug=$withval
5142 else
5143   with_debug=yes
5144 fi;
5145 echo "$as_me:5145: result: $with_debug" >&5
5146 echo "${ECHO_T}$with_debug" >&6
5147 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5148
5149 echo "$as_me:5149: checking if you want to build profiling libraries" >&5
5150 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5151
5152 # Check whether --with-profile or --without-profile was given.
5153 if test "${with_profile+set}" = set; then
5154   withval="$with_profile"
5155   with_profile=$withval
5156 else
5157   with_profile=no
5158 fi;
5159 echo "$as_me:5159: result: $with_profile" >&5
5160 echo "${ECHO_T}$with_profile" >&6
5161 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5162
5163 fi
5164
5165 if test "X$cf_with_cxx_binding" != Xno; then
5166 if test "x$with_shared" = "xyes"; then
5167 echo "$as_me:5167: checking if you want to build C++ shared libraries" >&5
5168 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5169
5170 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5171 if test "${with_cxx_shared+set}" = set; then
5172   withval="$with_cxx_shared"
5173   with_shared_cxx=$withval
5174 else
5175   with_shared_cxx=no
5176 fi;
5177 echo "$as_me:5177: result: $with_shared_cxx" >&5
5178 echo "${ECHO_T}$with_shared_cxx" >&6
5179 fi
5180 fi
5181
5182 ###############################################################################
5183
5184 echo "$as_me:5184: checking for specified models" >&5
5185 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5186 test -z "$cf_list_models" && cf_list_models=normal
5187 test "$with_libtool" != "no" && cf_list_models=libtool
5188 echo "$as_me:5188: result: $cf_list_models" >&5
5189 echo "${ECHO_T}$cf_list_models" >&6
5190
5191 ### Use the first model as the default, and save its suffix for use in building
5192 ### up test-applications.
5193 echo "$as_me:5193: checking for default model" >&5
5194 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5195 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5196 echo "$as_me:5196: result: $DFT_LWR_MODEL" >&5
5197 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5198
5199 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5200
5201 TICS_NAME=tic
5202
5203 TINFO_NAME=tinfo
5204
5205 LIB_NAME=ncurses
5206
5207 LIB_DIR=../lib
5208 LIB_2ND=../../lib
5209
5210 echo "$as_me:5210: checking if you want to have a library-prefix" >&5
5211 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5212
5213 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5214 if test "${with_lib_prefix+set}" = set; then
5215   withval="$with_lib_prefix"
5216   with_lib_prefix=$withval
5217 else
5218   with_lib_prefix=auto
5219 fi;
5220 echo "$as_me:5220: result: $with_lib_prefix" >&5
5221 echo "${ECHO_T}$with_lib_prefix" >&6
5222
5223 if test $with_lib_prefix = auto
5224 then
5225
5226         case $cf_cv_system_name in
5227         (OS/2*|os2*)
5228                 if test "$DFT_LWR_MODEL" = libtool; then
5229                         LIB_PREFIX='lib'
5230                 else
5231                         LIB_PREFIX=''
5232                 fi
5233                 ;;
5234         (*)     LIB_PREFIX='lib'
5235                 ;;
5236         esac
5237 cf_prefix=$LIB_PREFIX
5238
5239 elif test $with_lib_prefix = no
5240 then
5241         LIB_PREFIX=
5242 else
5243         LIB_PREFIX=$with_lib_prefix
5244 fi
5245
5246 LIB_SUFFIX=
5247
5248         echo "$as_me:5248: checking for PATH separator" >&5
5249 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5250         case $cf_cv_system_name in
5251         (os2*)  PATH_SEPARATOR=';'  ;;
5252         (*)     ${PATH_SEPARATOR:=':'}  ;;
5253         esac
5254
5255         echo "$as_me:5255: result: $PATH_SEPARATOR" >&5
5256 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5257
5258 ###############################################################################
5259
5260 echo "$as_me:5260: checking if you want to build a separate terminfo library" >&5
5261 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5262
5263 # Check whether --with-termlib or --without-termlib was given.
5264 if test "${with_termlib+set}" = set; then
5265   withval="$with_termlib"
5266   with_termlib=$withval
5267 else
5268   with_termlib=no
5269 fi;
5270 echo "$as_me:5270: result: $with_termlib" >&5
5271 echo "${ECHO_T}$with_termlib" >&6
5272
5273 echo "$as_me:5273: checking if you want to build a separate tic library" >&5
5274 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5275
5276 # Check whether --with-ticlib or --without-ticlib was given.
5277 if test "${with_ticlib+set}" = set; then
5278   withval="$with_ticlib"
5279   with_ticlib=$withval
5280 else
5281   with_ticlib=no
5282 fi;
5283 echo "$as_me:5283: result: $with_ticlib" >&5
5284 echo "${ECHO_T}$with_ticlib" >&6
5285
5286 if test X"$CC_G_OPT" = X"" ; then
5287         CC_G_OPT='-g'
5288         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5289 fi
5290
5291 if test X"$CXX_G_OPT" = X"" ; then
5292         CXX_G_OPT='-g'
5293         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5294 fi
5295
5296 echo "$as_me:5296: checking for default loader flags" >&5
5297 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5298 case $DFT_LWR_MODEL in
5299 (libtool) LD_MODEL=''   ;;
5300 (normal)  LD_MODEL=''   ;;
5301 (debug)   LD_MODEL=$CC_G_OPT ;;
5302 (profile) LD_MODEL='-pg';;
5303 (shared)  LD_MODEL=''   ;;
5304 esac
5305 echo "$as_me:5305: result: $LD_MODEL" >&5
5306 echo "${ECHO_T}$LD_MODEL" >&6
5307
5308 case $DFT_LWR_MODEL in
5309 (shared)
5310
5311 echo "$as_me:5311: checking if rpath option should be used" >&5
5312 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5313
5314 # Check whether --enable-rpath or --disable-rpath was given.
5315 if test "${enable_rpath+set}" = set; then
5316   enableval="$enable_rpath"
5317   cf_cv_enable_rpath=$enableval
5318 else
5319   cf_cv_enable_rpath=no
5320 fi;
5321 echo "$as_me:5321: result: $cf_cv_enable_rpath" >&5
5322 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5323
5324 echo "$as_me:5324: checking if shared libraries should be relinked during install" >&5
5325 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5326
5327 # Check whether --enable-relink or --disable-relink was given.
5328 if test "${enable_relink+set}" = set; then
5329   enableval="$enable_relink"
5330   cf_cv_do_relink=$enableval
5331 else
5332   cf_cv_do_relink=yes
5333 fi;
5334 echo "$as_me:5334: result: $cf_cv_do_relink" >&5
5335 echo "${ECHO_T}$cf_cv_do_relink" >&6
5336         ;;
5337 esac
5338
5339 # we will build libraries one-level down.
5340 rel_builddir=..
5341
5342 LD_RPATH_OPT=
5343 echo "$as_me:5343: checking for an rpath option" >&5
5344 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5345 case $cf_cv_system_name in
5346 (irix*)
5347         if test "$GCC" = yes; then
5348                 LD_RPATH_OPT="-Wl,-rpath,"
5349         else
5350                 LD_RPATH_OPT="-rpath "
5351         fi
5352         ;;
5353 (linux*|gnu*|k*bsd*-gnu|freebsd*)
5354         LD_RPATH_OPT="-Wl,-rpath,"
5355         ;;
5356 (openbsd[2-9].*|mirbsd*)
5357         LD_RPATH_OPT="-Wl,-rpath,"
5358         ;;
5359 (dragonfly*)
5360         LD_RPATH_OPT="-rpath "
5361         ;;
5362 (netbsd*)
5363         LD_RPATH_OPT="-Wl,-rpath,"
5364         ;;
5365 (osf*|mls+*)
5366         LD_RPATH_OPT="-rpath "
5367         ;;
5368 (solaris2*)
5369         LD_RPATH_OPT="-R"
5370         ;;
5371 (*)
5372         ;;
5373 esac
5374 echo "$as_me:5374: result: $LD_RPATH_OPT" >&5
5375 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5376
5377 case "x$LD_RPATH_OPT" in
5378 (x-R*)
5379         echo "$as_me:5379: checking if we need a space after rpath option" >&5
5380 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5381         cf_save_LIBS="$LIBS"
5382
5383 cf_add_libs="${LD_RPATH_OPT}$libdir"
5384 # Filter out duplicates - this happens with badly-designed ".pc" files...
5385 for cf_add_1lib in $LIBS
5386 do
5387         for cf_add_2lib in $cf_add_libs
5388         do
5389                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5390                 then
5391                         cf_add_1lib=
5392                         break
5393                 fi
5394         done
5395         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5396 done
5397 LIBS="$cf_add_libs"
5398
5399         cat >conftest.$ac_ext <<_ACEOF
5400 #line 5400 "configure"
5401 #include "confdefs.h"
5402
5403 int
5404 main (void)
5405 {
5406
5407   ;
5408   return 0;
5409 }
5410 _ACEOF
5411 rm -f conftest.$ac_objext conftest$ac_exeext
5412 if { (eval echo "$as_me:5412: \"$ac_link\"") >&5
5413   (eval $ac_link) 2>&5
5414   ac_status=$?
5415   echo "$as_me:5415: \$? = $ac_status" >&5
5416   (exit $ac_status); } &&
5417          { ac_try='test -s conftest$ac_exeext'
5418   { (eval echo "$as_me:5418: \"$ac_try\"") >&5
5419   (eval $ac_try) 2>&5
5420   ac_status=$?
5421   echo "$as_me:5421: \$? = $ac_status" >&5
5422   (exit $ac_status); }; }; then
5423   cf_rpath_space=no
5424 else
5425   echo "$as_me: failed program was:" >&5
5426 cat conftest.$ac_ext >&5
5427 cf_rpath_space=yes
5428 fi
5429 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5430         LIBS="$cf_save_LIBS"
5431         echo "$as_me:5431: result: $cf_rpath_space" >&5
5432 echo "${ECHO_T}$cf_rpath_space" >&6
5433         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5434         ;;
5435 esac
5436
5437         RM_SHARED_OPTS=
5438         LOCAL_LDFLAGS=
5439         LOCAL_LDFLAGS2=
5440         LD_SHARED_OPTS=
5441         INSTALL_LIB="-m 644"
5442         : ${rel_builddir:=.}
5443
5444         shlibdir=$libdir
5445
5446         MAKE_DLLS="#"
5447
5448         cf_cv_do_symlinks=no
5449         cf_ld_rpath_opt=
5450         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5451
5452         echo "$as_me:5452: checking if release/abi version should be used for shared libs" >&5
5453 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5454
5455 # Check whether --with-shlib-version or --without-shlib-version was given.
5456 if test "${with_shlib_version+set}" = set; then
5457   withval="$with_shlib_version"
5458   test -z "$withval" && withval=auto
5459         case $withval in
5460         (yes)
5461                 cf_cv_shlib_version=auto
5462                 ;;
5463         (rel|abi|auto)
5464                 cf_cv_shlib_version=$withval
5465                 ;;
5466         (*)
5467                 echo "$as_me:5467: result: $withval" >&5
5468 echo "${ECHO_T}$withval" >&6
5469                 { { echo "$as_me:5469: error: option value must be one of: rel, abi, or auto" >&5
5470 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5471    { (exit 1); exit 1; }; }
5472                 ;;
5473         esac
5474
5475 else
5476   cf_cv_shlib_version=auto
5477 fi;
5478         echo "$as_me:5478: result: $cf_cv_shlib_version" >&5
5479 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5480
5481         cf_cv_rm_so_locs=no
5482         cf_try_cflags=
5483
5484         # Some less-capable ports of gcc support only -fpic
5485         CC_SHARED_OPTS=
5486
5487         cf_try_fPIC=no
5488         if test "$GCC" = yes
5489         then
5490                 cf_try_fPIC=yes
5491         else
5492                 case $cf_cv_system_name in
5493                 (*linux*)       # e.g., PGI compiler
5494                         cf_try_fPIC=yes
5495                         ;;
5496                 esac
5497         fi
5498
5499         if test "$cf_try_fPIC" = yes
5500         then
5501                 echo "$as_me:5501: checking which $CC option to use" >&5
5502 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5503                 cf_save_CFLAGS="$CFLAGS"
5504                 for CC_SHARED_OPTS in -fPIC -fpic ''
5505                 do
5506                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5507                         cat >conftest.$ac_ext <<_ACEOF
5508 #line 5508 "configure"
5509 #include "confdefs.h"
5510 #include <stdio.h>
5511 int
5512 main (void)
5513 {
5514 int x = 1
5515   ;
5516   return 0;
5517 }
5518 _ACEOF
5519 rm -f conftest.$ac_objext
5520 if { (eval echo "$as_me:5520: \"$ac_compile\"") >&5
5521   (eval $ac_compile) 2>&5
5522   ac_status=$?
5523   echo "$as_me:5523: \$? = $ac_status" >&5
5524   (exit $ac_status); } &&
5525          { ac_try='test -s conftest.$ac_objext'
5526   { (eval echo "$as_me:5526: \"$ac_try\"") >&5
5527   (eval $ac_try) 2>&5
5528   ac_status=$?
5529   echo "$as_me:5529: \$? = $ac_status" >&5
5530   (exit $ac_status); }; }; then
5531   break
5532 else
5533   echo "$as_me: failed program was:" >&5
5534 cat conftest.$ac_ext >&5
5535 fi
5536 rm -f conftest.$ac_objext conftest.$ac_ext
5537                 done
5538                 echo "$as_me:5538: result: $CC_SHARED_OPTS" >&5
5539 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5540                 CFLAGS="$cf_save_CFLAGS"
5541         fi
5542
5543         cf_cv_shlib_version_infix=no
5544
5545         case $cf_cv_system_name in
5546         (aix4.3-9*|aix[5-7]*)
5547                 if test "$GCC" = yes; then
5548                         CC_SHARED_OPTS='-Wl,-brtl'
5549                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5550                 else
5551                         CC_SHARED_OPTS='-brtl'
5552                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5553                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5554                 fi
5555                 ;;
5556         (beos*)
5557                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5558                 ;;
5559         (cygwin*)
5560                 CC_SHARED_OPTS=
5561                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5562                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5563                 cf_cv_shlib_version=cygdll
5564                 cf_cv_shlib_version_infix=cygdll
5565                 shlibdir=$bindir
5566                 MAKE_DLLS=
5567                 cat >mk_shared_lib.sh <<-CF_EOF
5568                 #!$SHELL
5569                 SHARED_LIB=\$1
5570                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5571                 shift
5572                 cat <<-EOF
5573                 Linking shared library
5574                 ** SHARED_LIB \$SHARED_LIB
5575                 ** IMPORT_LIB \$IMPORT_LIB
5576 EOF
5577                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5578 CF_EOF
5579                 chmod +x mk_shared_lib.sh
5580                 ;;
5581         (msys*)
5582                 CC_SHARED_OPTS=
5583                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5584                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5585                 cf_cv_shlib_version=msysdll
5586                 cf_cv_shlib_version_infix=msysdll
5587                 shlibdir=$bindir
5588                 MAKE_DLLS=
5589                 cat >mk_shared_lib.sh <<-CF_EOF
5590                 #!$SHELL
5591                 SHARED_LIB=\$1
5592                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5593                 shift
5594                 cat <<-EOF
5595                 Linking shared library
5596                 ** SHARED_LIB \$SHARED_LIB
5597                 ** IMPORT_LIB \$IMPORT_LIB
5598 EOF
5599                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5600 CF_EOF
5601                 chmod +x mk_shared_lib.sh
5602                 ;;
5603         (darwin*)
5604                 cf_try_cflags="no-cpp-precomp"
5605                 CC_SHARED_OPTS="-dynamic"
5606                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5607                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5608                 cf_cv_shlib_version_infix=yes
5609                 echo "$as_me:5609: checking if ld -search_paths_first works" >&5
5610 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5611 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5612   echo $ECHO_N "(cached) $ECHO_C" >&6
5613 else
5614
5615                         cf_save_LDFLAGS=$LDFLAGS
5616                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5617                         cat >conftest.$ac_ext <<_ACEOF
5618 #line 5618 "configure"
5619 #include "confdefs.h"
5620
5621 int
5622 main (void)
5623 {
5624 int i;
5625   ;
5626   return 0;
5627 }
5628 _ACEOF
5629 rm -f conftest.$ac_objext conftest$ac_exeext
5630 if { (eval echo "$as_me:5630: \"$ac_link\"") >&5
5631   (eval $ac_link) 2>&5
5632   ac_status=$?
5633   echo "$as_me:5633: \$? = $ac_status" >&5
5634   (exit $ac_status); } &&
5635          { ac_try='test -s conftest$ac_exeext'
5636   { (eval echo "$as_me:5636: \"$ac_try\"") >&5
5637   (eval $ac_try) 2>&5
5638   ac_status=$?
5639   echo "$as_me:5639: \$? = $ac_status" >&5
5640   (exit $ac_status); }; }; then
5641   cf_cv_ldflags_search_paths_first=yes
5642 else
5643   echo "$as_me: failed program was:" >&5
5644 cat conftest.$ac_ext >&5
5645 cf_cv_ldflags_search_paths_first=no
5646 fi
5647 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5648                                 LDFLAGS=$cf_save_LDFLAGS
5649 fi
5650 echo "$as_me:5650: result: $cf_cv_ldflags_search_paths_first" >&5
5651 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5652                 if test $cf_cv_ldflags_search_paths_first = yes; then
5653                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5654                 fi
5655                 ;;
5656         (hpux[7-8]*)
5657                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5658                 if test "$GCC" != yes; then
5659                         CC_SHARED_OPTS='+Z'
5660                 fi
5661                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5662                 INSTALL_LIB="-m 555"
5663                 ;;
5664         (hpux*)
5665                 # (tested with gcc 2.7.2 -- I don't have c89)
5666                 if test "$GCC" = yes; then
5667                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5668                 else
5669                         CC_SHARED_OPTS='+Z'
5670                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5671                 fi
5672                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5673                 # HP-UX shared libraries must be executable, and should be
5674                 # readonly to exploit a quirk in the memory manager.
5675                 INSTALL_LIB="-m 555"
5676                 ;;
5677         (interix*)
5678                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5679                 if test "$cf_cv_shlib_version" = rel; then
5680                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5681                 else
5682                         cf_shared_soname='`basename $@`'
5683                 fi
5684                 CC_SHARED_OPTS=
5685                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5686                 ;;
5687         (irix*)
5688                 if test "$cf_cv_enable_rpath" = yes ; then
5689                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5690                 fi
5691                 # tested with IRIX 5.2 and 'cc'.
5692                 if test "$GCC" != yes; then
5693                         CC_SHARED_OPTS='-KPIC'
5694                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5695                 else
5696                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5697                 fi
5698                 cf_cv_rm_so_locs=yes
5699                 ;;
5700         (linux*|gnu*|k*bsd*-gnu)
5701                 if test "$DFT_LWR_MODEL" = "shared" ; then
5702                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5703                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5704                 fi
5705                 if test "$cf_cv_enable_rpath" = yes ; then
5706                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5707                 fi
5708
5709         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5710         if test "$cf_cv_shlib_version" = rel; then
5711                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5712         else
5713                 cf_cv_shared_soname='`basename $@`'
5714         fi
5715
5716                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5717                 ;;
5718         (mingw*)
5719                 cf_cv_shlib_version=mingw
5720                 cf_cv_shlib_version_infix=mingw
5721                 shlibdir=$bindir
5722                 MAKE_DLLS=
5723                 if test "$DFT_LWR_MODEL" = "shared" ; then
5724                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5725                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5726                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5727                 fi
5728                 CC_SHARED_OPTS=
5729                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5730                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5731                 cat >mk_shared_lib.sh <<-CF_EOF
5732                 #!$SHELL
5733                 SHARED_LIB=\$1
5734                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5735                 shift
5736                 cat <<-EOF
5737                 Linking shared library
5738                 ** SHARED_LIB \$SHARED_LIB
5739                 ** IMPORT_LIB \$IMPORT_LIB
5740 EOF
5741                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5742 CF_EOF
5743                 chmod +x mk_shared_lib.sh
5744                 ;;
5745         (openbsd[2-9].*|mirbsd*)
5746                 if test "$DFT_LWR_MODEL" = "shared" ; then
5747                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5748                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5749                 fi
5750                 if test "$cf_cv_enable_rpath" = yes ; then
5751                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5752                 fi
5753                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5754
5755         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5756         if test "$cf_cv_shlib_version" = rel; then
5757                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5758         else
5759                 cf_cv_shared_soname='`basename $@`'
5760         fi
5761
5762                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5763                 ;;
5764         (nto-qnx*|openbsd*|freebsd[12].*)
5765                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5766                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
5767                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5768                 ;;
5769         (dragonfly*|freebsd*)
5770                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5771                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5772                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5773                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5774                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5775                 fi
5776
5777         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5778         if test "$cf_cv_shlib_version" = rel; then
5779                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5780         else
5781                 cf_cv_shared_soname='`basename $@`'
5782         fi
5783
5784                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5785                 ;;
5786         (netbsd*)
5787                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5788                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5789                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5790                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5791                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5792                         if test "$cf_cv_shlib_version" = auto; then
5793                         if test -f /usr/libexec/ld.elf_so; then
5794                                 cf_cv_shlib_version=abi
5795                         else
5796                                 cf_cv_shlib_version=rel
5797                         fi
5798                         fi
5799
5800         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5801         if test "$cf_cv_shlib_version" = rel; then
5802                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5803         else
5804                 cf_cv_shared_soname='`basename $@`'
5805         fi
5806
5807                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5808                 else
5809                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
5810                 fi
5811                 ;;
5812         (osf*|mls+*)
5813                 # tested with OSF/1 V3.2 and 'cc'
5814                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5815                 # link with shared libs).
5816                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5817                 case $host_os in
5818                 (osf4*)
5819                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5820                         ;;
5821                 esac
5822                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5823                 if test "$DFT_LWR_MODEL" = "shared" ; then
5824                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5825                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5826                 fi
5827                 cf_cv_rm_so_locs=yes
5828                 ;;
5829         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
5830                 # tested with osr5.0.5
5831                 if test "$GCC" != yes; then
5832                         CC_SHARED_OPTS='-belf -KPIC'
5833                 fi
5834                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5835                 if test "$cf_cv_enable_rpath" = yes ; then
5836                         # only way is to set LD_RUN_PATH but no switch for it
5837                         RUN_PATH=$libdir
5838                 fi
5839                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5840                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5841                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5842                 ;;
5843         (sunos4*)
5844                 # tested with SunOS 4.1.1 and gcc 2.7.0
5845                 if test "$GCC" != yes; then
5846                         CC_SHARED_OPTS='-KPIC'
5847                 fi
5848                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
5849                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5850                 ;;
5851         (solaris2*)
5852                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5853                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5854                 if test "$DFT_LWR_MODEL" = "shared" ; then
5855                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5856                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5857                 fi
5858                 if test "$cf_cv_enable_rpath" = yes ; then
5859                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5860                 fi
5861
5862         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5863         if test "$cf_cv_shlib_version" = rel; then
5864                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5865         else
5866                 cf_cv_shared_soname='`basename $@`'
5867         fi
5868
5869                 if test "$GCC" != yes; then
5870                         cf_save_CFLAGS="$CFLAGS"
5871                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5872                         do
5873                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5874                                 cat >conftest.$ac_ext <<_ACEOF
5875 #line 5875 "configure"
5876 #include "confdefs.h"
5877 #include <stdio.h>
5878 int
5879 main (void)
5880 {
5881 printf("Hello\n");
5882   ;
5883   return 0;
5884 }
5885 _ACEOF
5886 rm -f conftest.$ac_objext
5887 if { (eval echo "$as_me:5887: \"$ac_compile\"") >&5
5888   (eval $ac_compile) 2>&5
5889   ac_status=$?
5890   echo "$as_me:5890: \$? = $ac_status" >&5
5891   (exit $ac_status); } &&
5892          { ac_try='test -s conftest.$ac_objext'
5893   { (eval echo "$as_me:5893: \"$ac_try\"") >&5
5894   (eval $ac_try) 2>&5
5895   ac_status=$?
5896   echo "$as_me:5896: \$? = $ac_status" >&5
5897   (exit $ac_status); }; }; then
5898   break
5899 else
5900   echo "$as_me: failed program was:" >&5
5901 cat conftest.$ac_ext >&5
5902 fi
5903 rm -f conftest.$ac_objext conftest.$ac_ext
5904                         done
5905                         CFLAGS="$cf_save_CFLAGS"
5906                         CC_SHARED_OPTS=$cf_shared_opts
5907                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
5908                 else
5909                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5910                 fi
5911                 ;;
5912         (sysv5uw7*|unix_sv*)
5913                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5914                 if test "$GCC" != yes; then
5915                         CC_SHARED_OPTS='-KPIC'
5916                 fi
5917                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
5918                 ;;
5919         (*)
5920                 CC_SHARED_OPTS='unknown'
5921                 MK_SHARED_LIB='echo unknown'
5922                 ;;
5923         esac
5924
5925         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5926         case "$cf_cv_shlib_version" in
5927         (rel|abi)
5928                 case "$MK_SHARED_LIB" in
5929                 (*'-o $@')
5930                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5931                         ;;
5932                 (*)
5933                         { echo "$as_me:5933: WARNING: ignored --with-shlib-version" >&5
5934 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5935                         ;;
5936                 esac
5937                 ;;
5938         esac
5939
5940         if test -n "$cf_try_cflags"
5941         then
5942 cat > conftest.$ac_ext <<EOF
5943 #line 5943 "${as_me:-configure}"
5944 #include <stdio.h>
5945 int main(int argc, char *argv[])
5946 {
5947         printf("hello\n");
5948         return (argv[argc-1] == 0) ;
5949 }
5950 EOF
5951                 cf_save_CFLAGS="$CFLAGS"
5952                 for cf_opt in $cf_try_cflags
5953                 do
5954                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
5955                         echo "$as_me:5955: checking if CFLAGS option -$cf_opt works" >&5
5956 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
5957                         if { (eval echo "$as_me:5957: \"$ac_compile\"") >&5
5958   (eval $ac_compile) 2>&5
5959   ac_status=$?
5960   echo "$as_me:5960: \$? = $ac_status" >&5
5961   (exit $ac_status); }; then
5962                                 echo "$as_me:5962: result: yes" >&5
5963 echo "${ECHO_T}yes" >&6
5964                                 cf_save_CFLAGS="$CFLAGS"
5965                         else
5966                                 echo "$as_me:5966: result: no" >&5
5967 echo "${ECHO_T}no" >&6
5968                         fi
5969                 done
5970                 CFLAGS="$cf_save_CFLAGS"
5971         fi
5972
5973         # RPATH_LIST is a colon-separated list of directories
5974         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
5975         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
5976
5977         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
5978
5979         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
5980
5981 echo "${as_me:-configure}:5981: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
5982
5983         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
5984
5985 echo "${as_me:-configure}:5985: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
5986
5987 for model in $cf_list_models; do
5988         case $model in
5989         (libtool)
5990
5991 echo "$as_me:5991: checking for additional libtool options" >&5
5992 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
5993
5994 # Check whether --with-libtool-opts or --without-libtool-opts was given.
5995 if test "${with_libtool_opts+set}" = set; then
5996   withval="$with_libtool_opts"
5997   with_libtool_opts=$withval
5998 else
5999   with_libtool_opts=no
6000 fi;
6001 echo "$as_me:6001: result: $with_libtool_opts" >&5
6002 echo "${ECHO_T}$with_libtool_opts" >&6
6003
6004 case .$with_libtool_opts in
6005 (.yes|.no|.)
6006         ;;
6007 (*)
6008         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6009         ;;
6010 esac
6011
6012 echo "$as_me:6012: checking if exported-symbols file should be used" >&5
6013 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6014
6015 # Check whether --with-export-syms or --without-export-syms was given.
6016 if test "${with_export_syms+set}" = set; then
6017   withval="$with_export_syms"
6018   with_export_syms=$withval
6019 else
6020   with_export_syms=no
6021 fi;
6022 if test "x$with_export_syms" = xyes
6023 then
6024         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6025
6026 fi
6027 echo "$as_me:6027: result: $with_export_syms" >&5
6028 echo "${ECHO_T}$with_export_syms" >&6
6029 if test "x$with_export_syms" != xno
6030 then
6031         EXPORT_SYMS="-export-symbols $with_export_syms"
6032
6033 fi
6034
6035                 ;;
6036         (shared)
6037                 if test "$CC_SHARED_OPTS" = "unknown"; then
6038                         { { echo "$as_me:6038: error: Shared libraries are not supported in this version" >&5
6039 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6040    { (exit 1); exit 1; }; }
6041                 fi
6042                 # workaround for inept transition to PIE vs PIC...
6043                 echo "$as_me:6043: checking if current CFLAGS link properly" >&5
6044 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6045                 cat >conftest.$ac_ext <<_ACEOF
6046 #line 6046 "configure"
6047 #include "confdefs.h"
6048 #include <stdio.h>
6049 int
6050 main (void)
6051 {
6052 printf("Hello work\n");
6053   ;
6054   return 0;
6055 }
6056 _ACEOF
6057 rm -f conftest.$ac_objext conftest$ac_exeext
6058 if { (eval echo "$as_me:6058: \"$ac_link\"") >&5
6059   (eval $ac_link) 2>&5
6060   ac_status=$?
6061   echo "$as_me:6061: \$? = $ac_status" >&5
6062   (exit $ac_status); } &&
6063          { ac_try='test -s conftest$ac_exeext'
6064   { (eval echo "$as_me:6064: \"$ac_try\"") >&5
6065   (eval $ac_try) 2>&5
6066   ac_status=$?
6067   echo "$as_me:6067: \$? = $ac_status" >&5
6068   (exit $ac_status); }; }; then
6069   cf_cflags_work=yes
6070 else
6071   echo "$as_me: failed program was:" >&5
6072 cat conftest.$ac_ext >&5
6073 cf_cflags_work=no
6074 fi
6075 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6076                 echo "$as_me:6076: result: $cf_cflags_work" >&5
6077 echo "${ECHO_T}$cf_cflags_work" >&6
6078                 if test "$cf_cflags_work" = no
6079                 then
6080                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6081
6082 echo "${as_me:-configure}:6082: testing try to work around by appending shared-options ..." 1>&5
6083
6084                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6085                 fi
6086
6087 echo "$as_me:6087: checking if versioned-symbols file should be used" >&5
6088 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6089
6090 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6091 if test "${with_versioned_syms+set}" = set; then
6092   withval="$with_versioned_syms"
6093   with_versioned_syms=$withval
6094 else
6095   with_versioned_syms=no
6096 fi;
6097 if test "x$with_versioned_syms" = xyes
6098 then
6099         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6100
6101 fi
6102 echo "$as_me:6102: result: $with_versioned_syms" >&5
6103 echo "${ECHO_T}$with_versioned_syms" >&6
6104
6105 RESULTING_SYMS=
6106 VERSIONED_SYMS=
6107 WILDCARD_SYMS=
6108
6109 if test "x$with_versioned_syms" != xno
6110 then
6111         RESULTING_SYMS=$with_versioned_syms
6112         case "x$MK_SHARED_LIB" in
6113         (*-Wl,*)
6114                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6115                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6116                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6117
6118 echo "${as_me:-configure}:6118: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6119
6120                 ;;
6121         (*-dy\ *)
6122                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6123                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6124                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6125
6126 echo "${as_me:-configure}:6126: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6127
6128                 ;;
6129         (*)
6130                 { echo "$as_me:6130: WARNING: this system does not support versioned-symbols" >&5
6131 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6132                 ;;
6133         esac
6134
6135         # Linux ld can selectively override scope, e.g., of symbols beginning with
6136         # "_" by first declaring some as global, and then using a wildcard to
6137         # declare the others as local.  Some other loaders cannot do this.  Check
6138         # by constructing a (very) simple shared library and inspecting its
6139         # symbols.
6140         if test "x$VERSIONED_SYMS" != "x"
6141         then
6142                 echo "$as_me:6142: checking if wildcards can be used to selectively omit symbols" >&5
6143 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6144                 WILDCARD_SYMS=no
6145
6146                 # make sources
6147                 rm -f conftest.*
6148
6149                 cat >conftest.ver <<EOF
6150 module_1.0 {
6151 global:
6152         globalf1;
6153 local:
6154         localf1;
6155 };
6156 module_2.0 {
6157 global:
6158         globalf2;
6159 local:
6160         localf2;
6161         _*;
6162 } module_1.0;
6163 submodule_1.0 {
6164 global:
6165         subglobalf1;
6166         _ismissing;
6167 local:
6168         sublocalf1;
6169 };
6170 submodule_2.0 {
6171 global:
6172         subglobalf2;
6173 local:
6174         sublocalf2;
6175         _*;
6176 } submodule_1.0;
6177 EOF
6178                 cat >conftest.$ac_ext <<EOF
6179 #line 6179 "configure"
6180 int     _ismissing(void) { return 1; }
6181 int     _localf1(void) { return 1; }
6182 int     _localf2(void) { return 2; }
6183 int     globalf1(void) { return 1; }
6184 int     globalf2(void) { return 2; }
6185 int     _sublocalf1(void) { return 1; }
6186 int     _sublocalf2(void) { return 2; }
6187 int     subglobalf1(void) { return 1; }
6188 int     subglobalf2(void) { return 2; }
6189 EOF
6190                 cat >conftest.mk <<EOF
6191 CC=${CC}
6192 CFLAGS=${CFLAGS}
6193 CPPFLAGS=${CPPFLAGS}
6194 LDFLAGS=${LDFLAGS}
6195 LIBS=${LIBS}
6196 VERSIONED_SYMS=${VERSIONED_SYMS}
6197 RESULTING_SYMS=conftest.ver
6198 MK_SHARED_LIB=${MK_SHARED_LIB}
6199 conftest.so: conftest.$ac_cv_objext
6200                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6201 EOF
6202
6203                 # compile source, make library
6204                 if make -f conftest.mk 2>&5 >/dev/null
6205                 then
6206                         # test for missing symbol in either Data or Text section
6207                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6208                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6209                 fi
6210                 echo "$as_me:6210: result: $WILDCARD_SYMS" >&5
6211 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6212                 rm -f conftest.*
6213         fi
6214 fi
6215
6216                 ;;
6217         esac
6218 done
6219
6220 ### Checks for special libraries, must be done up-front.
6221 SHLIB_LIST=""
6222
6223 echo "$as_me:6223: checking if you want to link with the GPM mouse library" >&5
6224 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6225
6226 # Check whether --with-gpm or --without-gpm was given.
6227 if test "${with_gpm+set}" = set; then
6228   withval="$with_gpm"
6229   with_gpm=$withval
6230 else
6231   with_gpm=maybe
6232 fi;
6233 echo "$as_me:6233: result: $with_gpm" >&5
6234 echo "${ECHO_T}$with_gpm" >&6
6235
6236 if test "$with_gpm" != no ; then
6237         echo "$as_me:6237: checking for gpm.h" >&5
6238 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6239 if test "${ac_cv_header_gpm_h+set}" = set; then
6240   echo $ECHO_N "(cached) $ECHO_C" >&6
6241 else
6242   cat >conftest.$ac_ext <<_ACEOF
6243 #line 6243 "configure"
6244 #include "confdefs.h"
6245 #include <gpm.h>
6246 _ACEOF
6247 if { (eval echo "$as_me:6247: \"$ac_cpp conftest.$ac_ext\"") >&5
6248   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6249   ac_status=$?
6250   egrep -v '^ *\+' conftest.er1 >conftest.err
6251   rm -f conftest.er1
6252   cat conftest.err >&5
6253   echo "$as_me:6253: \$? = $ac_status" >&5
6254   (exit $ac_status); } >/dev/null; then
6255   if test -s conftest.err; then
6256     ac_cpp_err=$ac_c_preproc_warn_flag
6257   else
6258     ac_cpp_err=
6259   fi
6260 else
6261   ac_cpp_err=yes
6262 fi
6263 if test -z "$ac_cpp_err"; then
6264   ac_cv_header_gpm_h=yes
6265 else
6266   echo "$as_me: failed program was:" >&5
6267   cat conftest.$ac_ext >&5
6268   ac_cv_header_gpm_h=no
6269 fi
6270 rm -f conftest.err conftest.$ac_ext
6271 fi
6272 echo "$as_me:6272: result: $ac_cv_header_gpm_h" >&5
6273 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6274 if test $ac_cv_header_gpm_h = yes; then
6275
6276 cat >>confdefs.h <<\EOF
6277 #define HAVE_GPM_H 1
6278 EOF
6279
6280                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6281                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6282
6283 echo "${as_me:-configure}:6283: testing assuming we really have GPM library ..." 1>&5
6284
6285 cat >>confdefs.h <<\EOF
6286 #define HAVE_LIBGPM 1
6287 EOF
6288
6289                         with_gpm=yes
6290                 else
6291                         echo "$as_me:6291: checking for Gpm_Open in -lgpm" >&5
6292 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6293 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6294   echo $ECHO_N "(cached) $ECHO_C" >&6
6295 else
6296   ac_check_lib_save_LIBS=$LIBS
6297 LIBS="-lgpm  $LIBS"
6298 cat >conftest.$ac_ext <<_ACEOF
6299 #line 6299 "configure"
6300 #include "confdefs.h"
6301
6302 /* Override any gcc2 internal prototype to avoid an error.  */
6303 #ifdef __cplusplus
6304 extern "C"
6305 #endif
6306 /* We use char because int might match the return type of a gcc2
6307    builtin and then its argument prototype would still apply.  */
6308 char Gpm_Open ();
6309 int
6310 main (void)
6311 {
6312 Gpm_Open ();
6313   ;
6314   return 0;
6315 }
6316 _ACEOF
6317 rm -f conftest.$ac_objext conftest$ac_exeext
6318 if { (eval echo "$as_me:6318: \"$ac_link\"") >&5
6319   (eval $ac_link) 2>&5
6320   ac_status=$?
6321   echo "$as_me:6321: \$? = $ac_status" >&5
6322   (exit $ac_status); } &&
6323          { ac_try='test -s conftest$ac_exeext'
6324   { (eval echo "$as_me:6324: \"$ac_try\"") >&5
6325   (eval $ac_try) 2>&5
6326   ac_status=$?
6327   echo "$as_me:6327: \$? = $ac_status" >&5
6328   (exit $ac_status); }; }; then
6329   ac_cv_lib_gpm_Gpm_Open=yes
6330 else
6331   echo "$as_me: failed program was:" >&5
6332 cat conftest.$ac_ext >&5
6333 ac_cv_lib_gpm_Gpm_Open=no
6334 fi
6335 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6336 LIBS=$ac_check_lib_save_LIBS
6337 fi
6338 echo "$as_me:6338: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6339 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6340 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6341   with_gpm=yes
6342 else
6343
6344                                 if test "$with_gpm" = maybe; then
6345                                         { echo "$as_me:6345: WARNING: Cannot link with GPM library" >&5
6346 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6347                                         with_gpm=no
6348                                 else
6349                                         { { echo "$as_me:6349: error: Cannot link with GPM library" >&5
6350 echo "$as_me: error: Cannot link with GPM library" >&2;}
6351    { (exit 1); exit 1; }; }
6352                                 fi
6353
6354 fi
6355
6356                 fi
6357
6358 else
6359
6360                 test "$with_gpm" != maybe && { echo "$as_me:6360: WARNING: Cannot find GPM header" >&5
6361 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6362                 with_gpm=no
6363
6364 fi
6365
6366 fi
6367
6368 if test "$with_gpm" != no ; then
6369         echo "$as_me:6369: checking if you want to load GPM dynamically" >&5
6370 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6371
6372 # Check whether --with-dlsym or --without-dlsym was given.
6373 if test "${with_dlsym+set}" = set; then
6374   withval="$with_dlsym"
6375   with_dlsym=$withval
6376 else
6377   with_dlsym=yes
6378 fi;
6379         echo "$as_me:6379: result: $with_dlsym" >&5
6380 echo "${ECHO_T}$with_dlsym" >&6
6381         if test "x$with_dlsym" = xyes ; then
6382
6383 cf_have_dlsym=no
6384 echo "$as_me:6384: checking for dlsym" >&5
6385 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6386 if test "${ac_cv_func_dlsym+set}" = set; then
6387   echo $ECHO_N "(cached) $ECHO_C" >&6
6388 else
6389   cat >conftest.$ac_ext <<_ACEOF
6390 #line 6390 "configure"
6391 #include "confdefs.h"
6392 /* System header to define __stub macros and hopefully few prototypes,
6393     which can conflict with char dlsym (); below.  */
6394 #include <assert.h>
6395 /* Override any gcc2 internal prototype to avoid an error.  */
6396 #ifdef __cplusplus
6397 extern "C"
6398 #endif
6399 /* We use char because int might match the return type of a gcc2
6400    builtin and then its argument prototype would still apply.  */
6401 char dlsym ();
6402 char (*f) ();
6403
6404 int
6405 main (void)
6406 {
6407 /* The GNU C library defines this for functions which it implements
6408     to always fail with ENOSYS.  Some functions are actually named
6409     something starting with __ and the normal name is an alias.  */
6410 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6411 choke me
6412 #else
6413 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6414 #endif
6415
6416   ;
6417   return 0;
6418 }
6419 _ACEOF
6420 rm -f conftest.$ac_objext conftest$ac_exeext
6421 if { (eval echo "$as_me:6421: \"$ac_link\"") >&5
6422   (eval $ac_link) 2>&5
6423   ac_status=$?
6424   echo "$as_me:6424: \$? = $ac_status" >&5
6425   (exit $ac_status); } &&
6426          { ac_try='test -s conftest$ac_exeext'
6427   { (eval echo "$as_me:6427: \"$ac_try\"") >&5
6428   (eval $ac_try) 2>&5
6429   ac_status=$?
6430   echo "$as_me:6430: \$? = $ac_status" >&5
6431   (exit $ac_status); }; }; then
6432   ac_cv_func_dlsym=yes
6433 else
6434   echo "$as_me: failed program was:" >&5
6435 cat conftest.$ac_ext >&5
6436 ac_cv_func_dlsym=no
6437 fi
6438 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6439 fi
6440 echo "$as_me:6440: result: $ac_cv_func_dlsym" >&5
6441 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6442 if test $ac_cv_func_dlsym = yes; then
6443   cf_have_dlsym=yes
6444 else
6445
6446 cf_have_libdl=no
6447 echo "$as_me:6447: checking for dlsym in -ldl" >&5
6448 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6449 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6450   echo $ECHO_N "(cached) $ECHO_C" >&6
6451 else
6452   ac_check_lib_save_LIBS=$LIBS
6453 LIBS="-ldl  $LIBS"
6454 cat >conftest.$ac_ext <<_ACEOF
6455 #line 6455 "configure"
6456 #include "confdefs.h"
6457
6458 /* Override any gcc2 internal prototype to avoid an error.  */
6459 #ifdef __cplusplus
6460 extern "C"
6461 #endif
6462 /* We use char because int might match the return type of a gcc2
6463    builtin and then its argument prototype would still apply.  */
6464 char dlsym ();
6465 int
6466 main (void)
6467 {
6468 dlsym ();
6469   ;
6470   return 0;
6471 }
6472 _ACEOF
6473 rm -f conftest.$ac_objext conftest$ac_exeext
6474 if { (eval echo "$as_me:6474: \"$ac_link\"") >&5
6475   (eval $ac_link) 2>&5
6476   ac_status=$?
6477   echo "$as_me:6477: \$? = $ac_status" >&5
6478   (exit $ac_status); } &&
6479          { ac_try='test -s conftest$ac_exeext'
6480   { (eval echo "$as_me:6480: \"$ac_try\"") >&5
6481   (eval $ac_try) 2>&5
6482   ac_status=$?
6483   echo "$as_me:6483: \$? = $ac_status" >&5
6484   (exit $ac_status); }; }; then
6485   ac_cv_lib_dl_dlsym=yes
6486 else
6487   echo "$as_me: failed program was:" >&5
6488 cat conftest.$ac_ext >&5
6489 ac_cv_lib_dl_dlsym=no
6490 fi
6491 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6492 LIBS=$ac_check_lib_save_LIBS
6493 fi
6494 echo "$as_me:6494: result: $ac_cv_lib_dl_dlsym" >&5
6495 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6496 if test $ac_cv_lib_dl_dlsym = yes; then
6497
6498         cf_have_dlsym=yes
6499         cf_have_libdl=yes
6500 fi
6501
6502 fi
6503
6504 if test "$cf_have_dlsym" = yes ; then
6505         test "$cf_have_libdl" = yes && {
6506 cf_add_libs="-ldl"
6507 # Filter out duplicates - this happens with badly-designed ".pc" files...
6508 for cf_add_1lib in $LIBS
6509 do
6510         for cf_add_2lib in $cf_add_libs
6511         do
6512                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6513                 then
6514                         cf_add_1lib=
6515                         break
6516                 fi
6517         done
6518         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6519 done
6520 LIBS="$cf_add_libs"
6521  }
6522
6523         echo "$as_me:6523: checking whether able to link to dl*() functions" >&5
6524 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6525         cat >conftest.$ac_ext <<_ACEOF
6526 #line 6526 "configure"
6527 #include "confdefs.h"
6528 #include <dlfcn.h>
6529 int
6530 main (void)
6531 {
6532
6533                 void *obj;
6534                 if ((obj = dlopen("filename", 0)) != 0) {
6535                         if (dlsym(obj, "symbolname") == 0) {
6536                         dlclose(obj);
6537                         }
6538                 }
6539   ;
6540   return 0;
6541 }
6542 _ACEOF
6543 rm -f conftest.$ac_objext conftest$ac_exeext
6544 if { (eval echo "$as_me:6544: \"$ac_link\"") >&5
6545   (eval $ac_link) 2>&5
6546   ac_status=$?
6547   echo "$as_me:6547: \$? = $ac_status" >&5
6548   (exit $ac_status); } &&
6549          { ac_try='test -s conftest$ac_exeext'
6550   { (eval echo "$as_me:6550: \"$ac_try\"") >&5
6551   (eval $ac_try) 2>&5
6552   ac_status=$?
6553   echo "$as_me:6553: \$? = $ac_status" >&5
6554   (exit $ac_status); }; }; then
6555
6556 cat >>confdefs.h <<\EOF
6557 #define HAVE_LIBDL 1
6558 EOF
6559
6560 else
6561   echo "$as_me: failed program was:" >&5
6562 cat conftest.$ac_ext >&5
6563
6564                 { { echo "$as_me:6564: error: Cannot link test program for libdl" >&5
6565 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6566    { (exit 1); exit 1; }; }
6567 fi
6568 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6569         echo "$as_me:6569: result: ok" >&5
6570 echo "${ECHO_T}ok" >&6
6571 else
6572         { { echo "$as_me:6572: error: Cannot find dlsym function" >&5
6573 echo "$as_me: error: Cannot find dlsym function" >&2;}
6574    { (exit 1); exit 1; }; }
6575 fi
6576
6577                 if test "x$with_gpm" != xyes ; then
6578                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6579
6580 echo "${as_me:-configure}:6580: testing assuming soname for gpm is $with_gpm ..." 1>&5
6581
6582                         cf_cv_gpm_soname="$with_gpm"
6583                 else
6584
6585 echo "$as_me:6585: checking for soname of gpm library" >&5
6586 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6587 if test "${cf_cv_gpm_soname+set}" = set; then
6588   echo $ECHO_N "(cached) $ECHO_C" >&6
6589 else
6590
6591 cf_cv_gpm_soname=unknown
6592 if test "$cross_compiling" != yes ; then
6593 cat >conftest.$ac_ext <<CF_EOF
6594 #include <gpm.h>
6595 int main(void)
6596 {
6597 if (Gpm_Open(0,0)) Gpm_Close();
6598         ${cf_cv_main_return:-return}(0);
6599 }
6600 CF_EOF
6601 cf_save_LIBS="$LIBS"
6602
6603 cf_add_libs="-lgpm"
6604 # Filter out duplicates - this happens with badly-designed ".pc" files...
6605 for cf_add_1lib in $LIBS
6606 do
6607         for cf_add_2lib in $cf_add_libs
6608         do
6609                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6610                 then
6611                         cf_add_1lib=
6612                         break
6613                 fi
6614         done
6615         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6616 done
6617 LIBS="$cf_add_libs"
6618
6619         if { (eval echo "$as_me:6619: \"$ac_compile\"") >&5
6620   (eval $ac_compile) 2>&5
6621   ac_status=$?
6622   echo "$as_me:6622: \$? = $ac_status" >&5
6623   (exit $ac_status); } ; then
6624                 if { (eval echo "$as_me:6624: \"$ac_link\"") >&5
6625   (eval $ac_link) 2>&5
6626   ac_status=$?
6627   echo "$as_me:6627: \$? = $ac_status" >&5
6628   (exit $ac_status); } ; then
6629                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
6630                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
6631                 fi
6632         fi
6633 rm -rf conftest*
6634 LIBS="$cf_save_LIBS"
6635 fi
6636
6637 fi
6638 echo "$as_me:6638: result: $cf_cv_gpm_soname" >&5
6639 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
6640
6641                 fi
6642                 test "$cf_cv_gpm_soname" != "unknown" &&
6643 cat >>confdefs.h <<EOF
6644 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
6645 EOF
6646
6647                 SHLIB_LIST="-ldl $SHLIB_LIST"
6648
6649 cf_add_libs="-ldl"
6650 # Filter out duplicates - this happens with badly-designed ".pc" files...
6651 for cf_add_1lib in $PRIVATE_LIBS
6652 do
6653         for cf_add_2lib in $cf_add_libs
6654         do
6655                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6656                 then
6657                         cf_add_1lib=
6658                         break
6659                 fi
6660         done
6661         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6662 done
6663 PRIVATE_LIBS="$cf_add_libs"
6664
6665         else
6666                 SHLIB_LIST="-lgpm $SHLIB_LIST"
6667
6668 cf_add_libs="-lgpm"
6669 # Filter out duplicates - this happens with badly-designed ".pc" files...
6670 for cf_add_1lib in $TEST_LIBS
6671 do
6672         for cf_add_2lib in $cf_add_libs
6673         do
6674                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6675                 then
6676                         cf_add_1lib=
6677                         break
6678                 fi
6679         done
6680         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6681 done
6682 TEST_LIBS="$cf_add_libs"
6683
6684 cf_add_libs="-lgpm"
6685 # Filter out duplicates - this happens with badly-designed ".pc" files...
6686 for cf_add_1lib in $PRIVATE_LIBS
6687 do
6688         for cf_add_2lib in $cf_add_libs
6689         do
6690                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6691                 then
6692                         cf_add_1lib=
6693                         break
6694                 fi
6695         done
6696         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6697 done
6698 PRIVATE_LIBS="$cf_add_libs"
6699
6700         fi
6701
6702 cat >>confdefs.h <<\EOF
6703 #define HAVE_LIBGPM 1
6704 EOF
6705
6706 echo "$as_me:6706: checking for Gpm_Wgetch in -lgpm" >&5
6707 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
6708 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
6709   echo $ECHO_N "(cached) $ECHO_C" >&6
6710 else
6711   ac_check_lib_save_LIBS=$LIBS
6712 LIBS="-lgpm  $LIBS"
6713 cat >conftest.$ac_ext <<_ACEOF
6714 #line 6714 "configure"
6715 #include "confdefs.h"
6716
6717 /* Override any gcc2 internal prototype to avoid an error.  */
6718 #ifdef __cplusplus
6719 extern "C"
6720 #endif
6721 /* We use char because int might match the return type of a gcc2
6722    builtin and then its argument prototype would still apply.  */
6723 char Gpm_Wgetch ();
6724 int
6725 main (void)
6726 {
6727 Gpm_Wgetch ();
6728   ;
6729   return 0;
6730 }
6731 _ACEOF
6732 rm -f conftest.$ac_objext conftest$ac_exeext
6733 if { (eval echo "$as_me:6733: \"$ac_link\"") >&5
6734   (eval $ac_link) 2>&5
6735   ac_status=$?
6736   echo "$as_me:6736: \$? = $ac_status" >&5
6737   (exit $ac_status); } &&
6738          { ac_try='test -s conftest$ac_exeext'
6739   { (eval echo "$as_me:6739: \"$ac_try\"") >&5
6740   (eval $ac_try) 2>&5
6741   ac_status=$?
6742   echo "$as_me:6742: \$? = $ac_status" >&5
6743   (exit $ac_status); }; }; then
6744   ac_cv_lib_gpm_Gpm_Wgetch=yes
6745 else
6746   echo "$as_me: failed program was:" >&5
6747 cat conftest.$ac_ext >&5
6748 ac_cv_lib_gpm_Gpm_Wgetch=no
6749 fi
6750 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6751 LIBS=$ac_check_lib_save_LIBS
6752 fi
6753 echo "$as_me:6753: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
6754 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
6755 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
6756
6757 echo "$as_me:6757: checking if GPM is weakly bound to curses library" >&5
6758 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
6759 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
6760   echo $ECHO_N "(cached) $ECHO_C" >&6
6761 else
6762
6763 cf_cv_check_gpm_wgetch=unknown
6764 if test "$cross_compiling" != yes ; then
6765
6766 cat >conftest.$ac_ext <<CF_EOF
6767 #include <gpm.h>
6768 int main(void)
6769 {
6770         Gpm_Wgetch();
6771         ${cf_cv_main_return:-return}(0);
6772 }
6773 CF_EOF
6774
6775         cf_save_LIBS="$LIBS"
6776         # This only works if we can look at the symbol table.  If a shared
6777         # library is stripped for install, we cannot use that.  So we're forced
6778         # to rely on the static library, noting that some packagers may not
6779         # include it.
6780         LIBS="-static -lgpm -dynamic $LIBS"
6781         if { (eval echo "$as_me:6781: \"$ac_compile\"") >&5
6782   (eval $ac_compile) 2>&5
6783   ac_status=$?
6784   echo "$as_me:6784: \$? = $ac_status" >&5
6785   (exit $ac_status); } ; then
6786                 if { (eval echo "$as_me:6786: \"$ac_link\"") >&5
6787   (eval $ac_link) 2>&5
6788   ac_status=$?
6789   echo "$as_me:6789: \$? = $ac_status" >&5
6790   (exit $ac_status); } ; then
6791                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
6792                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
6793                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
6794                 fi
6795         fi
6796         rm -rf conftest*
6797         LIBS="$cf_save_LIBS"
6798 fi
6799
6800 fi
6801 echo "$as_me:6801: result: $cf_cv_check_gpm_wgetch" >&5
6802 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
6803
6804 if test "$cf_cv_check_gpm_wgetch" != yes ; then
6805         { echo "$as_me:6805: WARNING: GPM library is already linked with curses - read the FAQ" >&5
6806 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
6807 fi
6808
6809 fi
6810
6811 fi
6812
6813 # not everyone has "test -c"
6814 if test -c /dev/sysmouse 2>/dev/null ; then
6815 echo "$as_me:6815: checking if you want to use sysmouse" >&5
6816 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
6817
6818 # Check whether --with-sysmouse or --without-sysmouse was given.
6819 if test "${with_sysmouse+set}" = set; then
6820   withval="$with_sysmouse"
6821   cf_with_sysmouse=$withval
6822 else
6823   cf_with_sysmouse=maybe
6824 fi;
6825         if test "$cf_with_sysmouse" != no ; then
6826         cat >conftest.$ac_ext <<_ACEOF
6827 #line 6827 "configure"
6828 #include "confdefs.h"
6829
6830 #include <osreldate.h>
6831 #if (__FreeBSD_version >= 400017)
6832 #include <sys/consio.h>
6833 #include <sys/fbio.h>
6834 #else
6835 #include <machine/console.h>
6836 #endif
6837
6838 int
6839 main (void)
6840 {
6841
6842         struct mouse_info the_mouse;
6843         ioctl(0, CONS_MOUSECTL, &the_mouse);
6844
6845   ;
6846   return 0;
6847 }
6848 _ACEOF
6849 rm -f conftest.$ac_objext
6850 if { (eval echo "$as_me:6850: \"$ac_compile\"") >&5
6851   (eval $ac_compile) 2>&5
6852   ac_status=$?
6853   echo "$as_me:6853: \$? = $ac_status" >&5
6854   (exit $ac_status); } &&
6855          { ac_try='test -s conftest.$ac_objext'
6856   { (eval echo "$as_me:6856: \"$ac_try\"") >&5
6857   (eval $ac_try) 2>&5
6858   ac_status=$?
6859   echo "$as_me:6859: \$? = $ac_status" >&5
6860   (exit $ac_status); }; }; then
6861   cf_with_sysmouse=yes
6862 else
6863   echo "$as_me: failed program was:" >&5
6864 cat conftest.$ac_ext >&5
6865 cf_with_sysmouse=no
6866 fi
6867 rm -f conftest.$ac_objext conftest.$ac_ext
6868         fi
6869 echo "$as_me:6869: result: $cf_with_sysmouse" >&5
6870 echo "${ECHO_T}$cf_with_sysmouse" >&6
6871 test "$cf_with_sysmouse" = yes &&
6872 cat >>confdefs.h <<\EOF
6873 #define USE_SYSMOUSE 1
6874 EOF
6875
6876 fi
6877
6878 # pretend that ncurses==ncursesw==ncursest
6879 echo "$as_me:6879: checking if you want to disable library suffixes" >&5
6880 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6881
6882 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6883 if test "${enable_lib_suffixes+set}" = set; then
6884   enableval="$enable_lib_suffixes"
6885   test "$enableval" != no && enableval=yes
6886         if test "$enableval" != "yes" ; then
6887     disable_lib_suffixes=yes
6888         else
6889                 disable_lib_suffixes=no
6890         fi
6891 else
6892   enableval=yes
6893         disable_lib_suffixes=no
6894
6895 fi;
6896 echo "$as_me:6896: result: $disable_lib_suffixes" >&5
6897 echo "${ECHO_T}$disable_lib_suffixes" >&6
6898
6899 ### If we're building with rpath, try to link non-standard libs that way too.
6900 if test "$DFT_LWR_MODEL" = "shared"; then
6901
6902 echo "$as_me:6902: checking if rpath-hack should be disabled" >&5
6903 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6904
6905 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6906 if test "${enable_rpath_hack+set}" = set; then
6907   enableval="$enable_rpath_hack"
6908   test "$enableval" != no && enableval=yes
6909         if test "$enableval" != "yes" ; then
6910     cf_disable_rpath_hack=yes
6911         else
6912                 cf_disable_rpath_hack=no
6913         fi
6914 else
6915   enableval=yes
6916         cf_disable_rpath_hack=no
6917
6918 fi;
6919 echo "$as_me:6919: result: $cf_disable_rpath_hack" >&5
6920 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6921 if test "$cf_disable_rpath_hack" = no ; then
6922
6923 echo "$as_me:6923: checking for updated LDFLAGS" >&5
6924 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6925 if test -n "$LD_RPATH_OPT" ; then
6926         echo "$as_me:6926: result: maybe" >&5
6927 echo "${ECHO_T}maybe" >&6
6928
6929         for ac_prog in ldd
6930 do
6931   # Extract the first word of "$ac_prog", so it can be a program name with args.
6932 set dummy $ac_prog; ac_word=$2
6933 echo "$as_me:6933: checking for $ac_word" >&5
6934 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6935 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6936   echo $ECHO_N "(cached) $ECHO_C" >&6
6937 else
6938   if test -n "$cf_ldd_prog"; then
6939   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6940 else
6941   ac_save_IFS=$IFS; IFS=$ac_path_separator
6942 ac_dummy="$PATH"
6943 for ac_dir in $ac_dummy; do
6944   IFS=$ac_save_IFS
6945   test -z "$ac_dir" && ac_dir=.
6946   $as_executable_p "$ac_dir/$ac_word" || continue
6947 ac_cv_prog_cf_ldd_prog="$ac_prog"
6948 echo "$as_me:6948: found $ac_dir/$ac_word" >&5
6949 break
6950 done
6951
6952 fi
6953 fi
6954 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6955 if test -n "$cf_ldd_prog"; then
6956   echo "$as_me:6956: result: $cf_ldd_prog" >&5
6957 echo "${ECHO_T}$cf_ldd_prog" >&6
6958 else
6959   echo "$as_me:6959: result: no" >&5
6960 echo "${ECHO_T}no" >&6
6961 fi
6962
6963   test -n "$cf_ldd_prog" && break
6964 done
6965 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6966
6967         cf_rpath_list="/usr/lib /lib"
6968         if test "$cf_ldd_prog" != no
6969         then
6970                 cf_rpath_oops=
6971
6972 cat >conftest.$ac_ext <<_ACEOF
6973 #line 6973 "configure"
6974 #include "confdefs.h"
6975 #include <stdio.h>
6976 int
6977 main (void)
6978 {
6979 printf("Hello");
6980   ;
6981   return 0;
6982 }
6983 _ACEOF
6984 rm -f conftest.$ac_objext conftest$ac_exeext
6985 if { (eval echo "$as_me:6985: \"$ac_link\"") >&5
6986   (eval $ac_link) 2>&5
6987   ac_status=$?
6988   echo "$as_me:6988: \$? = $ac_status" >&5
6989   (exit $ac_status); } &&
6990          { ac_try='test -s conftest$ac_exeext'
6991   { (eval echo "$as_me:6991: \"$ac_try\"") >&5
6992   (eval $ac_try) 2>&5
6993   ac_status=$?
6994   echo "$as_me:6994: \$? = $ac_status" >&5
6995   (exit $ac_status); }; }; then
6996   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6997                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6998 else
6999   echo "$as_me: failed program was:" >&5
7000 cat conftest.$ac_ext >&5
7001 fi
7002 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7003
7004                 # If we passed the link-test, but get a "not found" on a given library,
7005                 # this could be due to inept reconfiguration of gcc to make it only
7006                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7007                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7008                 # /usr/local libraries.
7009                 if test -n "$cf_rpath_oops"
7010                 then
7011                         for cf_rpath_src in $cf_rpath_oops
7012                         do
7013                                 for cf_rpath_dir in \
7014                                         /usr/local \
7015                                         /usr/pkg \
7016                                         /opt/sfw
7017                                 do
7018                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7019                                         then
7020                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7021
7022 echo "${as_me:-configure}:7022: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7023
7024                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7025                                                 break
7026                                         fi
7027                                 done
7028                         done
7029                 fi
7030         fi
7031
7032         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7033
7034 echo "${as_me:-configure}:7034: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7035
7036 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7037
7038 echo "${as_me:-configure}:7038: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7039
7040 cf_rpath_dst=
7041 for cf_rpath_src in $LDFLAGS
7042 do
7043         case $cf_rpath_src in
7044         (-L*)
7045
7046                 # check if this refers to a directory which we will ignore
7047                 cf_rpath_skip=no
7048                 if test -n "$cf_rpath_list"
7049                 then
7050                         for cf_rpath_item in $cf_rpath_list
7051                         do
7052                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7053                                 then
7054                                         cf_rpath_skip=yes
7055                                         break
7056                                 fi
7057                         done
7058                 fi
7059
7060                 if test "$cf_rpath_skip" = no
7061                 then
7062                         # transform the option
7063                         if test "$LD_RPATH_OPT" = "-R " ; then
7064                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7065                         else
7066                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7067                         fi
7068
7069                         # if we have not already added this, add it now
7070                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7071                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7072                         then
7073                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7074
7075 echo "${as_me:-configure}:7075: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7076
7077                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7078                         fi
7079                 fi
7080                 ;;
7081         esac
7082         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7083 done
7084 LDFLAGS=$cf_rpath_dst
7085
7086 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7087
7088 echo "${as_me:-configure}:7088: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7089
7090 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7091
7092 echo "${as_me:-configure}:7092: testing ...checking LIBS $LIBS ..." 1>&5
7093
7094 cf_rpath_dst=
7095 for cf_rpath_src in $LIBS
7096 do
7097         case $cf_rpath_src in
7098         (-L*)
7099
7100                 # check if this refers to a directory which we will ignore
7101                 cf_rpath_skip=no
7102                 if test -n "$cf_rpath_list"
7103                 then
7104                         for cf_rpath_item in $cf_rpath_list
7105                         do
7106                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7107                                 then
7108                                         cf_rpath_skip=yes
7109                                         break
7110                                 fi
7111                         done
7112                 fi
7113
7114                 if test "$cf_rpath_skip" = no
7115                 then
7116                         # transform the option
7117                         if test "$LD_RPATH_OPT" = "-R " ; then
7118                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7119                         else
7120                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7121                         fi
7122
7123                         # if we have not already added this, add it now
7124                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7125                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7126                         then
7127                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7128
7129 echo "${as_me:-configure}:7129: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7130
7131                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7132                         fi
7133                 fi
7134                 ;;
7135         esac
7136         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7137 done
7138 LIBS=$cf_rpath_dst
7139
7140 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7141
7142 echo "${as_me:-configure}:7142: testing ...checked LIBS $LIBS ..." 1>&5
7143
7144         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7145
7146 echo "${as_me:-configure}:7146: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7147
7148 else
7149         echo "$as_me:7149: result: no" >&5
7150 echo "${ECHO_T}no" >&6
7151 fi
7152
7153 fi
7154
7155 fi
7156
7157 ###############################################################################
7158
7159 ###     use option --with-extra-suffix to append suffix to headers and libraries
7160 echo "$as_me:7160: checking if you wish to append extra suffix to header/library paths" >&5
7161 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7162 EXTRA_SUFFIX=
7163
7164 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7165 if test "${with_extra_suffix+set}" = set; then
7166   withval="$with_extra_suffix"
7167   case x$withval in
7168         (no)
7169                 ;;
7170         (xyes|x)
7171                 EXTRA_SUFFIX=$cf_cv_abi_version
7172                 ;;
7173         (*)
7174                 EXTRA_SUFFIX=$withval
7175                 ;;
7176         esac
7177
7178 fi;
7179 echo "$as_me:7179: result: $EXTRA_SUFFIX" >&5
7180 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7181
7182 ###     use option --disable-overwrite to leave out the link to -lcurses
7183 echo "$as_me:7183: checking if you wish to install ncurses overwriting curses" >&5
7184 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7185
7186 # Check whether --enable-overwrite or --disable-overwrite was given.
7187 if test "${enable_overwrite+set}" = set; then
7188   enableval="$enable_overwrite"
7189   with_overwrite=$enableval
7190 else
7191   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7192 fi;
7193 echo "$as_me:7193: result: $with_overwrite" >&5
7194 echo "${ECHO_T}$with_overwrite" >&6
7195
7196 echo "$as_me:7196: checking if external terminfo-database is used" >&5
7197 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7198
7199 # Check whether --enable-database or --disable-database was given.
7200 if test "${enable_database+set}" = set; then
7201   enableval="$enable_database"
7202   use_database=$enableval
7203 else
7204   use_database=yes
7205 fi;
7206 echo "$as_me:7206: result: $use_database" >&5
7207 echo "${ECHO_T}$use_database" >&6
7208
7209 case $host_os in
7210 (os2*)
7211         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7212         ;;
7213 (*)
7214         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7215         ;;
7216 esac
7217
7218 NCURSES_USE_DATABASE=0
7219 if test "$use_database" != no ; then
7220         NCURSES_USE_DATABASE=1
7221
7222         echo "$as_me:7222: checking which terminfo source-file will be installed" >&5
7223 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7224
7225 # Check whether --with-database or --without-database was given.
7226 if test "${with_database+set}" = set; then
7227   withval="$with_database"
7228   TERMINFO_SRC=$withval
7229 fi;
7230         echo "$as_me:7230: result: $TERMINFO_SRC" >&5
7231 echo "${ECHO_T}$TERMINFO_SRC" >&6
7232
7233         echo "$as_me:7233: checking whether to use hashed database instead of directory/tree" >&5
7234 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7235
7236 # Check whether --with-hashed-db or --without-hashed-db was given.
7237 if test "${with_hashed_db+set}" = set; then
7238   withval="$with_hashed_db"
7239
7240 else
7241   with_hashed_db=no
7242 fi;
7243         echo "$as_me:7243: result: $with_hashed_db" >&5
7244 echo "${ECHO_T}$with_hashed_db" >&6
7245 else
7246         with_hashed_db=no
7247 fi
7248
7249 echo "$as_me:7249: checking for list of fallback descriptions" >&5
7250 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7251
7252 # Check whether --with-fallbacks or --without-fallbacks was given.
7253 if test "${with_fallbacks+set}" = set; then
7254   withval="$with_fallbacks"
7255   with_fallback=$withval
7256 else
7257   with_fallback=
7258 fi;
7259 echo "$as_me:7259: result: $with_fallback" >&5
7260 echo "${ECHO_T}$with_fallback" >&6
7261 FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
7262
7263 echo "$as_me:7263: checking if you want modern xterm or antique" >&5
7264 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7265
7266 # Check whether --with-xterm-new or --without-xterm-new was given.
7267 if test "${with_xterm_new+set}" = set; then
7268   withval="$with_xterm_new"
7269   with_xterm_new=$withval
7270 else
7271   with_xterm_new=yes
7272 fi;
7273 case $with_xterm_new in
7274 (no) with_xterm_new=xterm-old;;
7275 (*)      with_xterm_new=xterm-new;;
7276 esac
7277 echo "$as_me:7277: result: $with_xterm_new" >&5
7278 echo "${ECHO_T}$with_xterm_new" >&6
7279 WHICH_XTERM=$with_xterm_new
7280
7281 echo "$as_me:7281: checking if xterm backspace sends BS or DEL" >&5
7282 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7283
7284 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7285 if test "${with_xterm_kbs+set}" = set; then
7286   withval="$with_xterm_kbs"
7287   with_xterm_kbs=$withval
7288 else
7289   with_xterm_kbs=BS
7290 fi;
7291 case x$with_xterm_kbs in
7292 (xyes|xno|xBS|xbs|x8)
7293         with_xterm_kbs=BS
7294         ;;
7295 (xDEL|xdel|x127)
7296         with_xterm_kbs=DEL
7297         ;;
7298 (*)
7299         with_xterm_kbs=$withval
7300         ;;
7301 esac
7302 echo "$as_me:7302: result: $with_xterm_kbs" >&5
7303 echo "${ECHO_T}$with_xterm_kbs" >&6
7304 XTERM_KBS=$with_xterm_kbs
7305
7306 MAKE_TERMINFO=
7307 if test "$use_database" = no ; then
7308         TERMINFO="${datadir}/terminfo"
7309         MAKE_TERMINFO="#"
7310 else
7311
7312 echo "$as_me:7312: checking for list of terminfo directories" >&5
7313 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7314
7315 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7316 if test "${with_terminfo_dirs+set}" = set; then
7317   withval="$with_terminfo_dirs"
7318
7319 else
7320   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7321 fi;
7322 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7323 cf_dst_path=
7324 for cf_src_path in $withval
7325 do
7326
7327 if test "x$prefix" != xNONE; then
7328         cf_path_syntax="$prefix"
7329 else
7330         cf_path_syntax="$ac_default_prefix"
7331 fi
7332
7333 case ".$cf_src_path" in
7334 (.\$\(*\)*|.\'*\'*)
7335         ;;
7336 (..|./*|.\\*)
7337         ;;
7338 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7339         ;;
7340 (.\${*prefix}*|.\${*dir}*)
7341         eval cf_src_path="$cf_src_path"
7342         case ".$cf_src_path" in
7343         (.NONE/*)
7344                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7345                 ;;
7346         esac
7347         ;;
7348 (.no|.NONE/*)
7349         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7350         ;;
7351 (*)
7352         { { echo "$as_me:7352: error: expected a pathname, not \"$cf_src_path\"" >&5
7353 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7354    { (exit 1); exit 1; }; }
7355         ;;
7356 esac
7357
7358   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7359   cf_dst_path="${cf_dst_path}${cf_src_path}"
7360 done
7361 IFS="$ac_save_ifs"
7362
7363 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7364 # so we have to check/work around.  We do prefer the result of "eval"...
7365 eval cf_dst_eval="$cf_dst_path"
7366 case "x$cf_dst_eval" in
7367 (xNONE*)
7368         TERMINFO_DIRS=$cf_dst_path
7369         ;;
7370 (*)
7371         TERMINFO_DIRS="$cf_dst_eval"
7372         ;;
7373 esac
7374
7375 echo "$as_me:7375: result: $TERMINFO_DIRS" >&5
7376 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7377 test -n "$TERMINFO_DIRS" &&
7378 cat >>confdefs.h <<EOF
7379 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7380 EOF
7381
7382 echo "$as_me:7382: checking for default terminfo directory" >&5
7383 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7384
7385 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7386 if test "${with_default_terminfo_dir+set}" = set; then
7387   withval="$with_default_terminfo_dir"
7388
7389 else
7390   withval="${TERMINFO:-${datadir}/terminfo}"
7391 fi; if test -n "${datadir}/terminfo" ; then
7392
7393 if test "x$prefix" != xNONE; then
7394         cf_path_syntax="$prefix"
7395 else
7396         cf_path_syntax="$ac_default_prefix"
7397 fi
7398
7399 case ".$withval" in
7400 (.\$\(*\)*|.\'*\'*)
7401         ;;
7402 (..|./*|.\\*)
7403         ;;
7404 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7405         ;;
7406 (.\${*prefix}*|.\${*dir}*)
7407         eval withval="$withval"
7408         case ".$withval" in
7409         (.NONE/*)
7410                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7411                 ;;
7412         esac
7413         ;;
7414 (.no|.NONE/*)
7415         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7416         ;;
7417 (*)
7418         { { echo "$as_me:7418: error: expected a pathname, not \"$withval\"" >&5
7419 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7420    { (exit 1); exit 1; }; }
7421         ;;
7422 esac
7423
7424 fi
7425 eval TERMINFO="$withval"
7426
7427 echo "$as_me:7427: result: $TERMINFO" >&5
7428 echo "${ECHO_T}$TERMINFO" >&6
7429
7430 cat >>confdefs.h <<EOF
7431 #define TERMINFO "$TERMINFO"
7432 EOF
7433
7434 fi
7435
7436 ###     use option --disable-big-core to make tic run on small machines
7437 ###     We need 4Mb, check if we can allocate 50% more than that.
7438 echo "$as_me:7438: checking if big-core option selected" >&5
7439 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7440
7441 # Check whether --enable-big-core or --disable-big-core was given.
7442 if test "${enable_big_core+set}" = set; then
7443   enableval="$enable_big_core"
7444   with_big_core=$enableval
7445 else
7446   if test "$cross_compiling" = yes; then
7447   with_big_core=no
7448 else
7449   cat >conftest.$ac_ext <<_ACEOF
7450 #line 7450 "configure"
7451 #include "confdefs.h"
7452
7453 #include <stdlib.h>
7454 #include <string.h>
7455 int main() {
7456         unsigned long n = 6000000L;
7457         char *s = malloc(n);
7458         if (s != 0)
7459                 s[0] = s[n-1] = 0;
7460         ${cf_cv_main_return:-return}(s == 0);
7461 }
7462 _ACEOF
7463 rm -f conftest$ac_exeext
7464 if { (eval echo "$as_me:7464: \"$ac_link\"") >&5
7465   (eval $ac_link) 2>&5
7466   ac_status=$?
7467   echo "$as_me:7467: \$? = $ac_status" >&5
7468   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7469   { (eval echo "$as_me:7469: \"$ac_try\"") >&5
7470   (eval $ac_try) 2>&5
7471   ac_status=$?
7472   echo "$as_me:7472: \$? = $ac_status" >&5
7473   (exit $ac_status); }; }; then
7474   with_big_core=yes
7475 else
7476   echo "$as_me: program exited with status $ac_status" >&5
7477 echo "$as_me: failed program was:" >&5
7478 cat conftest.$ac_ext >&5
7479 with_big_core=no
7480 fi
7481 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7482 fi
7483 fi;
7484 echo "$as_me:7484: result: $with_big_core" >&5
7485 echo "${ECHO_T}$with_big_core" >&6
7486 test "x$with_big_core" = "xyes" &&
7487 cat >>confdefs.h <<\EOF
7488 #define HAVE_BIG_CORE 1
7489 EOF
7490
7491 ### ISO C only guarantees 512-char strings, we have tables which load faster
7492 ### when constructed using "big" strings.  More than the C compiler, the awk
7493 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7494 echo "$as_me:7494: checking if big-strings option selected" >&5
7495 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7496
7497 # Check whether --enable-big-strings or --disable-big-strings was given.
7498 if test "${enable_big_strings+set}" = set; then
7499   enableval="$enable_big_strings"
7500   with_big_strings=$enableval
7501 else
7502
7503         case x$AWK in
7504         (x)
7505                 eval with_big_strings=no
7506                 ;;
7507         (*)
7508                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7509                         | $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
7510                         eval with_big_strings=yes
7511                 else
7512                         eval with_big_strings=no
7513                 fi
7514                 ;;
7515         esac
7516
7517 fi;
7518 echo "$as_me:7518: result: $with_big_strings" >&5
7519 echo "${ECHO_T}$with_big_strings" >&6
7520
7521 USE_BIG_STRINGS=0
7522 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7523
7524 ###     use option --enable-termcap to compile in the termcap fallback support
7525 echo "$as_me:7525: checking if you want termcap-fallback support" >&5
7526 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7527
7528 # Check whether --enable-termcap or --disable-termcap was given.
7529 if test "${enable_termcap+set}" = set; then
7530   enableval="$enable_termcap"
7531   with_termcap=$enableval
7532 else
7533   with_termcap=no
7534 fi;
7535 echo "$as_me:7535: result: $with_termcap" >&5
7536 echo "${ECHO_T}$with_termcap" >&6
7537
7538 NCURSES_USE_TERMCAP=0
7539 if test "x$with_termcap" != "xyes" ; then
7540         if test "$use_database" = no ; then
7541                 if test -z "$with_fallback" ; then
7542                         { { echo "$as_me:7542: error: You have disabled the database w/o specifying fallbacks" >&5
7543 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7544    { (exit 1); exit 1; }; }
7545                 fi
7546         fi
7547
7548 cat >>confdefs.h <<\EOF
7549 #define PURE_TERMINFO 1
7550 EOF
7551
7552 else
7553
7554         if test "$with_ticlib" != no ; then
7555                 { { echo "$as_me:7555: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7556 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7557    { (exit 1); exit 1; }; }
7558         fi
7559
7560         NCURSES_USE_TERMCAP=1
7561         echo "$as_me:7561: checking for list of termcap files" >&5
7562 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7563
7564 # Check whether --with-termpath or --without-termpath was given.
7565 if test "${with_termpath+set}" = set; then
7566   withval="$with_termpath"
7567
7568 else
7569   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7570 fi;
7571 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7572 cf_dst_path=
7573 for cf_src_path in $withval
7574 do
7575
7576 if test "x$prefix" != xNONE; then
7577         cf_path_syntax="$prefix"
7578 else
7579         cf_path_syntax="$ac_default_prefix"
7580 fi
7581
7582 case ".$cf_src_path" in
7583 (.\$\(*\)*|.\'*\'*)
7584         ;;
7585 (..|./*|.\\*)
7586         ;;
7587 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7588         ;;
7589 (.\${*prefix}*|.\${*dir}*)
7590         eval cf_src_path="$cf_src_path"
7591         case ".$cf_src_path" in
7592         (.NONE/*)
7593                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7594                 ;;
7595         esac
7596         ;;
7597 (.no|.NONE/*)
7598         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7599         ;;
7600 (*)
7601         { { echo "$as_me:7601: error: expected a pathname, not \"$cf_src_path\"" >&5
7602 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7603    { (exit 1); exit 1; }; }
7604         ;;
7605 esac
7606
7607   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7608   cf_dst_path="${cf_dst_path}${cf_src_path}"
7609 done
7610 IFS="$ac_save_ifs"
7611
7612 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7613 # so we have to check/work around.  We do prefer the result of "eval"...
7614 eval cf_dst_eval="$cf_dst_path"
7615 case "x$cf_dst_eval" in
7616 (xNONE*)
7617         TERMPATH=$cf_dst_path
7618         ;;
7619 (*)
7620         TERMPATH="$cf_dst_eval"
7621         ;;
7622 esac
7623
7624         echo "$as_me:7624: result: $TERMPATH" >&5
7625 echo "${ECHO_T}$TERMPATH" >&6
7626         test -n "$TERMPATH" &&
7627 cat >>confdefs.h <<EOF
7628 #define TERMPATH "$TERMPATH"
7629 EOF
7630
7631         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7632         echo "$as_me:7632: checking if fast termcap-loader is needed" >&5
7633 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7634
7635 # Check whether --enable-getcap or --disable-getcap was given.
7636 if test "${enable_getcap+set}" = set; then
7637   enableval="$enable_getcap"
7638   with_getcap=$enableval
7639 else
7640   with_getcap=no
7641 fi;
7642         echo "$as_me:7642: result: $with_getcap" >&5
7643 echo "${ECHO_T}$with_getcap" >&6
7644         test "x$with_getcap" = "xyes" &&
7645 cat >>confdefs.h <<\EOF
7646 #define USE_GETCAP 1
7647 EOF
7648
7649         echo "$as_me:7649: checking if translated termcaps will be cached in ~/.terminfo" >&5
7650 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7651
7652 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7653 if test "${enable_getcap_cache+set}" = set; then
7654   enableval="$enable_getcap_cache"
7655   with_getcap_cache=$enableval
7656 else
7657   with_getcap_cache=no
7658 fi;
7659         echo "$as_me:7659: result: $with_getcap_cache" >&5
7660 echo "${ECHO_T}$with_getcap_cache" >&6
7661         test "x$with_getcap_cache" = "xyes" &&
7662 cat >>confdefs.h <<\EOF
7663 #define USE_GETCAP_CACHE 1
7664 EOF
7665
7666 fi
7667
7668 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7669 echo "$as_me:7669: checking if ~/.terminfo is wanted" >&5
7670 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7671
7672 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7673 if test "${enable_home_terminfo+set}" = set; then
7674   enableval="$enable_home_terminfo"
7675   with_home_terminfo=$enableval
7676 else
7677   with_home_terminfo=yes
7678 fi;
7679 echo "$as_me:7679: result: $with_home_terminfo" >&5
7680 echo "${ECHO_T}$with_home_terminfo" >&6
7681 test "x$with_home_terminfo" = "xyes" &&
7682 cat >>confdefs.h <<\EOF
7683 #define USE_HOME_TERMINFO 1
7684 EOF
7685
7686 echo "$as_me:7686: checking if you want to use restricted environment when running as root" >&5
7687 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7688
7689 # Check whether --enable-root-environ or --disable-root-environ was given.
7690 if test "${enable_root_environ+set}" = set; then
7691   enableval="$enable_root_environ"
7692   with_root_environ=$enableval
7693 else
7694   with_root_environ=yes
7695 fi;
7696 echo "$as_me:7696: result: $with_root_environ" >&5
7697 echo "${ECHO_T}$with_root_environ" >&6
7698 test "x$with_root_environ" = xyes &&
7699 cat >>confdefs.h <<\EOF
7700 #define USE_ROOT_ENVIRON 1
7701 EOF
7702
7703 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7704 ###   to reduce storage requirements for the terminfo database.
7705
7706 for ac_header in \
7707 unistd.h \
7708
7709 do
7710 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7711 echo "$as_me:7711: checking for $ac_header" >&5
7712 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7713 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7714   echo $ECHO_N "(cached) $ECHO_C" >&6
7715 else
7716   cat >conftest.$ac_ext <<_ACEOF
7717 #line 7717 "configure"
7718 #include "confdefs.h"
7719 #include <$ac_header>
7720 _ACEOF
7721 if { (eval echo "$as_me:7721: \"$ac_cpp conftest.$ac_ext\"") >&5
7722   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7723   ac_status=$?
7724   egrep -v '^ *\+' conftest.er1 >conftest.err
7725   rm -f conftest.er1
7726   cat conftest.err >&5
7727   echo "$as_me:7727: \$? = $ac_status" >&5
7728   (exit $ac_status); } >/dev/null; then
7729   if test -s conftest.err; then
7730     ac_cpp_err=$ac_c_preproc_warn_flag
7731   else
7732     ac_cpp_err=
7733   fi
7734 else
7735   ac_cpp_err=yes
7736 fi
7737 if test -z "$ac_cpp_err"; then
7738   eval "$as_ac_Header=yes"
7739 else
7740   echo "$as_me: failed program was:" >&5
7741   cat conftest.$ac_ext >&5
7742   eval "$as_ac_Header=no"
7743 fi
7744 rm -f conftest.err conftest.$ac_ext
7745 fi
7746 echo "$as_me:7746: result: `eval echo '${'$as_ac_Header'}'`" >&5
7747 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7748 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7749   cat >>confdefs.h <<EOF
7750 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7751 EOF
7752
7753 fi
7754 done
7755
7756 for ac_func in \
7757         remove \
7758         unlink
7759 do
7760 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7761 echo "$as_me:7761: checking for $ac_func" >&5
7762 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7763 if eval "test \"\${$as_ac_var+set}\" = set"; then
7764   echo $ECHO_N "(cached) $ECHO_C" >&6
7765 else
7766   cat >conftest.$ac_ext <<_ACEOF
7767 #line 7767 "configure"
7768 #include "confdefs.h"
7769 /* System header to define __stub macros and hopefully few prototypes,
7770     which can conflict with char $ac_func (); below.  */
7771 #include <assert.h>
7772 /* Override any gcc2 internal prototype to avoid an error.  */
7773 #ifdef __cplusplus
7774 extern "C"
7775 #endif
7776 /* We use char because int might match the return type of a gcc2
7777    builtin and then its argument prototype would still apply.  */
7778 char $ac_func ();
7779 char (*f) ();
7780
7781 int
7782 main (void)
7783 {
7784 /* The GNU C library defines this for functions which it implements
7785     to always fail with ENOSYS.  Some functions are actually named
7786     something starting with __ and the normal name is an alias.  */
7787 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7788 choke me
7789 #else
7790 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7791 #endif
7792
7793   ;
7794   return 0;
7795 }
7796 _ACEOF
7797 rm -f conftest.$ac_objext conftest$ac_exeext
7798 if { (eval echo "$as_me:7798: \"$ac_link\"") >&5
7799   (eval $ac_link) 2>&5
7800   ac_status=$?
7801   echo "$as_me:7801: \$? = $ac_status" >&5
7802   (exit $ac_status); } &&
7803          { ac_try='test -s conftest$ac_exeext'
7804   { (eval echo "$as_me:7804: \"$ac_try\"") >&5
7805   (eval $ac_try) 2>&5
7806   ac_status=$?
7807   echo "$as_me:7807: \$? = $ac_status" >&5
7808   (exit $ac_status); }; }; then
7809   eval "$as_ac_var=yes"
7810 else
7811   echo "$as_me: failed program was:" >&5
7812 cat conftest.$ac_ext >&5
7813 eval "$as_ac_var=no"
7814 fi
7815 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7816 fi
7817 echo "$as_me:7817: result: `eval echo '${'$as_ac_var'}'`" >&5
7818 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7819 if test `eval echo '${'$as_ac_var'}'` = yes; then
7820   cat >>confdefs.h <<EOF
7821 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7822 EOF
7823
7824 fi
7825 done
7826
7827 if test "$cross_compiling" = yes ; then
7828
7829 for ac_func in \
7830                 link \
7831                 symlink
7832 do
7833 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7834 echo "$as_me:7834: checking for $ac_func" >&5
7835 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7836 if eval "test \"\${$as_ac_var+set}\" = set"; then
7837   echo $ECHO_N "(cached) $ECHO_C" >&6
7838 else
7839   cat >conftest.$ac_ext <<_ACEOF
7840 #line 7840 "configure"
7841 #include "confdefs.h"
7842 /* System header to define __stub macros and hopefully few prototypes,
7843     which can conflict with char $ac_func (); below.  */
7844 #include <assert.h>
7845 /* Override any gcc2 internal prototype to avoid an error.  */
7846 #ifdef __cplusplus
7847 extern "C"
7848 #endif
7849 /* We use char because int might match the return type of a gcc2
7850    builtin and then its argument prototype would still apply.  */
7851 char $ac_func ();
7852 char (*f) ();
7853
7854 int
7855 main (void)
7856 {
7857 /* The GNU C library defines this for functions which it implements
7858     to always fail with ENOSYS.  Some functions are actually named
7859     something starting with __ and the normal name is an alias.  */
7860 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7861 choke me
7862 #else
7863 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7864 #endif
7865
7866   ;
7867   return 0;
7868 }
7869 _ACEOF
7870 rm -f conftest.$ac_objext conftest$ac_exeext
7871 if { (eval echo "$as_me:7871: \"$ac_link\"") >&5
7872   (eval $ac_link) 2>&5
7873   ac_status=$?
7874   echo "$as_me:7874: \$? = $ac_status" >&5
7875   (exit $ac_status); } &&
7876          { ac_try='test -s conftest$ac_exeext'
7877   { (eval echo "$as_me:7877: \"$ac_try\"") >&5
7878   (eval $ac_try) 2>&5
7879   ac_status=$?
7880   echo "$as_me:7880: \$? = $ac_status" >&5
7881   (exit $ac_status); }; }; then
7882   eval "$as_ac_var=yes"
7883 else
7884   echo "$as_me: failed program was:" >&5
7885 cat conftest.$ac_ext >&5
7886 eval "$as_ac_var=no"
7887 fi
7888 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7889 fi
7890 echo "$as_me:7890: result: `eval echo '${'$as_ac_var'}'`" >&5
7891 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7892 if test `eval echo '${'$as_ac_var'}'` = yes; then
7893   cat >>confdefs.h <<EOF
7894 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7895 EOF
7896
7897 fi
7898 done
7899
7900 else
7901         echo "$as_me:7901: checking if link/symlink functions work" >&5
7902 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7903 if test "${cf_cv_link_funcs+set}" = set; then
7904   echo $ECHO_N "(cached) $ECHO_C" >&6
7905 else
7906
7907                 cf_cv_link_funcs=
7908                 for cf_func in link symlink ; do
7909                         if test "$cross_compiling" = yes; then
7910
7911                         eval 'ac_cv_func_'$cf_func'=error'
7912 else
7913   cat >conftest.$ac_ext <<_ACEOF
7914 #line 7914 "configure"
7915 #include "confdefs.h"
7916
7917 #include <sys/types.h>
7918 #include <sys/stat.h>
7919 #ifdef HAVE_UNISTD_H
7920 #include <unistd.h>
7921 #endif
7922 int main(void)
7923 {
7924         int fail = 0;
7925         char *src = "config.log";
7926         char *dst = "conftest.chk";
7927         struct stat src_sb;
7928         struct stat dst_sb;
7929
7930         stat(src, &src_sb);
7931         fail = ($cf_func("config.log", "conftest.chk") < 0)
7932             || (stat(dst, &dst_sb) < 0)
7933             || (dst_sb.st_mtime != src_sb.st_mtime);
7934 #ifdef HAVE_UNLINK
7935         unlink(dst);
7936 #else
7937         remove(dst);
7938 #endif
7939         ${cf_cv_main_return:-return} (fail);
7940 }
7941
7942 _ACEOF
7943 rm -f conftest$ac_exeext
7944 if { (eval echo "$as_me:7944: \"$ac_link\"") >&5
7945   (eval $ac_link) 2>&5
7946   ac_status=$?
7947   echo "$as_me:7947: \$? = $ac_status" >&5
7948   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7949   { (eval echo "$as_me:7949: \"$ac_try\"") >&5
7950   (eval $ac_try) 2>&5
7951   ac_status=$?
7952   echo "$as_me:7952: \$? = $ac_status" >&5
7953   (exit $ac_status); }; }; then
7954
7955                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7956                         eval 'ac_cv_func_'$cf_func'=yes'
7957 else
7958   echo "$as_me: program exited with status $ac_status" >&5
7959 echo "$as_me: failed program was:" >&5
7960 cat conftest.$ac_ext >&5
7961
7962                         eval 'ac_cv_func_'$cf_func'=no'
7963 fi
7964 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7965 fi
7966                 done
7967                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7968
7969 fi
7970 echo "$as_me:7970: result: $cf_cv_link_funcs" >&5
7971 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7972         test "$ac_cv_func_link"    = yes &&
7973 cat >>confdefs.h <<\EOF
7974 #define HAVE_LINK 1
7975 EOF
7976
7977         test "$ac_cv_func_symlink" = yes &&
7978 cat >>confdefs.h <<\EOF
7979 #define HAVE_SYMLINK 1
7980 EOF
7981
7982 fi
7983
7984 with_links=no
7985 with_symlinks=no
7986
7987 # soft links (symbolic links) are useful for some systems where hard links do
7988 # not work, or to make it simpler to copy terminfo trees around.
7989 if test "x$ac_cv_func_symlink" = xyes ; then
7990         echo "$as_me:7990: checking if tic should use symbolic links" >&5
7991 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7992
7993 # Check whether --enable-symlinks or --disable-symlinks was given.
7994 if test "${enable_symlinks+set}" = set; then
7995   enableval="$enable_symlinks"
7996   with_symlinks=$enableval
7997 else
7998   with_symlinks=no
7999 fi;
8000         echo "$as_me:8000: result: $with_symlinks" >&5
8001 echo "${ECHO_T}$with_symlinks" >&6
8002 fi
8003
8004 # If we have hard links and did not choose to use soft links instead, there is
8005 # no reason to make this choice optional - use the hard links.
8006 if test "$with_symlinks" = no ; then
8007         echo "$as_me:8007: checking if tic should use hard links" >&5
8008 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
8009         if test "x$ac_cv_func_link" = xyes ; then
8010                 with_links=yes
8011         else
8012                 with_links=no
8013         fi
8014         echo "$as_me:8014: result: $with_links" >&5
8015 echo "${ECHO_T}$with_links" >&6
8016 fi
8017
8018 test "x$with_links" = xyes &&
8019 cat >>confdefs.h <<\EOF
8020 #define USE_LINKS 1
8021 EOF
8022
8023 test "x$with_symlinks" = xyes &&
8024 cat >>confdefs.h <<\EOF
8025 #define USE_SYMLINKS 1
8026 EOF
8027
8028 ###   use option --enable-broken-linker to force on use of broken-linker support
8029 echo "$as_me:8029: checking if you want broken-linker support code" >&5
8030 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
8031
8032 # Check whether --enable-broken_linker or --disable-broken_linker was given.
8033 if test "${enable_broken_linker+set}" = set; then
8034   enableval="$enable_broken_linker"
8035   with_broken_linker=$enableval
8036 else
8037   with_broken_linker=${BROKEN_LINKER:-no}
8038 fi;
8039 echo "$as_me:8039: result: $with_broken_linker" >&5
8040 echo "${ECHO_T}$with_broken_linker" >&6
8041
8042 BROKEN_LINKER=0
8043 if test "x$with_broken_linker" = xyes ; then
8044
8045 cat >>confdefs.h <<\EOF
8046 #define BROKEN_LINKER 1
8047 EOF
8048
8049         BROKEN_LINKER=1
8050 elif test "$DFT_LWR_MODEL" = shared ; then
8051         case $cf_cv_system_name in
8052         (cygwin*)
8053
8054 cat >>confdefs.h <<\EOF
8055 #define BROKEN_LINKER 1
8056 EOF
8057
8058                 BROKEN_LINKER=1
8059                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
8060
8061 echo "${as_me:-configure}:8061: testing cygwin linker is broken anyway ..." 1>&5
8062
8063                 ;;
8064         esac
8065 fi
8066
8067 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
8068 echo "$as_me:8068: checking if tputs should process BSD-style prefix padding" >&5
8069 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
8070
8071 # Check whether --enable-bsdpad or --disable-bsdpad was given.
8072 if test "${enable_bsdpad+set}" = set; then
8073   enableval="$enable_bsdpad"
8074   with_bsdpad=$enableval
8075 else
8076   with_bsdpad=no
8077 fi;
8078 echo "$as_me:8078: result: $with_bsdpad" >&5
8079 echo "${ECHO_T}$with_bsdpad" >&6
8080 test "x$with_bsdpad" = xyes &&
8081 cat >>confdefs.h <<\EOF
8082 #define BSD_TPUTS 1
8083 EOF
8084
8085 ###   use option --enable-widec to turn on use of wide-character support
8086 NCURSES_CH_T=chtype
8087 NCURSES_LIBUTF8=0
8088
8089 NEED_WCHAR_H=0
8090 NCURSES_MBSTATE_T=0
8091 NCURSES_WCHAR_T=0
8092 NCURSES_WINT_T=0
8093
8094 # Check to define _XOPEN_SOURCE "automatically"
8095 CPPFLAGS_before_XOPEN="$CPPFLAGS"
8096
8097 cf_XOPEN_SOURCE=600
8098 cf_POSIX_C_SOURCE=199506L
8099 cf_xopen_source=
8100
8101 case $host_os in
8102 (aix[4-7]*)
8103         cf_xopen_source="-D_ALL_SOURCE"
8104         ;;
8105 (msys)
8106         cf_XOPEN_SOURCE=600
8107         ;;
8108 (darwin[0-8].*)
8109         cf_xopen_source="-D_APPLE_C_SOURCE"
8110         ;;
8111 (darwin*)
8112         cf_xopen_source="-D_DARWIN_C_SOURCE"
8113         cf_XOPEN_SOURCE=
8114         ;;
8115 (freebsd*|dragonfly*)
8116         # 5.x headers associate
8117         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8118         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8119         cf_POSIX_C_SOURCE=200112L
8120         cf_XOPEN_SOURCE=600
8121         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8122         ;;
8123 (hpux11*)
8124         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8125         ;;
8126 (hpux*)
8127         cf_xopen_source="-D_HPUX_SOURCE"
8128         ;;
8129 (irix[56].*)
8130         cf_xopen_source="-D_SGI_SOURCE"
8131         cf_XOPEN_SOURCE=
8132         ;;
8133 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
8134
8135 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
8136
8137 echo "$as_me:8137: checking if this is the GNU C library" >&5
8138 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
8139 if test "${cf_cv_gnu_library+set}" = set; then
8140   echo $ECHO_N "(cached) $ECHO_C" >&6
8141 else
8142
8143 cat >conftest.$ac_ext <<_ACEOF
8144 #line 8144 "configure"
8145 #include "confdefs.h"
8146 #include <sys/types.h>
8147 int
8148 main (void)
8149 {
8150
8151         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
8152                 return 0;
8153         #else
8154         #       error not GNU C library
8155         #endif
8156   ;
8157   return 0;
8158 }
8159 _ACEOF
8160 rm -f conftest.$ac_objext
8161 if { (eval echo "$as_me:8161: \"$ac_compile\"") >&5
8162   (eval $ac_compile) 2>&5
8163   ac_status=$?
8164   echo "$as_me:8164: \$? = $ac_status" >&5
8165   (exit $ac_status); } &&
8166          { ac_try='test -s conftest.$ac_objext'
8167   { (eval echo "$as_me:8167: \"$ac_try\"") >&5
8168   (eval $ac_try) 2>&5
8169   ac_status=$?
8170   echo "$as_me:8170: \$? = $ac_status" >&5
8171   (exit $ac_status); }; }; then
8172   cf_cv_gnu_library=yes
8173 else
8174   echo "$as_me: failed program was:" >&5
8175 cat conftest.$ac_ext >&5
8176 cf_cv_gnu_library=no
8177 fi
8178 rm -f conftest.$ac_objext conftest.$ac_ext
8179
8180 fi
8181 echo "$as_me:8181: result: $cf_cv_gnu_library" >&5
8182 echo "${ECHO_T}$cf_cv_gnu_library" >&6
8183
8184 if test x$cf_cv_gnu_library = xyes; then
8185
8186         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
8187         # was changed to help a little...
8188         echo "$as_me:8188: checking if _DEFAULT_SOURCE can be used as a basis" >&5
8189 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
8190 if test "${cf_cv_gnu_library_219+set}" = set; then
8191   echo $ECHO_N "(cached) $ECHO_C" >&6
8192 else
8193
8194                 cf_save="$CPPFLAGS"
8195                 CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
8196                 cat >conftest.$ac_ext <<_ACEOF
8197 #line 8197 "configure"
8198 #include "confdefs.h"
8199 #include <sys/types.h>
8200 int
8201 main (void)
8202 {
8203
8204                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
8205                                 return 0;
8206                         #else
8207                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
8208                         #endif
8209   ;
8210   return 0;
8211 }
8212 _ACEOF
8213 rm -f conftest.$ac_objext
8214 if { (eval echo "$as_me:8214: \"$ac_compile\"") >&5
8215   (eval $ac_compile) 2>&5
8216   ac_status=$?
8217   echo "$as_me:8217: \$? = $ac_status" >&5
8218   (exit $ac_status); } &&
8219          { ac_try='test -s conftest.$ac_objext'
8220   { (eval echo "$as_me:8220: \"$ac_try\"") >&5
8221   (eval $ac_try) 2>&5
8222   ac_status=$?
8223   echo "$as_me:8223: \$? = $ac_status" >&5
8224   (exit $ac_status); }; }; then
8225   cf_cv_gnu_library_219=yes
8226 else
8227   echo "$as_me: failed program was:" >&5
8228 cat conftest.$ac_ext >&5
8229 cf_cv_gnu_library_219=no
8230 fi
8231 rm -f conftest.$ac_objext conftest.$ac_ext
8232                 CPPFLAGS="$cf_save"
8233
8234 fi
8235 echo "$as_me:8235: result: $cf_cv_gnu_library_219" >&5
8236 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
8237
8238         if test "x$cf_cv_gnu_library_219" = xyes; then
8239                 echo "$as_me:8239: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
8240 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
8241 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
8242   echo $ECHO_N "(cached) $ECHO_C" >&6
8243 else
8244
8245                         cf_save="$CPPFLAGS"
8246                         CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source"
8247                         cat >conftest.$ac_ext <<_ACEOF
8248 #line 8248 "configure"
8249 #include "confdefs.h"
8250
8251                                 #include <limits.h>
8252                                 #include <sys/types.h>
8253
8254 int
8255 main (void)
8256 {
8257
8258                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
8259                                         return 0;
8260                                 #else
8261                                 #       error GNU C library is too old
8262                                 #endif
8263   ;
8264   return 0;
8265 }
8266 _ACEOF
8267 rm -f conftest.$ac_objext
8268 if { (eval echo "$as_me:8268: \"$ac_compile\"") >&5
8269   (eval $ac_compile) 2>&5
8270   ac_status=$?
8271   echo "$as_me:8271: \$? = $ac_status" >&5
8272   (exit $ac_status); } &&
8273          { ac_try='test -s conftest.$ac_objext'
8274   { (eval echo "$as_me:8274: \"$ac_try\"") >&5
8275   (eval $ac_try) 2>&5
8276   ac_status=$?
8277   echo "$as_me:8277: \$? = $ac_status" >&5
8278   (exit $ac_status); }; }; then
8279   cf_cv_gnu_dftsrc_219=yes
8280 else
8281   echo "$as_me: failed program was:" >&5
8282 cat conftest.$ac_ext >&5
8283 cf_cv_gnu_dftsrc_219=no
8284 fi
8285 rm -f conftest.$ac_objext conftest.$ac_ext
8286
8287 fi
8288 echo "$as_me:8288: result: $cf_cv_gnu_dftsrc_219" >&5
8289 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
8290                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
8291         else
8292                 cf_cv_gnu_dftsrc_219=maybe
8293         fi
8294
8295         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
8296
8297                 echo "$as_me:8297: checking if we must define _GNU_SOURCE" >&5
8298 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
8299 if test "${cf_cv_gnu_source+set}" = set; then
8300   echo $ECHO_N "(cached) $ECHO_C" >&6
8301 else
8302
8303                 cat >conftest.$ac_ext <<_ACEOF
8304 #line 8304 "configure"
8305 #include "confdefs.h"
8306 #include <sys/types.h>
8307 int
8308 main (void)
8309 {
8310
8311                         #ifndef _XOPEN_SOURCE
8312                         #error  expected _XOPEN_SOURCE to be defined
8313                         #endif
8314   ;
8315   return 0;
8316 }
8317 _ACEOF
8318 rm -f conftest.$ac_objext
8319 if { (eval echo "$as_me:8319: \"$ac_compile\"") >&5
8320   (eval $ac_compile) 2>&5
8321   ac_status=$?
8322   echo "$as_me:8322: \$? = $ac_status" >&5
8323   (exit $ac_status); } &&
8324          { ac_try='test -s conftest.$ac_objext'
8325   { (eval echo "$as_me:8325: \"$ac_try\"") >&5
8326   (eval $ac_try) 2>&5
8327   ac_status=$?
8328   echo "$as_me:8328: \$? = $ac_status" >&5
8329   (exit $ac_status); }; }; then
8330   cf_cv_gnu_source=no
8331 else
8332   echo "$as_me: failed program was:" >&5
8333 cat conftest.$ac_ext >&5
8334 cf_save="$CPPFLAGS"
8335                          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8336                          cat >conftest.$ac_ext <<_ACEOF
8337 #line 8337 "configure"
8338 #include "confdefs.h"
8339 #include <sys/types.h>
8340 int
8341 main (void)
8342 {
8343
8344                                 #ifdef _XOPEN_SOURCE
8345                                 #error  expected _XOPEN_SOURCE to be undefined
8346                                 #endif
8347   ;
8348   return 0;
8349 }
8350 _ACEOF
8351 rm -f conftest.$ac_objext
8352 if { (eval echo "$as_me:8352: \"$ac_compile\"") >&5
8353   (eval $ac_compile) 2>&5
8354   ac_status=$?
8355   echo "$as_me:8355: \$? = $ac_status" >&5
8356   (exit $ac_status); } &&
8357          { ac_try='test -s conftest.$ac_objext'
8358   { (eval echo "$as_me:8358: \"$ac_try\"") >&5
8359   (eval $ac_try) 2>&5
8360   ac_status=$?
8361   echo "$as_me:8361: \$? = $ac_status" >&5
8362   (exit $ac_status); }; }; then
8363   cf_cv_gnu_source=no
8364 else
8365   echo "$as_me: failed program was:" >&5
8366 cat conftest.$ac_ext >&5
8367 cf_cv_gnu_source=yes
8368 fi
8369 rm -f conftest.$ac_objext conftest.$ac_ext
8370                         CPPFLAGS="$cf_save"
8371
8372 fi
8373 rm -f conftest.$ac_objext conftest.$ac_ext
8374
8375 fi
8376 echo "$as_me:8376: result: $cf_cv_gnu_source" >&5
8377 echo "${ECHO_T}$cf_cv_gnu_source" >&6
8378
8379                 if test "$cf_cv_gnu_source" = yes
8380                 then
8381                 echo "$as_me:8381: checking if we should also define _DEFAULT_SOURCE" >&5
8382 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
8383 if test "${cf_cv_default_source+set}" = set; then
8384   echo $ECHO_N "(cached) $ECHO_C" >&6
8385 else
8386
8387                         CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
8388                         cat >conftest.$ac_ext <<_ACEOF
8389 #line 8389 "configure"
8390 #include "confdefs.h"
8391 #include <sys/types.h>
8392 int
8393 main (void)
8394 {
8395
8396                                 #ifdef _DEFAULT_SOURCE
8397                                 #error  expected _DEFAULT_SOURCE to be undefined
8398                                 #endif
8399   ;
8400   return 0;
8401 }
8402 _ACEOF
8403 rm -f conftest.$ac_objext
8404 if { (eval echo "$as_me:8404: \"$ac_compile\"") >&5
8405   (eval $ac_compile) 2>&5
8406   ac_status=$?
8407   echo "$as_me:8407: \$? = $ac_status" >&5
8408   (exit $ac_status); } &&
8409          { ac_try='test -s conftest.$ac_objext'
8410   { (eval echo "$as_me:8410: \"$ac_try\"") >&5
8411   (eval $ac_try) 2>&5
8412   ac_status=$?
8413   echo "$as_me:8413: \$? = $ac_status" >&5
8414   (exit $ac_status); }; }; then
8415   cf_cv_default_source=no
8416 else
8417   echo "$as_me: failed program was:" >&5
8418 cat conftest.$ac_ext >&5
8419 cf_cv_default_source=yes
8420 fi
8421 rm -f conftest.$ac_objext conftest.$ac_ext
8422
8423 fi
8424 echo "$as_me:8424: result: $cf_cv_default_source" >&5
8425 echo "${ECHO_T}$cf_cv_default_source" >&6
8426                         test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
8427                 fi
8428         fi
8429
8430 fi
8431
8432         ;;
8433 (minix*)
8434         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
8435         ;;
8436 (mirbsd*)
8437         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
8438         cf_XOPEN_SOURCE=
8439
8440 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8441
8442 cf_save_CFLAGS="$CFLAGS"
8443 cf_save_CPPFLAGS="$CPPFLAGS"
8444
8445 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8446         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8447                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8448
8449 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8450         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8451                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8452
8453 echo "$as_me:8453: checking if we should define _POSIX_C_SOURCE" >&5
8454 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8455 if test "${cf_cv_posix_c_source+set}" = set; then
8456   echo $ECHO_N "(cached) $ECHO_C" >&6
8457 else
8458
8459 echo "${as_me:-configure}:8459: testing if the symbol is already defined go no further ..." 1>&5
8460
8461         cat >conftest.$ac_ext <<_ACEOF
8462 #line 8462 "configure"
8463 #include "confdefs.h"
8464 #include <sys/types.h>
8465 int
8466 main (void)
8467 {
8468
8469 #ifndef _POSIX_C_SOURCE
8470 make an error
8471 #endif
8472   ;
8473   return 0;
8474 }
8475 _ACEOF
8476 rm -f conftest.$ac_objext
8477 if { (eval echo "$as_me:8477: \"$ac_compile\"") >&5
8478   (eval $ac_compile) 2>&5
8479   ac_status=$?
8480   echo "$as_me:8480: \$? = $ac_status" >&5
8481   (exit $ac_status); } &&
8482          { ac_try='test -s conftest.$ac_objext'
8483   { (eval echo "$as_me:8483: \"$ac_try\"") >&5
8484   (eval $ac_try) 2>&5
8485   ac_status=$?
8486   echo "$as_me:8486: \$? = $ac_status" >&5
8487   (exit $ac_status); }; }; then
8488   cf_cv_posix_c_source=no
8489 else
8490   echo "$as_me: failed program was:" >&5
8491 cat conftest.$ac_ext >&5
8492 cf_want_posix_source=no
8493          case .$cf_POSIX_C_SOURCE in
8494          (.[12]??*)
8495                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8496                 ;;
8497          (.2)
8498                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8499                 cf_want_posix_source=yes
8500                 ;;
8501          (.*)
8502                 cf_want_posix_source=yes
8503                 ;;
8504          esac
8505          if test "$cf_want_posix_source" = yes ; then
8506                 cat >conftest.$ac_ext <<_ACEOF
8507 #line 8507 "configure"
8508 #include "confdefs.h"
8509 #include <sys/types.h>
8510 int
8511 main (void)
8512 {
8513
8514 #ifdef _POSIX_SOURCE
8515 make an error
8516 #endif
8517   ;
8518   return 0;
8519 }
8520 _ACEOF
8521 rm -f conftest.$ac_objext
8522 if { (eval echo "$as_me:8522: \"$ac_compile\"") >&5
8523   (eval $ac_compile) 2>&5
8524   ac_status=$?
8525   echo "$as_me:8525: \$? = $ac_status" >&5
8526   (exit $ac_status); } &&
8527          { ac_try='test -s conftest.$ac_objext'
8528   { (eval echo "$as_me:8528: \"$ac_try\"") >&5
8529   (eval $ac_try) 2>&5
8530   ac_status=$?
8531   echo "$as_me:8531: \$? = $ac_status" >&5
8532   (exit $ac_status); }; }; then
8533   :
8534 else
8535   echo "$as_me: failed program was:" >&5
8536 cat conftest.$ac_ext >&5
8537 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8538 fi
8539 rm -f conftest.$ac_objext conftest.$ac_ext
8540          fi
8541
8542 echo "${as_me:-configure}:8542: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8543
8544          CFLAGS="$cf_trim_CFLAGS"
8545          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8546
8547 echo "${as_me:-configure}:8547: testing if the second compile does not leave our definition intact error ..." 1>&5
8548
8549          cat >conftest.$ac_ext <<_ACEOF
8550 #line 8550 "configure"
8551 #include "confdefs.h"
8552 #include <sys/types.h>
8553 int
8554 main (void)
8555 {
8556
8557 #ifndef _POSIX_C_SOURCE
8558 make an error
8559 #endif
8560   ;
8561   return 0;
8562 }
8563 _ACEOF
8564 rm -f conftest.$ac_objext
8565 if { (eval echo "$as_me:8565: \"$ac_compile\"") >&5
8566   (eval $ac_compile) 2>&5
8567   ac_status=$?
8568   echo "$as_me:8568: \$? = $ac_status" >&5
8569   (exit $ac_status); } &&
8570          { ac_try='test -s conftest.$ac_objext'
8571   { (eval echo "$as_me:8571: \"$ac_try\"") >&5
8572   (eval $ac_try) 2>&5
8573   ac_status=$?
8574   echo "$as_me:8574: \$? = $ac_status" >&5
8575   (exit $ac_status); }; }; then
8576   :
8577 else
8578   echo "$as_me: failed program was:" >&5
8579 cat conftest.$ac_ext >&5
8580 cf_cv_posix_c_source=no
8581 fi
8582 rm -f conftest.$ac_objext conftest.$ac_ext
8583          CFLAGS="$cf_save_CFLAGS"
8584          CPPFLAGS="$cf_save_CPPFLAGS"
8585
8586 fi
8587 rm -f conftest.$ac_objext conftest.$ac_ext
8588
8589 fi
8590 echo "$as_me:8590: result: $cf_cv_posix_c_source" >&5
8591 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8592
8593 if test "$cf_cv_posix_c_source" != no ; then
8594         CFLAGS="$cf_trim_CFLAGS"
8595         CPPFLAGS="$cf_trim_CPPFLAGS"
8596
8597 cf_fix_cppflags=no
8598 cf_new_cflags=
8599 cf_new_cppflags=
8600 cf_new_extra_cppflags=
8601
8602 for cf_add_cflags in $cf_cv_posix_c_source
8603 do
8604 case $cf_fix_cppflags in
8605 (no)
8606         case $cf_add_cflags in
8607         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8608                 case $cf_add_cflags in
8609                 (-D*)
8610                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8611
8612                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8613                                 && test -z "${cf_tst_cflags}" \
8614                                 && cf_fix_cppflags=yes
8615
8616                         if test $cf_fix_cppflags = yes ; then
8617
8618         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8619         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8620
8621                                 continue
8622                         elif test "${cf_tst_cflags}" = "\"'" ; then
8623
8624         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8625         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8626
8627                                 continue
8628                         fi
8629                         ;;
8630                 esac
8631                 case "$CPPFLAGS" in
8632                 (*$cf_add_cflags)
8633                         ;;
8634                 (*)
8635                         case $cf_add_cflags in
8636                         (-D*)
8637                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8638
8639 CPPFLAGS=`echo "$CPPFLAGS" | \
8640         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8641                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8642
8643                                 ;;
8644                         esac
8645
8646         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8647         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8648
8649                         ;;
8650                 esac
8651                 ;;
8652         (*)
8653
8654         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8655         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8656
8657                 ;;
8658         esac
8659         ;;
8660 (yes)
8661
8662         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8663         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8664
8665         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8666
8667         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8668                 && test -z "${cf_tst_cflags}" \
8669                 && cf_fix_cppflags=no
8670         ;;
8671 esac
8672 done
8673
8674 if test -n "$cf_new_cflags" ; then
8675
8676         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8677         CFLAGS="${CFLAGS}$cf_new_cflags"
8678
8679 fi
8680
8681 if test -n "$cf_new_cppflags" ; then
8682
8683         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8684         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8685
8686 fi
8687
8688 if test -n "$cf_new_extra_cppflags" ; then
8689
8690         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8691         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8692
8693 fi
8694
8695 fi
8696
8697         ;;
8698 (netbsd*)
8699         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8700         ;;
8701 (openbsd[4-9]*)
8702         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8703         cf_xopen_source="-D_BSD_SOURCE"
8704         cf_XOPEN_SOURCE=600
8705         ;;
8706 (openbsd*)
8707         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8708         ;;
8709 (osf[45]*)
8710         cf_xopen_source="-D_OSF_SOURCE"
8711         ;;
8712 (nto-qnx*)
8713         cf_xopen_source="-D_QNX_SOURCE"
8714         ;;
8715 (sco*)
8716         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8717         ;;
8718 (solaris2.*)
8719         cf_xopen_source="-D__EXTENSIONS__"
8720         cf_cv_xopen_source=broken
8721         ;;
8722 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8723         cf_XOPEN_SOURCE=
8724         cf_POSIX_C_SOURCE=
8725         ;;
8726 (*)
8727
8728 echo "$as_me:8728: checking if we should define _XOPEN_SOURCE" >&5
8729 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8730 if test "${cf_cv_xopen_source+set}" = set; then
8731   echo $ECHO_N "(cached) $ECHO_C" >&6
8732 else
8733
8734         cat >conftest.$ac_ext <<_ACEOF
8735 #line 8735 "configure"
8736 #include "confdefs.h"
8737
8738 #include <stdlib.h>
8739 #include <string.h>
8740 #include <sys/types.h>
8741
8742 int
8743 main (void)
8744 {
8745
8746 #ifndef _XOPEN_SOURCE
8747 make an error
8748 #endif
8749   ;
8750   return 0;
8751 }
8752 _ACEOF
8753 rm -f conftest.$ac_objext
8754 if { (eval echo "$as_me:8754: \"$ac_compile\"") >&5
8755   (eval $ac_compile) 2>&5
8756   ac_status=$?
8757   echo "$as_me:8757: \$? = $ac_status" >&5
8758   (exit $ac_status); } &&
8759          { ac_try='test -s conftest.$ac_objext'
8760   { (eval echo "$as_me:8760: \"$ac_try\"") >&5
8761   (eval $ac_try) 2>&5
8762   ac_status=$?
8763   echo "$as_me:8763: \$? = $ac_status" >&5
8764   (exit $ac_status); }; }; then
8765   cf_cv_xopen_source=no
8766 else
8767   echo "$as_me: failed program was:" >&5
8768 cat conftest.$ac_ext >&5
8769 cf_save="$CPPFLAGS"
8770          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8771          cat >conftest.$ac_ext <<_ACEOF
8772 #line 8772 "configure"
8773 #include "confdefs.h"
8774
8775 #include <stdlib.h>
8776 #include <string.h>
8777 #include <sys/types.h>
8778
8779 int
8780 main (void)
8781 {
8782
8783 #ifdef _XOPEN_SOURCE
8784 make an error
8785 #endif
8786   ;
8787   return 0;
8788 }
8789 _ACEOF
8790 rm -f conftest.$ac_objext
8791 if { (eval echo "$as_me:8791: \"$ac_compile\"") >&5
8792   (eval $ac_compile) 2>&5
8793   ac_status=$?
8794   echo "$as_me:8794: \$? = $ac_status" >&5
8795   (exit $ac_status); } &&
8796          { ac_try='test -s conftest.$ac_objext'
8797   { (eval echo "$as_me:8797: \"$ac_try\"") >&5
8798   (eval $ac_try) 2>&5
8799   ac_status=$?
8800   echo "$as_me:8800: \$? = $ac_status" >&5
8801   (exit $ac_status); }; }; then
8802   cf_cv_xopen_source=no
8803 else
8804   echo "$as_me: failed program was:" >&5
8805 cat conftest.$ac_ext >&5
8806 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8807 fi
8808 rm -f conftest.$ac_objext conftest.$ac_ext
8809         CPPFLAGS="$cf_save"
8810
8811 fi
8812 rm -f conftest.$ac_objext conftest.$ac_ext
8813
8814 fi
8815 echo "$as_me:8815: result: $cf_cv_xopen_source" >&5
8816 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8817
8818 if test "$cf_cv_xopen_source" != no ; then
8819
8820 CFLAGS=`echo "$CFLAGS" | \
8821         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8822                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8823
8824 CPPFLAGS=`echo "$CPPFLAGS" | \
8825         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8826                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8827
8828         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8829
8830 cf_fix_cppflags=no
8831 cf_new_cflags=
8832 cf_new_cppflags=
8833 cf_new_extra_cppflags=
8834
8835 for cf_add_cflags in $cf_temp_xopen_source
8836 do
8837 case $cf_fix_cppflags in
8838 (no)
8839         case $cf_add_cflags in
8840         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8841                 case $cf_add_cflags in
8842                 (-D*)
8843                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8844
8845                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8846                                 && test -z "${cf_tst_cflags}" \
8847                                 && cf_fix_cppflags=yes
8848
8849                         if test $cf_fix_cppflags = yes ; then
8850
8851         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8852         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8853
8854                                 continue
8855                         elif test "${cf_tst_cflags}" = "\"'" ; then
8856
8857         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8858         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8859
8860                                 continue
8861                         fi
8862                         ;;
8863                 esac
8864                 case "$CPPFLAGS" in
8865                 (*$cf_add_cflags)
8866                         ;;
8867                 (*)
8868                         case $cf_add_cflags in
8869                         (-D*)
8870                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8871
8872 CPPFLAGS=`echo "$CPPFLAGS" | \
8873         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8874                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8875
8876                                 ;;
8877                         esac
8878
8879         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8880         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8881
8882                         ;;
8883                 esac
8884                 ;;
8885         (*)
8886
8887         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8888         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8889
8890                 ;;
8891         esac
8892         ;;
8893 (yes)
8894
8895         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8896         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8897
8898         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8899
8900         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8901                 && test -z "${cf_tst_cflags}" \
8902                 && cf_fix_cppflags=no
8903         ;;
8904 esac
8905 done
8906
8907 if test -n "$cf_new_cflags" ; then
8908
8909         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8910         CFLAGS="${CFLAGS}$cf_new_cflags"
8911
8912 fi
8913
8914 if test -n "$cf_new_cppflags" ; then
8915
8916         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8917         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8918
8919 fi
8920
8921 if test -n "$cf_new_extra_cppflags" ; then
8922
8923         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8924         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8925
8926 fi
8927
8928 fi
8929
8930 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8931
8932 cf_save_CFLAGS="$CFLAGS"
8933 cf_save_CPPFLAGS="$CPPFLAGS"
8934
8935 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8936         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8937                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8938
8939 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8940         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8941                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8942
8943 echo "$as_me:8943: checking if we should define _POSIX_C_SOURCE" >&5
8944 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8945 if test "${cf_cv_posix_c_source+set}" = set; then
8946   echo $ECHO_N "(cached) $ECHO_C" >&6
8947 else
8948
8949 echo "${as_me:-configure}:8949: testing if the symbol is already defined go no further ..." 1>&5
8950
8951         cat >conftest.$ac_ext <<_ACEOF
8952 #line 8952 "configure"
8953 #include "confdefs.h"
8954 #include <sys/types.h>
8955 int
8956 main (void)
8957 {
8958
8959 #ifndef _POSIX_C_SOURCE
8960 make an error
8961 #endif
8962   ;
8963   return 0;
8964 }
8965 _ACEOF
8966 rm -f conftest.$ac_objext
8967 if { (eval echo "$as_me:8967: \"$ac_compile\"") >&5
8968   (eval $ac_compile) 2>&5
8969   ac_status=$?
8970   echo "$as_me:8970: \$? = $ac_status" >&5
8971   (exit $ac_status); } &&
8972          { ac_try='test -s conftest.$ac_objext'
8973   { (eval echo "$as_me:8973: \"$ac_try\"") >&5
8974   (eval $ac_try) 2>&5
8975   ac_status=$?
8976   echo "$as_me:8976: \$? = $ac_status" >&5
8977   (exit $ac_status); }; }; then
8978   cf_cv_posix_c_source=no
8979 else
8980   echo "$as_me: failed program was:" >&5
8981 cat conftest.$ac_ext >&5
8982 cf_want_posix_source=no
8983          case .$cf_POSIX_C_SOURCE in
8984          (.[12]??*)
8985                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8986                 ;;
8987          (.2)
8988                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8989                 cf_want_posix_source=yes
8990                 ;;
8991          (.*)
8992                 cf_want_posix_source=yes
8993                 ;;
8994          esac
8995          if test "$cf_want_posix_source" = yes ; then
8996                 cat >conftest.$ac_ext <<_ACEOF
8997 #line 8997 "configure"
8998 #include "confdefs.h"
8999 #include <sys/types.h>
9000 int
9001 main (void)
9002 {
9003
9004 #ifdef _POSIX_SOURCE
9005 make an error
9006 #endif
9007   ;
9008   return 0;
9009 }
9010 _ACEOF
9011 rm -f conftest.$ac_objext
9012 if { (eval echo "$as_me:9012: \"$ac_compile\"") >&5
9013   (eval $ac_compile) 2>&5
9014   ac_status=$?
9015   echo "$as_me:9015: \$? = $ac_status" >&5
9016   (exit $ac_status); } &&
9017          { ac_try='test -s conftest.$ac_objext'
9018   { (eval echo "$as_me:9018: \"$ac_try\"") >&5
9019   (eval $ac_try) 2>&5
9020   ac_status=$?
9021   echo "$as_me:9021: \$? = $ac_status" >&5
9022   (exit $ac_status); }; }; then
9023   :
9024 else
9025   echo "$as_me: failed program was:" >&5
9026 cat conftest.$ac_ext >&5
9027 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9028 fi
9029 rm -f conftest.$ac_objext conftest.$ac_ext
9030          fi
9031
9032 echo "${as_me:-configure}:9032: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9033
9034          CFLAGS="$cf_trim_CFLAGS"
9035          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
9036
9037 echo "${as_me:-configure}:9037: testing if the second compile does not leave our definition intact error ..." 1>&5
9038
9039          cat >conftest.$ac_ext <<_ACEOF
9040 #line 9040 "configure"
9041 #include "confdefs.h"
9042 #include <sys/types.h>
9043 int
9044 main (void)
9045 {
9046
9047 #ifndef _POSIX_C_SOURCE
9048 make an error
9049 #endif
9050   ;
9051   return 0;
9052 }
9053 _ACEOF
9054 rm -f conftest.$ac_objext
9055 if { (eval echo "$as_me:9055: \"$ac_compile\"") >&5
9056   (eval $ac_compile) 2>&5
9057   ac_status=$?
9058   echo "$as_me:9058: \$? = $ac_status" >&5
9059   (exit $ac_status); } &&
9060          { ac_try='test -s conftest.$ac_objext'
9061   { (eval echo "$as_me:9061: \"$ac_try\"") >&5
9062   (eval $ac_try) 2>&5
9063   ac_status=$?
9064   echo "$as_me:9064: \$? = $ac_status" >&5
9065   (exit $ac_status); }; }; then
9066   :
9067 else
9068   echo "$as_me: failed program was:" >&5
9069 cat conftest.$ac_ext >&5
9070 cf_cv_posix_c_source=no
9071 fi
9072 rm -f conftest.$ac_objext conftest.$ac_ext
9073          CFLAGS="$cf_save_CFLAGS"
9074          CPPFLAGS="$cf_save_CPPFLAGS"
9075
9076 fi
9077 rm -f conftest.$ac_objext conftest.$ac_ext
9078
9079 fi
9080 echo "$as_me:9080: result: $cf_cv_posix_c_source" >&5
9081 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9082
9083 if test "$cf_cv_posix_c_source" != no ; then
9084         CFLAGS="$cf_trim_CFLAGS"
9085         CPPFLAGS="$cf_trim_CPPFLAGS"
9086
9087 cf_fix_cppflags=no
9088 cf_new_cflags=
9089 cf_new_cppflags=
9090 cf_new_extra_cppflags=
9091
9092 for cf_add_cflags in $cf_cv_posix_c_source
9093 do
9094 case $cf_fix_cppflags in
9095 (no)
9096         case $cf_add_cflags in
9097         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9098                 case $cf_add_cflags in
9099                 (-D*)
9100                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9101
9102                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9103                                 && test -z "${cf_tst_cflags}" \
9104                                 && cf_fix_cppflags=yes
9105
9106                         if test $cf_fix_cppflags = yes ; then
9107
9108         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9109         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9110
9111                                 continue
9112                         elif test "${cf_tst_cflags}" = "\"'" ; then
9113
9114         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9115         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9116
9117                                 continue
9118                         fi
9119                         ;;
9120                 esac
9121                 case "$CPPFLAGS" in
9122                 (*$cf_add_cflags)
9123                         ;;
9124                 (*)
9125                         case $cf_add_cflags in
9126                         (-D*)
9127                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9128
9129 CPPFLAGS=`echo "$CPPFLAGS" | \
9130         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9131                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9132
9133                                 ;;
9134                         esac
9135
9136         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9137         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9138
9139                         ;;
9140                 esac
9141                 ;;
9142         (*)
9143
9144         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9145         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9146
9147                 ;;
9148         esac
9149         ;;
9150 (yes)
9151
9152         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9153         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9154
9155         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9156
9157         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9158                 && test -z "${cf_tst_cflags}" \
9159                 && cf_fix_cppflags=no
9160         ;;
9161 esac
9162 done
9163
9164 if test -n "$cf_new_cflags" ; then
9165
9166         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9167         CFLAGS="${CFLAGS}$cf_new_cflags"
9168
9169 fi
9170
9171 if test -n "$cf_new_cppflags" ; then
9172
9173         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9174         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9175
9176 fi
9177
9178 if test -n "$cf_new_extra_cppflags" ; then
9179
9180         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9181         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9182
9183 fi
9184
9185 fi
9186
9187         ;;
9188 esac
9189
9190 if test -n "$cf_xopen_source" ; then
9191
9192 cf_fix_cppflags=no
9193 cf_new_cflags=
9194 cf_new_cppflags=
9195 cf_new_extra_cppflags=
9196
9197 for cf_add_cflags in $cf_xopen_source
9198 do
9199 case $cf_fix_cppflags in
9200 (no)
9201         case $cf_add_cflags in
9202         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9203                 case $cf_add_cflags in
9204                 (-D*)
9205                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9206
9207                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9208                                 && test -z "${cf_tst_cflags}" \
9209                                 && cf_fix_cppflags=yes
9210
9211                         if test $cf_fix_cppflags = yes ; then
9212
9213         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9214         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9215
9216                                 continue
9217                         elif test "${cf_tst_cflags}" = "\"'" ; then
9218
9219         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9220         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9221
9222                                 continue
9223                         fi
9224                         ;;
9225                 esac
9226                 case "$CPPFLAGS" in
9227                 (*$cf_add_cflags)
9228                         ;;
9229                 (*)
9230                         case $cf_add_cflags in
9231                         (-D*)
9232                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9233
9234 CPPFLAGS=`echo "$CPPFLAGS" | \
9235         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9236                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9237
9238                                 ;;
9239                         esac
9240
9241         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9242         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9243
9244                         ;;
9245                 esac
9246                 ;;
9247         (*)
9248
9249         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9250         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9251
9252                 ;;
9253         esac
9254         ;;
9255 (yes)
9256
9257         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9258         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9259
9260         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9261
9262         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9263                 && test -z "${cf_tst_cflags}" \
9264                 && cf_fix_cppflags=no
9265         ;;
9266 esac
9267 done
9268
9269 if test -n "$cf_new_cflags" ; then
9270         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
9271
9272 echo "${as_me:-configure}:9272: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
9273
9274         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9275         CFLAGS="${CFLAGS}$cf_new_cflags"
9276
9277 fi
9278
9279 if test -n "$cf_new_cppflags" ; then
9280         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
9281
9282 echo "${as_me:-configure}:9282: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
9283
9284         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9285         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9286
9287 fi
9288
9289 if test -n "$cf_new_extra_cppflags" ; then
9290         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
9291
9292 echo "${as_me:-configure}:9292: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
9293
9294         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9295         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9296
9297 fi
9298
9299 fi
9300
9301 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
9302         echo "$as_me:9302: checking if _XOPEN_SOURCE really is set" >&5
9303 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
9304         cat >conftest.$ac_ext <<_ACEOF
9305 #line 9305 "configure"
9306 #include "confdefs.h"
9307 #include <stdlib.h>
9308 int
9309 main (void)
9310 {
9311
9312 #ifndef _XOPEN_SOURCE
9313 make an error
9314 #endif
9315   ;
9316   return 0;
9317 }
9318 _ACEOF
9319 rm -f conftest.$ac_objext
9320 if { (eval echo "$as_me:9320: \"$ac_compile\"") >&5
9321   (eval $ac_compile) 2>&5
9322   ac_status=$?
9323   echo "$as_me:9323: \$? = $ac_status" >&5
9324   (exit $ac_status); } &&
9325          { ac_try='test -s conftest.$ac_objext'
9326   { (eval echo "$as_me:9326: \"$ac_try\"") >&5
9327   (eval $ac_try) 2>&5
9328   ac_status=$?
9329   echo "$as_me:9329: \$? = $ac_status" >&5
9330   (exit $ac_status); }; }; then
9331   cf_XOPEN_SOURCE_set=yes
9332 else
9333   echo "$as_me: failed program was:" >&5
9334 cat conftest.$ac_ext >&5
9335 cf_XOPEN_SOURCE_set=no
9336 fi
9337 rm -f conftest.$ac_objext conftest.$ac_ext
9338         echo "$as_me:9338: result: $cf_XOPEN_SOURCE_set" >&5
9339 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
9340         if test $cf_XOPEN_SOURCE_set = yes
9341         then
9342                 cat >conftest.$ac_ext <<_ACEOF
9343 #line 9343 "configure"
9344 #include "confdefs.h"
9345 #include <stdlib.h>
9346 int
9347 main (void)
9348 {
9349
9350 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
9351 make an error
9352 #endif
9353   ;
9354   return 0;
9355 }
9356 _ACEOF
9357 rm -f conftest.$ac_objext
9358 if { (eval echo "$as_me:9358: \"$ac_compile\"") >&5
9359   (eval $ac_compile) 2>&5
9360   ac_status=$?
9361   echo "$as_me:9361: \$? = $ac_status" >&5
9362   (exit $ac_status); } &&
9363          { ac_try='test -s conftest.$ac_objext'
9364   { (eval echo "$as_me:9364: \"$ac_try\"") >&5
9365   (eval $ac_try) 2>&5
9366   ac_status=$?
9367   echo "$as_me:9367: \$? = $ac_status" >&5
9368   (exit $ac_status); }; }; then
9369   cf_XOPEN_SOURCE_set_ok=yes
9370 else
9371   echo "$as_me: failed program was:" >&5
9372 cat conftest.$ac_ext >&5
9373 cf_XOPEN_SOURCE_set_ok=no
9374 fi
9375 rm -f conftest.$ac_objext conftest.$ac_ext
9376                 if test $cf_XOPEN_SOURCE_set_ok = no
9377                 then
9378                         { echo "$as_me:9378: WARNING: _XOPEN_SOURCE is lower than requested" >&5
9379 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
9380                 fi
9381         else
9382
9383 echo "$as_me:9383: checking if we should define _XOPEN_SOURCE" >&5
9384 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9385 if test "${cf_cv_xopen_source+set}" = set; then
9386   echo $ECHO_N "(cached) $ECHO_C" >&6
9387 else
9388
9389         cat >conftest.$ac_ext <<_ACEOF
9390 #line 9390 "configure"
9391 #include "confdefs.h"
9392
9393 #include <stdlib.h>
9394 #include <string.h>
9395 #include <sys/types.h>
9396
9397 int
9398 main (void)
9399 {
9400
9401 #ifndef _XOPEN_SOURCE
9402 make an error
9403 #endif
9404   ;
9405   return 0;
9406 }
9407 _ACEOF
9408 rm -f conftest.$ac_objext
9409 if { (eval echo "$as_me:9409: \"$ac_compile\"") >&5
9410   (eval $ac_compile) 2>&5
9411   ac_status=$?
9412   echo "$as_me:9412: \$? = $ac_status" >&5
9413   (exit $ac_status); } &&
9414          { ac_try='test -s conftest.$ac_objext'
9415   { (eval echo "$as_me:9415: \"$ac_try\"") >&5
9416   (eval $ac_try) 2>&5
9417   ac_status=$?
9418   echo "$as_me:9418: \$? = $ac_status" >&5
9419   (exit $ac_status); }; }; then
9420   cf_cv_xopen_source=no
9421 else
9422   echo "$as_me: failed program was:" >&5
9423 cat conftest.$ac_ext >&5
9424 cf_save="$CPPFLAGS"
9425          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9426          cat >conftest.$ac_ext <<_ACEOF
9427 #line 9427 "configure"
9428 #include "confdefs.h"
9429
9430 #include <stdlib.h>
9431 #include <string.h>
9432 #include <sys/types.h>
9433
9434 int
9435 main (void)
9436 {
9437
9438 #ifdef _XOPEN_SOURCE
9439 make an error
9440 #endif
9441   ;
9442   return 0;
9443 }
9444 _ACEOF
9445 rm -f conftest.$ac_objext
9446 if { (eval echo "$as_me:9446: \"$ac_compile\"") >&5
9447   (eval $ac_compile) 2>&5
9448   ac_status=$?
9449   echo "$as_me:9449: \$? = $ac_status" >&5
9450   (exit $ac_status); } &&
9451          { ac_try='test -s conftest.$ac_objext'
9452   { (eval echo "$as_me:9452: \"$ac_try\"") >&5
9453   (eval $ac_try) 2>&5
9454   ac_status=$?
9455   echo "$as_me:9455: \$? = $ac_status" >&5
9456   (exit $ac_status); }; }; then
9457   cf_cv_xopen_source=no
9458 else
9459   echo "$as_me: failed program was:" >&5
9460 cat conftest.$ac_ext >&5
9461 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9462 fi
9463 rm -f conftest.$ac_objext conftest.$ac_ext
9464         CPPFLAGS="$cf_save"
9465
9466 fi
9467 rm -f conftest.$ac_objext conftest.$ac_ext
9468
9469 fi
9470 echo "$as_me:9470: result: $cf_cv_xopen_source" >&5
9471 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9472
9473 if test "$cf_cv_xopen_source" != no ; then
9474
9475 CFLAGS=`echo "$CFLAGS" | \
9476         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9477                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9478
9479 CPPFLAGS=`echo "$CPPFLAGS" | \
9480         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9481                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9482
9483         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9484
9485 cf_fix_cppflags=no
9486 cf_new_cflags=
9487 cf_new_cppflags=
9488 cf_new_extra_cppflags=
9489
9490 for cf_add_cflags in $cf_temp_xopen_source
9491 do
9492 case $cf_fix_cppflags in
9493 (no)
9494         case $cf_add_cflags in
9495         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9496                 case $cf_add_cflags in
9497                 (-D*)
9498                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9499
9500                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9501                                 && test -z "${cf_tst_cflags}" \
9502                                 && cf_fix_cppflags=yes
9503
9504                         if test $cf_fix_cppflags = yes ; then
9505
9506         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9507         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9508
9509                                 continue
9510                         elif test "${cf_tst_cflags}" = "\"'" ; then
9511
9512         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9513         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9514
9515                                 continue
9516                         fi
9517                         ;;
9518                 esac
9519                 case "$CPPFLAGS" in
9520                 (*$cf_add_cflags)
9521                         ;;
9522                 (*)
9523                         case $cf_add_cflags in
9524                         (-D*)
9525                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9526
9527 CPPFLAGS=`echo "$CPPFLAGS" | \
9528         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9529                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9530
9531                                 ;;
9532                         esac
9533
9534         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9535         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9536
9537                         ;;
9538                 esac
9539                 ;;
9540         (*)
9541
9542         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9543         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9544
9545                 ;;
9546         esac
9547         ;;
9548 (yes)
9549
9550         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9551         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9552
9553         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9554
9555         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9556                 && test -z "${cf_tst_cflags}" \
9557                 && cf_fix_cppflags=no
9558         ;;
9559 esac
9560 done
9561
9562 if test -n "$cf_new_cflags" ; then
9563
9564         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9565         CFLAGS="${CFLAGS}$cf_new_cflags"
9566
9567 fi
9568
9569 if test -n "$cf_new_cppflags" ; then
9570
9571         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9572         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9573
9574 fi
9575
9576 if test -n "$cf_new_extra_cppflags" ; then
9577
9578         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9579         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9580
9581 fi
9582
9583 fi
9584
9585         fi
9586 fi
9587
9588 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9589
9590 # Work around breakage on OS X
9591
9592 echo "$as_me:9592: checking if SIGWINCH is defined" >&5
9593 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9594 if test "${cf_cv_define_sigwinch+set}" = set; then
9595   echo $ECHO_N "(cached) $ECHO_C" >&6
9596 else
9597
9598         cat >conftest.$ac_ext <<_ACEOF
9599 #line 9599 "configure"
9600 #include "confdefs.h"
9601
9602 #include <sys/types.h>
9603 #include <sys/signal.h>
9604
9605 int
9606 main (void)
9607 {
9608 int x = SIGWINCH
9609   ;
9610   return 0;
9611 }
9612 _ACEOF
9613 rm -f conftest.$ac_objext
9614 if { (eval echo "$as_me:9614: \"$ac_compile\"") >&5
9615   (eval $ac_compile) 2>&5
9616   ac_status=$?
9617   echo "$as_me:9617: \$? = $ac_status" >&5
9618   (exit $ac_status); } &&
9619          { ac_try='test -s conftest.$ac_objext'
9620   { (eval echo "$as_me:9620: \"$ac_try\"") >&5
9621   (eval $ac_try) 2>&5
9622   ac_status=$?
9623   echo "$as_me:9623: \$? = $ac_status" >&5
9624   (exit $ac_status); }; }; then
9625   cf_cv_define_sigwinch=yes
9626 else
9627   echo "$as_me: failed program was:" >&5
9628 cat conftest.$ac_ext >&5
9629 cat >conftest.$ac_ext <<_ACEOF
9630 #line 9630 "configure"
9631 #include "confdefs.h"
9632
9633 #undef _XOPEN_SOURCE
9634 #undef _POSIX_SOURCE
9635 #undef _POSIX_C_SOURCE
9636 #include <sys/types.h>
9637 #include <sys/signal.h>
9638
9639 int
9640 main (void)
9641 {
9642 int x = SIGWINCH
9643   ;
9644   return 0;
9645 }
9646 _ACEOF
9647 rm -f conftest.$ac_objext
9648 if { (eval echo "$as_me:9648: \"$ac_compile\"") >&5
9649   (eval $ac_compile) 2>&5
9650   ac_status=$?
9651   echo "$as_me:9651: \$? = $ac_status" >&5
9652   (exit $ac_status); } &&
9653          { ac_try='test -s conftest.$ac_objext'
9654   { (eval echo "$as_me:9654: \"$ac_try\"") >&5
9655   (eval $ac_try) 2>&5
9656   ac_status=$?
9657   echo "$as_me:9657: \$? = $ac_status" >&5
9658   (exit $ac_status); }; }; then
9659   cf_cv_define_sigwinch=maybe
9660 else
9661   echo "$as_me: failed program was:" >&5
9662 cat conftest.$ac_ext >&5
9663 cf_cv_define_sigwinch=no
9664 fi
9665 rm -f conftest.$ac_objext conftest.$ac_ext
9666
9667 fi
9668 rm -f conftest.$ac_objext conftest.$ac_ext
9669
9670 fi
9671 echo "$as_me:9671: result: $cf_cv_define_sigwinch" >&5
9672 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9673
9674 if test "$cf_cv_define_sigwinch" = maybe ; then
9675 echo "$as_me:9675: checking for actual SIGWINCH definition" >&5
9676 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9677 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9678   echo $ECHO_N "(cached) $ECHO_C" >&6
9679 else
9680
9681 cf_cv_fixup_sigwinch=unknown
9682 cf_sigwinch=32
9683 while test $cf_sigwinch != 1
9684 do
9685         cat >conftest.$ac_ext <<_ACEOF
9686 #line 9686 "configure"
9687 #include "confdefs.h"
9688
9689 #undef _XOPEN_SOURCE
9690 #undef _POSIX_SOURCE
9691 #undef _POSIX_C_SOURCE
9692 #include <sys/types.h>
9693 #include <sys/signal.h>
9694
9695 int
9696 main (void)
9697 {
9698
9699 #if SIGWINCH != $cf_sigwinch
9700 make an error
9701 #endif
9702 int x = SIGWINCH
9703   ;
9704   return 0;
9705 }
9706 _ACEOF
9707 rm -f conftest.$ac_objext
9708 if { (eval echo "$as_me:9708: \"$ac_compile\"") >&5
9709   (eval $ac_compile) 2>&5
9710   ac_status=$?
9711   echo "$as_me:9711: \$? = $ac_status" >&5
9712   (exit $ac_status); } &&
9713          { ac_try='test -s conftest.$ac_objext'
9714   { (eval echo "$as_me:9714: \"$ac_try\"") >&5
9715   (eval $ac_try) 2>&5
9716   ac_status=$?
9717   echo "$as_me:9717: \$? = $ac_status" >&5
9718   (exit $ac_status); }; }; then
9719   cf_cv_fixup_sigwinch=$cf_sigwinch
9720          break
9721 else
9722   echo "$as_me: failed program was:" >&5
9723 cat conftest.$ac_ext >&5
9724 fi
9725 rm -f conftest.$ac_objext conftest.$ac_ext
9726
9727 cf_sigwinch=`expr $cf_sigwinch - 1`
9728 done
9729
9730 fi
9731 echo "$as_me:9731: result: $cf_cv_fixup_sigwinch" >&5
9732 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9733
9734         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9735                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9736         fi
9737 fi
9738
9739 # Checks for CODESET support.
9740
9741 echo "$as_me:9741: checking for nl_langinfo and CODESET" >&5
9742 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9743 if test "${am_cv_langinfo_codeset+set}" = set; then
9744   echo $ECHO_N "(cached) $ECHO_C" >&6
9745 else
9746   cat >conftest.$ac_ext <<_ACEOF
9747 #line 9747 "configure"
9748 #include "confdefs.h"
9749 #include <langinfo.h>
9750 int
9751 main (void)
9752 {
9753 char* cs = nl_langinfo(CODESET);
9754   ;
9755   return 0;
9756 }
9757 _ACEOF
9758 rm -f conftest.$ac_objext conftest$ac_exeext
9759 if { (eval echo "$as_me:9759: \"$ac_link\"") >&5
9760   (eval $ac_link) 2>&5
9761   ac_status=$?
9762   echo "$as_me:9762: \$? = $ac_status" >&5
9763   (exit $ac_status); } &&
9764          { ac_try='test -s conftest$ac_exeext'
9765   { (eval echo "$as_me:9765: \"$ac_try\"") >&5
9766   (eval $ac_try) 2>&5
9767   ac_status=$?
9768   echo "$as_me:9768: \$? = $ac_status" >&5
9769   (exit $ac_status); }; }; then
9770   am_cv_langinfo_codeset=yes
9771 else
9772   echo "$as_me: failed program was:" >&5
9773 cat conftest.$ac_ext >&5
9774 am_cv_langinfo_codeset=no
9775 fi
9776 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9777
9778 fi
9779 echo "$as_me:9779: result: $am_cv_langinfo_codeset" >&5
9780 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9781         if test $am_cv_langinfo_codeset = yes; then
9782
9783 cat >>confdefs.h <<\EOF
9784 #define HAVE_LANGINFO_CODESET 1
9785 EOF
9786
9787         fi
9788
9789 # use these variables to work around a defect in gcc's fixincludes.
9790 NCURSES_OK_WCHAR_T=
9791 NCURSES_OK_WINT_T=
9792
9793 echo "$as_me:9793: checking if you want wide-character code" >&5
9794 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9795
9796 # Check whether --enable-widec or --disable-widec was given.
9797 if test "${enable_widec+set}" = set; then
9798   enableval="$enable_widec"
9799   with_widec=$enableval
9800 else
9801   with_widec=no
9802 fi;
9803 echo "$as_me:9803: result: $with_widec" >&5
9804 echo "${ECHO_T}$with_widec" >&6
9805
9806 NCURSES_WCWIDTH_GRAPHICS=1
9807
9808 if test "x$with_widec" = xyes ; then
9809         if test "x$disable_lib_suffixes" = xno ; then
9810                 LIB_SUFFIX="w${LIB_SUFFIX}"
9811         fi
9812
9813 cat >>confdefs.h <<\EOF
9814 #define USE_WIDEC_SUPPORT 1
9815 EOF
9816
9817 cat >>confdefs.h <<\EOF
9818 #define NCURSES_WIDECHAR 1
9819 EOF
9820
9821 for ac_header in \
9822 wchar.h \
9823 wctype.h \
9824
9825 do
9826 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9827 echo "$as_me:9827: checking for $ac_header" >&5
9828 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9829 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9830   echo $ECHO_N "(cached) $ECHO_C" >&6
9831 else
9832   cat >conftest.$ac_ext <<_ACEOF
9833 #line 9833 "configure"
9834 #include "confdefs.h"
9835 #include <$ac_header>
9836 _ACEOF
9837 if { (eval echo "$as_me:9837: \"$ac_cpp conftest.$ac_ext\"") >&5
9838   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9839   ac_status=$?
9840   egrep -v '^ *\+' conftest.er1 >conftest.err
9841   rm -f conftest.er1
9842   cat conftest.err >&5
9843   echo "$as_me:9843: \$? = $ac_status" >&5
9844   (exit $ac_status); } >/dev/null; then
9845   if test -s conftest.err; then
9846     ac_cpp_err=$ac_c_preproc_warn_flag
9847   else
9848     ac_cpp_err=
9849   fi
9850 else
9851   ac_cpp_err=yes
9852 fi
9853 if test -z "$ac_cpp_err"; then
9854   eval "$as_ac_Header=yes"
9855 else
9856   echo "$as_me: failed program was:" >&5
9857   cat conftest.$ac_ext >&5
9858   eval "$as_ac_Header=no"
9859 fi
9860 rm -f conftest.err conftest.$ac_ext
9861 fi
9862 echo "$as_me:9862: result: `eval echo '${'$as_ac_Header'}'`" >&5
9863 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9864 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9865   cat >>confdefs.h <<EOF
9866 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9867 EOF
9868
9869 fi
9870 done
9871
9872 echo "$as_me:9872: checking if wchar.h can be used as is" >&5
9873 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9874 if test "${cf_cv_wchar_h_okay+set}" = set; then
9875   echo $ECHO_N "(cached) $ECHO_C" >&6
9876 else
9877
9878 cat >conftest.$ac_ext <<_ACEOF
9879 #line 9879 "configure"
9880 #include "confdefs.h"
9881
9882 #include <stdlib.h>
9883 #ifdef HAVE_WCHAR_H
9884 #include <wchar.h>
9885 #endif
9886 #ifdef HAVE_WCTYPE_H
9887 #include <wctype.h>
9888 #endif
9889
9890 int
9891 main (void)
9892 {
9893
9894         wint_t foo = 0;
9895         int bar = iswpunct(foo)
9896   ;
9897   return 0;
9898 }
9899 _ACEOF
9900 rm -f conftest.$ac_objext
9901 if { (eval echo "$as_me:9901: \"$ac_compile\"") >&5
9902   (eval $ac_compile) 2>&5
9903   ac_status=$?
9904   echo "$as_me:9904: \$? = $ac_status" >&5
9905   (exit $ac_status); } &&
9906          { ac_try='test -s conftest.$ac_objext'
9907   { (eval echo "$as_me:9907: \"$ac_try\"") >&5
9908   (eval $ac_try) 2>&5
9909   ac_status=$?
9910   echo "$as_me:9910: \$? = $ac_status" >&5
9911   (exit $ac_status); }; }; then
9912   cf_cv_wchar_h_okay=yes
9913 else
9914   echo "$as_me: failed program was:" >&5
9915 cat conftest.$ac_ext >&5
9916 cf_cv_wchar_h_okay=no
9917 fi
9918 rm -f conftest.$ac_objext conftest.$ac_ext
9919 fi
9920 echo "$as_me:9920: result: $cf_cv_wchar_h_okay" >&5
9921 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9922
9923 if test $cf_cv_wchar_h_okay = no
9924 then
9925
9926 echo "$as_me:9926: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9927 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9928 cat >conftest.$ac_ext <<_ACEOF
9929 #line 9929 "configure"
9930 #include "confdefs.h"
9931 #include <sys/types.h>
9932
9933 int
9934 main (void)
9935 {
9936
9937 #ifndef _XOPEN_SOURCE_EXTENDED
9938 make an error
9939 #endif
9940   ;
9941   return 0;
9942 }
9943 _ACEOF
9944 rm -f conftest.$ac_objext
9945 if { (eval echo "$as_me:9945: \"$ac_compile\"") >&5
9946   (eval $ac_compile) 2>&5
9947   ac_status=$?
9948   echo "$as_me:9948: \$? = $ac_status" >&5
9949   (exit $ac_status); } &&
9950          { ac_try='test -s conftest.$ac_objext'
9951   { (eval echo "$as_me:9951: \"$ac_try\"") >&5
9952   (eval $ac_try) 2>&5
9953   ac_status=$?
9954   echo "$as_me:9954: \$? = $ac_status" >&5
9955   (exit $ac_status); }; }; then
9956   cf_result=no
9957 else
9958   echo "$as_me: failed program was:" >&5
9959 cat conftest.$ac_ext >&5
9960 cf_result=yes
9961 fi
9962 rm -f conftest.$ac_objext conftest.$ac_ext
9963 echo "$as_me:9963: result: $cf_result" >&5
9964 echo "${ECHO_T}$cf_result" >&6
9965
9966 if test "$cf_result" = yes ; then
9967         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9968 elif test "x" != "x" ; then
9969         echo "$as_me:9969: checking checking for compatible value versus " >&5
9970 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9971         cat >conftest.$ac_ext <<_ACEOF
9972 #line 9972 "configure"
9973 #include "confdefs.h"
9974 #include <sys/types.h>
9975
9976 int
9977 main (void)
9978 {
9979
9980 #if _XOPEN_SOURCE_EXTENDED- < 0
9981 make an error
9982 #endif
9983   ;
9984   return 0;
9985 }
9986 _ACEOF
9987 rm -f conftest.$ac_objext
9988 if { (eval echo "$as_me:9988: \"$ac_compile\"") >&5
9989   (eval $ac_compile) 2>&5
9990   ac_status=$?
9991   echo "$as_me:9991: \$? = $ac_status" >&5
9992   (exit $ac_status); } &&
9993          { ac_try='test -s conftest.$ac_objext'
9994   { (eval echo "$as_me:9994: \"$ac_try\"") >&5
9995   (eval $ac_try) 2>&5
9996   ac_status=$?
9997   echo "$as_me:9997: \$? = $ac_status" >&5
9998   (exit $ac_status); }; }; then
9999   cf_result=yes
10000 else
10001   echo "$as_me: failed program was:" >&5
10002 cat conftest.$ac_ext >&5
10003 cf_result=no
10004 fi
10005 rm -f conftest.$ac_objext conftest.$ac_ext
10006         echo "$as_me:10006: result: $cf_result" >&5
10007 echo "${ECHO_T}$cf_result" >&6
10008         if test "$cf_result" = no ; then
10009                 # perhaps we can override it - try...
10010                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
10011         fi
10012 fi
10013
10014 fi
10015
10016 echo "$as_me:10016: checking if wcwidth agrees graphics are single-width" >&5
10017 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
10018 if test "${cf_cv_wcwidth_graphics+set}" = set; then
10019   echo $ECHO_N "(cached) $ECHO_C" >&6
10020 else
10021
10022 cat >conftest.in <<CF_EOF
10023 -       VT100 symbols
10024 0x250c  upper left corner
10025 0x2514  lower left corner
10026 0x2510  upper right corner
10027 0x2518  lower right corner
10028 0x251c  tee pointing left
10029 0x2524  tee pointing right
10030 0x2534  tee pointing up
10031 0x252c  tee pointing down
10032 0x2500  horizontal line
10033 0x2502  vertical line
10034 0x253c  large plus or crossover
10035 0x23ba  scan line 1
10036 0x23bd  scan line 9
10037 0x25c6  diamond
10038 0x2592  checker board (stipple)
10039 0x00b0  degree symbol
10040 0x00b1  plus/minus
10041 0x00b7  bullet
10042 -       Teletype 5410v1 symbols
10043 0x2190  arrow pointing left
10044 0x2192  arrow pointing right
10045 0x2193  arrow pointing down
10046 0x2191  arrow pointing up
10047 0x2592  board of squares
10048 0x2603  lantern symbol
10049 0x25ae  solid square block
10050 -       these defaults were invented for ncurses
10051 0x23bb  scan line 3
10052 0x23bc  scan line 7
10053 0x2264  less-than-or-equal-to
10054 0x2265  greater-than-or-equal-to
10055 0x03c0  greek pi
10056 0x2260  not-equal
10057 0x00a3  pound-sterling symbol
10058 -       thick-line-drawing
10059 0x250f  upper left corner
10060 0x2517  lower left corner
10061 0x2513  upper right corner
10062 0x251b  lower right corner
10063 0x2523  tee pointing left
10064 0x252b  tee pointing right
10065 0x253b  tee pointing up
10066 0x2533  tee pointing down
10067 0x2501  horizontal line
10068 0x2503  vertical line
10069 0x254b  large plus or crossover
10070 -       double-line-drawing
10071 0x2554  upper left corner
10072 0x255a  lower left corner
10073 0x2557  upper right corner
10074 0x255d  lower right corner
10075 0x2563  tee pointing left
10076 0x2560  tee pointing right
10077 0x2569  tee pointing up
10078 0x2566  tee pointing down
10079 0x2550  horizontal line
10080 0x2551  vertical line
10081 0x256c  large plus or crossover
10082 CF_EOF
10083 if test "$cross_compiling" = yes; then
10084   cf_cv_wcwidth_graphics=unknown
10085 else
10086   cat >conftest.$ac_ext <<_ACEOF
10087 #line 10087 "configure"
10088 #include "confdefs.h"
10089
10090 #include <locale.h>
10091 #include <stdio.h>
10092 #include <wchar.h>
10093
10094 #define MY_LEN 80
10095
10096 int
10097 main(void)
10098 {
10099         FILE *fp;
10100         int value;
10101         char buffer[MY_LEN + 1];
10102         char notes[MY_LEN + 1];
10103         int totals = 0;
10104         int passed = 0;
10105
10106         if (setlocale(LC_ALL, "en_US.UTF8") ||
10107                 setlocale(LC_ALL, "en_US.UTF-8") ||
10108                 setlocale(LC_ALL, "en_US.utf8") ||
10109                 setlocale(LC_ALL, "en_US.utf-8")) {
10110                 if ((fp = fopen("conftest.in", "r")) != 0) {
10111                         while (fgets(buffer, MY_LEN, fp) != 0) {
10112                                 if (*buffer == '-') {
10113                                         fprintf(stderr, "\t%s", buffer);
10114                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
10115                                         ++totals;
10116                                         if (wcwidth(value) == 1)
10117                                                 ++passed;
10118                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
10119                                 } else {
10120                                         fprintf(stderr, "?\t%s", buffer);
10121                                 }
10122                         }
10123                 }
10124         }
10125         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
10126         return (totals == passed) ? 0 : 1;
10127 }
10128
10129 _ACEOF
10130 rm -f conftest$ac_exeext
10131 if { (eval echo "$as_me:10131: \"$ac_link\"") >&5
10132   (eval $ac_link) 2>&5
10133   ac_status=$?
10134   echo "$as_me:10134: \$? = $ac_status" >&5
10135   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10136   { (eval echo "$as_me:10136: \"$ac_try\"") >&5
10137   (eval $ac_try) 2>&5
10138   ac_status=$?
10139   echo "$as_me:10139: \$? = $ac_status" >&5
10140   (exit $ac_status); }; }; then
10141   cf_cv_wcwidth_graphics=yes
10142 else
10143   echo "$as_me: program exited with status $ac_status" >&5
10144 echo "$as_me: failed program was:" >&5
10145 cat conftest.$ac_ext >&5
10146 cf_cv_wcwidth_graphics=no
10147 fi
10148 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10149 fi
10150
10151 fi
10152 echo "$as_me:10152: result: $cf_cv_wcwidth_graphics" >&5
10153 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
10154
10155         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
10156
10157         # with_overwrite=no
10158         NCURSES_CH_T=cchar_t
10159
10160 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
10161 do
10162 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10163 echo "$as_me:10163: checking for $ac_func" >&5
10164 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10165 if eval "test \"\${$as_ac_var+set}\" = set"; then
10166   echo $ECHO_N "(cached) $ECHO_C" >&6
10167 else
10168   cat >conftest.$ac_ext <<_ACEOF
10169 #line 10169 "configure"
10170 #include "confdefs.h"
10171 /* System header to define __stub macros and hopefully few prototypes,
10172     which can conflict with char $ac_func (); below.  */
10173 #include <assert.h>
10174 /* Override any gcc2 internal prototype to avoid an error.  */
10175 #ifdef __cplusplus
10176 extern "C"
10177 #endif
10178 /* We use char because int might match the return type of a gcc2
10179    builtin and then its argument prototype would still apply.  */
10180 char $ac_func ();
10181 char (*f) ();
10182
10183 int
10184 main (void)
10185 {
10186 /* The GNU C library defines this for functions which it implements
10187     to always fail with ENOSYS.  Some functions are actually named
10188     something starting with __ and the normal name is an alias.  */
10189 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10190 choke me
10191 #else
10192 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10193 #endif
10194
10195   ;
10196   return 0;
10197 }
10198 _ACEOF
10199 rm -f conftest.$ac_objext conftest$ac_exeext
10200 if { (eval echo "$as_me:10200: \"$ac_link\"") >&5
10201   (eval $ac_link) 2>&5
10202   ac_status=$?
10203   echo "$as_me:10203: \$? = $ac_status" >&5
10204   (exit $ac_status); } &&
10205          { ac_try='test -s conftest$ac_exeext'
10206   { (eval echo "$as_me:10206: \"$ac_try\"") >&5
10207   (eval $ac_try) 2>&5
10208   ac_status=$?
10209   echo "$as_me:10209: \$? = $ac_status" >&5
10210   (exit $ac_status); }; }; then
10211   eval "$as_ac_var=yes"
10212 else
10213   echo "$as_me: failed program was:" >&5
10214 cat conftest.$ac_ext >&5
10215 eval "$as_ac_var=no"
10216 fi
10217 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10218 fi
10219 echo "$as_me:10219: result: `eval echo '${'$as_ac_var'}'`" >&5
10220 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10221 if test `eval echo '${'$as_ac_var'}'` = yes; then
10222   cat >>confdefs.h <<EOF
10223 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10224 EOF
10225
10226 fi
10227 done
10228
10229         if test "x$ac_cv_func_putwc" != xyes ; then
10230
10231 echo "$as_me:10231: checking for multibyte character support" >&5
10232 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
10233 if test "${cf_cv_utf8_lib+set}" = set; then
10234   echo $ECHO_N "(cached) $ECHO_C" >&6
10235 else
10236
10237         cf_save_LIBS="$LIBS"
10238         cat >conftest.$ac_ext <<_ACEOF
10239 #line 10239 "configure"
10240 #include "confdefs.h"
10241
10242 #include <stdlib.h>
10243 int
10244 main (void)
10245 {
10246 putwc(0,0);
10247   ;
10248   return 0;
10249 }
10250 _ACEOF
10251 rm -f conftest.$ac_objext conftest$ac_exeext
10252 if { (eval echo "$as_me:10252: \"$ac_link\"") >&5
10253   (eval $ac_link) 2>&5
10254   ac_status=$?
10255   echo "$as_me:10255: \$? = $ac_status" >&5
10256   (exit $ac_status); } &&
10257          { ac_try='test -s conftest$ac_exeext'
10258   { (eval echo "$as_me:10258: \"$ac_try\"") >&5
10259   (eval $ac_try) 2>&5
10260   ac_status=$?
10261   echo "$as_me:10261: \$? = $ac_status" >&5
10262   (exit $ac_status); }; }; then
10263   cf_cv_utf8_lib=yes
10264 else
10265   echo "$as_me: failed program was:" >&5
10266 cat conftest.$ac_ext >&5
10267
10268 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
10269 # will be set on completion of the AC_TRY_LINK below.
10270 cf_cv_header_path_utf8=
10271 cf_cv_library_path_utf8=
10272
10273 echo "${as_me:-configure}:10273: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
10274
10275 cf_save_LIBS="$LIBS"
10276
10277 cat >conftest.$ac_ext <<_ACEOF
10278 #line 10278 "configure"
10279 #include "confdefs.h"
10280
10281 #include <libutf8.h>
10282 int
10283 main (void)
10284 {
10285 putwc(0,0);
10286   ;
10287   return 0;
10288 }
10289 _ACEOF
10290 rm -f conftest.$ac_objext conftest$ac_exeext
10291 if { (eval echo "$as_me:10291: \"$ac_link\"") >&5
10292   (eval $ac_link) 2>&5
10293   ac_status=$?
10294   echo "$as_me:10294: \$? = $ac_status" >&5
10295   (exit $ac_status); } &&
10296          { ac_try='test -s conftest$ac_exeext'
10297   { (eval echo "$as_me:10297: \"$ac_try\"") >&5
10298   (eval $ac_try) 2>&5
10299   ac_status=$?
10300   echo "$as_me:10300: \$? = $ac_status" >&5
10301   (exit $ac_status); }; }; then
10302
10303         cf_cv_find_linkage_utf8=yes
10304         cf_cv_header_path_utf8=/usr/include
10305         cf_cv_library_path_utf8=/usr/lib
10306
10307 else
10308   echo "$as_me: failed program was:" >&5
10309 cat conftest.$ac_ext >&5
10310
10311 LIBS="-lutf8  $cf_save_LIBS"
10312
10313 cat >conftest.$ac_ext <<_ACEOF
10314 #line 10314 "configure"
10315 #include "confdefs.h"
10316
10317 #include <libutf8.h>
10318 int
10319 main (void)
10320 {
10321 putwc(0,0);
10322   ;
10323   return 0;
10324 }
10325 _ACEOF
10326 rm -f conftest.$ac_objext conftest$ac_exeext
10327 if { (eval echo "$as_me:10327: \"$ac_link\"") >&5
10328   (eval $ac_link) 2>&5
10329   ac_status=$?
10330   echo "$as_me:10330: \$? = $ac_status" >&5
10331   (exit $ac_status); } &&
10332          { ac_try='test -s conftest$ac_exeext'
10333   { (eval echo "$as_me:10333: \"$ac_try\"") >&5
10334   (eval $ac_try) 2>&5
10335   ac_status=$?
10336   echo "$as_me:10336: \$? = $ac_status" >&5
10337   (exit $ac_status); }; }; then
10338
10339         cf_cv_find_linkage_utf8=yes
10340         cf_cv_header_path_utf8=/usr/include
10341         cf_cv_library_path_utf8=/usr/lib
10342         cf_cv_library_file_utf8="-lutf8"
10343
10344 else
10345   echo "$as_me: failed program was:" >&5
10346 cat conftest.$ac_ext >&5
10347
10348         cf_cv_find_linkage_utf8=no
10349         LIBS="$cf_save_LIBS"
10350
10351         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
10352
10353 echo "${as_me:-configure}:10353: testing find linkage for utf8 library ..." 1>&5
10354
10355 echo "${as_me:-configure}:10355: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
10356
10357         cf_save_CPPFLAGS="$CPPFLAGS"
10358         cf_test_CPPFLAGS="$CPPFLAGS"
10359
10360 cf_search=
10361
10362 # collect the current set of include-directories from compiler flags
10363 cf_header_path_list=""
10364 if test -n "${CFLAGS}${CPPFLAGS}" ; then
10365         for cf_header_path in $CPPFLAGS $CFLAGS
10366         do
10367                 case $cf_header_path in
10368                 (-I*)
10369                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10370
10371 test "x$cf_header_path" != "xNONE" && \
10372 test -d "$cf_header_path" && \
10373  {
10374         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
10375         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
10376         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
10377         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
10378         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
10379         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
10380 }
10381
10382                         cf_header_path_list="$cf_header_path_list $cf_search"
10383                         ;;
10384                 esac
10385         done
10386 fi
10387
10388 # add the variations for the package we are looking for
10389
10390 cf_search=
10391
10392 test "x$prefix" != "xNONE" && \
10393 test -d "$prefix" && \
10394  {
10395         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
10396         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
10397         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
10398         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
10399         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
10400         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
10401 }
10402
10403 for cf_subdir_prefix in \
10404         /usr \
10405         /usr/local \
10406         /usr/pkg \
10407         /opt \
10408         /opt/local \
10409         $HOME
10410 do
10411
10412 test "x$cf_subdir_prefix" != "x$prefix" && \
10413 test -d "$cf_subdir_prefix" && \
10414 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10415         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
10416         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
10417         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
10418         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
10419         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
10420         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
10421 }
10422
10423 done
10424
10425 test "$includedir" != NONE && \
10426 test "$includedir" != "/usr/include" && \
10427 test -d "$includedir" && {
10428         test -d $includedir &&    cf_search="$cf_search $includedir"
10429         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
10430 }
10431
10432 test "$oldincludedir" != NONE && \
10433 test "$oldincludedir" != "/usr/include" && \
10434 test -d "$oldincludedir" && {
10435         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
10436         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
10437 }
10438
10439 cf_search="$cf_search $cf_header_path_list"
10440
10441         for cf_cv_header_path_utf8 in $cf_search
10442         do
10443                 if test -d $cf_cv_header_path_utf8 ; then
10444                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
10445
10446 echo "${as_me:-configure}:10446: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
10447
10448                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
10449                         cat >conftest.$ac_ext <<_ACEOF
10450 #line 10450 "configure"
10451 #include "confdefs.h"
10452
10453 #include <libutf8.h>
10454 int
10455 main (void)
10456 {
10457 putwc(0,0);
10458   ;
10459   return 0;
10460 }
10461 _ACEOF
10462 rm -f conftest.$ac_objext
10463 if { (eval echo "$as_me:10463: \"$ac_compile\"") >&5
10464   (eval $ac_compile) 2>&5
10465   ac_status=$?
10466   echo "$as_me:10466: \$? = $ac_status" >&5
10467   (exit $ac_status); } &&
10468          { ac_try='test -s conftest.$ac_objext'
10469   { (eval echo "$as_me:10469: \"$ac_try\"") >&5
10470   (eval $ac_try) 2>&5
10471   ac_status=$?
10472   echo "$as_me:10472: \$? = $ac_status" >&5
10473   (exit $ac_status); }; }; then
10474
10475                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
10476
10477 echo "${as_me:-configure}:10477: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
10478
10479                                 cf_cv_find_linkage_utf8=maybe
10480                                 cf_test_CPPFLAGS="$CPPFLAGS"
10481                                 break
10482 else
10483   echo "$as_me: failed program was:" >&5
10484 cat conftest.$ac_ext >&5
10485
10486                                 CPPFLAGS="$cf_save_CPPFLAGS"
10487
10488 fi
10489 rm -f conftest.$ac_objext conftest.$ac_ext
10490                 fi
10491         done
10492
10493         if test "$cf_cv_find_linkage_utf8" = maybe ; then
10494
10495 echo "${as_me:-configure}:10495: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
10496
10497                 cf_save_LIBS="$LIBS"
10498                 cf_save_LDFLAGS="$LDFLAGS"
10499
10500                 if test "$cf_cv_find_linkage_utf8" != yes ; then
10501
10502 cf_search=
10503 cf_library_path_list=""
10504 if test -n "${LDFLAGS}${LIBS}" ; then
10505         for cf_library_path in $LDFLAGS $LIBS
10506         do
10507                 case $cf_library_path in
10508                 (-L*)
10509                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10510
10511 test "x$cf_library_path" != "xNONE" && \
10512 test -d "$cf_library_path" && \
10513  {
10514         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
10515         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
10516         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
10517         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
10518         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
10519         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
10520 }
10521
10522                         cf_library_path_list="$cf_library_path_list $cf_search"
10523                         ;;
10524                 esac
10525         done
10526 fi
10527
10528 cf_search=
10529
10530 test "x$prefix" != "xNONE" && \
10531 test -d "$prefix" && \
10532  {
10533         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
10534         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
10535         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
10536         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
10537         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
10538         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
10539 }
10540
10541 for cf_subdir_prefix in \
10542         /usr \
10543         /usr/local \
10544         /usr/pkg \
10545         /opt \
10546         /opt/local \
10547         $HOME
10548 do
10549
10550 test "x$cf_subdir_prefix" != "x$prefix" && \
10551 test -d "$cf_subdir_prefix" && \
10552 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
10553         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
10554         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
10555         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
10556         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
10557         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
10558         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
10559 }
10560
10561 done
10562
10563 cf_search="$cf_library_path_list $cf_search"
10564
10565                         for cf_cv_library_path_utf8 in $cf_search
10566                         do
10567                                 if test -d $cf_cv_library_path_utf8 ; then
10568                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
10569
10570 echo "${as_me:-configure}:10570: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
10571
10572                                         CPPFLAGS="$cf_test_CPPFLAGS"
10573                                         LIBS="-lutf8  $cf_save_LIBS"
10574                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
10575                                         cat >conftest.$ac_ext <<_ACEOF
10576 #line 10576 "configure"
10577 #include "confdefs.h"
10578
10579 #include <libutf8.h>
10580 int
10581 main (void)
10582 {
10583 putwc(0,0);
10584   ;
10585   return 0;
10586 }
10587 _ACEOF
10588 rm -f conftest.$ac_objext conftest$ac_exeext
10589 if { (eval echo "$as_me:10589: \"$ac_link\"") >&5
10590   (eval $ac_link) 2>&5
10591   ac_status=$?
10592   echo "$as_me:10592: \$? = $ac_status" >&5
10593   (exit $ac_status); } &&
10594          { ac_try='test -s conftest$ac_exeext'
10595   { (eval echo "$as_me:10595: \"$ac_try\"") >&5
10596   (eval $ac_try) 2>&5
10597   ac_status=$?
10598   echo "$as_me:10598: \$? = $ac_status" >&5
10599   (exit $ac_status); }; }; then
10600
10601                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
10602
10603 echo "${as_me:-configure}:10603: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
10604
10605                                         cf_cv_find_linkage_utf8=yes
10606                                         cf_cv_library_file_utf8="-lutf8"
10607                                         break
10608 else
10609   echo "$as_me: failed program was:" >&5
10610 cat conftest.$ac_ext >&5
10611
10612                                         CPPFLAGS="$cf_save_CPPFLAGS"
10613                                         LIBS="$cf_save_LIBS"
10614                                         LDFLAGS="$cf_save_LDFLAGS"
10615
10616 fi
10617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10618                                 fi
10619                         done
10620                         CPPFLAGS="$cf_save_CPPFLAGS"
10621                         LDFLAGS="$cf_save_LDFLAGS"
10622                 fi
10623
10624         else
10625                 cf_cv_find_linkage_utf8=no
10626         fi
10627
10628 fi
10629 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10630
10631 fi
10632 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10633
10634 LIBS="$cf_save_LIBS"
10635
10636 if test "$cf_cv_find_linkage_utf8" = yes ; then
10637 cf_cv_utf8_lib=add-on
10638 else
10639 cf_cv_utf8_lib=no
10640 fi
10641
10642 fi
10643 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10644 fi
10645 echo "$as_me:10645: result: $cf_cv_utf8_lib" >&5
10646 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
10647
10648 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
10649 # ncurses/ncursesw:
10650 if test "$cf_cv_utf8_lib" = "add-on" ; then
10651
10652 cat >>confdefs.h <<\EOF
10653 #define HAVE_LIBUTF8_H 1
10654 EOF
10655
10656 if test -n "$cf_cv_header_path_utf8" ; then
10657   for cf_add_incdir in $cf_cv_header_path_utf8
10658   do
10659         while test $cf_add_incdir != /usr/include
10660         do
10661           if test -d $cf_add_incdir
10662           then
10663                 cf_have_incdir=no
10664                 if test -n "$CFLAGS$CPPFLAGS" ; then
10665                   # a loop is needed to ensure we can add subdirs of existing dirs
10666                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10667                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10668                           cf_have_incdir=yes; break
10669                         fi
10670                   done
10671                 fi
10672
10673                 if test "$cf_have_incdir" = no ; then
10674                   if test "$cf_add_incdir" = /usr/local/include ; then
10675                         if test "$GCC" = yes
10676                         then
10677                           cf_save_CPPFLAGS=$CPPFLAGS
10678                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10679                           cat >conftest.$ac_ext <<_ACEOF
10680 #line 10680 "configure"
10681 #include "confdefs.h"
10682 #include <stdio.h>
10683 int
10684 main (void)
10685 {
10686 printf("Hello")
10687   ;
10688   return 0;
10689 }
10690 _ACEOF
10691 rm -f conftest.$ac_objext
10692 if { (eval echo "$as_me:10692: \"$ac_compile\"") >&5
10693   (eval $ac_compile) 2>&5
10694   ac_status=$?
10695   echo "$as_me:10695: \$? = $ac_status" >&5
10696   (exit $ac_status); } &&
10697          { ac_try='test -s conftest.$ac_objext'
10698   { (eval echo "$as_me:10698: \"$ac_try\"") >&5
10699   (eval $ac_try) 2>&5
10700   ac_status=$?
10701   echo "$as_me:10701: \$? = $ac_status" >&5
10702   (exit $ac_status); }; }; then
10703   :
10704 else
10705   echo "$as_me: failed program was:" >&5
10706 cat conftest.$ac_ext >&5
10707 cf_have_incdir=yes
10708 fi
10709 rm -f conftest.$ac_objext conftest.$ac_ext
10710                           CPPFLAGS=$cf_save_CPPFLAGS
10711                         fi
10712                   fi
10713                 fi
10714
10715                 if test "$cf_have_incdir" = no ; then
10716                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
10717
10718 echo "${as_me:-configure}:10718: testing adding $cf_add_incdir to include-path ..." 1>&5
10719
10720                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10721
10722                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10723                   test "$cf_top_incdir" = "$cf_add_incdir" && break
10724                   cf_add_incdir="$cf_top_incdir"
10725                 else
10726                   break
10727                 fi
10728           else
10729                 break
10730           fi
10731         done
10732   done
10733 fi
10734
10735 if test -n "$cf_cv_library_path_utf8" ; then
10736         for cf_add_libdir in $cf_cv_library_path_utf8
10737         do
10738                 if test $cf_add_libdir = /usr/lib ; then
10739                         :
10740                 elif test -d $cf_add_libdir
10741                 then
10742                         cf_have_libdir=no
10743                         if test -n "$LDFLAGS$LIBS" ; then
10744                                 # a loop is needed to ensure we can add subdirs of existing dirs
10745                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
10746                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10747                                                 cf_have_libdir=yes; break
10748                                         fi
10749                                 done
10750                         fi
10751                         if test "$cf_have_libdir" = no ; then
10752                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
10753
10754 echo "${as_me:-configure}:10754: testing adding $cf_add_libdir to library-path ..." 1>&5
10755
10756                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10757                         fi
10758                 fi
10759         done
10760 fi
10761
10762 cf_add_libs="$cf_cv_library_file_utf8"
10763 # Filter out duplicates - this happens with badly-designed ".pc" files...
10764 for cf_add_1lib in $LIBS
10765 do
10766         for cf_add_2lib in $cf_add_libs
10767         do
10768                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10769                 then
10770                         cf_add_1lib=
10771                         break
10772                 fi
10773         done
10774         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10775 done
10776 LIBS="$cf_add_libs"
10777
10778 fi
10779
10780                 if test "$cf_cv_utf8_lib" != no ; then
10781                         NCURSES_LIBUTF8=1
10782                 fi
10783         fi
10784
10785 # This is needed on Tru64 5.0 to declare mbstate_t
10786 echo "$as_me:10786: checking if we must include wchar.h to declare mbstate_t" >&5
10787 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10788 if test "${cf_cv_mbstate_t+set}" = set; then
10789   echo $ECHO_N "(cached) $ECHO_C" >&6
10790 else
10791
10792 cat >conftest.$ac_ext <<_ACEOF
10793 #line 10793 "configure"
10794 #include "confdefs.h"
10795
10796 #include <stdlib.h>
10797 #include <stdarg.h>
10798 #include <stdio.h>
10799 #ifdef HAVE_LIBUTF8_H
10800 #include <libutf8.h>
10801 #endif
10802 int
10803 main (void)
10804 {
10805 mbstate_t state
10806   ;
10807   return 0;
10808 }
10809 _ACEOF
10810 rm -f conftest.$ac_objext
10811 if { (eval echo "$as_me:10811: \"$ac_compile\"") >&5
10812   (eval $ac_compile) 2>&5
10813   ac_status=$?
10814   echo "$as_me:10814: \$? = $ac_status" >&5
10815   (exit $ac_status); } &&
10816          { ac_try='test -s conftest.$ac_objext'
10817   { (eval echo "$as_me:10817: \"$ac_try\"") >&5
10818   (eval $ac_try) 2>&5
10819   ac_status=$?
10820   echo "$as_me:10820: \$? = $ac_status" >&5
10821   (exit $ac_status); }; }; then
10822   cf_cv_mbstate_t=no
10823 else
10824   echo "$as_me: failed program was:" >&5
10825 cat conftest.$ac_ext >&5
10826 cat >conftest.$ac_ext <<_ACEOF
10827 #line 10827 "configure"
10828 #include "confdefs.h"
10829
10830 #include <stdlib.h>
10831 #include <stdarg.h>
10832 #include <stdio.h>
10833 #include <wchar.h>
10834 #ifdef HAVE_LIBUTF8_H
10835 #include <libutf8.h>
10836 #endif
10837 int
10838 main (void)
10839 {
10840 mbstate_t value
10841   ;
10842   return 0;
10843 }
10844 _ACEOF
10845 rm -f conftest.$ac_objext
10846 if { (eval echo "$as_me:10846: \"$ac_compile\"") >&5
10847   (eval $ac_compile) 2>&5
10848   ac_status=$?
10849   echo "$as_me:10849: \$? = $ac_status" >&5
10850   (exit $ac_status); } &&
10851          { ac_try='test -s conftest.$ac_objext'
10852   { (eval echo "$as_me:10852: \"$ac_try\"") >&5
10853   (eval $ac_try) 2>&5
10854   ac_status=$?
10855   echo "$as_me:10855: \$? = $ac_status" >&5
10856   (exit $ac_status); }; }; then
10857   cf_cv_mbstate_t=yes
10858 else
10859   echo "$as_me: failed program was:" >&5
10860 cat conftest.$ac_ext >&5
10861 cf_cv_mbstate_t=unknown
10862 fi
10863 rm -f conftest.$ac_objext conftest.$ac_ext
10864 fi
10865 rm -f conftest.$ac_objext conftest.$ac_ext
10866 fi
10867 echo "$as_me:10867: result: $cf_cv_mbstate_t" >&5
10868 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10869
10870 if test "$cf_cv_mbstate_t" = yes ; then
10871
10872 cat >>confdefs.h <<\EOF
10873 #define NEED_WCHAR_H 1
10874 EOF
10875
10876         NEED_WCHAR_H=1
10877 fi
10878
10879 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10880 if test "$cf_cv_mbstate_t" = unknown ; then
10881         NCURSES_MBSTATE_T=1
10882 fi
10883
10884 # This is needed on Tru64 5.0 to declare wchar_t
10885 echo "$as_me:10885: checking if we must include wchar.h to declare wchar_t" >&5
10886 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10887 if test "${cf_cv_wchar_t+set}" = set; then
10888   echo $ECHO_N "(cached) $ECHO_C" >&6
10889 else
10890
10891 cat >conftest.$ac_ext <<_ACEOF
10892 #line 10892 "configure"
10893 #include "confdefs.h"
10894
10895 #include <stdlib.h>
10896 #include <stdarg.h>
10897 #include <stdio.h>
10898 #ifdef HAVE_LIBUTF8_H
10899 #include <libutf8.h>
10900 #endif
10901 int
10902 main (void)
10903 {
10904 wchar_t state
10905   ;
10906   return 0;
10907 }
10908 _ACEOF
10909 rm -f conftest.$ac_objext
10910 if { (eval echo "$as_me:10910: \"$ac_compile\"") >&5
10911   (eval $ac_compile) 2>&5
10912   ac_status=$?
10913   echo "$as_me:10913: \$? = $ac_status" >&5
10914   (exit $ac_status); } &&
10915          { ac_try='test -s conftest.$ac_objext'
10916   { (eval echo "$as_me:10916: \"$ac_try\"") >&5
10917   (eval $ac_try) 2>&5
10918   ac_status=$?
10919   echo "$as_me:10919: \$? = $ac_status" >&5
10920   (exit $ac_status); }; }; then
10921   cf_cv_wchar_t=no
10922 else
10923   echo "$as_me: failed program was:" >&5
10924 cat conftest.$ac_ext >&5
10925 cat >conftest.$ac_ext <<_ACEOF
10926 #line 10926 "configure"
10927 #include "confdefs.h"
10928
10929 #include <stdlib.h>
10930 #include <stdarg.h>
10931 #include <stdio.h>
10932 #include <wchar.h>
10933 #ifdef HAVE_LIBUTF8_H
10934 #include <libutf8.h>
10935 #endif
10936 int
10937 main (void)
10938 {
10939 wchar_t value
10940   ;
10941   return 0;
10942 }
10943 _ACEOF
10944 rm -f conftest.$ac_objext
10945 if { (eval echo "$as_me:10945: \"$ac_compile\"") >&5
10946   (eval $ac_compile) 2>&5
10947   ac_status=$?
10948   echo "$as_me:10948: \$? = $ac_status" >&5
10949   (exit $ac_status); } &&
10950          { ac_try='test -s conftest.$ac_objext'
10951   { (eval echo "$as_me:10951: \"$ac_try\"") >&5
10952   (eval $ac_try) 2>&5
10953   ac_status=$?
10954   echo "$as_me:10954: \$? = $ac_status" >&5
10955   (exit $ac_status); }; }; then
10956   cf_cv_wchar_t=yes
10957 else
10958   echo "$as_me: failed program was:" >&5
10959 cat conftest.$ac_ext >&5
10960 cf_cv_wchar_t=unknown
10961 fi
10962 rm -f conftest.$ac_objext conftest.$ac_ext
10963 fi
10964 rm -f conftest.$ac_objext conftest.$ac_ext
10965 fi
10966 echo "$as_me:10966: result: $cf_cv_wchar_t" >&5
10967 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10968
10969 if test "$cf_cv_wchar_t" = yes ; then
10970
10971 cat >>confdefs.h <<\EOF
10972 #define NEED_WCHAR_H 1
10973 EOF
10974
10975         NEED_WCHAR_H=1
10976 fi
10977
10978 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10979 if test "$cf_cv_wchar_t" = unknown ; then
10980         NCURSES_WCHAR_T=1
10981 fi
10982
10983 # if we find wchar_t in either place, use substitution to provide a fallback.
10984 if test "$cf_cv_wchar_t" != unknown ; then
10985         NCURSES_OK_WCHAR_T=1
10986 fi
10987
10988 # This is needed on Tru64 5.0 to declare wint_t
10989 echo "$as_me:10989: checking if we must include wchar.h to declare wint_t" >&5
10990 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10991 if test "${cf_cv_wint_t+set}" = set; then
10992   echo $ECHO_N "(cached) $ECHO_C" >&6
10993 else
10994
10995 cat >conftest.$ac_ext <<_ACEOF
10996 #line 10996 "configure"
10997 #include "confdefs.h"
10998
10999 #include <stdlib.h>
11000 #include <stdarg.h>
11001 #include <stdio.h>
11002 #ifdef HAVE_LIBUTF8_H
11003 #include <libutf8.h>
11004 #endif
11005 int
11006 main (void)
11007 {
11008 wint_t state
11009   ;
11010   return 0;
11011 }
11012 _ACEOF
11013 rm -f conftest.$ac_objext
11014 if { (eval echo "$as_me:11014: \"$ac_compile\"") >&5
11015   (eval $ac_compile) 2>&5
11016   ac_status=$?
11017   echo "$as_me:11017: \$? = $ac_status" >&5
11018   (exit $ac_status); } &&
11019          { ac_try='test -s conftest.$ac_objext'
11020   { (eval echo "$as_me:11020: \"$ac_try\"") >&5
11021   (eval $ac_try) 2>&5
11022   ac_status=$?
11023   echo "$as_me:11023: \$? = $ac_status" >&5
11024   (exit $ac_status); }; }; then
11025   cf_cv_wint_t=no
11026 else
11027   echo "$as_me: failed program was:" >&5
11028 cat conftest.$ac_ext >&5
11029 cat >conftest.$ac_ext <<_ACEOF
11030 #line 11030 "configure"
11031 #include "confdefs.h"
11032
11033 #include <stdlib.h>
11034 #include <stdarg.h>
11035 #include <stdio.h>
11036 #include <wchar.h>
11037 #ifdef HAVE_LIBUTF8_H
11038 #include <libutf8.h>
11039 #endif
11040 int
11041 main (void)
11042 {
11043 wint_t value
11044   ;
11045   return 0;
11046 }
11047 _ACEOF
11048 rm -f conftest.$ac_objext
11049 if { (eval echo "$as_me:11049: \"$ac_compile\"") >&5
11050   (eval $ac_compile) 2>&5
11051   ac_status=$?
11052   echo "$as_me:11052: \$? = $ac_status" >&5
11053   (exit $ac_status); } &&
11054          { ac_try='test -s conftest.$ac_objext'
11055   { (eval echo "$as_me:11055: \"$ac_try\"") >&5
11056   (eval $ac_try) 2>&5
11057   ac_status=$?
11058   echo "$as_me:11058: \$? = $ac_status" >&5
11059   (exit $ac_status); }; }; then
11060   cf_cv_wint_t=yes
11061 else
11062   echo "$as_me: failed program was:" >&5
11063 cat conftest.$ac_ext >&5
11064 cf_cv_wint_t=unknown
11065 fi
11066 rm -f conftest.$ac_objext conftest.$ac_ext
11067 fi
11068 rm -f conftest.$ac_objext conftest.$ac_ext
11069 fi
11070 echo "$as_me:11070: result: $cf_cv_wint_t" >&5
11071 echo "${ECHO_T}$cf_cv_wint_t" >&6
11072
11073 if test "$cf_cv_wint_t" = yes ; then
11074
11075 cat >>confdefs.h <<\EOF
11076 #define NEED_WCHAR_H 1
11077 EOF
11078
11079         NEED_WCHAR_H=1
11080 fi
11081
11082 # if we do not find wint_t in either place, use substitution to provide a fallback.
11083 if test "$cf_cv_wint_t" = unknown ; then
11084         NCURSES_WINT_T=1
11085 fi
11086
11087 # if we find wint_t in either place, use substitution to provide a fallback.
11088 if test "$cf_cv_wint_t" != unknown ; then
11089         NCURSES_OK_WINT_T=1
11090 fi
11091
11092         if test "$NCURSES_MBSTATE_T" != 0; then
11093
11094 cat >>confdefs.h <<\EOF
11095 #define NEED_MBSTATE_T_DEF 1
11096 EOF
11097
11098         fi
11099 fi
11100
11101 ###   use option --disable-lp64 to allow long chtype
11102 echo "$as_me:11102: checking whether to enable _LP64 definition in curses.h" >&5
11103 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
11104
11105 # Check whether --enable-lp64 or --disable-lp64 was given.
11106 if test "${enable_lp64+set}" = set; then
11107   enableval="$enable_lp64"
11108   with_lp64=$enableval
11109 else
11110   with_lp64=$cf_dft_with_lp64
11111 fi;
11112 echo "$as_me:11112: result: $with_lp64" >&5
11113 echo "${ECHO_T}$with_lp64" >&6
11114
11115 if test "x$with_lp64" = xyes ; then
11116         cf_cv_enable_lp64=1
11117 else
11118         cf_cv_enable_lp64=0
11119 fi
11120
11121 # Check whether --enable-largefile or --disable-largefile was given.
11122 if test "${enable_largefile+set}" = set; then
11123   enableval="$enable_largefile"
11124
11125 fi;
11126 if test "$enable_largefile" != no; then
11127
11128   echo "$as_me:11128: checking for special C compiler options needed for large files" >&5
11129 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
11130 if test "${ac_cv_sys_largefile_CC+set}" = set; then
11131   echo $ECHO_N "(cached) $ECHO_C" >&6
11132 else
11133   ac_cv_sys_largefile_CC=no
11134      if test "$GCC" != yes; then
11135        ac_save_CC=$CC
11136        while :; do
11137          # IRIX 6.2 and later do not support large files by default,
11138          # so use the C compiler's -n32 option if that helps.
11139          cat >conftest.$ac_ext <<_ACEOF
11140 #line 11140 "configure"
11141 #include "confdefs.h"
11142 #include <sys/types.h>
11143  /* Check that off_t can represent 2**63 - 1 correctly.
11144     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11145     since some C++ compilers masquerading as C compilers
11146     incorrectly reject 9223372036854775807.  */
11147 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11148   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11149                        && LARGE_OFF_T % 2147483647 == 1)
11150                       ? 1 : -1];
11151 int
11152 main (void)
11153 {
11154
11155   ;
11156   return 0;
11157 }
11158 _ACEOF
11159          rm -f conftest.$ac_objext
11160 if { (eval echo "$as_me:11160: \"$ac_compile\"") >&5
11161   (eval $ac_compile) 2>&5
11162   ac_status=$?
11163   echo "$as_me:11163: \$? = $ac_status" >&5
11164   (exit $ac_status); } &&
11165          { ac_try='test -s conftest.$ac_objext'
11166   { (eval echo "$as_me:11166: \"$ac_try\"") >&5
11167   (eval $ac_try) 2>&5
11168   ac_status=$?
11169   echo "$as_me:11169: \$? = $ac_status" >&5
11170   (exit $ac_status); }; }; then
11171   break
11172 else
11173   echo "$as_me: failed program was:" >&5
11174 cat conftest.$ac_ext >&5
11175 fi
11176 rm -f conftest.$ac_objext
11177          CC="$CC -n32"
11178          rm -f conftest.$ac_objext
11179 if { (eval echo "$as_me:11179: \"$ac_compile\"") >&5
11180   (eval $ac_compile) 2>&5
11181   ac_status=$?
11182   echo "$as_me:11182: \$? = $ac_status" >&5
11183   (exit $ac_status); } &&
11184          { ac_try='test -s conftest.$ac_objext'
11185   { (eval echo "$as_me:11185: \"$ac_try\"") >&5
11186   (eval $ac_try) 2>&5
11187   ac_status=$?
11188   echo "$as_me:11188: \$? = $ac_status" >&5
11189   (exit $ac_status); }; }; then
11190   ac_cv_sys_largefile_CC=' -n32'; break
11191 else
11192   echo "$as_me: failed program was:" >&5
11193 cat conftest.$ac_ext >&5
11194 fi
11195 rm -f conftest.$ac_objext
11196          break
11197        done
11198        CC=$ac_save_CC
11199        rm -f conftest.$ac_ext
11200     fi
11201 fi
11202 echo "$as_me:11202: result: $ac_cv_sys_largefile_CC" >&5
11203 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
11204   if test "$ac_cv_sys_largefile_CC" != no; then
11205     CC=$CC$ac_cv_sys_largefile_CC
11206   fi
11207
11208   echo "$as_me:11208: checking for _FILE_OFFSET_BITS value needed for large files" >&5
11209 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
11210 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
11211   echo $ECHO_N "(cached) $ECHO_C" >&6
11212 else
11213   while :; do
11214   ac_cv_sys_file_offset_bits=no
11215   cat >conftest.$ac_ext <<_ACEOF
11216 #line 11216 "configure"
11217 #include "confdefs.h"
11218 #include <sys/types.h>
11219  /* Check that off_t can represent 2**63 - 1 correctly.
11220     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11221     since some C++ compilers masquerading as C compilers
11222     incorrectly reject 9223372036854775807.  */
11223 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11224   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11225                        && LARGE_OFF_T % 2147483647 == 1)
11226                       ? 1 : -1];
11227 int
11228 main (void)
11229 {
11230
11231   ;
11232   return 0;
11233 }
11234 _ACEOF
11235 rm -f conftest.$ac_objext
11236 if { (eval echo "$as_me:11236: \"$ac_compile\"") >&5
11237   (eval $ac_compile) 2>&5
11238   ac_status=$?
11239   echo "$as_me:11239: \$? = $ac_status" >&5
11240   (exit $ac_status); } &&
11241          { ac_try='test -s conftest.$ac_objext'
11242   { (eval echo "$as_me:11242: \"$ac_try\"") >&5
11243   (eval $ac_try) 2>&5
11244   ac_status=$?
11245   echo "$as_me:11245: \$? = $ac_status" >&5
11246   (exit $ac_status); }; }; then
11247   break
11248 else
11249   echo "$as_me: failed program was:" >&5
11250 cat conftest.$ac_ext >&5
11251 fi
11252 rm -f conftest.$ac_objext conftest.$ac_ext
11253   cat >conftest.$ac_ext <<_ACEOF
11254 #line 11254 "configure"
11255 #include "confdefs.h"
11256 #define _FILE_OFFSET_BITS 64
11257 #include <sys/types.h>
11258  /* Check that off_t can represent 2**63 - 1 correctly.
11259     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11260     since some C++ compilers masquerading as C compilers
11261     incorrectly reject 9223372036854775807.  */
11262 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11263   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11264                        && LARGE_OFF_T % 2147483647 == 1)
11265                       ? 1 : -1];
11266 int
11267 main (void)
11268 {
11269
11270   ;
11271   return 0;
11272 }
11273 _ACEOF
11274 rm -f conftest.$ac_objext
11275 if { (eval echo "$as_me:11275: \"$ac_compile\"") >&5
11276   (eval $ac_compile) 2>&5
11277   ac_status=$?
11278   echo "$as_me:11278: \$? = $ac_status" >&5
11279   (exit $ac_status); } &&
11280          { ac_try='test -s conftest.$ac_objext'
11281   { (eval echo "$as_me:11281: \"$ac_try\"") >&5
11282   (eval $ac_try) 2>&5
11283   ac_status=$?
11284   echo "$as_me:11284: \$? = $ac_status" >&5
11285   (exit $ac_status); }; }; then
11286   ac_cv_sys_file_offset_bits=64; break
11287 else
11288   echo "$as_me: failed program was:" >&5
11289 cat conftest.$ac_ext >&5
11290 fi
11291 rm -f conftest.$ac_objext conftest.$ac_ext
11292   break
11293 done
11294 fi
11295 echo "$as_me:11295: result: $ac_cv_sys_file_offset_bits" >&5
11296 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
11297 if test "$ac_cv_sys_file_offset_bits" != no; then
11298
11299 cat >>confdefs.h <<EOF
11300 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
11301 EOF
11302
11303 fi
11304 rm -rf conftest*
11305   echo "$as_me:11305: checking for _LARGE_FILES value needed for large files" >&5
11306 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
11307 if test "${ac_cv_sys_large_files+set}" = set; then
11308   echo $ECHO_N "(cached) $ECHO_C" >&6
11309 else
11310   while :; do
11311   ac_cv_sys_large_files=no
11312   cat >conftest.$ac_ext <<_ACEOF
11313 #line 11313 "configure"
11314 #include "confdefs.h"
11315 #include <sys/types.h>
11316  /* Check that off_t can represent 2**63 - 1 correctly.
11317     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11318     since some C++ compilers masquerading as C compilers
11319     incorrectly reject 9223372036854775807.  */
11320 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11321   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11322                        && LARGE_OFF_T % 2147483647 == 1)
11323                       ? 1 : -1];
11324 int
11325 main (void)
11326 {
11327
11328   ;
11329   return 0;
11330 }
11331 _ACEOF
11332 rm -f conftest.$ac_objext
11333 if { (eval echo "$as_me:11333: \"$ac_compile\"") >&5
11334   (eval $ac_compile) 2>&5
11335   ac_status=$?
11336   echo "$as_me:11336: \$? = $ac_status" >&5
11337   (exit $ac_status); } &&
11338          { ac_try='test -s conftest.$ac_objext'
11339   { (eval echo "$as_me:11339: \"$ac_try\"") >&5
11340   (eval $ac_try) 2>&5
11341   ac_status=$?
11342   echo "$as_me:11342: \$? = $ac_status" >&5
11343   (exit $ac_status); }; }; then
11344   break
11345 else
11346   echo "$as_me: failed program was:" >&5
11347 cat conftest.$ac_ext >&5
11348 fi
11349 rm -f conftest.$ac_objext conftest.$ac_ext
11350   cat >conftest.$ac_ext <<_ACEOF
11351 #line 11351 "configure"
11352 #include "confdefs.h"
11353 #define _LARGE_FILES 1
11354 #include <sys/types.h>
11355  /* Check that off_t can represent 2**63 - 1 correctly.
11356     We can't simply define LARGE_OFF_T to be 9223372036854775807,
11357     since some C++ compilers masquerading as C compilers
11358     incorrectly reject 9223372036854775807.  */
11359 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
11360   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
11361                        && LARGE_OFF_T % 2147483647 == 1)
11362                       ? 1 : -1];
11363 int
11364 main (void)
11365 {
11366
11367   ;
11368   return 0;
11369 }
11370 _ACEOF
11371 rm -f conftest.$ac_objext
11372 if { (eval echo "$as_me:11372: \"$ac_compile\"") >&5
11373   (eval $ac_compile) 2>&5
11374   ac_status=$?
11375   echo "$as_me:11375: \$? = $ac_status" >&5
11376   (exit $ac_status); } &&
11377          { ac_try='test -s conftest.$ac_objext'
11378   { (eval echo "$as_me:11378: \"$ac_try\"") >&5
11379   (eval $ac_try) 2>&5
11380   ac_status=$?
11381   echo "$as_me:11381: \$? = $ac_status" >&5
11382   (exit $ac_status); }; }; then
11383   ac_cv_sys_large_files=1; break
11384 else
11385   echo "$as_me: failed program was:" >&5
11386 cat conftest.$ac_ext >&5
11387 fi
11388 rm -f conftest.$ac_objext conftest.$ac_ext
11389   break
11390 done
11391 fi
11392 echo "$as_me:11392: result: $ac_cv_sys_large_files" >&5
11393 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
11394 if test "$ac_cv_sys_large_files" != no; then
11395
11396 cat >>confdefs.h <<EOF
11397 #define _LARGE_FILES $ac_cv_sys_large_files
11398 EOF
11399
11400 fi
11401 rm -rf conftest*
11402 fi
11403
11404         if test "$enable_largefile" != no ; then
11405         echo "$as_me:11405: checking for _LARGEFILE_SOURCE value needed for large files" >&5
11406 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
11407 if test "${ac_cv_sys_largefile_source+set}" = set; then
11408   echo $ECHO_N "(cached) $ECHO_C" >&6
11409 else
11410   while :; do
11411   ac_cv_sys_largefile_source=no
11412   cat >conftest.$ac_ext <<_ACEOF
11413 #line 11413 "configure"
11414 #include "confdefs.h"
11415 #include <stdio.h>
11416 int
11417 main (void)
11418 {
11419 return !fseeko;
11420   ;
11421   return 0;
11422 }
11423 _ACEOF
11424 rm -f conftest.$ac_objext
11425 if { (eval echo "$as_me:11425: \"$ac_compile\"") >&5
11426   (eval $ac_compile) 2>&5
11427   ac_status=$?
11428   echo "$as_me:11428: \$? = $ac_status" >&5
11429   (exit $ac_status); } &&
11430          { ac_try='test -s conftest.$ac_objext'
11431   { (eval echo "$as_me:11431: \"$ac_try\"") >&5
11432   (eval $ac_try) 2>&5
11433   ac_status=$?
11434   echo "$as_me:11434: \$? = $ac_status" >&5
11435   (exit $ac_status); }; }; then
11436   break
11437 else
11438   echo "$as_me: failed program was:" >&5
11439 cat conftest.$ac_ext >&5
11440 fi
11441 rm -f conftest.$ac_objext conftest.$ac_ext
11442   cat >conftest.$ac_ext <<_ACEOF
11443 #line 11443 "configure"
11444 #include "confdefs.h"
11445 #define _LARGEFILE_SOURCE 1
11446 #include <stdio.h>
11447 int
11448 main (void)
11449 {
11450 return !fseeko;
11451   ;
11452   return 0;
11453 }
11454 _ACEOF
11455 rm -f conftest.$ac_objext
11456 if { (eval echo "$as_me:11456: \"$ac_compile\"") >&5
11457   (eval $ac_compile) 2>&5
11458   ac_status=$?
11459   echo "$as_me:11459: \$? = $ac_status" >&5
11460   (exit $ac_status); } &&
11461          { ac_try='test -s conftest.$ac_objext'
11462   { (eval echo "$as_me:11462: \"$ac_try\"") >&5
11463   (eval $ac_try) 2>&5
11464   ac_status=$?
11465   echo "$as_me:11465: \$? = $ac_status" >&5
11466   (exit $ac_status); }; }; then
11467   ac_cv_sys_largefile_source=1; break
11468 else
11469   echo "$as_me: failed program was:" >&5
11470 cat conftest.$ac_ext >&5
11471 fi
11472 rm -f conftest.$ac_objext conftest.$ac_ext
11473   break
11474 done
11475 fi
11476 echo "$as_me:11476: result: $ac_cv_sys_largefile_source" >&5
11477 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
11478 if test "$ac_cv_sys_largefile_source" != no; then
11479
11480 cat >>confdefs.h <<EOF
11481 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
11482 EOF
11483
11484 fi
11485 rm -rf conftest*
11486
11487 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
11488 # in glibc 2.1.3, but that breaks too many other things.
11489 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
11490 echo "$as_me:11490: checking for fseeko" >&5
11491 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
11492 if test "${ac_cv_func_fseeko+set}" = set; then
11493   echo $ECHO_N "(cached) $ECHO_C" >&6
11494 else
11495   cat >conftest.$ac_ext <<_ACEOF
11496 #line 11496 "configure"
11497 #include "confdefs.h"
11498 #include <stdio.h>
11499 int
11500 main (void)
11501 {
11502 return fseeko && fseeko (stdin, 0, 0);
11503   ;
11504   return 0;
11505 }
11506 _ACEOF
11507 rm -f conftest.$ac_objext conftest$ac_exeext
11508 if { (eval echo "$as_me:11508: \"$ac_link\"") >&5
11509   (eval $ac_link) 2>&5
11510   ac_status=$?
11511   echo "$as_me:11511: \$? = $ac_status" >&5
11512   (exit $ac_status); } &&
11513          { ac_try='test -s conftest$ac_exeext'
11514   { (eval echo "$as_me:11514: \"$ac_try\"") >&5
11515   (eval $ac_try) 2>&5
11516   ac_status=$?
11517   echo "$as_me:11517: \$? = $ac_status" >&5
11518   (exit $ac_status); }; }; then
11519   ac_cv_func_fseeko=yes
11520 else
11521   echo "$as_me: failed program was:" >&5
11522 cat conftest.$ac_ext >&5
11523 ac_cv_func_fseeko=no
11524 fi
11525 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11526 fi
11527 echo "$as_me:11527: result: $ac_cv_func_fseeko" >&5
11528 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
11529 if test $ac_cv_func_fseeko = yes; then
11530
11531 cat >>confdefs.h <<\EOF
11532 #define HAVE_FSEEKO 1
11533 EOF
11534
11535 fi
11536
11537         # Normally we would collect these definitions in the config.h,
11538         # but (like _XOPEN_SOURCE), some environments rely on having these
11539         # defined before any of the system headers are included.  Another
11540         # case comes up with C++, e.g., on AIX the compiler compiles the
11541         # header files by themselves before looking at the body files it is
11542         # told to compile.  For ncurses, those header files do not include
11543         # the config.h
11544         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
11545         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
11546         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
11547
11548         echo "$as_me:11548: checking whether to use struct dirent64" >&5
11549 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
11550 if test "${cf_cv_struct_dirent64+set}" = set; then
11551   echo $ECHO_N "(cached) $ECHO_C" >&6
11552 else
11553
11554                 cat >conftest.$ac_ext <<_ACEOF
11555 #line 11555 "configure"
11556 #include "confdefs.h"
11557
11558 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
11559 #include <sys/types.h>
11560 #include <dirent.h>
11561
11562 int
11563 main (void)
11564 {
11565
11566                 /* if transitional largefile support is setup, this is true */
11567                 extern struct dirent64 * readdir(DIR *);
11568                 struct dirent64 *x = readdir((DIR *)0);
11569                 struct dirent *y = readdir((DIR *)0);
11570                 int z = x - y;
11571
11572   ;
11573   return 0;
11574 }
11575 _ACEOF
11576 rm -f conftest.$ac_objext
11577 if { (eval echo "$as_me:11577: \"$ac_compile\"") >&5
11578   (eval $ac_compile) 2>&5
11579   ac_status=$?
11580   echo "$as_me:11580: \$? = $ac_status" >&5
11581   (exit $ac_status); } &&
11582          { ac_try='test -s conftest.$ac_objext'
11583   { (eval echo "$as_me:11583: \"$ac_try\"") >&5
11584   (eval $ac_try) 2>&5
11585   ac_status=$?
11586   echo "$as_me:11586: \$? = $ac_status" >&5
11587   (exit $ac_status); }; }; then
11588   cf_cv_struct_dirent64=yes
11589 else
11590   echo "$as_me: failed program was:" >&5
11591 cat conftest.$ac_ext >&5
11592 cf_cv_struct_dirent64=no
11593 fi
11594 rm -f conftest.$ac_objext conftest.$ac_ext
11595
11596 fi
11597 echo "$as_me:11597: result: $cf_cv_struct_dirent64" >&5
11598 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
11599         test "$cf_cv_struct_dirent64" = yes &&
11600 cat >>confdefs.h <<\EOF
11601 #define HAVE_STRUCT_DIRENT64 1
11602 EOF
11603
11604         fi
11605
11606 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
11607 echo "$as_me:11607: checking if you want tparm not to use X/Open fixed-parameter list" >&5
11608 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
11609
11610 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
11611 if test "${enable_tparm_varargs+set}" = set; then
11612   enableval="$enable_tparm_varargs"
11613   with_tparm_varargs=$enableval
11614 else
11615   with_tparm_varargs=yes
11616 fi;
11617 echo "$as_me:11617: result: $with_tparm_varargs" >&5
11618 echo "${ECHO_T}$with_tparm_varargs" >&6
11619 NCURSES_TPARM_VARARGS=0
11620 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
11621
11622 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
11623 if test "$with_ticlib" != no ; then
11624 echo "$as_me:11624: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
11625 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
11626
11627 # Check whether --enable-tic-depends or --disable-tic-depends was given.
11628 if test "${enable_tic_depends+set}" = set; then
11629   enableval="$enable_tic_depends"
11630   with_tic_depends=$enableval
11631 else
11632   with_tic_depends=yes
11633 fi;
11634 echo "$as_me:11634: result: $with_tic_depends" >&5
11635 echo "${ECHO_T}$with_tic_depends" >&6
11636 else
11637         with_tic_depends=no
11638 fi
11639
11640 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
11641 echo "$as_me:11641: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
11642 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
11643
11644 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
11645 if test "${enable_wattr_macros+set}" = set; then
11646   enableval="$enable_wattr_macros"
11647   with_wattr_macros=$enableval
11648 else
11649   with_wattr_macros=yes
11650 fi;
11651 if [ "x$with_wattr_macros" != xyes ]; then
11652         NCURSES_WATTR_MACROS=0
11653         echo "$as_me:11653: result: yes" >&5
11654 echo "${ECHO_T}yes" >&6
11655 else
11656         NCURSES_WATTR_MACROS=1
11657         echo "$as_me:11657: result: no" >&5
11658 echo "${ECHO_T}no" >&6
11659 fi
11660
11661 echo "$as_me:11661: checking for X11 rgb file" >&5
11662 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
11663
11664 # Check whether --with-x11-rgb or --without-x11-rgb was given.
11665 if test "${with_x11_rgb+set}" = set; then
11666   withval="$with_x11_rgb"
11667   RGB_PATH=$withval
11668 else
11669   RGB_PATH=auto
11670 fi;
11671
11672 if test "x$RGB_PATH" = xauto
11673 then
11674         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
11675         for cf_path in \
11676                 /opt/local/share/X11/rgb.txt \
11677                 /opt/X11/share/X11/rgb.txt \
11678                 /usr/share/X11/rgb.txt \
11679                 /usr/X11/share/X11/rgb.txt \
11680                 /usr/X11/lib/X11/rgb.txt \
11681                 /usr/lib/X11/rgb.txt \
11682                 /etc/X11/rgb.txt \
11683                 /usr/pkg/lib/X11/rgb.txt \
11684                 /usr/X11R7/lib/X11/rgb.txt \
11685                 /usr/X11R6/lib/X11/rgb.txt \
11686                 /usr/X11R5/lib/X11/rgb.txt \
11687                 /usr/X11R4/lib/X11/rgb.txt \
11688                 /usr/local/lib/X11/rgb.txt \
11689                 /usr/local/share/X11/rgb.txt \
11690                 /usr/lib64/X11/rgb.txt
11691         do
11692                 if test -f "$cf_path" ; then
11693                         RGB_PATH="$cf_path"
11694                         break
11695                 fi
11696         done
11697 else
11698         cf_path=$RGB_PATH
11699
11700 if test "x$prefix" != xNONE; then
11701         cf_path_syntax="$prefix"
11702 else
11703         cf_path_syntax="$ac_default_prefix"
11704 fi
11705
11706 case ".$cf_path" in
11707 (.\$\(*\)*|.\'*\'*)
11708         ;;
11709 (..|./*|.\\*)
11710         ;;
11711 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
11712         ;;
11713 (.\${*prefix}*|.\${*dir}*)
11714         eval cf_path="$cf_path"
11715         case ".$cf_path" in
11716         (.NONE/*)
11717                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
11718                 ;;
11719         esac
11720         ;;
11721 (.no|.NONE/*)
11722         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
11723         ;;
11724 (*)
11725         { { echo "$as_me:11725: error: expected a pathname, not \"$cf_path\"" >&5
11726 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
11727    { (exit 1); exit 1; }; }
11728         ;;
11729 esac
11730
11731 fi
11732
11733 echo "$as_me:11733: result: $RGB_PATH" >&5
11734 echo "${ECHO_T}$RGB_PATH" >&6
11735
11736 cat >>confdefs.h <<EOF
11737 #define RGB_PATH "$cf_path"
11738 EOF
11739
11740 no_x11_rgb=
11741 if test "$RGB_PATH" = no
11742 then
11743         no_x11_rgb="#"
11744 fi
11745
11746 ###   use option --with-bool to override bool's type
11747 echo "$as_me:11747: checking for type of bool" >&5
11748 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
11749
11750 # Check whether --with-bool or --without-bool was given.
11751 if test "${with_bool+set}" = set; then
11752   withval="$with_bool"
11753   NCURSES_BOOL="$withval"
11754 else
11755   NCURSES_BOOL=auto
11756 fi;
11757 echo "$as_me:11757: result: $NCURSES_BOOL" >&5
11758 echo "${ECHO_T}$NCURSES_BOOL" >&6
11759
11760 echo "$as_me:11760: checking for alternate terminal capabilities file" >&5
11761 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
11762
11763 # Check whether --with-caps or --without-caps was given.
11764 if test "${with_caps+set}" = set; then
11765   withval="$with_caps"
11766   TERMINFO_CAPS=Caps.$withval
11767 else
11768   TERMINFO_CAPS=Caps
11769 fi;
11770 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
11771 echo "$as_me:11771: result: $TERMINFO_CAPS" >&5
11772 echo "${ECHO_T}$TERMINFO_CAPS" >&6
11773
11774 ###   use option --with-chtype to override chtype's type
11775 echo "$as_me:11775: checking for type of chtype" >&5
11776 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11777
11778 # Check whether --with-chtype or --without-chtype was given.
11779 if test "${with_chtype+set}" = set; then
11780   withval="$with_chtype"
11781   NCURSES_CHTYPE="$withval"
11782 else
11783   NCURSES_CHTYPE=$cf_dft_chtype
11784 fi;
11785 echo "$as_me:11785: result: $NCURSES_CHTYPE" >&5
11786 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
11787
11788 ###   use option --with-ospeed to override ospeed's type
11789 echo "$as_me:11789: checking for type of ospeed" >&5
11790 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
11791
11792 # Check whether --with-ospeed or --without-ospeed was given.
11793 if test "${with_ospeed+set}" = set; then
11794   withval="$with_ospeed"
11795   NCURSES_OSPEED="$withval"
11796 else
11797   NCURSES_OSPEED=short
11798 fi;
11799 echo "$as_me:11799: result: $NCURSES_OSPEED" >&5
11800 echo "${ECHO_T}$NCURSES_OSPEED" >&6
11801
11802 ###   use option --with-mmask-t to override mmask_t's type
11803 echo "$as_me:11803: checking for type of mmask_t" >&5
11804 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
11805
11806 # Check whether --with-mmask-t or --without-mmask-t was given.
11807 if test "${with_mmask_t+set}" = set; then
11808   withval="$with_mmask_t"
11809   NCURSES_MMASK_T="$withval"
11810 else
11811   NCURSES_MMASK_T=$cf_dft_mmask_t
11812 fi;
11813 echo "$as_me:11813: result: $NCURSES_MMASK_T" >&5
11814 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
11815
11816 ###   use option --with-ccharw-max to override CCHARW_MAX size
11817 echo "$as_me:11817: checking for size CCHARW_MAX" >&5
11818 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
11819
11820 # Check whether --with-ccharw-max or --without-ccharw-max was given.
11821 if test "${with_ccharw_max+set}" = set; then
11822   withval="$with_ccharw_max"
11823   NCURSES_CCHARW_MAX="$withval"
11824 else
11825   NCURSES_CCHARW_MAX=5
11826 fi;
11827 echo "$as_me:11827: result: $NCURSES_CCHARW_MAX" >&5
11828 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
11829
11830 echo "$as_me:11830: checking for ANSI C header files" >&5
11831 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11832 if test "${ac_cv_header_stdc+set}" = set; then
11833   echo $ECHO_N "(cached) $ECHO_C" >&6
11834 else
11835   cat >conftest.$ac_ext <<_ACEOF
11836 #line 11836 "configure"
11837 #include "confdefs.h"
11838 #include <stdlib.h>
11839 #include <stdarg.h>
11840 #include <string.h>
11841 #include <float.h>
11842
11843 _ACEOF
11844 if { (eval echo "$as_me:11844: \"$ac_cpp conftest.$ac_ext\"") >&5
11845   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11846   ac_status=$?
11847   egrep -v '^ *\+' conftest.er1 >conftest.err
11848   rm -f conftest.er1
11849   cat conftest.err >&5
11850   echo "$as_me:11850: \$? = $ac_status" >&5
11851   (exit $ac_status); } >/dev/null; then
11852   if test -s conftest.err; then
11853     ac_cpp_err=$ac_c_preproc_warn_flag
11854   else
11855     ac_cpp_err=
11856   fi
11857 else
11858   ac_cpp_err=yes
11859 fi
11860 if test -z "$ac_cpp_err"; then
11861   ac_cv_header_stdc=yes
11862 else
11863   echo "$as_me: failed program was:" >&5
11864   cat conftest.$ac_ext >&5
11865   ac_cv_header_stdc=no
11866 fi
11867 rm -f conftest.err conftest.$ac_ext
11868
11869 if test $ac_cv_header_stdc = yes; then
11870   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11871   cat >conftest.$ac_ext <<_ACEOF
11872 #line 11872 "configure"
11873 #include "confdefs.h"
11874 #include <string.h>
11875
11876 _ACEOF
11877 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11878   egrep "memchr" >/dev/null 2>&1; then
11879   :
11880 else
11881   ac_cv_header_stdc=no
11882 fi
11883 rm -rf conftest*
11884
11885 fi
11886
11887 if test $ac_cv_header_stdc = yes; then
11888   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11889   cat >conftest.$ac_ext <<_ACEOF
11890 #line 11890 "configure"
11891 #include "confdefs.h"
11892 #include <stdlib.h>
11893
11894 _ACEOF
11895 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11896   egrep "free" >/dev/null 2>&1; then
11897   :
11898 else
11899   ac_cv_header_stdc=no
11900 fi
11901 rm -rf conftest*
11902
11903 fi
11904
11905 if test $ac_cv_header_stdc = yes; then
11906   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11907   if test "$cross_compiling" = yes; then
11908   :
11909 else
11910   cat >conftest.$ac_ext <<_ACEOF
11911 #line 11911 "configure"
11912 #include "confdefs.h"
11913 #include <ctype.h>
11914 #if ((' ' & 0x0FF) == 0x020)
11915 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11916 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11917 #else
11918 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11919                      || ('j' <= (c) && (c) <= 'r') \
11920                      || ('s' <= (c) && (c) <= 'z'))
11921 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11922 #endif
11923
11924 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11925 int
11926 main (void)
11927 {
11928   int i;
11929   for (i = 0; i < 256; i++)
11930     if (XOR (islower (i), ISLOWER (i))
11931         || toupper (i) != TOUPPER (i))
11932       $ac_main_return(2);
11933   $ac_main_return (0);
11934 }
11935 _ACEOF
11936 rm -f conftest$ac_exeext
11937 if { (eval echo "$as_me:11937: \"$ac_link\"") >&5
11938   (eval $ac_link) 2>&5
11939   ac_status=$?
11940   echo "$as_me:11940: \$? = $ac_status" >&5
11941   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11942   { (eval echo "$as_me:11942: \"$ac_try\"") >&5
11943   (eval $ac_try) 2>&5
11944   ac_status=$?
11945   echo "$as_me:11945: \$? = $ac_status" >&5
11946   (exit $ac_status); }; }; then
11947   :
11948 else
11949   echo "$as_me: program exited with status $ac_status" >&5
11950 echo "$as_me: failed program was:" >&5
11951 cat conftest.$ac_ext >&5
11952 ac_cv_header_stdc=no
11953 fi
11954 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11955 fi
11956 fi
11957 fi
11958 echo "$as_me:11958: result: $ac_cv_header_stdc" >&5
11959 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11960 if test $ac_cv_header_stdc = yes; then
11961
11962 cat >>confdefs.h <<\EOF
11963 #define STDC_HEADERS 1
11964 EOF
11965
11966 fi
11967
11968 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11969
11970 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11971                   inttypes.h stdint.h unistd.h
11972 do
11973 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11974 echo "$as_me:11974: checking for $ac_header" >&5
11975 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11976 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11977   echo $ECHO_N "(cached) $ECHO_C" >&6
11978 else
11979   cat >conftest.$ac_ext <<_ACEOF
11980 #line 11980 "configure"
11981 #include "confdefs.h"
11982 $ac_includes_default
11983 #include <$ac_header>
11984 _ACEOF
11985 rm -f conftest.$ac_objext
11986 if { (eval echo "$as_me:11986: \"$ac_compile\"") >&5
11987   (eval $ac_compile) 2>&5
11988   ac_status=$?
11989   echo "$as_me:11989: \$? = $ac_status" >&5
11990   (exit $ac_status); } &&
11991          { ac_try='test -s conftest.$ac_objext'
11992   { (eval echo "$as_me:11992: \"$ac_try\"") >&5
11993   (eval $ac_try) 2>&5
11994   ac_status=$?
11995   echo "$as_me:11995: \$? = $ac_status" >&5
11996   (exit $ac_status); }; }; then
11997   eval "$as_ac_Header=yes"
11998 else
11999   echo "$as_me: failed program was:" >&5
12000 cat conftest.$ac_ext >&5
12001 eval "$as_ac_Header=no"
12002 fi
12003 rm -f conftest.$ac_objext conftest.$ac_ext
12004 fi
12005 echo "$as_me:12005: result: `eval echo '${'$as_ac_Header'}'`" >&5
12006 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12007 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12008   cat >>confdefs.h <<EOF
12009 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12010 EOF
12011
12012 fi
12013 done
12014
12015 echo "$as_me:12015: checking for signed char" >&5
12016 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12017 if test "${ac_cv_type_signed_char+set}" = set; then
12018   echo $ECHO_N "(cached) $ECHO_C" >&6
12019 else
12020   cat >conftest.$ac_ext <<_ACEOF
12021 #line 12021 "configure"
12022 #include "confdefs.h"
12023 $ac_includes_default
12024 int
12025 main (void)
12026 {
12027 if ((signed char *) 0)
12028   return 0;
12029 if (sizeof (signed char))
12030   return 0;
12031   ;
12032   return 0;
12033 }
12034 _ACEOF
12035 rm -f conftest.$ac_objext
12036 if { (eval echo "$as_me:12036: \"$ac_compile\"") >&5
12037   (eval $ac_compile) 2>&5
12038   ac_status=$?
12039   echo "$as_me:12039: \$? = $ac_status" >&5
12040   (exit $ac_status); } &&
12041          { ac_try='test -s conftest.$ac_objext'
12042   { (eval echo "$as_me:12042: \"$ac_try\"") >&5
12043   (eval $ac_try) 2>&5
12044   ac_status=$?
12045   echo "$as_me:12045: \$? = $ac_status" >&5
12046   (exit $ac_status); }; }; then
12047   ac_cv_type_signed_char=yes
12048 else
12049   echo "$as_me: failed program was:" >&5
12050 cat conftest.$ac_ext >&5
12051 ac_cv_type_signed_char=no
12052 fi
12053 rm -f conftest.$ac_objext conftest.$ac_ext
12054 fi
12055 echo "$as_me:12055: result: $ac_cv_type_signed_char" >&5
12056 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12057
12058 echo "$as_me:12058: checking size of signed char" >&5
12059 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12060 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12061   echo $ECHO_N "(cached) $ECHO_C" >&6
12062 else
12063   if test "$ac_cv_type_signed_char" = yes; then
12064   if test "$cross_compiling" = yes; then
12065   # Depending upon the size, compute the lo and hi bounds.
12066 cat >conftest.$ac_ext <<_ACEOF
12067 #line 12067 "configure"
12068 #include "confdefs.h"
12069 $ac_includes_default
12070 int
12071 main (void)
12072 {
12073 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12074   ;
12075   return 0;
12076 }
12077 _ACEOF
12078 rm -f conftest.$ac_objext
12079 if { (eval echo "$as_me:12079: \"$ac_compile\"") >&5
12080   (eval $ac_compile) 2>&5
12081   ac_status=$?
12082   echo "$as_me:12082: \$? = $ac_status" >&5
12083   (exit $ac_status); } &&
12084          { ac_try='test -s conftest.$ac_objext'
12085   { (eval echo "$as_me:12085: \"$ac_try\"") >&5
12086   (eval $ac_try) 2>&5
12087   ac_status=$?
12088   echo "$as_me:12088: \$? = $ac_status" >&5
12089   (exit $ac_status); }; }; then
12090   ac_lo=0 ac_mid=0
12091   while :; do
12092     cat >conftest.$ac_ext <<_ACEOF
12093 #line 12093 "configure"
12094 #include "confdefs.h"
12095 $ac_includes_default
12096 int
12097 main (void)
12098 {
12099 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12100   ;
12101   return 0;
12102 }
12103 _ACEOF
12104 rm -f conftest.$ac_objext
12105 if { (eval echo "$as_me:12105: \"$ac_compile\"") >&5
12106   (eval $ac_compile) 2>&5
12107   ac_status=$?
12108   echo "$as_me:12108: \$? = $ac_status" >&5
12109   (exit $ac_status); } &&
12110          { ac_try='test -s conftest.$ac_objext'
12111   { (eval echo "$as_me:12111: \"$ac_try\"") >&5
12112   (eval $ac_try) 2>&5
12113   ac_status=$?
12114   echo "$as_me:12114: \$? = $ac_status" >&5
12115   (exit $ac_status); }; }; then
12116   ac_hi=$ac_mid; break
12117 else
12118   echo "$as_me: failed program was:" >&5
12119 cat conftest.$ac_ext >&5
12120 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12121 fi
12122 rm -f conftest.$ac_objext conftest.$ac_ext
12123   done
12124 else
12125   echo "$as_me: failed program was:" >&5
12126 cat conftest.$ac_ext >&5
12127 ac_hi=-1 ac_mid=-1
12128   while :; do
12129     cat >conftest.$ac_ext <<_ACEOF
12130 #line 12130 "configure"
12131 #include "confdefs.h"
12132 $ac_includes_default
12133 int
12134 main (void)
12135 {
12136 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12137   ;
12138   return 0;
12139 }
12140 _ACEOF
12141 rm -f conftest.$ac_objext
12142 if { (eval echo "$as_me:12142: \"$ac_compile\"") >&5
12143   (eval $ac_compile) 2>&5
12144   ac_status=$?
12145   echo "$as_me:12145: \$? = $ac_status" >&5
12146   (exit $ac_status); } &&
12147          { ac_try='test -s conftest.$ac_objext'
12148   { (eval echo "$as_me:12148: \"$ac_try\"") >&5
12149   (eval $ac_try) 2>&5
12150   ac_status=$?
12151   echo "$as_me:12151: \$? = $ac_status" >&5
12152   (exit $ac_status); }; }; then
12153   ac_lo=$ac_mid; break
12154 else
12155   echo "$as_me: failed program was:" >&5
12156 cat conftest.$ac_ext >&5
12157 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12158 fi
12159 rm -f conftest.$ac_objext conftest.$ac_ext
12160   done
12161 fi
12162 rm -f conftest.$ac_objext conftest.$ac_ext
12163 # Binary search between lo and hi bounds.
12164 while test "x$ac_lo" != "x$ac_hi"; do
12165   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12166   cat >conftest.$ac_ext <<_ACEOF
12167 #line 12167 "configure"
12168 #include "confdefs.h"
12169 $ac_includes_default
12170 int
12171 main (void)
12172 {
12173 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12174   ;
12175   return 0;
12176 }
12177 _ACEOF
12178 rm -f conftest.$ac_objext
12179 if { (eval echo "$as_me:12179: \"$ac_compile\"") >&5
12180   (eval $ac_compile) 2>&5
12181   ac_status=$?
12182   echo "$as_me:12182: \$? = $ac_status" >&5
12183   (exit $ac_status); } &&
12184          { ac_try='test -s conftest.$ac_objext'
12185   { (eval echo "$as_me:12185: \"$ac_try\"") >&5
12186   (eval $ac_try) 2>&5
12187   ac_status=$?
12188   echo "$as_me:12188: \$? = $ac_status" >&5
12189   (exit $ac_status); }; }; then
12190   ac_hi=$ac_mid
12191 else
12192   echo "$as_me: failed program was:" >&5
12193 cat conftest.$ac_ext >&5
12194 ac_lo=`expr $ac_mid + 1`
12195 fi
12196 rm -f conftest.$ac_objext conftest.$ac_ext
12197 done
12198 ac_cv_sizeof_signed_char=$ac_lo
12199 else
12200   if test "$cross_compiling" = yes; then
12201   { { echo "$as_me:12201: error: cannot run test program while cross compiling" >&5
12202 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12203    { (exit 1); exit 1; }; }
12204 else
12205   cat >conftest.$ac_ext <<_ACEOF
12206 #line 12206 "configure"
12207 #include "confdefs.h"
12208 $ac_includes_default
12209 int
12210 main (void)
12211 {
12212 FILE *f = fopen ("conftest.val", "w");
12213 if (!f)
12214   $ac_main_return (1);
12215 fprintf (f, "%d", (sizeof (signed char)));
12216 fclose (f);
12217   ;
12218   return 0;
12219 }
12220 _ACEOF
12221 rm -f conftest$ac_exeext
12222 if { (eval echo "$as_me:12222: \"$ac_link\"") >&5
12223   (eval $ac_link) 2>&5
12224   ac_status=$?
12225   echo "$as_me:12225: \$? = $ac_status" >&5
12226   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12227   { (eval echo "$as_me:12227: \"$ac_try\"") >&5
12228   (eval $ac_try) 2>&5
12229   ac_status=$?
12230   echo "$as_me:12230: \$? = $ac_status" >&5
12231   (exit $ac_status); }; }; then
12232   ac_cv_sizeof_signed_char=`cat conftest.val`
12233 else
12234   echo "$as_me: program exited with status $ac_status" >&5
12235 echo "$as_me: failed program was:" >&5
12236 cat conftest.$ac_ext >&5
12237 fi
12238 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12239 fi
12240 fi
12241 rm -f conftest.val
12242 else
12243   ac_cv_sizeof_signed_char=0
12244 fi
12245 fi
12246 echo "$as_me:12246: result: $ac_cv_sizeof_signed_char" >&5
12247 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12248 cat >>confdefs.h <<EOF
12249 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12250 EOF
12251
12252 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12253         NCURSES_SBOOL="signed char"
12254 else
12255         NCURSES_SBOOL="char"
12256 fi
12257 echo "$as_me:12257: checking if you want to use signed Boolean array in term.h" >&5
12258 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12259
12260 # Check whether --enable-signed-char or --disable-signed-char was given.
12261 if test "${enable_signed_char+set}" = set; then
12262   enableval="$enable_signed_char"
12263   with_signed_char=$enableval
12264 else
12265   with_signed_char=no
12266 fi;
12267 echo "$as_me:12267: result: $with_signed_char" >&5
12268 echo "${ECHO_T}$with_signed_char" >&6
12269 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12270
12271 ###   use option --with-tparm-arg to override tparm's argument type
12272 echo "$as_me:12272: checking for type of tparm args" >&5
12273 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
12274
12275 # Check whether --with-tparm-arg or --without-tparm-arg was given.
12276 if test "${with_tparm_arg+set}" = set; then
12277   withval="$with_tparm_arg"
12278   NCURSES_TPARM_ARG="$withval"
12279 else
12280   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
12281 fi;
12282 echo "$as_me:12282: result: $NCURSES_TPARM_ARG" >&5
12283 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
12284
12285 ### Enable compiling-in rcs id's
12286 echo "$as_me:12286: checking if RCS identifiers should be compiled-in" >&5
12287 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
12288
12289 # Check whether --with-rcs-ids or --without-rcs-ids was given.
12290 if test "${with_rcs_ids+set}" = set; then
12291   withval="$with_rcs_ids"
12292   with_rcs_ids=$withval
12293 else
12294   with_rcs_ids=no
12295 fi;
12296 echo "$as_me:12296: result: $with_rcs_ids" >&5
12297 echo "${ECHO_T}$with_rcs_ids" >&6
12298 test "x$with_rcs_ids" = xyes &&
12299 cat >>confdefs.h <<\EOF
12300 #define USE_RCS_IDS 1
12301 EOF
12302
12303 ###############################################################################
12304
12305 echo "$as_me:12305: checking format of man-pages" >&5
12306 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
12307
12308 # Check whether --with-manpage-format or --without-manpage-format was given.
12309 if test "${with_manpage_format+set}" = set; then
12310   withval="$with_manpage_format"
12311   MANPAGE_FORMAT=$withval
12312 else
12313   MANPAGE_FORMAT=unknown
12314 fi;
12315
12316 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
12317 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
12318
12319 cf_unknown=
12320
12321 case $MANPAGE_FORMAT in
12322 (unknown)
12323         if test -z "$MANPATH" ; then
12324                 MANPATH="/usr/man:/usr/share/man"
12325         fi
12326
12327         # look for the 'date' man-page (it's most likely to be installed!)
12328         MANPAGE_FORMAT=
12329         cf_preform=no
12330         cf_catonly=yes
12331         cf_example=date
12332
12333         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
12334         for cf_dir in $MANPATH; do
12335                 test -z "$cf_dir" && cf_dir=/usr/man
12336                 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
12337                 do
12338                         cf_test=`echo $cf_name | sed -e 's/*//'`
12339                         if test "x$cf_test" = "x$cf_name" ; then
12340
12341                                 case "$cf_name" in
12342                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
12343                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
12344                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
12345                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
12346                                 esac
12347
12348                                 case "$cf_name" in
12349                                 ($cf_dir/man*)
12350                                         cf_catonly=no
12351                                         ;;
12352                                 ($cf_dir/cat*)
12353                                         cf_preform=yes
12354                                         ;;
12355                                 esac
12356                                 break
12357                         fi
12358
12359                         # if we found a match in either man* or cat*, stop looking
12360                         if test -n "$MANPAGE_FORMAT" ; then
12361                                 cf_found=no
12362                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
12363                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
12364                                 case "$cf_name" in
12365                                 ($cf_dir/cat*)
12366                                         cf_found=yes
12367                                         ;;
12368                                 esac
12369                                 test $cf_found=yes && break
12370                         fi
12371                 done
12372                 # only check the first directory in $MANPATH where we find manpages
12373                 if test -n "$MANPAGE_FORMAT" ; then
12374                         break
12375                 fi
12376         done
12377         # if we did not find the example, just assume it is normal
12378         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
12379         IFS="$ac_save_ifs"
12380         ;;
12381 (*)
12382         for cf_option in $MANPAGE_FORMAT; do
12383         case $cf_option in
12384         (gzip|compress|BSDI|normal|formatted|catonly)
12385                 ;;
12386         (*)
12387                 cf_unknown="$cf_unknown $cf_option"
12388                 ;;
12389         esac
12390         done
12391         ;;
12392 esac
12393
12394 echo "$as_me:12394: result: $MANPAGE_FORMAT" >&5
12395 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
12396 if test -n "$cf_unknown" ; then
12397         { echo "$as_me:12397: WARNING: Unexpected manpage-format $cf_unknown" >&5
12398 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
12399 fi
12400
12401 echo "$as_me:12401: checking for manpage renaming" >&5
12402 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
12403
12404 # Check whether --with-manpage-renames or --without-manpage-renames was given.
12405 if test "${with_manpage_renames+set}" = set; then
12406   withval="$with_manpage_renames"
12407   MANPAGE_RENAMES=$withval
12408 else
12409   MANPAGE_RENAMES=yes
12410 fi;
12411
12412 case ".$MANPAGE_RENAMES" in
12413 (.no)
12414         ;;
12415 (.|.yes)
12416         # Debian 'man' program?
12417         if test -f /etc/debian_version ; then
12418                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
12419         else
12420                 MANPAGE_RENAMES=no
12421         fi
12422         ;;
12423 esac
12424
12425 if test "$MANPAGE_RENAMES" != no ; then
12426         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
12427                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
12428         elif test ! -f $MANPAGE_RENAMES ; then
12429                 { { echo "$as_me:12429: error: not a filename: $MANPAGE_RENAMES" >&5
12430 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
12431    { (exit 1); exit 1; }; }
12432         fi
12433
12434         test ! -d man && mkdir man
12435
12436         # Construct a sed-script to perform renaming within man-pages
12437         if test -n "$MANPAGE_RENAMES" ; then
12438                 test ! -d man && mkdir man
12439                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
12440         fi
12441 fi
12442
12443 echo "$as_me:12443: result: $MANPAGE_RENAMES" >&5
12444 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
12445
12446 echo "$as_me:12446: checking if manpage aliases will be installed" >&5
12447 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
12448
12449 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
12450 if test "${with_manpage_aliases+set}" = set; then
12451   withval="$with_manpage_aliases"
12452   MANPAGE_ALIASES=$withval
12453 else
12454   MANPAGE_ALIASES=yes
12455 fi;
12456
12457 echo "$as_me:12457: result: $MANPAGE_ALIASES" >&5
12458 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
12459
12460 case "x$LN_S" in
12461 (xln*)
12462         cf_use_symlinks=yes
12463         ;;
12464 (*)
12465         cf_use_symlinks=no
12466         ;;
12467 esac
12468
12469 MANPAGE_SYMLINKS=no
12470 if test "$MANPAGE_ALIASES" = yes ; then
12471 echo "$as_me:12471: checking if manpage symlinks should be used" >&5
12472 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
12473
12474 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
12475 if test "${with_manpage_symlinks+set}" = set; then
12476   withval="$with_manpage_symlinks"
12477   MANPAGE_SYMLINKS=$withval
12478 else
12479   MANPAGE_SYMLINKS=$cf_use_symlinks
12480 fi;
12481
12482 if test "$$cf_use_symlinks" = no; then
12483 if test "$MANPAGE_SYMLINKS" = yes ; then
12484         { echo "$as_me:12484: WARNING: cannot make symlinks" >&5
12485 echo "$as_me: WARNING: cannot make symlinks" >&2;}
12486         MANPAGE_SYMLINKS=no
12487 fi
12488 fi
12489
12490 echo "$as_me:12490: result: $MANPAGE_SYMLINKS" >&5
12491 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
12492 fi
12493
12494 echo "$as_me:12494: checking for manpage tbl" >&5
12495 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
12496
12497 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
12498 if test "${with_manpage_tbl+set}" = set; then
12499   withval="$with_manpage_tbl"
12500   MANPAGE_TBL=$withval
12501 else
12502   MANPAGE_TBL=no
12503 fi;
12504
12505 echo "$as_me:12505: result: $MANPAGE_TBL" >&5
12506 echo "${ECHO_T}$MANPAGE_TBL" >&6
12507
12508 if test "$prefix" = "NONE" ; then
12509         cf_prefix="$ac_default_prefix"
12510 else
12511         cf_prefix="$prefix"
12512 fi
12513
12514 case "$MANPAGE_FORMAT" in
12515 (*catonly*)
12516         cf_format=yes
12517         cf_inboth=no
12518         ;;
12519 (*formatted*)
12520         cf_format=yes
12521         cf_inboth=yes
12522         ;;
12523 (*)
12524         cf_format=no
12525         cf_inboth=no
12526         ;;
12527 esac
12528
12529 test ! -d man && mkdir man
12530
12531 cf_so_strip=
12532 cf_compress=
12533 case "$MANPAGE_FORMAT" in
12534 (*compress*)
12535         cf_so_strip="Z"
12536         cf_compress=compress
12537         ;;
12538 (*gzip*)
12539         cf_so_strip="gz"
12540         cf_compress=gzip
12541         ;;
12542 esac
12543
12544 cf_edit_man=./edit_man.sh
12545 cf_man_alias=`pwd`/man_alias.sed
12546
12547 cat >$cf_edit_man <<CF_EOF
12548 #! $SHELL
12549 # this script is generated by the configure-script CF_MAN_PAGES macro.
12550
12551 prefix="$cf_prefix"
12552 datarootdir="$datarootdir"
12553 datadir="$datadir"
12554
12555 NCURSES_MAJOR="$NCURSES_MAJOR"
12556 NCURSES_MINOR="$NCURSES_MINOR"
12557 NCURSES_PATCH="$NCURSES_PATCH"
12558
12559 NCURSES_OSPEED="$NCURSES_OSPEED"
12560 TERMINFO="$TERMINFO"
12561
12562 INSTALL="$INSTALL"
12563 INSTALL_DATA="$INSTALL_DATA"
12564
12565 transform="$program_transform_name"
12566
12567 TMP=\${TMPDIR:=/tmp}/man\$\$
12568 trap "rm -f \$TMP" 0 1 2 3 15
12569
12570 form=\$1
12571 shift || exit 1
12572
12573 verb=\$1
12574 shift || exit 1
12575
12576 mandir=\$1
12577 shift || exit 1
12578
12579 srcdir=\$1
12580 top_srcdir=\$srcdir/..
12581 shift || exit 1
12582
12583 if test "\$form" = normal ; then
12584         if test "$cf_format" = yes ; then
12585         if test "$cf_inboth" = no ; then
12586                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
12587                 exit $?
12588         fi
12589         fi
12590         cf_subdir=\$mandir/man
12591         cf_tables=$MANPAGE_TBL
12592 else
12593         cf_subdir=\$mandir/cat
12594         cf_tables=yes
12595 fi
12596
12597 # process the list of source-files
12598 for i in \$* ; do
12599 case \$i in
12600 (*.orig|*.rej) ;;
12601 (*.[0-9]*)
12602         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
12603         if test \$verb = installing ; then
12604         if test ! -d \$cf_subdir\${section} ; then
12605                 mkdir -p \$cf_subdir\$section
12606         fi
12607         fi
12608
12609         # replace variables in man page
12610         if test ! -f $cf_man_alias ; then
12611 cat >>$cf_man_alias <<-CF_EOF2
12612                 s,@DATADIR@,\$datadir,g
12613                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
12614                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
12615                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
12616                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
12617                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
12618                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
12619 CF_EOF
12620
12621         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
12622         do
12623                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12624                 cf_name=`echo $cf_name|sed "$program_transform_name"`
12625 cat >>$cf_edit_man <<-CF_EOF
12626                 s,@$cf_NAME@,$cf_name,g
12627 CF_EOF
12628         done
12629
12630 cat >>$cf_edit_man <<CF_EOF
12631 CF_EOF2
12632                 echo "...made $cf_man_alias"
12633         fi
12634
12635         aliases=
12636         cf_source=\`basename \$i\`
12637         inalias=\$cf_source
12638         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
12639         if test ! -f \$inalias ; then
12640                 echo .. skipped \$cf_source
12641                 continue
12642         fi
12643 CF_EOF
12644
12645 if test "$MANPAGE_ALIASES" != no ; then
12646 cat >>$cf_edit_man <<CF_EOF
12647         nCurses=ignore.3x
12648         test $with_curses_h = yes && nCurses=ncurses.3x
12649         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
12650 CF_EOF
12651 fi
12652
12653 if test "$MANPAGE_RENAMES" = no ; then
12654 cat >>$cf_edit_man <<CF_EOF
12655         # perform program transformations for section 1 man pages
12656         if test \$section = 1 ; then
12657                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
12658         else
12659                 cf_target=\$cf_subdir\${section}/\$cf_source
12660         fi
12661 CF_EOF
12662 else
12663 cat >>$cf_edit_man <<CF_EOF
12664         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
12665         if test -z "\$cf_target" ; then
12666                 echo '? missing rename for '\$cf_source
12667                 cf_target="\$cf_source"
12668         fi
12669         cf_target="\$cf_subdir\${section}/\${cf_target}"
12670
12671 CF_EOF
12672 fi
12673
12674 cat >>$cf_edit_man <<CF_EOF
12675         sed     -f $cf_man_alias \\
12676 CF_EOF
12677
12678 if test -f $MANPAGE_RENAMES ; then
12679 cat >>$cf_edit_man <<CF_EOF
12680                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
12681 CF_EOF
12682 else
12683 cat >>$cf_edit_man <<CF_EOF
12684                 < \$i >\$TMP
12685 CF_EOF
12686 fi
12687
12688 cat >>$cf_edit_man <<CF_EOF
12689 if test \$cf_tables = yes ; then
12690         tbl \$TMP >\$TMP.out
12691         mv \$TMP.out \$TMP
12692 fi
12693 CF_EOF
12694
12695 if test $with_overwrite != yes ; then
12696 cat >>$cf_edit_man <<CF_EOF
12697         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
12698         mv \$TMP.out \$TMP
12699 CF_EOF
12700 fi
12701
12702 if test $with_curses_h != yes ; then
12703 cat >>$cf_edit_man <<CF_EOF
12704         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
12705         mv \$TMP.out \$TMP
12706 CF_EOF
12707 fi
12708
12709 cat >>$cf_edit_man <<CF_EOF
12710         if test \$form = format ; then
12711                 nroff -man \$TMP >\$TMP.out
12712                 mv \$TMP.out \$TMP
12713         fi
12714 CF_EOF
12715
12716 if test -n "$cf_compress" ; then
12717 cat >>$cf_edit_man <<CF_EOF
12718         if test \$verb = installing ; then
12719         if ( $cf_compress -f \$TMP )
12720         then
12721                 mv \$TMP.$cf_so_strip \$TMP
12722         fi
12723         fi
12724         cf_target="\$cf_target.$cf_so_strip"
12725 CF_EOF
12726 fi
12727
12728 case "$MANPAGE_FORMAT" in
12729 (*BSDI*)
12730 cat >>$cf_edit_man <<CF_EOF
12731         if test \$form = format ; then
12732                 # BSDI installs only .0 suffixes in the cat directories
12733                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
12734         fi
12735 CF_EOF
12736   ;;
12737 esac
12738
12739 cat >>$cf_edit_man <<CF_EOF
12740         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
12741         if test \$verb = installing ; then
12742                 echo \$verb \$cf_target
12743                 \$INSTALL_DATA \$TMP \$cf_target
12744                 test -d \$cf_subdir\${section} &&
12745                 test -n "\$aliases" && (
12746                         cd \$cf_subdir\${section} && (
12747                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
12748                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
12749                                 cf_target=\`basename \$cf_target\`
12750                                 for cf_alias in \$aliases
12751                                 do
12752                                         if test \$section = 1 ; then
12753                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
12754                                         fi
12755
12756                                         if test "$MANPAGE_SYMLINKS" = yes ; then
12757                                                 if test -f \$cf_alias\${suffix} ; then
12758                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
12759                                                         then
12760                                                                 continue
12761                                                         fi
12762                                                 fi
12763                                                 echo .. \$verb alias \$cf_alias\${suffix}
12764 CF_EOF
12765 case "x$LN_S" in
12766 (*-f)
12767 cat >>$cf_edit_man <<CF_EOF
12768                                                 $LN_S \$cf_target \$cf_alias\${suffix}
12769 CF_EOF
12770         ;;
12771 (*)
12772 cat >>$cf_edit_man <<CF_EOF
12773                                                 rm -f \$cf_alias\${suffix}
12774                                                 $LN_S \$cf_target \$cf_alias\${suffix}
12775 CF_EOF
12776         ;;
12777 esac
12778 cat >>$cf_edit_man <<CF_EOF
12779                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
12780                                                 echo ".so \$cf_source" >\$TMP
12781 CF_EOF
12782 if test -n "$cf_compress" ; then
12783 cat >>$cf_edit_man <<CF_EOF
12784                                                 if test -n "$cf_so_strip" ; then
12785                                                         $cf_compress -f \$TMP
12786                                                         mv \$TMP.$cf_so_strip \$TMP
12787                                                 fi
12788 CF_EOF
12789 fi
12790 cat >>$cf_edit_man <<CF_EOF
12791                                                 echo .. \$verb alias \$cf_alias\${suffix}
12792                                                 rm -f \$cf_alias\${suffix}
12793                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
12794                                         fi
12795                                 done
12796                         )
12797                 )
12798         elif test \$verb = removing ; then
12799                 test -f \$cf_target && (
12800                         echo \$verb \$cf_target
12801                         rm -f \$cf_target
12802                 )
12803                 test -d \$cf_subdir\${section} &&
12804                 test -n "\$aliases" && (
12805                         cd \$cf_subdir\${section} && (
12806                                 for cf_alias in \$aliases
12807                                 do
12808                                         if test \$section = 1 ; then
12809                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
12810                                         fi
12811
12812                                         echo .. \$verb alias \$cf_alias\${suffix}
12813                                         rm -f \$cf_alias\${suffix}
12814                                 done
12815                         )
12816                 )
12817         else
12818 #               echo ".hy 0"
12819                 cat \$TMP
12820         fi
12821         ;;
12822 esac
12823 done
12824
12825 if test $cf_inboth = yes ; then
12826 if test \$form != format ; then
12827         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
12828 fi
12829 fi
12830
12831 exit 0
12832 CF_EOF
12833 chmod 755 $cf_edit_man
12834
12835 ###############################################################################
12836
12837 ### Note that some functions (such as const) are normally disabled anyway.
12838 echo "$as_me:12838: checking if you want to build with function extensions" >&5
12839 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
12840
12841 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
12842 if test "${enable_ext_funcs+set}" = set; then
12843   enableval="$enable_ext_funcs"
12844   with_ext_funcs=$enableval
12845 else
12846   with_ext_funcs=yes
12847 fi;
12848 echo "$as_me:12848: result: $with_ext_funcs" >&5
12849 echo "${ECHO_T}$with_ext_funcs" >&6
12850 if test "x$with_ext_funcs" = xyes ; then
12851         NCURSES_EXT_FUNCS=1
12852
12853 cat >>confdefs.h <<\EOF
12854 #define NCURSES_EXT_FUNCS 1
12855 EOF
12856
12857 cat >>confdefs.h <<\EOF
12858 #define HAVE_ASSUME_DEFAULT_COLORS 1
12859 EOF
12860
12861 cat >>confdefs.h <<\EOF
12862 #define HAVE_CURSES_VERSION 1
12863 EOF
12864
12865 cat >>confdefs.h <<\EOF
12866 #define HAVE_HAS_KEY 1
12867 EOF
12868
12869 cat >>confdefs.h <<\EOF
12870 #define HAVE_RESIZETERM 1
12871 EOF
12872
12873 cat >>confdefs.h <<\EOF
12874 #define HAVE_RESIZE_TERM 1
12875 EOF
12876
12877 cat >>confdefs.h <<\EOF
12878 #define HAVE_TERM_ENTRY_H 1
12879 EOF
12880
12881 cat >>confdefs.h <<\EOF
12882 #define HAVE_USE_DEFAULT_COLORS 1
12883 EOF
12884
12885 cat >>confdefs.h <<\EOF
12886 #define HAVE_USE_EXTENDED_NAMES 1
12887 EOF
12888
12889 cat >>confdefs.h <<\EOF
12890 #define HAVE_USE_SCREEN 1
12891 EOF
12892
12893 cat >>confdefs.h <<\EOF
12894 #define HAVE_USE_WINDOW 1
12895 EOF
12896
12897 cat >>confdefs.h <<\EOF
12898 #define HAVE_WRESIZE 1
12899 EOF
12900
12901         GENERATED_EXT_FUNCS=generated
12902         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
12903 else
12904         NCURSES_EXT_FUNCS=0
12905         GENERATED_EXT_FUNCS=
12906 fi
12907
12908 echo "$as_me:12908: checking if you want to build with SCREEN extensions" >&5
12909 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
12910
12911 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
12912 if test "${enable_sp_funcs+set}" = set; then
12913   enableval="$enable_sp_funcs"
12914   with_sp_funcs=$enableval
12915 else
12916   with_sp_funcs=$cf_dft_ext_spfuncs
12917 fi;
12918 echo "$as_me:12918: result: $with_sp_funcs" >&5
12919 echo "${ECHO_T}$with_sp_funcs" >&6
12920 if test "x$with_sp_funcs" = xyes ; then
12921         NCURSES_SP_FUNCS=1
12922
12923 cat >>confdefs.h <<\EOF
12924 #define NCURSES_SP_FUNCS 1
12925 EOF
12926
12927 cat >>confdefs.h <<\EOF
12928 #define HAVE_TPUTS_SP 1
12929 EOF
12930
12931         GENERATED_SP_FUNCS=generated
12932 else
12933         NCURSES_SP_FUNCS=0
12934         GENERATED_SP_FUNCS=
12935 fi
12936
12937 echo "$as_me:12937: checking if you want to build with terminal-driver" >&5
12938 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
12939
12940 # Check whether --enable-term-driver or --disable-term-driver was given.
12941 if test "${enable_term_driver+set}" = set; then
12942   enableval="$enable_term_driver"
12943   with_term_driver=$enableval
12944 else
12945   with_term_driver=no
12946 fi;
12947 echo "$as_me:12947: result: $with_term_driver" >&5
12948 echo "${ECHO_T}$with_term_driver" >&6
12949 if test "x$with_term_driver" = xyes ; then
12950
12951 cat >>confdefs.h <<\EOF
12952 #define USE_TERM_DRIVER 1
12953 EOF
12954
12955         if test "x$with_termlib" != xno ; then
12956                 { { echo "$as_me:12956: error: The term-driver option conflicts with the termlib option" >&5
12957 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
12958    { (exit 1); exit 1; }; }
12959         fi
12960         if test "x$with_sp_funcs" != xyes ; then
12961                 { { echo "$as_me:12961: error: The term-driver option relies upon sp-funcs" >&5
12962 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
12963    { (exit 1); exit 1; }; }
12964         fi
12965 fi
12966
12967 ###   use option --enable-const to turn on use of const beyond that in XSI.
12968 echo "$as_me:12968: checking for extended use of const keyword" >&5
12969 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
12970
12971 # Check whether --enable-const or --disable-const was given.
12972 if test "${enable_const+set}" = set; then
12973   enableval="$enable_const"
12974   with_ext_const=$enableval
12975 else
12976   with_ext_const=$cf_dft_ext_const
12977 fi;
12978 echo "$as_me:12978: result: $with_ext_const" >&5
12979 echo "${ECHO_T}$with_ext_const" >&6
12980 NCURSES_CONST='/*nothing*/'
12981 if test "x$with_ext_const" = xyes ; then
12982         NCURSES_CONST=const
12983 fi
12984
12985 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
12986 echo "$as_me:12986: checking if you want to use extended colors" >&5
12987 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
12988
12989 # Check whether --enable-ext-colors or --disable-ext-colors was given.
12990 if test "${enable_ext_colors+set}" = set; then
12991   enableval="$enable_ext_colors"
12992   with_ext_colors=$enableval
12993 else
12994   with_ext_colors=$cf_dft_ext_colors
12995 fi;
12996 echo "$as_me:12996: result: $with_ext_colors" >&5
12997 echo "${ECHO_T}$with_ext_colors" >&6
12998 NCURSES_EXT_COLORS=0
12999 if test "x$with_ext_colors" = xyes ; then
13000         if test "x$with_widec" != xyes ; then
13001                 { echo "$as_me:13001: WARNING: This option applies only to wide-character library" >&5
13002 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
13003         else
13004                 # cannot be ABI 5 since it changes sizeof(cchar_t)
13005
13006 if test "${with_abi_version+set}" != set; then
13007         case $cf_cv_rel_version in
13008         (5.*)
13009                 cf_cv_rel_version=6.0
13010                 cf_cv_abi_version=6
13011                 { echo "$as_me:13011: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13012 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13013                 ;;
13014         esac
13015 fi
13016
13017                 NCURSES_EXT_COLORS=1
13018
13019 cat >>confdefs.h <<\EOF
13020 #define NCURSES_EXT_COLORS 1
13021 EOF
13022
13023 cat >>confdefs.h <<\EOF
13024 #define HAVE_ALLOC_PAIR 1
13025 EOF
13026
13027 cat >>confdefs.h <<\EOF
13028 #define HAVE_INIT_EXTENDED_COLOR 1
13029 EOF
13030
13031 cat >>confdefs.h <<\EOF
13032 #define HAVE_RESET_COLOR_PAIRS 1
13033 EOF
13034
13035         fi
13036 fi
13037
13038 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
13039 echo "$as_me:13039: checking if you want to use extended mouse encoding" >&5
13040 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
13041
13042 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
13043 if test "${enable_ext_mouse+set}" = set; then
13044   enableval="$enable_ext_mouse"
13045   with_ext_mouse=$enableval
13046 else
13047   with_ext_mouse=$cf_dft_ext_mouse
13048 fi;
13049 echo "$as_me:13049: result: $with_ext_mouse" >&5
13050 echo "${ECHO_T}$with_ext_mouse" >&6
13051 NCURSES_MOUSE_VERSION=1
13052 if test "x$with_ext_mouse" = xyes ; then
13053         NCURSES_MOUSE_VERSION=2
13054
13055 if test "${with_abi_version+set}" != set; then
13056         case $cf_cv_rel_version in
13057         (5.*)
13058                 cf_cv_rel_version=6.0
13059                 cf_cv_abi_version=6
13060                 { echo "$as_me:13060: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13061 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13062                 ;;
13063         esac
13064 fi
13065
13066 fi
13067
13068 ###   use option --enable-ext-putwin to turn on extended screendumps
13069 echo "$as_me:13069: checking if you want to use extended putwin/screendump" >&5
13070 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
13071
13072 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
13073 if test "${enable_ext_putwin+set}" = set; then
13074   enableval="$enable_ext_putwin"
13075   with_ext_putwin=$enableval
13076 else
13077   with_ext_putwin=$cf_dft_ext_putwin
13078 fi;
13079 echo "$as_me:13079: result: $with_ext_putwin" >&5
13080 echo "${ECHO_T}$with_ext_putwin" >&6
13081 if test "x$with_ext_putwin" = xyes ; then
13082
13083 cat >>confdefs.h <<\EOF
13084 #define NCURSES_EXT_PUTWIN 1
13085 EOF
13086
13087 fi
13088
13089 echo "$as_me:13089: checking if you want \$NCURSES_NO_PADDING code" >&5
13090 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
13091
13092 # Check whether --enable-no-padding or --disable-no-padding was given.
13093 if test "${enable_no_padding+set}" = set; then
13094   enableval="$enable_no_padding"
13095   with_no_padding=$enableval
13096 else
13097   with_no_padding=$with_ext_funcs
13098 fi;
13099 echo "$as_me:13099: result: $with_no_padding" >&5
13100 echo "${ECHO_T}$with_no_padding" >&6
13101 test "x$with_no_padding" = xyes &&
13102 cat >>confdefs.h <<\EOF
13103 #define NCURSES_NO_PADDING 1
13104 EOF
13105
13106 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
13107 echo "$as_me:13107: checking if you want SIGWINCH handler" >&5
13108 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
13109
13110 # Check whether --enable-sigwinch or --disable-sigwinch was given.
13111 if test "${enable_sigwinch+set}" = set; then
13112   enableval="$enable_sigwinch"
13113   with_sigwinch=$enableval
13114 else
13115   with_sigwinch=$with_ext_funcs
13116 fi;
13117 echo "$as_me:13117: result: $with_sigwinch" >&5
13118 echo "${ECHO_T}$with_sigwinch" >&6
13119 test "x$with_sigwinch" = xyes &&
13120 cat >>confdefs.h <<\EOF
13121 #define USE_SIGWINCH 1
13122 EOF
13123
13124 ###   use option --enable-tcap-names to allow user to define new capabilities
13125 echo "$as_me:13125: checking if you want user-definable terminal capabilities like termcap" >&5
13126 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
13127
13128 # Check whether --enable-tcap-names or --disable-tcap-names was given.
13129 if test "${enable_tcap_names+set}" = set; then
13130   enableval="$enable_tcap_names"
13131   with_tcap_names=$enableval
13132 else
13133   with_tcap_names=$with_ext_funcs
13134 fi;
13135 echo "$as_me:13135: result: $with_tcap_names" >&5
13136 echo "${ECHO_T}$with_tcap_names" >&6
13137 NCURSES_XNAMES=0
13138 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
13139
13140 ##############################################################################
13141
13142 echo "$as_me:13142: checking if you want to link with the pthread library" >&5
13143 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
13144
13145 # Check whether --with-pthread or --without-pthread was given.
13146 if test "${with_pthread+set}" = set; then
13147   withval="$with_pthread"
13148   with_pthread=$withval
13149 else
13150   with_pthread=no
13151 fi;
13152 echo "$as_me:13152: result: $with_pthread" >&5
13153 echo "${ECHO_T}$with_pthread" >&6
13154
13155 if test "$with_pthread" != no ; then
13156         echo "$as_me:13156: checking for pthread.h" >&5
13157 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
13158 if test "${ac_cv_header_pthread_h+set}" = set; then
13159   echo $ECHO_N "(cached) $ECHO_C" >&6
13160 else
13161   cat >conftest.$ac_ext <<_ACEOF
13162 #line 13162 "configure"
13163 #include "confdefs.h"
13164 #include <pthread.h>
13165 _ACEOF
13166 if { (eval echo "$as_me:13166: \"$ac_cpp conftest.$ac_ext\"") >&5
13167   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13168   ac_status=$?
13169   egrep -v '^ *\+' conftest.er1 >conftest.err
13170   rm -f conftest.er1
13171   cat conftest.err >&5
13172   echo "$as_me:13172: \$? = $ac_status" >&5
13173   (exit $ac_status); } >/dev/null; then
13174   if test -s conftest.err; then
13175     ac_cpp_err=$ac_c_preproc_warn_flag
13176   else
13177     ac_cpp_err=
13178   fi
13179 else
13180   ac_cpp_err=yes
13181 fi
13182 if test -z "$ac_cpp_err"; then
13183   ac_cv_header_pthread_h=yes
13184 else
13185   echo "$as_me: failed program was:" >&5
13186   cat conftest.$ac_ext >&5
13187   ac_cv_header_pthread_h=no
13188 fi
13189 rm -f conftest.err conftest.$ac_ext
13190 fi
13191 echo "$as_me:13191: result: $ac_cv_header_pthread_h" >&5
13192 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
13193 if test $ac_cv_header_pthread_h = yes; then
13194
13195 cat >>confdefs.h <<\EOF
13196 #define HAVE_PTHREADS_H 1
13197 EOF
13198
13199         for cf_lib_pthread in pthread c_r
13200         do
13201             echo "$as_me:13201: checking if we can link with the $cf_lib_pthread library" >&5
13202 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
13203             cf_save_LIBS="$LIBS"
13204
13205 cf_add_libs="-l$cf_lib_pthread"
13206 # Filter out duplicates - this happens with badly-designed ".pc" files...
13207 for cf_add_1lib in $LIBS
13208 do
13209         for cf_add_2lib in $cf_add_libs
13210         do
13211                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13212                 then
13213                         cf_add_1lib=
13214                         break
13215                 fi
13216         done
13217         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13218 done
13219 LIBS="$cf_add_libs"
13220
13221             cat >conftest.$ac_ext <<_ACEOF
13222 #line 13222 "configure"
13223 #include "confdefs.h"
13224
13225 #include <pthread.h>
13226
13227 int
13228 main (void)
13229 {
13230
13231                 int rc = pthread_create(0,0,0,0);
13232                 int r2 = pthread_mutexattr_settype(0, 0);
13233
13234   ;
13235   return 0;
13236 }
13237 _ACEOF
13238 rm -f conftest.$ac_objext conftest$ac_exeext
13239 if { (eval echo "$as_me:13239: \"$ac_link\"") >&5
13240   (eval $ac_link) 2>&5
13241   ac_status=$?
13242   echo "$as_me:13242: \$? = $ac_status" >&5
13243   (exit $ac_status); } &&
13244          { ac_try='test -s conftest$ac_exeext'
13245   { (eval echo "$as_me:13245: \"$ac_try\"") >&5
13246   (eval $ac_try) 2>&5
13247   ac_status=$?
13248   echo "$as_me:13248: \$? = $ac_status" >&5
13249   (exit $ac_status); }; }; then
13250   with_pthread=yes
13251 else
13252   echo "$as_me: failed program was:" >&5
13253 cat conftest.$ac_ext >&5
13254 with_pthread=no
13255 fi
13256 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13257             LIBS="$cf_save_LIBS"
13258             echo "$as_me:13258: result: $with_pthread" >&5
13259 echo "${ECHO_T}$with_pthread" >&6
13260             test "$with_pthread" = yes && break
13261         done
13262
13263         if test "$with_pthread" = yes ; then
13264
13265 cf_add_libs="-l$cf_lib_pthread"
13266 # Filter out duplicates - this happens with badly-designed ".pc" files...
13267 for cf_add_1lib in $LIBS
13268 do
13269         for cf_add_2lib in $cf_add_libs
13270         do
13271                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13272                 then
13273                         cf_add_1lib=
13274                         break
13275                 fi
13276         done
13277         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13278 done
13279 LIBS="$cf_add_libs"
13280
13281 cat >>confdefs.h <<\EOF
13282 #define HAVE_LIBPTHREADS 1
13283 EOF
13284
13285         else
13286             { { echo "$as_me:13286: error: Cannot link with pthread library" >&5
13287 echo "$as_me: error: Cannot link with pthread library" >&2;}
13288    { (exit 1); exit 1; }; }
13289         fi
13290
13291 fi
13292
13293 fi
13294
13295 if test "x$with_pthread" != xno; then
13296         echo "$as_me:13296: checking for pthread_kill" >&5
13297 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
13298 if test "${ac_cv_func_pthread_kill+set}" = set; then
13299   echo $ECHO_N "(cached) $ECHO_C" >&6
13300 else
13301   cat >conftest.$ac_ext <<_ACEOF
13302 #line 13302 "configure"
13303 #include "confdefs.h"
13304 /* System header to define __stub macros and hopefully few prototypes,
13305     which can conflict with char pthread_kill (); below.  */
13306 #include <assert.h>
13307 /* Override any gcc2 internal prototype to avoid an error.  */
13308 #ifdef __cplusplus
13309 extern "C"
13310 #endif
13311 /* We use char because int might match the return type of a gcc2
13312    builtin and then its argument prototype would still apply.  */
13313 char pthread_kill ();
13314 char (*f) ();
13315
13316 int
13317 main (void)
13318 {
13319 /* The GNU C library defines this for functions which it implements
13320     to always fail with ENOSYS.  Some functions are actually named
13321     something starting with __ and the normal name is an alias.  */
13322 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
13323 choke me
13324 #else
13325 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13326 #endif
13327
13328   ;
13329   return 0;
13330 }
13331 _ACEOF
13332 rm -f conftest.$ac_objext conftest$ac_exeext
13333 if { (eval echo "$as_me:13333: \"$ac_link\"") >&5
13334   (eval $ac_link) 2>&5
13335   ac_status=$?
13336   echo "$as_me:13336: \$? = $ac_status" >&5
13337   (exit $ac_status); } &&
13338          { ac_try='test -s conftest$ac_exeext'
13339   { (eval echo "$as_me:13339: \"$ac_try\"") >&5
13340   (eval $ac_try) 2>&5
13341   ac_status=$?
13342   echo "$as_me:13342: \$? = $ac_status" >&5
13343   (exit $ac_status); }; }; then
13344   ac_cv_func_pthread_kill=yes
13345 else
13346   echo "$as_me: failed program was:" >&5
13347 cat conftest.$ac_ext >&5
13348 ac_cv_func_pthread_kill=no
13349 fi
13350 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13351 fi
13352 echo "$as_me:13352: result: $ac_cv_func_pthread_kill" >&5
13353 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
13354 if test $ac_cv_func_pthread_kill = yes; then
13355
13356                 echo "$as_me:13356: checking if you want to allow EINTR in wgetch with pthreads" >&5
13357 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
13358
13359 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
13360 if test "${enable_pthreads_eintr+set}" = set; then
13361   enableval="$enable_pthreads_eintr"
13362   use_pthreads_eintr=$enableval
13363 else
13364   use_pthreads_eintr=no
13365 fi;
13366                 echo "$as_me:13366: result: $use_pthreads_eintr" >&5
13367 echo "${ECHO_T}$use_pthreads_eintr" >&6
13368                 if test "x$use_pthreads_eintr" = xyes ; then
13369
13370 cat >>confdefs.h <<\EOF
13371 #define USE_PTHREADS_EINTR 1
13372 EOF
13373
13374                 fi
13375 fi
13376
13377         echo "$as_me:13377: checking if you want to use weak-symbols for pthreads" >&5
13378 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
13379
13380 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
13381 if test "${enable_weak_symbols+set}" = set; then
13382   enableval="$enable_weak_symbols"
13383   use_weak_symbols=$enableval
13384 else
13385   use_weak_symbols=no
13386 fi;
13387         echo "$as_me:13387: result: $use_weak_symbols" >&5
13388 echo "${ECHO_T}$use_weak_symbols" >&6
13389         if test "x$use_weak_symbols" = xyes ; then
13390
13391 echo "$as_me:13391: checking if $CC supports weak symbols" >&5
13392 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
13393 if test "${cf_cv_weak_symbols+set}" = set; then
13394   echo $ECHO_N "(cached) $ECHO_C" >&6
13395 else
13396
13397 cat >conftest.$ac_ext <<_ACEOF
13398 #line 13398 "configure"
13399 #include "confdefs.h"
13400
13401 #include <stdio.h>
13402 int
13403 main (void)
13404 {
13405
13406 #if defined(__GNUC__)
13407 #  if defined __USE_ISOC99
13408 #    define _cat_pragma(exp)    _Pragma(#exp)
13409 #    define _weak_pragma(exp)   _cat_pragma(weak name)
13410 #  else
13411 #    define _weak_pragma(exp)
13412 #  endif
13413 #  define _declare(name)        __extension__ extern __typeof__(name) name
13414 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
13415 #endif
13416
13417 weak_symbol(fopen);
13418
13419   ;
13420   return 0;
13421 }
13422 _ACEOF
13423 rm -f conftest.$ac_objext
13424 if { (eval echo "$as_me:13424: \"$ac_compile\"") >&5
13425   (eval $ac_compile) 2>&5
13426   ac_status=$?
13427   echo "$as_me:13427: \$? = $ac_status" >&5
13428   (exit $ac_status); } &&
13429          { ac_try='test -s conftest.$ac_objext'
13430   { (eval echo "$as_me:13430: \"$ac_try\"") >&5
13431   (eval $ac_try) 2>&5
13432   ac_status=$?
13433   echo "$as_me:13433: \$? = $ac_status" >&5
13434   (exit $ac_status); }; }; then
13435   cf_cv_weak_symbols=yes
13436 else
13437   echo "$as_me: failed program was:" >&5
13438 cat conftest.$ac_ext >&5
13439 cf_cv_weak_symbols=no
13440 fi
13441 rm -f conftest.$ac_objext conftest.$ac_ext
13442
13443 fi
13444 echo "$as_me:13444: result: $cf_cv_weak_symbols" >&5
13445 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
13446
13447         else
13448                 cf_cv_weak_symbols=no
13449         fi
13450
13451         if test "x$cf_cv_weak_symbols" = xyes ; then
13452
13453 cat >>confdefs.h <<\EOF
13454 #define USE_WEAK_SYMBOLS 1
13455 EOF
13456
13457         fi
13458 fi
13459
13460 PTHREAD=
13461 if test "x$with_pthread" = "xyes" ; then
13462
13463 cat >>confdefs.h <<\EOF
13464 #define USE_PTHREADS 1
13465 EOF
13466
13467         enable_reentrant=yes
13468         if test "x$cf_cv_weak_symbols" = xyes ; then
13469                 PTHREAD=-lpthread
13470
13471 cf_add_libs="-lpthread"
13472 # Filter out duplicates - this happens with badly-designed ".pc" files...
13473 for cf_add_1lib in $PRIVATE_LIBS
13474 do
13475         for cf_add_2lib in $cf_add_libs
13476         do
13477                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13478                 then
13479                         cf_add_1lib=
13480                         break
13481                 fi
13482         done
13483         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13484 done
13485 PRIVATE_LIBS="$cf_add_libs"
13486
13487         fi
13488 fi
13489
13490 # Reentrant code has to be opaque; there's little advantage to making ncurses
13491 # opaque outside of that, so there is no --enable-opaque option.  We can use
13492 # this option without --with-pthreads, but this will be always set for
13493 # pthreads.
13494 echo "$as_me:13494: checking if you want reentrant code" >&5
13495 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
13496
13497 # Check whether --enable-reentrant or --disable-reentrant was given.
13498 if test "${enable_reentrant+set}" = set; then
13499   enableval="$enable_reentrant"
13500   with_reentrant=$enableval
13501 else
13502   with_reentrant=no
13503 fi;
13504 echo "$as_me:13504: result: $with_reentrant" >&5
13505 echo "${ECHO_T}$with_reentrant" >&6
13506 if test "x$with_reentrant" = xyes ; then
13507         cf_cv_enable_reentrant=1
13508         cf_cv_enable_opaque="NCURSES_INTERNALS"
13509         NCURSES_SIZE_T=int
13510         if test "x$cf_cv_weak_symbols" = xyes ; then
13511
13512 # remove pthread library from $LIBS
13513 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
13514
13515 cf_add_libs="-lpthread"
13516 # Filter out duplicates - this happens with badly-designed ".pc" files...
13517 for cf_add_1lib in $TEST_LIBS
13518 do
13519         for cf_add_2lib in $cf_add_libs
13520         do
13521                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13522                 then
13523                         cf_add_1lib=
13524                         break
13525                 fi
13526         done
13527         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13528 done
13529 TEST_LIBS="$cf_add_libs"
13530
13531 cf_add_libs="-lpthread"
13532 # Filter out duplicates - this happens with badly-designed ".pc" files...
13533 for cf_add_1lib in $TEST_LIBS2
13534 do
13535         for cf_add_2lib in $cf_add_libs
13536         do
13537                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13538                 then
13539                         cf_add_1lib=
13540                         break
13541                 fi
13542         done
13543         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13544 done
13545 TEST_LIBS2="$cf_add_libs"
13546
13547 cf_add_libs="-lpthread"
13548 # Filter out duplicates - this happens with badly-designed ".pc" files...
13549 for cf_add_1lib in $PRIVATE_LIBS
13550 do
13551         for cf_add_2lib in $cf_add_libs
13552         do
13553                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13554                 then
13555                         cf_add_1lib=
13556                         break
13557                 fi
13558         done
13559         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13560 done
13561 PRIVATE_LIBS="$cf_add_libs"
13562
13563         else
13564                 # when not using weak symbols but with_reentrant,
13565                 # add 't' to the library suffix on all platforms
13566                 # except cygwin, where we only do that if ALSO
13567                 # compiling with full thread support.
13568                 case "$host" in
13569                 (*cygwin* | *msys*)
13570                         if test "$with_pthread" = "yes" ; then
13571                                 if test "x$disable_lib_suffixes" = "xno" ; then
13572                                         LIB_SUFFIX="t${LIB_SUFFIX}"
13573                                 fi
13574                         fi ;;
13575                 (*)
13576                         if test "x$disable_lib_suffixes" = "xno" ; then
13577                                 LIB_SUFFIX="t${LIB_SUFFIX}"
13578                         fi
13579                         ;;
13580                 esac
13581         fi
13582
13583 cat >>confdefs.h <<\EOF
13584 #define USE_REENTRANT 1
13585 EOF
13586
13587 if test "${with_abi_version+set}" != set; then
13588         case $cf_cv_rel_version in
13589         (5.*)
13590                 cf_cv_rel_version=6.0
13591                 cf_cv_abi_version=6
13592                 { echo "$as_me:13592: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13593 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13594                 ;;
13595         esac
13596 fi
13597
13598 else
13599         cf_cv_enable_reentrant=0
13600         cf_cv_enable_opaque="NCURSES_OPAQUE"
13601         NCURSES_SIZE_T=short
13602 fi
13603
13604 echo "$as_me:13604: checking if you want opaque curses-library structures" >&5
13605 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
13606
13607 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
13608 if test "${enable_opaque_curses+set}" = set; then
13609   enableval="$enable_opaque_curses"
13610   test "$enableval" != yes && enableval=no
13611         if test "$enableval" != "no" ; then
13612     enable_opaque_curses=yes
13613         else
13614
13615          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13616          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13617
13618         fi
13619 else
13620   enableval=no
13621
13622          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
13623          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
13624
13625 fi;
13626 echo "$as_me:13626: result: $enable_opaque_curses" >&5
13627 echo "${ECHO_T}$enable_opaque_curses" >&6
13628
13629 test "$cf_cv_enable_reentrant" = 1 && \
13630 test "$enable_opaque_curses" = no && \
13631 { { echo "$as_me:13631: error: reentrant configuration requires opaque library" >&5
13632 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
13633    { (exit 1); exit 1; }; }
13634
13635 echo "$as_me:13635: checking if you want opaque form-library structures" >&5
13636 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
13637
13638 # Check whether --enable-opaque-form or --disable-opaque-form was given.
13639 if test "${enable_opaque_form+set}" = set; then
13640   enableval="$enable_opaque_form"
13641   enable_opaque_form=yes
13642 else
13643   enable_opaque_form=no
13644 fi;
13645 echo "$as_me:13645: result: $enable_opaque_form" >&5
13646 echo "${ECHO_T}$enable_opaque_form" >&6
13647
13648 echo "$as_me:13648: checking if you want opaque menu-library structures" >&5
13649 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
13650
13651 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
13652 if test "${enable_opaque_menu+set}" = set; then
13653   enableval="$enable_opaque_menu"
13654   enable_opaque_menu=yes
13655 else
13656   enable_opaque_menu=no
13657 fi;
13658 echo "$as_me:13658: result: $enable_opaque_menu" >&5
13659 echo "${ECHO_T}$enable_opaque_menu" >&6
13660
13661 echo "$as_me:13661: checking if you want opaque panel-library structures" >&5
13662 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
13663
13664 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
13665 if test "${enable_opaque_panel+set}" = set; then
13666   enableval="$enable_opaque_panel"
13667   enable_opaque_panel=yes
13668 else
13669   enable_opaque_panel=no
13670 fi;
13671 echo "$as_me:13671: result: $enable_opaque_panel" >&5
13672 echo "${ECHO_T}$enable_opaque_panel" >&6
13673
13674 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
13675 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
13676 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
13677 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
13678
13679 ### Allow using a different wrap-prefix
13680 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
13681         echo "$as_me:13681: checking for prefix used to wrap public variables" >&5
13682 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
13683
13684 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
13685 if test "${with_wrap_prefix+set}" = set; then
13686   withval="$with_wrap_prefix"
13687   NCURSES_WRAP_PREFIX=$withval
13688 else
13689   NCURSES_WRAP_PREFIX=_nc_
13690 fi;
13691         echo "$as_me:13691: result: $NCURSES_WRAP_PREFIX" >&5
13692 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
13693 else
13694         NCURSES_WRAP_PREFIX=_nc_
13695 fi
13696
13697 cat >>confdefs.h <<EOF
13698 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
13699 EOF
13700
13701 ###############################################################################
13702 # These options are relatively safe to experiment with.
13703
13704 echo "$as_me:13704: checking if you want all development code" >&5
13705 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
13706
13707 # Check whether --with-develop or --without-develop was given.
13708 if test "${with_develop+set}" = set; then
13709   withval="$with_develop"
13710   with_develop=$withval
13711 else
13712   with_develop=no
13713 fi;
13714 echo "$as_me:13714: result: $with_develop" >&5
13715 echo "${ECHO_T}$with_develop" >&6
13716
13717 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
13718 echo "$as_me:13718: checking if you want hard-tabs code" >&5
13719 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
13720
13721 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
13722 if test "${enable_hard_tabs+set}" = set; then
13723   enableval="$enable_hard_tabs"
13724
13725 else
13726   enable_hard_tabs=$with_develop
13727 fi;
13728 echo "$as_me:13728: result: $enable_hard_tabs" >&5
13729 echo "${ECHO_T}$enable_hard_tabs" >&6
13730 test "x$enable_hard_tabs" = xyes &&
13731 cat >>confdefs.h <<\EOF
13732 #define USE_HARD_TABS 1
13733 EOF
13734
13735 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
13736 echo "$as_me:13736: checking if you want limited support for xmc" >&5
13737 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
13738
13739 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
13740 if test "${enable_xmc_glitch+set}" = set; then
13741   enableval="$enable_xmc_glitch"
13742
13743 else
13744   enable_xmc_glitch=$with_develop
13745 fi;
13746 echo "$as_me:13746: result: $enable_xmc_glitch" >&5
13747 echo "${ECHO_T}$enable_xmc_glitch" >&6
13748 test "x$enable_xmc_glitch" = xyes &&
13749 cat >>confdefs.h <<\EOF
13750 #define USE_XMC_SUPPORT 1
13751 EOF
13752
13753 ###############################################################################
13754 # These are just experimental, probably should not be in a package:
13755
13756 echo "$as_me:13756: checking if you do not want to assume colors are white-on-black" >&5
13757 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
13758
13759 # Check whether --enable-assumed-color or --disable-assumed-color was given.
13760 if test "${enable_assumed_color+set}" = set; then
13761   enableval="$enable_assumed_color"
13762   with_assumed_color=$enableval
13763 else
13764   with_assumed_color=yes
13765 fi;
13766 echo "$as_me:13766: result: $with_assumed_color" >&5
13767 echo "${ECHO_T}$with_assumed_color" >&6
13768 test "x$with_assumed_color" = xyes &&
13769 cat >>confdefs.h <<\EOF
13770 #define USE_ASSUMED_COLOR 1
13771 EOF
13772
13773 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
13774 echo "$as_me:13774: checking if you want hashmap scrolling-optimization code" >&5
13775 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
13776
13777 # Check whether --enable-hashmap or --disable-hashmap was given.
13778 if test "${enable_hashmap+set}" = set; then
13779   enableval="$enable_hashmap"
13780   with_hashmap=$enableval
13781 else
13782   with_hashmap=yes
13783 fi;
13784 echo "$as_me:13784: result: $with_hashmap" >&5
13785 echo "${ECHO_T}$with_hashmap" >&6
13786 test "x$with_hashmap" = xyes &&
13787 cat >>confdefs.h <<\EOF
13788 #define USE_HASHMAP 1
13789 EOF
13790
13791 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
13792 echo "$as_me:13792: checking if you want colorfgbg code" >&5
13793 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
13794
13795 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
13796 if test "${enable_colorfgbg+set}" = set; then
13797   enableval="$enable_colorfgbg"
13798   with_colorfgbg=$enableval
13799 else
13800   with_colorfgbg=no
13801 fi;
13802 echo "$as_me:13802: result: $with_colorfgbg" >&5
13803 echo "${ECHO_T}$with_colorfgbg" >&6
13804 test "x$with_colorfgbg" = xyes &&
13805 cat >>confdefs.h <<\EOF
13806 #define USE_COLORFGBG 1
13807 EOF
13808
13809 ###   use option --enable-interop to turn on use of bindings used for interop
13810 echo "$as_me:13810: checking if you want interop bindings" >&5
13811 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
13812
13813 # Check whether --enable-interop or --disable-interop was given.
13814 if test "${enable_interop+set}" = set; then
13815   enableval="$enable_interop"
13816   with_exp_interop=$enableval
13817 else
13818   with_exp_interop=$cf_dft_interop
13819 fi;
13820 echo "$as_me:13820: result: $with_exp_interop" >&5
13821 echo "${ECHO_T}$with_exp_interop" >&6
13822
13823 NCURSES_INTEROP_FUNCS=0
13824 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
13825
13826 echo "$as_me:13826: checking if you want experimental safe-sprintf code" >&5
13827 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
13828
13829 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
13830 if test "${enable_safe_sprintf+set}" = set; then
13831   enableval="$enable_safe_sprintf"
13832   with_safe_sprintf=$enableval
13833 else
13834   with_safe_sprintf=no
13835 fi;
13836 echo "$as_me:13836: result: $with_safe_sprintf" >&5
13837 echo "${ECHO_T}$with_safe_sprintf" >&6
13838
13839 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
13840 # when hashmap is used scroll hints are useless
13841 if test "$with_hashmap" = no ; then
13842 echo "$as_me:13842: checking if you want to experiment without scrolling-hints code" >&5
13843 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
13844
13845 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
13846 if test "${enable_scroll_hints+set}" = set; then
13847   enableval="$enable_scroll_hints"
13848   with_scroll_hints=$enableval
13849 else
13850   with_scroll_hints=yes
13851 fi;
13852 echo "$as_me:13852: result: $with_scroll_hints" >&5
13853 echo "${ECHO_T}$with_scroll_hints" >&6
13854 test "x$with_scroll_hints" = xyes &&
13855 cat >>confdefs.h <<\EOF
13856 #define USE_SCROLL_HINTS 1
13857 EOF
13858
13859 fi
13860
13861 echo "$as_me:13861: checking if you want wgetch-events code" >&5
13862 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
13863
13864 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
13865 if test "${enable_wgetch_events+set}" = set; then
13866   enableval="$enable_wgetch_events"
13867   with_wgetch_events=$enableval
13868 else
13869   with_wgetch_events=no
13870 fi;
13871 echo "$as_me:13871: result: $with_wgetch_events" >&5
13872 echo "${ECHO_T}$with_wgetch_events" >&6
13873 test "x$with_wgetch_events" = xyes &&
13874 cat >>confdefs.h <<\EOF
13875 #define NCURSES_WGETCH_EVENTS 1
13876 EOF
13877
13878 ###############################################################################
13879
13880 ###     use option --disable-echo to suppress full display compiling commands
13881
13882 echo "$as_me:13882: checking if you want to see long compiling messages" >&5
13883 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
13884
13885 # Check whether --enable-echo or --disable-echo was given.
13886 if test "${enable_echo+set}" = set; then
13887   enableval="$enable_echo"
13888   test "$enableval" != no && enableval=yes
13889         if test "$enableval" != "yes" ; then
13890
13891         ECHO_LT='--silent'
13892         ECHO_LD='@echo linking $@;'
13893         RULE_CC='@echo compiling $<'
13894         SHOW_CC='@echo compiling $@'
13895         ECHO_CC='@'
13896
13897         else
13898
13899         ECHO_LT=''
13900         ECHO_LD=''
13901         RULE_CC=''
13902         SHOW_CC=''
13903         ECHO_CC=''
13904
13905         fi
13906 else
13907   enableval=yes
13908
13909         ECHO_LT=''
13910         ECHO_LD=''
13911         RULE_CC=''
13912         SHOW_CC=''
13913         ECHO_CC=''
13914
13915 fi;
13916 echo "$as_me:13916: result: $enableval" >&5
13917 echo "${ECHO_T}$enableval" >&6
13918
13919 if test "x$enable_echo" = xyes; then
13920         ECHO_LINK=
13921 else
13922         ECHO_LINK='@ echo linking $@ ... ;'
13923         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
13924         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
13925 fi
13926
13927 # --disable-stripping is used for debugging
13928
13929 echo "$as_me:13929: checking if you want to install stripped executables" >&5
13930 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
13931
13932 # Check whether --enable-stripping or --disable-stripping was given.
13933 if test "${enable_stripping+set}" = set; then
13934   enableval="$enable_stripping"
13935   test "$enableval" != no && enableval=yes
13936         if test "$enableval" != "yes" ; then
13937     with_stripping=no
13938         else
13939                 with_stripping=yes
13940         fi
13941 else
13942   enableval=yes
13943         with_stripping=yes
13944
13945 fi;
13946 echo "$as_me:13946: result: $with_stripping" >&5
13947 echo "${ECHO_T}$with_stripping" >&6
13948
13949 if test "$with_stripping" = yes
13950 then
13951         INSTALL_OPT_S="-s"
13952 else
13953         INSTALL_OPT_S=
13954 fi
13955
13956 echo "$as_me:13956: checking if install needs to be told about ownership" >&5
13957 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
13958 case `$ac_config_guess` in
13959 (*minix)
13960         with_install_o=yes
13961         ;;
13962 (*)
13963         with_install_o=no
13964         ;;
13965 esac
13966
13967 echo "$as_me:13967: result: $with_install_o" >&5
13968 echo "${ECHO_T}$with_install_o" >&6
13969 if test "x$with_install_o" = xyes
13970 then
13971         INSTALL_OPT_O=`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`
13972 else
13973         INSTALL_OPT_O=
13974 fi
13975
13976 ###     use option --enable-warnings to turn on all gcc warnings
13977 echo "$as_me:13977: checking if you want to see compiler warnings" >&5
13978 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
13979
13980 # Check whether --enable-warnings or --disable-warnings was given.
13981 if test "${enable_warnings+set}" = set; then
13982   enableval="$enable_warnings"
13983   with_warnings=$enableval
13984 fi;
13985 echo "$as_me:13985: result: $with_warnings" >&5
13986 echo "${ECHO_T}$with_warnings" >&6
13987
13988 if test "x$with_warnings" = "xyes"; then
13989
13990         ADAFLAGS="$ADAFLAGS -gnatg"
13991
13992 INTEL_COMPILER=no
13993
13994 if test "$GCC" = yes ; then
13995         case $host_os in
13996         (linux*|gnu*)
13997                 echo "$as_me:13997: checking if this is really Intel C compiler" >&5
13998 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
13999                 cf_save_CFLAGS="$CFLAGS"
14000                 CFLAGS="$CFLAGS -no-gcc"
14001                 cat >conftest.$ac_ext <<_ACEOF
14002 #line 14002 "configure"
14003 #include "confdefs.h"
14004
14005 int
14006 main (void)
14007 {
14008
14009 #ifdef __INTEL_COMPILER
14010 #else
14011 make an error
14012 #endif
14013
14014   ;
14015   return 0;
14016 }
14017 _ACEOF
14018 rm -f conftest.$ac_objext
14019 if { (eval echo "$as_me:14019: \"$ac_compile\"") >&5
14020   (eval $ac_compile) 2>&5
14021   ac_status=$?
14022   echo "$as_me:14022: \$? = $ac_status" >&5
14023   (exit $ac_status); } &&
14024          { ac_try='test -s conftest.$ac_objext'
14025   { (eval echo "$as_me:14025: \"$ac_try\"") >&5
14026   (eval $ac_try) 2>&5
14027   ac_status=$?
14028   echo "$as_me:14028: \$? = $ac_status" >&5
14029   (exit $ac_status); }; }; then
14030   INTEL_COMPILER=yes
14031 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
14032
14033 else
14034   echo "$as_me: failed program was:" >&5
14035 cat conftest.$ac_ext >&5
14036 fi
14037 rm -f conftest.$ac_objext conftest.$ac_ext
14038                 CFLAGS="$cf_save_CFLAGS"
14039                 echo "$as_me:14039: result: $INTEL_COMPILER" >&5
14040 echo "${ECHO_T}$INTEL_COMPILER" >&6
14041                 ;;
14042         esac
14043 fi
14044
14045 CLANG_COMPILER=no
14046
14047 if test "$GCC" = yes ; then
14048         echo "$as_me:14048: checking if this is really Clang C compiler" >&5
14049 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
14050         cf_save_CFLAGS="$CFLAGS"
14051         CFLAGS="$CFLAGS -Qunused-arguments"
14052         cat >conftest.$ac_ext <<_ACEOF
14053 #line 14053 "configure"
14054 #include "confdefs.h"
14055
14056 int
14057 main (void)
14058 {
14059
14060 #ifdef __clang__
14061 #else
14062 make an error
14063 #endif
14064
14065   ;
14066   return 0;
14067 }
14068 _ACEOF
14069 rm -f conftest.$ac_objext
14070 if { (eval echo "$as_me:14070: \"$ac_compile\"") >&5
14071   (eval $ac_compile) 2>&5
14072   ac_status=$?
14073   echo "$as_me:14073: \$? = $ac_status" >&5
14074   (exit $ac_status); } &&
14075          { ac_try='test -s conftest.$ac_objext'
14076   { (eval echo "$as_me:14076: \"$ac_try\"") >&5
14077   (eval $ac_try) 2>&5
14078   ac_status=$?
14079   echo "$as_me:14079: \$? = $ac_status" >&5
14080   (exit $ac_status); }; }; then
14081   CLANG_COMPILER=yes
14082 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
14083
14084 else
14085   echo "$as_me: failed program was:" >&5
14086 cat conftest.$ac_ext >&5
14087 fi
14088 rm -f conftest.$ac_objext conftest.$ac_ext
14089         CFLAGS="$cf_save_CFLAGS"
14090         echo "$as_me:14090: result: $CLANG_COMPILER" >&5
14091 echo "${ECHO_T}$CLANG_COMPILER" >&6
14092 fi
14093
14094 cat > conftest.$ac_ext <<EOF
14095 #line 14095 "${as_me:-configure}"
14096 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
14097 EOF
14098
14099 if test "$INTEL_COMPILER" = yes
14100 then
14101 # The "-wdXXX" options suppress warnings:
14102 # remark #1419: external declaration in primary source file
14103 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14104 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
14105 # remark #193: zero used for undefined preprocessing identifier
14106 # remark #593: variable "curs_sb_left_arrow" was set but never used
14107 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
14108 # remark #869: parameter "tw" was never referenced
14109 # remark #981: operands are evaluated in unspecified order
14110 # warning #279: controlling expression is constant
14111
14112         { echo "$as_me:14112: checking for $CC warning options..." >&5
14113 echo "$as_me: checking for $CC warning options..." >&6;}
14114         cf_save_CFLAGS="$CFLAGS"
14115         EXTRA_CFLAGS="-Wall"
14116         for cf_opt in \
14117                 wd1419 \
14118                 wd1683 \
14119                 wd1684 \
14120                 wd193 \
14121                 wd593 \
14122                 wd279 \
14123                 wd810 \
14124                 wd869 \
14125                 wd981
14126         do
14127                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
14128                 if { (eval echo "$as_me:14128: \"$ac_compile\"") >&5
14129   (eval $ac_compile) 2>&5
14130   ac_status=$?
14131   echo "$as_me:14131: \$? = $ac_status" >&5
14132   (exit $ac_status); }; then
14133                         test -n "$verbose" && echo "$as_me:14133: result: ... -$cf_opt" >&5
14134 echo "${ECHO_T}... -$cf_opt" >&6
14135                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
14136                 fi
14137         done
14138         CFLAGS="$cf_save_CFLAGS"
14139
14140 elif test "$GCC" = yes
14141 then
14142         { echo "$as_me:14142: checking for $CC warning options..." >&5
14143 echo "$as_me: checking for $CC warning options..." >&6;}
14144         cf_save_CFLAGS="$CFLAGS"
14145         EXTRA_CFLAGS=
14146         cf_warn_CONST=""
14147         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
14148         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
14149         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
14150         for cf_opt in W Wall \
14151                 Wbad-function-cast \
14152                 Wcast-align \
14153                 Wcast-qual \
14154                 Wdeclaration-after-statement \
14155                 Wextra \
14156                 Winline \
14157                 Wmissing-declarations \
14158                 Wmissing-prototypes \
14159                 Wnested-externs \
14160                 Wpointer-arith \
14161                 Wshadow \
14162                 Wstrict-prototypes \
14163                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
14164         do
14165                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
14166                 if { (eval echo "$as_me:14166: \"$ac_compile\"") >&5
14167   (eval $ac_compile) 2>&5
14168   ac_status=$?
14169   echo "$as_me:14169: \$? = $ac_status" >&5
14170   (exit $ac_status); }; then
14171                         test -n "$verbose" && echo "$as_me:14171: result: ... -$cf_opt" >&5
14172 echo "${ECHO_T}... -$cf_opt" >&6
14173                         case $cf_opt in
14174                         (Wcast-qual)
14175                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
14176                                 ;;
14177                         (Winline)
14178                                 case $GCC_VERSION in
14179                                 ([34].*)
14180                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
14181
14182 echo "${as_me:-configure}:14182: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
14183
14184                                         continue;;
14185                                 esac
14186                                 ;;
14187                         (Wpointer-arith)
14188                                 case $GCC_VERSION in
14189                                 ([12].*)
14190                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
14191
14192 echo "${as_me:-configure}:14192: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
14193
14194                                         continue;;
14195                                 esac
14196                                 ;;
14197                         esac
14198                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
14199                 fi
14200         done
14201         CFLAGS="$cf_save_CFLAGS"
14202 fi
14203 rm -rf conftest*
14204
14205         if test "x$cf_with_cxx" = xyes ; then
14206
14207 INTEL_CPLUSPLUS=no
14208
14209 if test "$GCC" = yes ; then
14210         case $host_os in
14211         (linux*|gnu*)
14212                 echo "$as_me:14212: checking if this is really Intel C++ compiler" >&5
14213 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
14214                 cf_save_CFLAGS="$CXXFLAGS"
14215                 CXXFLAGS="$CXXFLAGS -no-gcc"
14216                 cat >conftest.$ac_ext <<_ACEOF
14217 #line 14217 "configure"
14218 #include "confdefs.h"
14219
14220 int
14221 main (void)
14222 {
14223
14224 #ifdef __INTEL_COMPILER
14225 #else
14226 make an error
14227 #endif
14228
14229   ;
14230   return 0;
14231 }
14232 _ACEOF
14233 rm -f conftest.$ac_objext
14234 if { (eval echo "$as_me:14234: \"$ac_compile\"") >&5
14235   (eval $ac_compile) 2>&5
14236   ac_status=$?
14237   echo "$as_me:14237: \$? = $ac_status" >&5
14238   (exit $ac_status); } &&
14239          { ac_try='test -s conftest.$ac_objext'
14240   { (eval echo "$as_me:14240: \"$ac_try\"") >&5
14241   (eval $ac_try) 2>&5
14242   ac_status=$?
14243   echo "$as_me:14243: \$? = $ac_status" >&5
14244   (exit $ac_status); }; }; then
14245   INTEL_CPLUSPLUS=yes
14246 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
14247
14248 else
14249   echo "$as_me: failed program was:" >&5
14250 cat conftest.$ac_ext >&5
14251 fi
14252 rm -f conftest.$ac_objext conftest.$ac_ext
14253                 CXXFLAGS="$cf_save_CFLAGS"
14254                 echo "$as_me:14254: result: $INTEL_CPLUSPLUS" >&5
14255 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
14256                 ;;
14257         esac
14258 fi
14259
14260 CLANG_CPLUSPLUS=no
14261
14262 if test "$GCC" = yes ; then
14263         echo "$as_me:14263: checking if this is really Clang C++ compiler" >&5
14264 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
14265         cf_save_CFLAGS="$CXXFLAGS"
14266         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
14267         cat >conftest.$ac_ext <<_ACEOF
14268 #line 14268 "configure"
14269 #include "confdefs.h"
14270
14271 int
14272 main (void)
14273 {
14274
14275 #ifdef __clang__
14276 #else
14277 make an error
14278 #endif
14279
14280   ;
14281   return 0;
14282 }
14283 _ACEOF
14284 rm -f conftest.$ac_objext
14285 if { (eval echo "$as_me:14285: \"$ac_compile\"") >&5
14286   (eval $ac_compile) 2>&5
14287   ac_status=$?
14288   echo "$as_me:14288: \$? = $ac_status" >&5
14289   (exit $ac_status); } &&
14290          { ac_try='test -s conftest.$ac_objext'
14291   { (eval echo "$as_me:14291: \"$ac_try\"") >&5
14292   (eval $ac_try) 2>&5
14293   ac_status=$?
14294   echo "$as_me:14294: \$? = $ac_status" >&5
14295   (exit $ac_status); }; }; then
14296   CLANG_CPLUSPLUS=yes
14297 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
14298
14299 else
14300   echo "$as_me: failed program was:" >&5
14301 cat conftest.$ac_ext >&5
14302 fi
14303 rm -f conftest.$ac_objext conftest.$ac_ext
14304         CXXFLAGS="$cf_save_CFLAGS"
14305         echo "$as_me:14305: result: $CLANG_CPLUSPLUS" >&5
14306 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
14307 fi
14308
14309 ac_ext=cc
14310 ac_cpp='$CXXCPP $CPPFLAGS'
14311 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14312 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14313 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14314 ac_main_return=return
14315
14316 cat > conftest.$ac_ext <<EOF
14317 #line 14317 "configure"
14318 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
14319 EOF
14320
14321 if test "$INTEL_CPLUSPLUS" = yes
14322 then
14323 # The "-wdXXX" options suppress warnings:
14324 # remark #1419: external declaration in primary source file
14325 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14326 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
14327 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
14328 # remark #193: zero used for undefined preprocessing identifier
14329 # remark #593: variable "curs_sb_left_arrow" was set but never used
14330 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
14331 # remark #869: parameter "tw" was never referenced
14332 # remark #981: operands are evaluated in unspecified order
14333 # warning #269: invalid format string conversion
14334
14335         { echo "$as_me:14335: checking for $CC warning options..." >&5
14336 echo "$as_me: checking for $CC warning options..." >&6;}
14337         cf_save_CXXFLAGS="$CXXFLAGS"
14338         EXTRA_CXXFLAGS="-Wall"
14339         for cf_opt in \
14340                 wd1419 \
14341                 wd1682 \
14342                 wd1683 \
14343                 wd1684 \
14344                 wd193 \
14345                 wd279 \
14346                 wd593 \
14347                 wd810 \
14348                 wd869 \
14349                 wd981
14350         do
14351                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
14352                 if { (eval echo "$as_me:14352: \"$ac_compile\"") >&5
14353   (eval $ac_compile) 2>&5
14354   ac_status=$?
14355   echo "$as_me:14355: \$? = $ac_status" >&5
14356   (exit $ac_status); }; then
14357                         test -n "$verbose" && echo "$as_me:14357: result: ... -$cf_opt" >&5
14358 echo "${ECHO_T}... -$cf_opt" >&6
14359                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
14360                 fi
14361         done
14362         CXXFLAGS="$cf_save_CXXFLAGS"
14363
14364 elif test "$GXX" = yes
14365 then
14366         { echo "$as_me:14366: checking for $CXX warning options..." >&5
14367 echo "$as_me: checking for $CXX warning options..." >&6;}
14368         cf_save_CXXFLAGS="$CXXFLAGS"
14369         EXTRA_CXXFLAGS="-W -Wall"
14370         cf_gxx_extra_warnings=""
14371         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
14372         case "$GCC_VERSION" in
14373         ([1-2].*)
14374                 ;;
14375         (*)
14376                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
14377                 ;;
14378         esac
14379         for cf_opt in \
14380                 Wabi \
14381                 fabi-version=0 \
14382                 Wextra \
14383                 Wignored-qualifiers \
14384                 Wlogical-op \
14385                 Woverloaded-virtual \
14386                 Wsign-promo \
14387                 Wsynth \
14388                 Wold-style-cast \
14389                 Wcast-align \
14390                 Wcast-qual \
14391                 Wpointer-arith \
14392                 Wshadow \
14393                 Wundef $cf_gxx_extra_warnings Wno-unused
14394         do
14395                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
14396                 if { (eval echo "$as_me:14396: \"$ac_compile\"") >&5
14397   (eval $ac_compile) 2>&5
14398   ac_status=$?
14399   echo "$as_me:14399: \$? = $ac_status" >&5
14400   (exit $ac_status); }; then
14401                         test -n "$verbose" && echo "$as_me:14401: result: ... -$cf_opt" >&5
14402 echo "${ECHO_T}... -$cf_opt" >&6
14403                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
14404                 else
14405                         test -n "$verbose" && echo "$as_me:14405: result: ... no -$cf_opt" >&5
14406 echo "${ECHO_T}... no -$cf_opt" >&6
14407                 fi
14408         done
14409         CXXFLAGS="$cf_save_CXXFLAGS"
14410 fi
14411
14412 rm -rf conftest*
14413 ac_ext=c
14414 ac_cpp='$CPP $CPPFLAGS'
14415 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14416 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14417 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14418 ac_main_return=return
14419
14420         fi
14421 fi
14422
14423 if test "$GCC" = yes
14424 then
14425 cat > conftest.i <<EOF
14426 #ifndef GCC_PRINTF
14427 #define GCC_PRINTF 0
14428 #endif
14429 #ifndef GCC_SCANF
14430 #define GCC_SCANF 0
14431 #endif
14432 #ifndef GCC_NORETURN
14433 #define GCC_NORETURN /* nothing */
14434 #endif
14435 #ifndef GCC_UNUSED
14436 #define GCC_UNUSED /* nothing */
14437 #endif
14438 EOF
14439 if test "$GCC" = yes
14440 then
14441         { echo "$as_me:14441: checking for $CC __attribute__ directives..." >&5
14442 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
14443 cat > conftest.$ac_ext <<EOF
14444 #line 14444 "${as_me:-configure}"
14445 #include "confdefs.h"
14446 #include "conftest.h"
14447 #include "conftest.i"
14448 #if     GCC_PRINTF
14449 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
14450 #else
14451 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
14452 #endif
14453 #if     GCC_SCANF
14454 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
14455 #else
14456 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
14457 #endif
14458 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
14459 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
14460 extern void foo(void) GCC_NORETURN;
14461 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
14462 EOF
14463         cf_printf_attribute=no
14464         cf_scanf_attribute=no
14465         for cf_attribute in scanf printf unused noreturn
14466         do
14467
14468 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14469
14470                 cf_directive="__attribute__(($cf_attribute))"
14471                 echo "checking for $CC $cf_directive" 1>&5
14472
14473                 case $cf_attribute in
14474                 (printf)
14475                         cf_printf_attribute=yes
14476                         cat >conftest.h <<EOF
14477 #define GCC_$cf_ATTRIBUTE 1
14478 EOF
14479                         ;;
14480                 (scanf)
14481                         cf_scanf_attribute=yes
14482                         cat >conftest.h <<EOF
14483 #define GCC_$cf_ATTRIBUTE 1
14484 EOF
14485                         ;;
14486                 (*)
14487                         cat >conftest.h <<EOF
14488 #define GCC_$cf_ATTRIBUTE $cf_directive
14489 EOF
14490                         ;;
14491                 esac
14492
14493                 if { (eval echo "$as_me:14493: \"$ac_compile\"") >&5
14494   (eval $ac_compile) 2>&5
14495   ac_status=$?
14496   echo "$as_me:14496: \$? = $ac_status" >&5
14497   (exit $ac_status); }; then
14498                         test -n "$verbose" && echo "$as_me:14498: result: ... $cf_attribute" >&5
14499 echo "${ECHO_T}... $cf_attribute" >&6
14500                         cat conftest.h >>confdefs.h
14501                         case $cf_attribute in
14502                         (noreturn)
14503
14504 cat >>confdefs.h <<EOF
14505 #define GCC_NORETURN $cf_directive
14506 EOF
14507
14508                                 ;;
14509                         (printf)
14510                                 cf_value='/* nothing */'
14511                                 if test "$cf_printf_attribute" != no ; then
14512                                         cf_value='__attribute__((format(printf,fmt,var)))'
14513
14514 cat >>confdefs.h <<\EOF
14515 #define GCC_PRINTF 1
14516 EOF
14517
14518                                 fi
14519
14520 cat >>confdefs.h <<EOF
14521 #define GCC_PRINTFLIKE(fmt,var) $cf_value
14522 EOF
14523
14524                                 ;;
14525                         (scanf)
14526                                 cf_value='/* nothing */'
14527                                 if test "$cf_scanf_attribute" != no ; then
14528                                         cf_value='__attribute__((format(scanf,fmt,var)))'
14529
14530 cat >>confdefs.h <<\EOF
14531 #define GCC_SCANF 1
14532 EOF
14533
14534                                 fi
14535
14536 cat >>confdefs.h <<EOF
14537 #define GCC_SCANFLIKE(fmt,var) $cf_value
14538 EOF
14539
14540                                 ;;
14541                         (unused)
14542
14543 cat >>confdefs.h <<EOF
14544 #define GCC_UNUSED $cf_directive
14545 EOF
14546
14547                                 ;;
14548                         esac
14549                 fi
14550         done
14551 else
14552         fgrep define conftest.i >>confdefs.h
14553 fi
14554 rm -rf conftest*
14555 fi
14556
14557 echo "$as_me:14557: checking if you want to work around bogus compiler/loader warnings" >&5
14558 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
14559
14560 # Check whether --enable-string-hacks or --disable-string-hacks was given.
14561 if test "${enable_string_hacks+set}" = set; then
14562   enableval="$enable_string_hacks"
14563   with_string_hacks=$enableval
14564 else
14565   with_string_hacks=no
14566 fi;
14567 echo "$as_me:14567: result: $with_string_hacks" >&5
14568 echo "${ECHO_T}$with_string_hacks" >&6
14569
14570 if test "x$with_string_hacks" = "xyes"; then
14571
14572 cat >>confdefs.h <<\EOF
14573 #define USE_STRING_HACKS 1
14574 EOF
14575
14576         { echo "$as_me:14576: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
14577 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
14578         echo "$as_me:14578: checking for strlcat" >&5
14579 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
14580 if test "${ac_cv_func_strlcat+set}" = set; then
14581   echo $ECHO_N "(cached) $ECHO_C" >&6
14582 else
14583   cat >conftest.$ac_ext <<_ACEOF
14584 #line 14584 "configure"
14585 #include "confdefs.h"
14586 /* System header to define __stub macros and hopefully few prototypes,
14587     which can conflict with char strlcat (); below.  */
14588 #include <assert.h>
14589 /* Override any gcc2 internal prototype to avoid an error.  */
14590 #ifdef __cplusplus
14591 extern "C"
14592 #endif
14593 /* We use char because int might match the return type of a gcc2
14594    builtin and then its argument prototype would still apply.  */
14595 char strlcat ();
14596 char (*f) ();
14597
14598 int
14599 main (void)
14600 {
14601 /* The GNU C library defines this for functions which it implements
14602     to always fail with ENOSYS.  Some functions are actually named
14603     something starting with __ and the normal name is an alias.  */
14604 #if defined (__stub_strlcat) || defined (__stub___strlcat)
14605 choke me
14606 #else
14607 f = strlcat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14608 #endif
14609
14610   ;
14611   return 0;
14612 }
14613 _ACEOF
14614 rm -f conftest.$ac_objext conftest$ac_exeext
14615 if { (eval echo "$as_me:14615: \"$ac_link\"") >&5
14616   (eval $ac_link) 2>&5
14617   ac_status=$?
14618   echo "$as_me:14618: \$? = $ac_status" >&5
14619   (exit $ac_status); } &&
14620          { ac_try='test -s conftest$ac_exeext'
14621   { (eval echo "$as_me:14621: \"$ac_try\"") >&5
14622   (eval $ac_try) 2>&5
14623   ac_status=$?
14624   echo "$as_me:14624: \$? = $ac_status" >&5
14625   (exit $ac_status); }; }; then
14626   ac_cv_func_strlcat=yes
14627 else
14628   echo "$as_me: failed program was:" >&5
14629 cat conftest.$ac_ext >&5
14630 ac_cv_func_strlcat=no
14631 fi
14632 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14633 fi
14634 echo "$as_me:14634: result: $ac_cv_func_strlcat" >&5
14635 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
14636 if test $ac_cv_func_strlcat = yes; then
14637
14638 cat >>confdefs.h <<\EOF
14639 #define HAVE_STRLCAT 1
14640 EOF
14641
14642 else
14643
14644                 echo "$as_me:14644: checking for strlcat in -lbsd" >&5
14645 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
14646 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
14647   echo $ECHO_N "(cached) $ECHO_C" >&6
14648 else
14649   ac_check_lib_save_LIBS=$LIBS
14650 LIBS="-lbsd  $LIBS"
14651 cat >conftest.$ac_ext <<_ACEOF
14652 #line 14652 "configure"
14653 #include "confdefs.h"
14654
14655 /* Override any gcc2 internal prototype to avoid an error.  */
14656 #ifdef __cplusplus
14657 extern "C"
14658 #endif
14659 /* We use char because int might match the return type of a gcc2
14660    builtin and then its argument prototype would still apply.  */
14661 char strlcat ();
14662 int
14663 main (void)
14664 {
14665 strlcat ();
14666   ;
14667   return 0;
14668 }
14669 _ACEOF
14670 rm -f conftest.$ac_objext conftest$ac_exeext
14671 if { (eval echo "$as_me:14671: \"$ac_link\"") >&5
14672   (eval $ac_link) 2>&5
14673   ac_status=$?
14674   echo "$as_me:14674: \$? = $ac_status" >&5
14675   (exit $ac_status); } &&
14676          { ac_try='test -s conftest$ac_exeext'
14677   { (eval echo "$as_me:14677: \"$ac_try\"") >&5
14678   (eval $ac_try) 2>&5
14679   ac_status=$?
14680   echo "$as_me:14680: \$? = $ac_status" >&5
14681   (exit $ac_status); }; }; then
14682   ac_cv_lib_bsd_strlcat=yes
14683 else
14684   echo "$as_me: failed program was:" >&5
14685 cat conftest.$ac_ext >&5
14686 ac_cv_lib_bsd_strlcat=no
14687 fi
14688 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14689 LIBS=$ac_check_lib_save_LIBS
14690 fi
14691 echo "$as_me:14691: result: $ac_cv_lib_bsd_strlcat" >&5
14692 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
14693 if test $ac_cv_lib_bsd_strlcat = yes; then
14694
14695 cf_add_libs="-lbsd"
14696 # Filter out duplicates - this happens with badly-designed ".pc" files...
14697 for cf_add_1lib in $LIBS
14698 do
14699         for cf_add_2lib in $cf_add_libs
14700         do
14701                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14702                 then
14703                         cf_add_1lib=
14704                         break
14705                 fi
14706         done
14707         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14708 done
14709 LIBS="$cf_add_libs"
14710
14711 for ac_header in bsd/string.h
14712 do
14713 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14714 echo "$as_me:14714: checking for $ac_header" >&5
14715 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14716 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14717   echo $ECHO_N "(cached) $ECHO_C" >&6
14718 else
14719   cat >conftest.$ac_ext <<_ACEOF
14720 #line 14720 "configure"
14721 #include "confdefs.h"
14722 #include <$ac_header>
14723 _ACEOF
14724 if { (eval echo "$as_me:14724: \"$ac_cpp conftest.$ac_ext\"") >&5
14725   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14726   ac_status=$?
14727   egrep -v '^ *\+' conftest.er1 >conftest.err
14728   rm -f conftest.er1
14729   cat conftest.err >&5
14730   echo "$as_me:14730: \$? = $ac_status" >&5
14731   (exit $ac_status); } >/dev/null; then
14732   if test -s conftest.err; then
14733     ac_cpp_err=$ac_c_preproc_warn_flag
14734   else
14735     ac_cpp_err=
14736   fi
14737 else
14738   ac_cpp_err=yes
14739 fi
14740 if test -z "$ac_cpp_err"; then
14741   eval "$as_ac_Header=yes"
14742 else
14743   echo "$as_me: failed program was:" >&5
14744   cat conftest.$ac_ext >&5
14745   eval "$as_ac_Header=no"
14746 fi
14747 rm -f conftest.err conftest.$ac_ext
14748 fi
14749 echo "$as_me:14749: result: `eval echo '${'$as_ac_Header'}'`" >&5
14750 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14751 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14752   cat >>confdefs.h <<EOF
14753 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14754 EOF
14755
14756 fi
14757 done
14758
14759 cat >>confdefs.h <<\EOF
14760 #define HAVE_STRLCAT 1
14761 EOF
14762
14763 fi
14764
14765 fi
14766
14767 for ac_func in strlcpy snprintf
14768 do
14769 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14770 echo "$as_me:14770: checking for $ac_func" >&5
14771 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14772 if eval "test \"\${$as_ac_var+set}\" = set"; then
14773   echo $ECHO_N "(cached) $ECHO_C" >&6
14774 else
14775   cat >conftest.$ac_ext <<_ACEOF
14776 #line 14776 "configure"
14777 #include "confdefs.h"
14778 /* System header to define __stub macros and hopefully few prototypes,
14779     which can conflict with char $ac_func (); below.  */
14780 #include <assert.h>
14781 /* Override any gcc2 internal prototype to avoid an error.  */
14782 #ifdef __cplusplus
14783 extern "C"
14784 #endif
14785 /* We use char because int might match the return type of a gcc2
14786    builtin and then its argument prototype would still apply.  */
14787 char $ac_func ();
14788 char (*f) ();
14789
14790 int
14791 main (void)
14792 {
14793 /* The GNU C library defines this for functions which it implements
14794     to always fail with ENOSYS.  Some functions are actually named
14795     something starting with __ and the normal name is an alias.  */
14796 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14797 choke me
14798 #else
14799 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14800 #endif
14801
14802   ;
14803   return 0;
14804 }
14805 _ACEOF
14806 rm -f conftest.$ac_objext conftest$ac_exeext
14807 if { (eval echo "$as_me:14807: \"$ac_link\"") >&5
14808   (eval $ac_link) 2>&5
14809   ac_status=$?
14810   echo "$as_me:14810: \$? = $ac_status" >&5
14811   (exit $ac_status); } &&
14812          { ac_try='test -s conftest$ac_exeext'
14813   { (eval echo "$as_me:14813: \"$ac_try\"") >&5
14814   (eval $ac_try) 2>&5
14815   ac_status=$?
14816   echo "$as_me:14816: \$? = $ac_status" >&5
14817   (exit $ac_status); }; }; then
14818   eval "$as_ac_var=yes"
14819 else
14820   echo "$as_me: failed program was:" >&5
14821 cat conftest.$ac_ext >&5
14822 eval "$as_ac_var=no"
14823 fi
14824 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14825 fi
14826 echo "$as_me:14826: result: `eval echo '${'$as_ac_var'}'`" >&5
14827 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14828 if test `eval echo '${'$as_ac_var'}'` = yes; then
14829   cat >>confdefs.h <<EOF
14830 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14831 EOF
14832
14833 fi
14834 done
14835
14836 fi
14837
14838 ###     use option --enable-assertions to turn on generation of assertion code
14839 echo "$as_me:14839: checking if you want to enable runtime assertions" >&5
14840 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
14841
14842 # Check whether --enable-assertions or --disable-assertions was given.
14843 if test "${enable_assertions+set}" = set; then
14844   enableval="$enable_assertions"
14845   with_assertions=$enableval
14846 else
14847   with_assertions=no
14848 fi;
14849 echo "$as_me:14849: result: $with_assertions" >&5
14850 echo "${ECHO_T}$with_assertions" >&6
14851 if test -n "$GCC"
14852 then
14853         if test "$with_assertions" = no
14854         then
14855                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
14856         else
14857
14858         ADAFLAGS="$ADAFLAGS -gnata"
14859
14860         fi
14861 fi
14862
14863 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
14864
14865 echo "$as_me:14865: checking if you want to use dmalloc for testing" >&5
14866 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
14867
14868 # Check whether --with-dmalloc or --without-dmalloc was given.
14869 if test "${with_dmalloc+set}" = set; then
14870   withval="$with_dmalloc"
14871
14872 cat >>confdefs.h <<EOF
14873 #define USE_DMALLOC 1
14874 EOF
14875
14876         : ${with_cflags:=-g}
14877         : ${with_no_leaks:=yes}
14878          with_dmalloc=yes
14879 else
14880   with_dmalloc=
14881 fi;
14882 echo "$as_me:14882: result: ${with_dmalloc:-no}" >&5
14883 echo "${ECHO_T}${with_dmalloc:-no}" >&6
14884
14885 case .$with_cflags in
14886 (.*-g*)
14887         case .$CFLAGS in
14888         (.*-g*)
14889                 ;;
14890         (*)
14891
14892 cf_fix_cppflags=no
14893 cf_new_cflags=
14894 cf_new_cppflags=
14895 cf_new_extra_cppflags=
14896
14897 for cf_add_cflags in -g
14898 do
14899 case $cf_fix_cppflags in
14900 (no)
14901         case $cf_add_cflags in
14902         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14903                 case $cf_add_cflags in
14904                 (-D*)
14905                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14906
14907                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14908                                 && test -z "${cf_tst_cflags}" \
14909                                 && cf_fix_cppflags=yes
14910
14911                         if test $cf_fix_cppflags = yes ; then
14912
14913         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14914         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14915
14916                                 continue
14917                         elif test "${cf_tst_cflags}" = "\"'" ; then
14918
14919         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14920         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14921
14922                                 continue
14923                         fi
14924                         ;;
14925                 esac
14926                 case "$CPPFLAGS" in
14927                 (*$cf_add_cflags)
14928                         ;;
14929                 (*)
14930                         case $cf_add_cflags in
14931                         (-D*)
14932                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14933
14934 CPPFLAGS=`echo "$CPPFLAGS" | \
14935         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14936                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14937
14938                                 ;;
14939                         esac
14940
14941         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14942         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14943
14944                         ;;
14945                 esac
14946                 ;;
14947         (*)
14948
14949         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14950         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14951
14952                 ;;
14953         esac
14954         ;;
14955 (yes)
14956
14957         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14958         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14959
14960         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14961
14962         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14963                 && test -z "${cf_tst_cflags}" \
14964                 && cf_fix_cppflags=no
14965         ;;
14966 esac
14967 done
14968
14969 if test -n "$cf_new_cflags" ; then
14970
14971         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14972         CFLAGS="${CFLAGS}$cf_new_cflags"
14973
14974 fi
14975
14976 if test -n "$cf_new_cppflags" ; then
14977
14978         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14979         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14980
14981 fi
14982
14983 if test -n "$cf_new_extra_cppflags" ; then
14984
14985         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14986         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14987
14988 fi
14989
14990                 ;;
14991         esac
14992         ;;
14993 esac
14994
14995 if test "$with_dmalloc" = yes ; then
14996         echo "$as_me:14996: checking for dmalloc.h" >&5
14997 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
14998 if test "${ac_cv_header_dmalloc_h+set}" = set; then
14999   echo $ECHO_N "(cached) $ECHO_C" >&6
15000 else
15001   cat >conftest.$ac_ext <<_ACEOF
15002 #line 15002 "configure"
15003 #include "confdefs.h"
15004 #include <dmalloc.h>
15005 _ACEOF
15006 if { (eval echo "$as_me:15006: \"$ac_cpp conftest.$ac_ext\"") >&5
15007   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15008   ac_status=$?
15009   egrep -v '^ *\+' conftest.er1 >conftest.err
15010   rm -f conftest.er1
15011   cat conftest.err >&5
15012   echo "$as_me:15012: \$? = $ac_status" >&5
15013   (exit $ac_status); } >/dev/null; then
15014   if test -s conftest.err; then
15015     ac_cpp_err=$ac_c_preproc_warn_flag
15016   else
15017     ac_cpp_err=
15018   fi
15019 else
15020   ac_cpp_err=yes
15021 fi
15022 if test -z "$ac_cpp_err"; then
15023   ac_cv_header_dmalloc_h=yes
15024 else
15025   echo "$as_me: failed program was:" >&5
15026   cat conftest.$ac_ext >&5
15027   ac_cv_header_dmalloc_h=no
15028 fi
15029 rm -f conftest.err conftest.$ac_ext
15030 fi
15031 echo "$as_me:15031: result: $ac_cv_header_dmalloc_h" >&5
15032 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
15033 if test $ac_cv_header_dmalloc_h = yes; then
15034
15035 echo "$as_me:15035: checking for dmalloc_debug in -ldmalloc" >&5
15036 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
15037 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
15038   echo $ECHO_N "(cached) $ECHO_C" >&6
15039 else
15040   ac_check_lib_save_LIBS=$LIBS
15041 LIBS="-ldmalloc  $LIBS"
15042 cat >conftest.$ac_ext <<_ACEOF
15043 #line 15043 "configure"
15044 #include "confdefs.h"
15045
15046 /* Override any gcc2 internal prototype to avoid an error.  */
15047 #ifdef __cplusplus
15048 extern "C"
15049 #endif
15050 /* We use char because int might match the return type of a gcc2
15051    builtin and then its argument prototype would still apply.  */
15052 char dmalloc_debug ();
15053 int
15054 main (void)
15055 {
15056 dmalloc_debug ();
15057   ;
15058   return 0;
15059 }
15060 _ACEOF
15061 rm -f conftest.$ac_objext conftest$ac_exeext
15062 if { (eval echo "$as_me:15062: \"$ac_link\"") >&5
15063   (eval $ac_link) 2>&5
15064   ac_status=$?
15065   echo "$as_me:15065: \$? = $ac_status" >&5
15066   (exit $ac_status); } &&
15067          { ac_try='test -s conftest$ac_exeext'
15068   { (eval echo "$as_me:15068: \"$ac_try\"") >&5
15069   (eval $ac_try) 2>&5
15070   ac_status=$?
15071   echo "$as_me:15071: \$? = $ac_status" >&5
15072   (exit $ac_status); }; }; then
15073   ac_cv_lib_dmalloc_dmalloc_debug=yes
15074 else
15075   echo "$as_me: failed program was:" >&5
15076 cat conftest.$ac_ext >&5
15077 ac_cv_lib_dmalloc_dmalloc_debug=no
15078 fi
15079 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15080 LIBS=$ac_check_lib_save_LIBS
15081 fi
15082 echo "$as_me:15082: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
15083 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
15084 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
15085   cat >>confdefs.h <<EOF
15086 #define HAVE_LIBDMALLOC 1
15087 EOF
15088
15089   LIBS="-ldmalloc $LIBS"
15090
15091 fi
15092
15093 fi
15094
15095 fi
15096
15097 echo "$as_me:15097: checking if you want to use dbmalloc for testing" >&5
15098 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
15099
15100 # Check whether --with-dbmalloc or --without-dbmalloc was given.
15101 if test "${with_dbmalloc+set}" = set; then
15102   withval="$with_dbmalloc"
15103
15104 cat >>confdefs.h <<EOF
15105 #define USE_DBMALLOC 1
15106 EOF
15107
15108         : ${with_cflags:=-g}
15109         : ${with_no_leaks:=yes}
15110          with_dbmalloc=yes
15111 else
15112   with_dbmalloc=
15113 fi;
15114 echo "$as_me:15114: result: ${with_dbmalloc:-no}" >&5
15115 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
15116
15117 case .$with_cflags in
15118 (.*-g*)
15119         case .$CFLAGS in
15120         (.*-g*)
15121                 ;;
15122         (*)
15123
15124 cf_fix_cppflags=no
15125 cf_new_cflags=
15126 cf_new_cppflags=
15127 cf_new_extra_cppflags=
15128
15129 for cf_add_cflags in -g
15130 do
15131 case $cf_fix_cppflags in
15132 (no)
15133         case $cf_add_cflags in
15134         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15135                 case $cf_add_cflags in
15136                 (-D*)
15137                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15138
15139                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15140                                 && test -z "${cf_tst_cflags}" \
15141                                 && cf_fix_cppflags=yes
15142
15143                         if test $cf_fix_cppflags = yes ; then
15144
15145         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15146         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15147
15148                                 continue
15149                         elif test "${cf_tst_cflags}" = "\"'" ; then
15150
15151         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15152         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15153
15154                                 continue
15155                         fi
15156                         ;;
15157                 esac
15158                 case "$CPPFLAGS" in
15159                 (*$cf_add_cflags)
15160                         ;;
15161                 (*)
15162                         case $cf_add_cflags in
15163                         (-D*)
15164                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15165
15166 CPPFLAGS=`echo "$CPPFLAGS" | \
15167         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15168                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15169
15170                                 ;;
15171                         esac
15172
15173         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15174         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15175
15176                         ;;
15177                 esac
15178                 ;;
15179         (*)
15180
15181         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15182         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15183
15184                 ;;
15185         esac
15186         ;;
15187 (yes)
15188
15189         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15190         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15191
15192         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15193
15194         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15195                 && test -z "${cf_tst_cflags}" \
15196                 && cf_fix_cppflags=no
15197         ;;
15198 esac
15199 done
15200
15201 if test -n "$cf_new_cflags" ; then
15202
15203         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15204         CFLAGS="${CFLAGS}$cf_new_cflags"
15205
15206 fi
15207
15208 if test -n "$cf_new_cppflags" ; then
15209
15210         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15211         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15212
15213 fi
15214
15215 if test -n "$cf_new_extra_cppflags" ; then
15216
15217         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15218         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15219
15220 fi
15221
15222                 ;;
15223         esac
15224         ;;
15225 esac
15226
15227 if test "$with_dbmalloc" = yes ; then
15228         echo "$as_me:15228: checking for dbmalloc.h" >&5
15229 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
15230 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
15231   echo $ECHO_N "(cached) $ECHO_C" >&6
15232 else
15233   cat >conftest.$ac_ext <<_ACEOF
15234 #line 15234 "configure"
15235 #include "confdefs.h"
15236 #include <dbmalloc.h>
15237 _ACEOF
15238 if { (eval echo "$as_me:15238: \"$ac_cpp conftest.$ac_ext\"") >&5
15239   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15240   ac_status=$?
15241   egrep -v '^ *\+' conftest.er1 >conftest.err
15242   rm -f conftest.er1
15243   cat conftest.err >&5
15244   echo "$as_me:15244: \$? = $ac_status" >&5
15245   (exit $ac_status); } >/dev/null; then
15246   if test -s conftest.err; then
15247     ac_cpp_err=$ac_c_preproc_warn_flag
15248   else
15249     ac_cpp_err=
15250   fi
15251 else
15252   ac_cpp_err=yes
15253 fi
15254 if test -z "$ac_cpp_err"; then
15255   ac_cv_header_dbmalloc_h=yes
15256 else
15257   echo "$as_me: failed program was:" >&5
15258   cat conftest.$ac_ext >&5
15259   ac_cv_header_dbmalloc_h=no
15260 fi
15261 rm -f conftest.err conftest.$ac_ext
15262 fi
15263 echo "$as_me:15263: result: $ac_cv_header_dbmalloc_h" >&5
15264 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
15265 if test $ac_cv_header_dbmalloc_h = yes; then
15266
15267 echo "$as_me:15267: checking for debug_malloc in -ldbmalloc" >&5
15268 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
15269 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
15270   echo $ECHO_N "(cached) $ECHO_C" >&6
15271 else
15272   ac_check_lib_save_LIBS=$LIBS
15273 LIBS="-ldbmalloc  $LIBS"
15274 cat >conftest.$ac_ext <<_ACEOF
15275 #line 15275 "configure"
15276 #include "confdefs.h"
15277
15278 /* Override any gcc2 internal prototype to avoid an error.  */
15279 #ifdef __cplusplus
15280 extern "C"
15281 #endif
15282 /* We use char because int might match the return type of a gcc2
15283    builtin and then its argument prototype would still apply.  */
15284 char debug_malloc ();
15285 int
15286 main (void)
15287 {
15288 debug_malloc ();
15289   ;
15290   return 0;
15291 }
15292 _ACEOF
15293 rm -f conftest.$ac_objext conftest$ac_exeext
15294 if { (eval echo "$as_me:15294: \"$ac_link\"") >&5
15295   (eval $ac_link) 2>&5
15296   ac_status=$?
15297   echo "$as_me:15297: \$? = $ac_status" >&5
15298   (exit $ac_status); } &&
15299          { ac_try='test -s conftest$ac_exeext'
15300   { (eval echo "$as_me:15300: \"$ac_try\"") >&5
15301   (eval $ac_try) 2>&5
15302   ac_status=$?
15303   echo "$as_me:15303: \$? = $ac_status" >&5
15304   (exit $ac_status); }; }; then
15305   ac_cv_lib_dbmalloc_debug_malloc=yes
15306 else
15307   echo "$as_me: failed program was:" >&5
15308 cat conftest.$ac_ext >&5
15309 ac_cv_lib_dbmalloc_debug_malloc=no
15310 fi
15311 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15312 LIBS=$ac_check_lib_save_LIBS
15313 fi
15314 echo "$as_me:15314: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
15315 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
15316 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
15317   cat >>confdefs.h <<EOF
15318 #define HAVE_LIBDBMALLOC 1
15319 EOF
15320
15321   LIBS="-ldbmalloc $LIBS"
15322
15323 fi
15324
15325 fi
15326
15327 fi
15328
15329 echo "$as_me:15329: checking if you want to use valgrind for testing" >&5
15330 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
15331
15332 # Check whether --with-valgrind or --without-valgrind was given.
15333 if test "${with_valgrind+set}" = set; then
15334   withval="$with_valgrind"
15335
15336 cat >>confdefs.h <<EOF
15337 #define USE_VALGRIND 1
15338 EOF
15339
15340         : ${with_cflags:=-g}
15341         : ${with_no_leaks:=yes}
15342          with_valgrind=yes
15343 else
15344   with_valgrind=
15345 fi;
15346 echo "$as_me:15346: result: ${with_valgrind:-no}" >&5
15347 echo "${ECHO_T}${with_valgrind:-no}" >&6
15348
15349 case .$with_cflags in
15350 (.*-g*)
15351         case .$CFLAGS in
15352         (.*-g*)
15353                 ;;
15354         (*)
15355
15356 cf_fix_cppflags=no
15357 cf_new_cflags=
15358 cf_new_cppflags=
15359 cf_new_extra_cppflags=
15360
15361 for cf_add_cflags in -g
15362 do
15363 case $cf_fix_cppflags in
15364 (no)
15365         case $cf_add_cflags in
15366         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15367                 case $cf_add_cflags in
15368                 (-D*)
15369                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15370
15371                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15372                                 && test -z "${cf_tst_cflags}" \
15373                                 && cf_fix_cppflags=yes
15374
15375                         if test $cf_fix_cppflags = yes ; then
15376
15377         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15378         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15379
15380                                 continue
15381                         elif test "${cf_tst_cflags}" = "\"'" ; then
15382
15383         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15384         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15385
15386                                 continue
15387                         fi
15388                         ;;
15389                 esac
15390                 case "$CPPFLAGS" in
15391                 (*$cf_add_cflags)
15392                         ;;
15393                 (*)
15394                         case $cf_add_cflags in
15395                         (-D*)
15396                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15397
15398 CPPFLAGS=`echo "$CPPFLAGS" | \
15399         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15400                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15401
15402                                 ;;
15403                         esac
15404
15405         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15406         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15407
15408                         ;;
15409                 esac
15410                 ;;
15411         (*)
15412
15413         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15414         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15415
15416                 ;;
15417         esac
15418         ;;
15419 (yes)
15420
15421         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15422         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15423
15424         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15425
15426         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15427                 && test -z "${cf_tst_cflags}" \
15428                 && cf_fix_cppflags=no
15429         ;;
15430 esac
15431 done
15432
15433 if test -n "$cf_new_cflags" ; then
15434
15435         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15436         CFLAGS="${CFLAGS}$cf_new_cflags"
15437
15438 fi
15439
15440 if test -n "$cf_new_cppflags" ; then
15441
15442         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15443         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15444
15445 fi
15446
15447 if test -n "$cf_new_extra_cppflags" ; then
15448
15449         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15450         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15451
15452 fi
15453
15454                 ;;
15455         esac
15456         ;;
15457 esac
15458
15459 echo "$as_me:15459: checking if you want to perform memory-leak testing" >&5
15460 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
15461
15462 # Check whether --enable-leaks or --disable-leaks was given.
15463 if test "${enable_leaks+set}" = set; then
15464   enableval="$enable_leaks"
15465   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
15466 else
15467   : ${with_no_leaks:=no}
15468 fi;
15469 echo "$as_me:15469: result: $with_no_leaks" >&5
15470 echo "${ECHO_T}$with_no_leaks" >&6
15471
15472 if test "$with_no_leaks" = yes ; then
15473
15474 cat >>confdefs.h <<\EOF
15475 #define NO_LEAKS 1
15476 EOF
15477
15478 cat >>confdefs.h <<\EOF
15479 #define YY_NO_LEAKS 1
15480 EOF
15481
15482 fi
15483
15484 cat >>confdefs.h <<\EOF
15485 #define HAVE_NC_ALLOC_H 1
15486 EOF
15487
15488 ###     use option --enable-expanded to generate certain macros as functions
15489
15490 # Check whether --enable-expanded or --disable-expanded was given.
15491 if test "${enable_expanded+set}" = set; then
15492   enableval="$enable_expanded"
15493   test "x$enableval" = xyes &&
15494 cat >>confdefs.h <<\EOF
15495 #define NCURSES_EXPANDED 1
15496 EOF
15497
15498 fi;
15499
15500 ###     use option --disable-macros to suppress macros in favor of functions
15501
15502 # Check whether --enable-macros or --disable-macros was given.
15503 if test "${enable_macros+set}" = set; then
15504   enableval="$enable_macros"
15505   test "$enableval" = no &&
15506 cat >>confdefs.h <<\EOF
15507 #define NCURSES_NOMACROS 1
15508 EOF
15509
15510 fi;
15511
15512 # Normally we only add trace() to the debug-library.  Allow this to be
15513 # extended to all models of the ncurses library:
15514 cf_all_traces=no
15515 case "$CFLAGS $CPPFLAGS" in
15516 (*-DTRACE*)
15517         cf_all_traces=yes
15518         ;;
15519 esac
15520
15521 echo "$as_me:15521: checking whether to add trace feature to all models" >&5
15522 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
15523
15524 # Check whether --with-trace or --without-trace was given.
15525 if test "${with_trace+set}" = set; then
15526   withval="$with_trace"
15527   cf_with_trace=$withval
15528 else
15529   cf_with_trace=$cf_all_traces
15530 fi;
15531 echo "$as_me:15531: result: $cf_with_trace" >&5
15532 echo "${ECHO_T}$cf_with_trace" >&6
15533
15534 if test "x$cf_with_trace" = xyes ; then
15535         LIB_TRACING=all
15536         ADA_TRACE=TRUE
15537
15538 cf_fix_cppflags=no
15539 cf_new_cflags=
15540 cf_new_cppflags=
15541 cf_new_extra_cppflags=
15542
15543 for cf_add_cflags in -DTRACE
15544 do
15545 case $cf_fix_cppflags in
15546 (no)
15547         case $cf_add_cflags in
15548         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15549                 case $cf_add_cflags in
15550                 (-D*)
15551                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15552
15553                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15554                                 && test -z "${cf_tst_cflags}" \
15555                                 && cf_fix_cppflags=yes
15556
15557                         if test $cf_fix_cppflags = yes ; then
15558
15559         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15560         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15561
15562                                 continue
15563                         elif test "${cf_tst_cflags}" = "\"'" ; then
15564
15565         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15566         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15567
15568                                 continue
15569                         fi
15570                         ;;
15571                 esac
15572                 case "$CPPFLAGS" in
15573                 (*$cf_add_cflags)
15574                         ;;
15575                 (*)
15576                         case $cf_add_cflags in
15577                         (-D*)
15578                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15579
15580 CPPFLAGS=`echo "$CPPFLAGS" | \
15581         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15582                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15583
15584                                 ;;
15585                         esac
15586
15587         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15588         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15589
15590                         ;;
15591                 esac
15592                 ;;
15593         (*)
15594
15595         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15596         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15597
15598                 ;;
15599         esac
15600         ;;
15601 (yes)
15602
15603         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15604         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15605
15606         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15607
15608         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15609                 && test -z "${cf_tst_cflags}" \
15610                 && cf_fix_cppflags=no
15611         ;;
15612 esac
15613 done
15614
15615 if test -n "$cf_new_cflags" ; then
15616
15617         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15618         CFLAGS="${CFLAGS}$cf_new_cflags"
15619
15620 fi
15621
15622 if test -n "$cf_new_cppflags" ; then
15623
15624         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15625         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15626
15627 fi
15628
15629 if test -n "$cf_new_extra_cppflags" ; then
15630
15631         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15632         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15633
15634 fi
15635
15636 cat >>confdefs.h <<\EOF
15637 #define HAVE__TRACEF 1
15638 EOF
15639
15640 else
15641         LIB_TRACING=DEBUG
15642         ADA_TRACE=FALSE
15643 fi
15644
15645 echo "$as_me:15645: checking if we want to use GNAT projects" >&5
15646 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
15647
15648 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
15649 if test "${enable_gnat_projects+set}" = set; then
15650   enableval="$enable_gnat_projects"
15651   test "$enableval" != no && enableval=yes
15652         if test "$enableval" != "yes" ; then
15653     enable_gnat_projects=no
15654         else
15655                 enable_gnat_projects=yes
15656         fi
15657 else
15658   enableval=yes
15659         enable_gnat_projects=yes
15660
15661 fi;
15662 echo "$as_me:15662: result: $enable_gnat_projects" >&5
15663 echo "${ECHO_T}$enable_gnat_projects" >&6
15664
15665 ###     Checks for libraries.
15666 case $cf_cv_system_name in
15667 (*mingw32*|*mingw64*)
15668         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
15669         LIBS=" -lpsapi $LIBS"
15670         ;;
15671 (*)
15672 echo "$as_me:15672: checking for gettimeofday" >&5
15673 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
15674 if test "${ac_cv_func_gettimeofday+set}" = set; then
15675   echo $ECHO_N "(cached) $ECHO_C" >&6
15676 else
15677   cat >conftest.$ac_ext <<_ACEOF
15678 #line 15678 "configure"
15679 #include "confdefs.h"
15680 /* System header to define __stub macros and hopefully few prototypes,
15681     which can conflict with char gettimeofday (); below.  */
15682 #include <assert.h>
15683 /* Override any gcc2 internal prototype to avoid an error.  */
15684 #ifdef __cplusplus
15685 extern "C"
15686 #endif
15687 /* We use char because int might match the return type of a gcc2
15688    builtin and then its argument prototype would still apply.  */
15689 char gettimeofday ();
15690 char (*f) ();
15691
15692 int
15693 main (void)
15694 {
15695 /* The GNU C library defines this for functions which it implements
15696     to always fail with ENOSYS.  Some functions are actually named
15697     something starting with __ and the normal name is an alias.  */
15698 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
15699 choke me
15700 #else
15701 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15702 #endif
15703
15704   ;
15705   return 0;
15706 }
15707 _ACEOF
15708 rm -f conftest.$ac_objext conftest$ac_exeext
15709 if { (eval echo "$as_me:15709: \"$ac_link\"") >&5
15710   (eval $ac_link) 2>&5
15711   ac_status=$?
15712   echo "$as_me:15712: \$? = $ac_status" >&5
15713   (exit $ac_status); } &&
15714          { ac_try='test -s conftest$ac_exeext'
15715   { (eval echo "$as_me:15715: \"$ac_try\"") >&5
15716   (eval $ac_try) 2>&5
15717   ac_status=$?
15718   echo "$as_me:15718: \$? = $ac_status" >&5
15719   (exit $ac_status); }; }; then
15720   ac_cv_func_gettimeofday=yes
15721 else
15722   echo "$as_me: failed program was:" >&5
15723 cat conftest.$ac_ext >&5
15724 ac_cv_func_gettimeofday=no
15725 fi
15726 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15727 fi
15728 echo "$as_me:15728: result: $ac_cv_func_gettimeofday" >&5
15729 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
15730 if test $ac_cv_func_gettimeofday = yes; then
15731
15732 cat >>confdefs.h <<\EOF
15733 #define HAVE_GETTIMEOFDAY 1
15734 EOF
15735
15736 else
15737
15738 echo "$as_me:15738: checking for gettimeofday in -lbsd" >&5
15739 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
15740 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
15741   echo $ECHO_N "(cached) $ECHO_C" >&6
15742 else
15743   ac_check_lib_save_LIBS=$LIBS
15744 LIBS="-lbsd  $LIBS"
15745 cat >conftest.$ac_ext <<_ACEOF
15746 #line 15746 "configure"
15747 #include "confdefs.h"
15748
15749 /* Override any gcc2 internal prototype to avoid an error.  */
15750 #ifdef __cplusplus
15751 extern "C"
15752 #endif
15753 /* We use char because int might match the return type of a gcc2
15754    builtin and then its argument prototype would still apply.  */
15755 char gettimeofday ();
15756 int
15757 main (void)
15758 {
15759 gettimeofday ();
15760   ;
15761   return 0;
15762 }
15763 _ACEOF
15764 rm -f conftest.$ac_objext conftest$ac_exeext
15765 if { (eval echo "$as_me:15765: \"$ac_link\"") >&5
15766   (eval $ac_link) 2>&5
15767   ac_status=$?
15768   echo "$as_me:15768: \$? = $ac_status" >&5
15769   (exit $ac_status); } &&
15770          { ac_try='test -s conftest$ac_exeext'
15771   { (eval echo "$as_me:15771: \"$ac_try\"") >&5
15772   (eval $ac_try) 2>&5
15773   ac_status=$?
15774   echo "$as_me:15774: \$? = $ac_status" >&5
15775   (exit $ac_status); }; }; then
15776   ac_cv_lib_bsd_gettimeofday=yes
15777 else
15778   echo "$as_me: failed program was:" >&5
15779 cat conftest.$ac_ext >&5
15780 ac_cv_lib_bsd_gettimeofday=no
15781 fi
15782 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15783 LIBS=$ac_check_lib_save_LIBS
15784 fi
15785 echo "$as_me:15785: result: $ac_cv_lib_bsd_gettimeofday" >&5
15786 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
15787 if test $ac_cv_lib_bsd_gettimeofday = yes; then
15788
15789 cat >>confdefs.h <<\EOF
15790 #define HAVE_GETTIMEOFDAY 1
15791 EOF
15792
15793 cf_add_libs="-lbsd"
15794 # Filter out duplicates - this happens with badly-designed ".pc" files...
15795 for cf_add_1lib in $LIBS
15796 do
15797         for cf_add_2lib in $cf_add_libs
15798         do
15799                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15800                 then
15801                         cf_add_1lib=
15802                         break
15803                 fi
15804         done
15805         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15806 done
15807 LIBS="$cf_add_libs"
15808
15809 fi
15810
15811 fi
15812         ;;
15813 esac
15814
15815 echo "$as_me:15815: checking if -lm needed for math functions" >&5
15816 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
15817 if test "${cf_cv_need_libm+set}" = set; then
15818   echo $ECHO_N "(cached) $ECHO_C" >&6
15819 else
15820
15821         cat >conftest.$ac_ext <<_ACEOF
15822 #line 15822 "configure"
15823 #include "confdefs.h"
15824
15825         #include <stdio.h>
15826         #include <stdlib.h>
15827         #include <math.h>
15828
15829 int
15830 main (void)
15831 {
15832 double x = rand(); printf("result = %g\n", pow(sin(x),x))
15833   ;
15834   return 0;
15835 }
15836 _ACEOF
15837 rm -f conftest.$ac_objext conftest$ac_exeext
15838 if { (eval echo "$as_me:15838: \"$ac_link\"") >&5
15839   (eval $ac_link) 2>&5
15840   ac_status=$?
15841   echo "$as_me:15841: \$? = $ac_status" >&5
15842   (exit $ac_status); } &&
15843          { ac_try='test -s conftest$ac_exeext'
15844   { (eval echo "$as_me:15844: \"$ac_try\"") >&5
15845   (eval $ac_try) 2>&5
15846   ac_status=$?
15847   echo "$as_me:15847: \$? = $ac_status" >&5
15848   (exit $ac_status); }; }; then
15849   cf_cv_need_libm=no
15850 else
15851   echo "$as_me: failed program was:" >&5
15852 cat conftest.$ac_ext >&5
15853 cf_cv_need_libm=yes
15854 fi
15855 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15856 fi
15857 echo "$as_me:15857: result: $cf_cv_need_libm" >&5
15858 echo "${ECHO_T}$cf_cv_need_libm" >&6
15859 if test "$cf_cv_need_libm" = yes
15860 then
15861 MATH_LIB=-lm
15862 fi
15863
15864 ###     Checks for header files.
15865 echo "$as_me:15865: checking for ANSI C header files" >&5
15866 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
15867 if test "${ac_cv_header_stdc+set}" = set; then
15868   echo $ECHO_N "(cached) $ECHO_C" >&6
15869 else
15870   cat >conftest.$ac_ext <<_ACEOF
15871 #line 15871 "configure"
15872 #include "confdefs.h"
15873 #include <stdlib.h>
15874 #include <stdarg.h>
15875 #include <string.h>
15876 #include <float.h>
15877
15878 _ACEOF
15879 if { (eval echo "$as_me:15879: \"$ac_cpp conftest.$ac_ext\"") >&5
15880   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15881   ac_status=$?
15882   egrep -v '^ *\+' conftest.er1 >conftest.err
15883   rm -f conftest.er1
15884   cat conftest.err >&5
15885   echo "$as_me:15885: \$? = $ac_status" >&5
15886   (exit $ac_status); } >/dev/null; then
15887   if test -s conftest.err; then
15888     ac_cpp_err=$ac_c_preproc_warn_flag
15889   else
15890     ac_cpp_err=
15891   fi
15892 else
15893   ac_cpp_err=yes
15894 fi
15895 if test -z "$ac_cpp_err"; then
15896   ac_cv_header_stdc=yes
15897 else
15898   echo "$as_me: failed program was:" >&5
15899   cat conftest.$ac_ext >&5
15900   ac_cv_header_stdc=no
15901 fi
15902 rm -f conftest.err conftest.$ac_ext
15903
15904 if test $ac_cv_header_stdc = yes; then
15905   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
15906   cat >conftest.$ac_ext <<_ACEOF
15907 #line 15907 "configure"
15908 #include "confdefs.h"
15909 #include <string.h>
15910
15911 _ACEOF
15912 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15913   egrep "memchr" >/dev/null 2>&1; then
15914   :
15915 else
15916   ac_cv_header_stdc=no
15917 fi
15918 rm -rf conftest*
15919
15920 fi
15921
15922 if test $ac_cv_header_stdc = yes; then
15923   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
15924   cat >conftest.$ac_ext <<_ACEOF
15925 #line 15925 "configure"
15926 #include "confdefs.h"
15927 #include <stdlib.h>
15928
15929 _ACEOF
15930 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15931   egrep "free" >/dev/null 2>&1; then
15932   :
15933 else
15934   ac_cv_header_stdc=no
15935 fi
15936 rm -rf conftest*
15937
15938 fi
15939
15940 if test $ac_cv_header_stdc = yes; then
15941   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
15942   if test "$cross_compiling" = yes; then
15943   :
15944 else
15945   cat >conftest.$ac_ext <<_ACEOF
15946 #line 15946 "configure"
15947 #include "confdefs.h"
15948 #include <ctype.h>
15949 #if ((' ' & 0x0FF) == 0x020)
15950 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
15951 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
15952 #else
15953 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
15954                      || ('j' <= (c) && (c) <= 'r') \
15955                      || ('s' <= (c) && (c) <= 'z'))
15956 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
15957 #endif
15958
15959 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
15960 int
15961 main (void)
15962 {
15963   int i;
15964   for (i = 0; i < 256; i++)
15965     if (XOR (islower (i), ISLOWER (i))
15966         || toupper (i) != TOUPPER (i))
15967       $ac_main_return(2);
15968   $ac_main_return (0);
15969 }
15970 _ACEOF
15971 rm -f conftest$ac_exeext
15972 if { (eval echo "$as_me:15972: \"$ac_link\"") >&5
15973   (eval $ac_link) 2>&5
15974   ac_status=$?
15975   echo "$as_me:15975: \$? = $ac_status" >&5
15976   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15977   { (eval echo "$as_me:15977: \"$ac_try\"") >&5
15978   (eval $ac_try) 2>&5
15979   ac_status=$?
15980   echo "$as_me:15980: \$? = $ac_status" >&5
15981   (exit $ac_status); }; }; then
15982   :
15983 else
15984   echo "$as_me: program exited with status $ac_status" >&5
15985 echo "$as_me: failed program was:" >&5
15986 cat conftest.$ac_ext >&5
15987 ac_cv_header_stdc=no
15988 fi
15989 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15990 fi
15991 fi
15992 fi
15993 echo "$as_me:15993: result: $ac_cv_header_stdc" >&5
15994 echo "${ECHO_T}$ac_cv_header_stdc" >&6
15995 if test $ac_cv_header_stdc = yes; then
15996
15997 cat >>confdefs.h <<\EOF
15998 #define STDC_HEADERS 1
15999 EOF
16000
16001 fi
16002
16003 ac_header_dirent=no
16004 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16005   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16006 echo "$as_me:16006: checking for $ac_hdr that defines DIR" >&5
16007 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16008 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16009   echo $ECHO_N "(cached) $ECHO_C" >&6
16010 else
16011   cat >conftest.$ac_ext <<_ACEOF
16012 #line 16012 "configure"
16013 #include "confdefs.h"
16014 #include <sys/types.h>
16015 #include <$ac_hdr>
16016
16017 int
16018 main (void)
16019 {
16020 if ((DIR *) 0)
16021 return 0;
16022   ;
16023   return 0;
16024 }
16025 _ACEOF
16026 rm -f conftest.$ac_objext
16027 if { (eval echo "$as_me:16027: \"$ac_compile\"") >&5
16028   (eval $ac_compile) 2>&5
16029   ac_status=$?
16030   echo "$as_me:16030: \$? = $ac_status" >&5
16031   (exit $ac_status); } &&
16032          { ac_try='test -s conftest.$ac_objext'
16033   { (eval echo "$as_me:16033: \"$ac_try\"") >&5
16034   (eval $ac_try) 2>&5
16035   ac_status=$?
16036   echo "$as_me:16036: \$? = $ac_status" >&5
16037   (exit $ac_status); }; }; then
16038   eval "$as_ac_Header=yes"
16039 else
16040   echo "$as_me: failed program was:" >&5
16041 cat conftest.$ac_ext >&5
16042 eval "$as_ac_Header=no"
16043 fi
16044 rm -f conftest.$ac_objext conftest.$ac_ext
16045 fi
16046 echo "$as_me:16046: result: `eval echo '${'$as_ac_Header'}'`" >&5
16047 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16048 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16049   cat >>confdefs.h <<EOF
16050 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
16051 EOF
16052
16053 ac_header_dirent=$ac_hdr; break
16054 fi
16055
16056 done
16057 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
16058 if test $ac_header_dirent = dirent.h; then
16059   echo "$as_me:16059: checking for opendir in -ldir" >&5
16060 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
16061 if test "${ac_cv_lib_dir_opendir+set}" = set; then
16062   echo $ECHO_N "(cached) $ECHO_C" >&6
16063 else
16064   ac_check_lib_save_LIBS=$LIBS
16065 LIBS="-ldir  $LIBS"
16066 cat >conftest.$ac_ext <<_ACEOF
16067 #line 16067 "configure"
16068 #include "confdefs.h"
16069
16070 /* Override any gcc2 internal prototype to avoid an error.  */
16071 #ifdef __cplusplus
16072 extern "C"
16073 #endif
16074 /* We use char because int might match the return type of a gcc2
16075    builtin and then its argument prototype would still apply.  */
16076 char opendir ();
16077 int
16078 main (void)
16079 {
16080 opendir ();
16081   ;
16082   return 0;
16083 }
16084 _ACEOF
16085 rm -f conftest.$ac_objext conftest$ac_exeext
16086 if { (eval echo "$as_me:16086: \"$ac_link\"") >&5
16087   (eval $ac_link) 2>&5
16088   ac_status=$?
16089   echo "$as_me:16089: \$? = $ac_status" >&5
16090   (exit $ac_status); } &&
16091          { ac_try='test -s conftest$ac_exeext'
16092   { (eval echo "$as_me:16092: \"$ac_try\"") >&5
16093   (eval $ac_try) 2>&5
16094   ac_status=$?
16095   echo "$as_me:16095: \$? = $ac_status" >&5
16096   (exit $ac_status); }; }; then
16097   ac_cv_lib_dir_opendir=yes
16098 else
16099   echo "$as_me: failed program was:" >&5
16100 cat conftest.$ac_ext >&5
16101 ac_cv_lib_dir_opendir=no
16102 fi
16103 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16104 LIBS=$ac_check_lib_save_LIBS
16105 fi
16106 echo "$as_me:16106: result: $ac_cv_lib_dir_opendir" >&5
16107 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
16108 if test $ac_cv_lib_dir_opendir = yes; then
16109   LIBS="$LIBS -ldir"
16110 fi
16111
16112 else
16113   echo "$as_me:16113: checking for opendir in -lx" >&5
16114 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
16115 if test "${ac_cv_lib_x_opendir+set}" = set; then
16116   echo $ECHO_N "(cached) $ECHO_C" >&6
16117 else
16118   ac_check_lib_save_LIBS=$LIBS
16119 LIBS="-lx  $LIBS"
16120 cat >conftest.$ac_ext <<_ACEOF
16121 #line 16121 "configure"
16122 #include "confdefs.h"
16123
16124 /* Override any gcc2 internal prototype to avoid an error.  */
16125 #ifdef __cplusplus
16126 extern "C"
16127 #endif
16128 /* We use char because int might match the return type of a gcc2
16129    builtin and then its argument prototype would still apply.  */
16130 char opendir ();
16131 int
16132 main (void)
16133 {
16134 opendir ();
16135   ;
16136   return 0;
16137 }
16138 _ACEOF
16139 rm -f conftest.$ac_objext conftest$ac_exeext
16140 if { (eval echo "$as_me:16140: \"$ac_link\"") >&5
16141   (eval $ac_link) 2>&5
16142   ac_status=$?
16143   echo "$as_me:16143: \$? = $ac_status" >&5
16144   (exit $ac_status); } &&
16145          { ac_try='test -s conftest$ac_exeext'
16146   { (eval echo "$as_me:16146: \"$ac_try\"") >&5
16147   (eval $ac_try) 2>&5
16148   ac_status=$?
16149   echo "$as_me:16149: \$? = $ac_status" >&5
16150   (exit $ac_status); }; }; then
16151   ac_cv_lib_x_opendir=yes
16152 else
16153   echo "$as_me: failed program was:" >&5
16154 cat conftest.$ac_ext >&5
16155 ac_cv_lib_x_opendir=no
16156 fi
16157 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16158 LIBS=$ac_check_lib_save_LIBS
16159 fi
16160 echo "$as_me:16160: result: $ac_cv_lib_x_opendir" >&5
16161 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
16162 if test $ac_cv_lib_x_opendir = yes; then
16163   LIBS="$LIBS -lx"
16164 fi
16165
16166 fi
16167
16168 echo "$as_me:16168: checking whether time.h and sys/time.h may both be included" >&5
16169 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
16170 if test "${ac_cv_header_time+set}" = set; then
16171   echo $ECHO_N "(cached) $ECHO_C" >&6
16172 else
16173   cat >conftest.$ac_ext <<_ACEOF
16174 #line 16174 "configure"
16175 #include "confdefs.h"
16176 #include <sys/types.h>
16177 #include <sys/time.h>
16178 #include <time.h>
16179
16180 int
16181 main (void)
16182 {
16183 if ((struct tm *) 0)
16184 return 0;
16185   ;
16186   return 0;
16187 }
16188 _ACEOF
16189 rm -f conftest.$ac_objext
16190 if { (eval echo "$as_me:16190: \"$ac_compile\"") >&5
16191   (eval $ac_compile) 2>&5
16192   ac_status=$?
16193   echo "$as_me:16193: \$? = $ac_status" >&5
16194   (exit $ac_status); } &&
16195          { ac_try='test -s conftest.$ac_objext'
16196   { (eval echo "$as_me:16196: \"$ac_try\"") >&5
16197   (eval $ac_try) 2>&5
16198   ac_status=$?
16199   echo "$as_me:16199: \$? = $ac_status" >&5
16200   (exit $ac_status); }; }; then
16201   ac_cv_header_time=yes
16202 else
16203   echo "$as_me: failed program was:" >&5
16204 cat conftest.$ac_ext >&5
16205 ac_cv_header_time=no
16206 fi
16207 rm -f conftest.$ac_objext conftest.$ac_ext
16208 fi
16209 echo "$as_me:16209: result: $ac_cv_header_time" >&5
16210 echo "${ECHO_T}$ac_cv_header_time" >&6
16211 if test $ac_cv_header_time = yes; then
16212
16213 cat >>confdefs.h <<\EOF
16214 #define TIME_WITH_SYS_TIME 1
16215 EOF
16216
16217 fi
16218
16219 cf_regex_func=no
16220
16221 cf_regex_libs="regex re"
16222 case $host_os in
16223 (mingw*)
16224         cf_regex_libs="gnurx $cf_regex_libs"
16225         ;;
16226 esac
16227
16228 echo "$as_me:16228: checking for regcomp" >&5
16229 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
16230 if test "${ac_cv_func_regcomp+set}" = set; then
16231   echo $ECHO_N "(cached) $ECHO_C" >&6
16232 else
16233   cat >conftest.$ac_ext <<_ACEOF
16234 #line 16234 "configure"
16235 #include "confdefs.h"
16236 /* System header to define __stub macros and hopefully few prototypes,
16237     which can conflict with char regcomp (); below.  */
16238 #include <assert.h>
16239 /* Override any gcc2 internal prototype to avoid an error.  */
16240 #ifdef __cplusplus
16241 extern "C"
16242 #endif
16243 /* We use char because int might match the return type of a gcc2
16244    builtin and then its argument prototype would still apply.  */
16245 char regcomp ();
16246 char (*f) ();
16247
16248 int
16249 main (void)
16250 {
16251 /* The GNU C library defines this for functions which it implements
16252     to always fail with ENOSYS.  Some functions are actually named
16253     something starting with __ and the normal name is an alias.  */
16254 #if defined (__stub_regcomp) || defined (__stub___regcomp)
16255 choke me
16256 #else
16257 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16258 #endif
16259
16260   ;
16261   return 0;
16262 }
16263 _ACEOF
16264 rm -f conftest.$ac_objext conftest$ac_exeext
16265 if { (eval echo "$as_me:16265: \"$ac_link\"") >&5
16266   (eval $ac_link) 2>&5
16267   ac_status=$?
16268   echo "$as_me:16268: \$? = $ac_status" >&5
16269   (exit $ac_status); } &&
16270          { ac_try='test -s conftest$ac_exeext'
16271   { (eval echo "$as_me:16271: \"$ac_try\"") >&5
16272   (eval $ac_try) 2>&5
16273   ac_status=$?
16274   echo "$as_me:16274: \$? = $ac_status" >&5
16275   (exit $ac_status); }; }; then
16276   ac_cv_func_regcomp=yes
16277 else
16278   echo "$as_me: failed program was:" >&5
16279 cat conftest.$ac_ext >&5
16280 ac_cv_func_regcomp=no
16281 fi
16282 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16283 fi
16284 echo "$as_me:16284: result: $ac_cv_func_regcomp" >&5
16285 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
16286 if test $ac_cv_func_regcomp = yes; then
16287   cf_regex_func=regcomp
16288 else
16289
16290         for cf_regex_lib in $cf_regex_libs
16291         do
16292                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
16293 echo "$as_me:16293: checking for regcomp in -l$cf_regex_lib" >&5
16294 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
16295 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16296   echo $ECHO_N "(cached) $ECHO_C" >&6
16297 else
16298   ac_check_lib_save_LIBS=$LIBS
16299 LIBS="-l$cf_regex_lib  $LIBS"
16300 cat >conftest.$ac_ext <<_ACEOF
16301 #line 16301 "configure"
16302 #include "confdefs.h"
16303
16304 /* Override any gcc2 internal prototype to avoid an error.  */
16305 #ifdef __cplusplus
16306 extern "C"
16307 #endif
16308 /* We use char because int might match the return type of a gcc2
16309    builtin and then its argument prototype would still apply.  */
16310 char regcomp ();
16311 int
16312 main (void)
16313 {
16314 regcomp ();
16315   ;
16316   return 0;
16317 }
16318 _ACEOF
16319 rm -f conftest.$ac_objext conftest$ac_exeext
16320 if { (eval echo "$as_me:16320: \"$ac_link\"") >&5
16321   (eval $ac_link) 2>&5
16322   ac_status=$?
16323   echo "$as_me:16323: \$? = $ac_status" >&5
16324   (exit $ac_status); } &&
16325          { ac_try='test -s conftest$ac_exeext'
16326   { (eval echo "$as_me:16326: \"$ac_try\"") >&5
16327   (eval $ac_try) 2>&5
16328   ac_status=$?
16329   echo "$as_me:16329: \$? = $ac_status" >&5
16330   (exit $ac_status); }; }; then
16331   eval "$as_ac_Lib=yes"
16332 else
16333   echo "$as_me: failed program was:" >&5
16334 cat conftest.$ac_ext >&5
16335 eval "$as_ac_Lib=no"
16336 fi
16337 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16338 LIBS=$ac_check_lib_save_LIBS
16339 fi
16340 echo "$as_me:16340: result: `eval echo '${'$as_ac_Lib'}'`" >&5
16341 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
16342 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
16343
16344 cf_add_libs="-l$cf_regex_lib"
16345 # Filter out duplicates - this happens with badly-designed ".pc" files...
16346 for cf_add_1lib in $LIBS
16347 do
16348         for cf_add_2lib in $cf_add_libs
16349         do
16350                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16351                 then
16352                         cf_add_1lib=
16353                         break
16354                 fi
16355         done
16356         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16357 done
16358 LIBS="$cf_add_libs"
16359
16360                                 cf_regex_func=regcomp
16361                                 break
16362 fi
16363
16364         done
16365
16366 fi
16367
16368 if test "$cf_regex_func" = no ; then
16369         echo "$as_me:16369: checking for compile" >&5
16370 echo $ECHO_N "checking for compile... $ECHO_C" >&6
16371 if test "${ac_cv_func_compile+set}" = set; then
16372   echo $ECHO_N "(cached) $ECHO_C" >&6
16373 else
16374   cat >conftest.$ac_ext <<_ACEOF
16375 #line 16375 "configure"
16376 #include "confdefs.h"
16377 /* System header to define __stub macros and hopefully few prototypes,
16378     which can conflict with char compile (); below.  */
16379 #include <assert.h>
16380 /* Override any gcc2 internal prototype to avoid an error.  */
16381 #ifdef __cplusplus
16382 extern "C"
16383 #endif
16384 /* We use char because int might match the return type of a gcc2
16385    builtin and then its argument prototype would still apply.  */
16386 char compile ();
16387 char (*f) ();
16388
16389 int
16390 main (void)
16391 {
16392 /* The GNU C library defines this for functions which it implements
16393     to always fail with ENOSYS.  Some functions are actually named
16394     something starting with __ and the normal name is an alias.  */
16395 #if defined (__stub_compile) || defined (__stub___compile)
16396 choke me
16397 #else
16398 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16399 #endif
16400
16401   ;
16402   return 0;
16403 }
16404 _ACEOF
16405 rm -f conftest.$ac_objext conftest$ac_exeext
16406 if { (eval echo "$as_me:16406: \"$ac_link\"") >&5
16407   (eval $ac_link) 2>&5
16408   ac_status=$?
16409   echo "$as_me:16409: \$? = $ac_status" >&5
16410   (exit $ac_status); } &&
16411          { ac_try='test -s conftest$ac_exeext'
16412   { (eval echo "$as_me:16412: \"$ac_try\"") >&5
16413   (eval $ac_try) 2>&5
16414   ac_status=$?
16415   echo "$as_me:16415: \$? = $ac_status" >&5
16416   (exit $ac_status); }; }; then
16417   ac_cv_func_compile=yes
16418 else
16419   echo "$as_me: failed program was:" >&5
16420 cat conftest.$ac_ext >&5
16421 ac_cv_func_compile=no
16422 fi
16423 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16424 fi
16425 echo "$as_me:16425: result: $ac_cv_func_compile" >&5
16426 echo "${ECHO_T}$ac_cv_func_compile" >&6
16427 if test $ac_cv_func_compile = yes; then
16428   cf_regex_func=compile
16429 else
16430
16431                 echo "$as_me:16431: checking for compile in -lgen" >&5
16432 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
16433 if test "${ac_cv_lib_gen_compile+set}" = set; then
16434   echo $ECHO_N "(cached) $ECHO_C" >&6
16435 else
16436   ac_check_lib_save_LIBS=$LIBS
16437 LIBS="-lgen  $LIBS"
16438 cat >conftest.$ac_ext <<_ACEOF
16439 #line 16439 "configure"
16440 #include "confdefs.h"
16441
16442 /* Override any gcc2 internal prototype to avoid an error.  */
16443 #ifdef __cplusplus
16444 extern "C"
16445 #endif
16446 /* We use char because int might match the return type of a gcc2
16447    builtin and then its argument prototype would still apply.  */
16448 char compile ();
16449 int
16450 main (void)
16451 {
16452 compile ();
16453   ;
16454   return 0;
16455 }
16456 _ACEOF
16457 rm -f conftest.$ac_objext conftest$ac_exeext
16458 if { (eval echo "$as_me:16458: \"$ac_link\"") >&5
16459   (eval $ac_link) 2>&5
16460   ac_status=$?
16461   echo "$as_me:16461: \$? = $ac_status" >&5
16462   (exit $ac_status); } &&
16463          { ac_try='test -s conftest$ac_exeext'
16464   { (eval echo "$as_me:16464: \"$ac_try\"") >&5
16465   (eval $ac_try) 2>&5
16466   ac_status=$?
16467   echo "$as_me:16467: \$? = $ac_status" >&5
16468   (exit $ac_status); }; }; then
16469   ac_cv_lib_gen_compile=yes
16470 else
16471   echo "$as_me: failed program was:" >&5
16472 cat conftest.$ac_ext >&5
16473 ac_cv_lib_gen_compile=no
16474 fi
16475 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16476 LIBS=$ac_check_lib_save_LIBS
16477 fi
16478 echo "$as_me:16478: result: $ac_cv_lib_gen_compile" >&5
16479 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
16480 if test $ac_cv_lib_gen_compile = yes; then
16481
16482 cf_add_libs="-lgen"
16483 # Filter out duplicates - this happens with badly-designed ".pc" files...
16484 for cf_add_1lib in $LIBS
16485 do
16486         for cf_add_2lib in $cf_add_libs
16487         do
16488                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16489                 then
16490                         cf_add_1lib=
16491                         break
16492                 fi
16493         done
16494         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16495 done
16496 LIBS="$cf_add_libs"
16497
16498                                 cf_regex_func=compile
16499 fi
16500
16501 fi
16502
16503 fi
16504
16505 if test "$cf_regex_func" = no ; then
16506         { echo "$as_me:16506: WARNING: cannot find regular expression library" >&5
16507 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
16508 fi
16509
16510 echo "$as_me:16510: checking for regular-expression headers" >&5
16511 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
16512 if test "${cf_cv_regex_hdrs+set}" = set; then
16513   echo $ECHO_N "(cached) $ECHO_C" >&6
16514 else
16515
16516 cf_cv_regex_hdrs=no
16517 case $cf_regex_func in
16518 (compile)
16519         for cf_regex_hdr in regexp.h regexpr.h
16520         do
16521                 cat >conftest.$ac_ext <<_ACEOF
16522 #line 16522 "configure"
16523 #include "confdefs.h"
16524 #include <$cf_regex_hdr>
16525 int
16526 main (void)
16527 {
16528
16529                         char *p = compile("", "", "", 0);
16530                         int x = step("", "");
16531
16532   ;
16533   return 0;
16534 }
16535 _ACEOF
16536 rm -f conftest.$ac_objext conftest$ac_exeext
16537 if { (eval echo "$as_me:16537: \"$ac_link\"") >&5
16538   (eval $ac_link) 2>&5
16539   ac_status=$?
16540   echo "$as_me:16540: \$? = $ac_status" >&5
16541   (exit $ac_status); } &&
16542          { ac_try='test -s conftest$ac_exeext'
16543   { (eval echo "$as_me:16543: \"$ac_try\"") >&5
16544   (eval $ac_try) 2>&5
16545   ac_status=$?
16546   echo "$as_me:16546: \$? = $ac_status" >&5
16547   (exit $ac_status); }; }; then
16548
16549                         cf_cv_regex_hdrs=$cf_regex_hdr
16550                         break
16551
16552 else
16553   echo "$as_me: failed program was:" >&5
16554 cat conftest.$ac_ext >&5
16555 fi
16556 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16557         done
16558         ;;
16559 (*)
16560         for cf_regex_hdr in regex.h
16561         do
16562                 cat >conftest.$ac_ext <<_ACEOF
16563 #line 16563 "configure"
16564 #include "confdefs.h"
16565 #include <sys/types.h>
16566 #include <$cf_regex_hdr>
16567 int
16568 main (void)
16569 {
16570
16571                         regex_t *p;
16572                         int x = regcomp(p, "", 0);
16573                         int y = regexec(p, "", 0, 0, 0);
16574                         regfree(p);
16575
16576   ;
16577   return 0;
16578 }
16579 _ACEOF
16580 rm -f conftest.$ac_objext conftest$ac_exeext
16581 if { (eval echo "$as_me:16581: \"$ac_link\"") >&5
16582   (eval $ac_link) 2>&5
16583   ac_status=$?
16584   echo "$as_me:16584: \$? = $ac_status" >&5
16585   (exit $ac_status); } &&
16586          { ac_try='test -s conftest$ac_exeext'
16587   { (eval echo "$as_me:16587: \"$ac_try\"") >&5
16588   (eval $ac_try) 2>&5
16589   ac_status=$?
16590   echo "$as_me:16590: \$? = $ac_status" >&5
16591   (exit $ac_status); }; }; then
16592
16593                         cf_cv_regex_hdrs=$cf_regex_hdr
16594                         break
16595
16596 else
16597   echo "$as_me: failed program was:" >&5
16598 cat conftest.$ac_ext >&5
16599 fi
16600 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16601         done
16602         ;;
16603 esac
16604
16605 fi
16606 echo "$as_me:16606: result: $cf_cv_regex_hdrs" >&5
16607 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
16608
16609 case $cf_cv_regex_hdrs in
16610         (no)            { echo "$as_me:16610: WARNING: no regular expression header found" >&5
16611 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
16612         (regex.h)
16613 cat >>confdefs.h <<\EOF
16614 #define HAVE_REGEX_H_FUNCS 1
16615 EOF
16616  ;;
16617         (regexp.h)
16618 cat >>confdefs.h <<\EOF
16619 #define HAVE_REGEXP_H_FUNCS 1
16620 EOF
16621  ;;
16622         (regexpr.h)
16623 cat >>confdefs.h <<\EOF
16624 #define HAVE_REGEXPR_H_FUNCS 1
16625 EOF
16626  ;;
16627 esac
16628
16629 for ac_header in \
16630 fcntl.h \
16631 getopt.h \
16632 limits.h \
16633 locale.h \
16634 math.h \
16635 poll.h \
16636 sys/bsdtypes.h \
16637 sys/ioctl.h \
16638 sys/param.h \
16639 sys/poll.h \
16640 sys/select.h \
16641 sys/time.h \
16642 sys/times.h \
16643 ttyent.h \
16644 unistd.h \
16645 wctype.h \
16646
16647 do
16648 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16649 echo "$as_me:16649: checking for $ac_header" >&5
16650 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16651 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16652   echo $ECHO_N "(cached) $ECHO_C" >&6
16653 else
16654   cat >conftest.$ac_ext <<_ACEOF
16655 #line 16655 "configure"
16656 #include "confdefs.h"
16657 #include <$ac_header>
16658 _ACEOF
16659 if { (eval echo "$as_me:16659: \"$ac_cpp conftest.$ac_ext\"") >&5
16660   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16661   ac_status=$?
16662   egrep -v '^ *\+' conftest.er1 >conftest.err
16663   rm -f conftest.er1
16664   cat conftest.err >&5
16665   echo "$as_me:16665: \$? = $ac_status" >&5
16666   (exit $ac_status); } >/dev/null; then
16667   if test -s conftest.err; then
16668     ac_cpp_err=$ac_c_preproc_warn_flag
16669   else
16670     ac_cpp_err=
16671   fi
16672 else
16673   ac_cpp_err=yes
16674 fi
16675 if test -z "$ac_cpp_err"; then
16676   eval "$as_ac_Header=yes"
16677 else
16678   echo "$as_me: failed program was:" >&5
16679   cat conftest.$ac_ext >&5
16680   eval "$as_ac_Header=no"
16681 fi
16682 rm -f conftest.err conftest.$ac_ext
16683 fi
16684 echo "$as_me:16684: result: `eval echo '${'$as_ac_Header'}'`" >&5
16685 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16686 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16687   cat >>confdefs.h <<EOF
16688 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16689 EOF
16690
16691 fi
16692 done
16693
16694 for ac_header in unistd.h getopt.h
16695 do
16696 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16697 echo "$as_me:16697: checking for $ac_header" >&5
16698 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16699 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16700   echo $ECHO_N "(cached) $ECHO_C" >&6
16701 else
16702   cat >conftest.$ac_ext <<_ACEOF
16703 #line 16703 "configure"
16704 #include "confdefs.h"
16705 #include <$ac_header>
16706 _ACEOF
16707 if { (eval echo "$as_me:16707: \"$ac_cpp conftest.$ac_ext\"") >&5
16708   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16709   ac_status=$?
16710   egrep -v '^ *\+' conftest.er1 >conftest.err
16711   rm -f conftest.er1
16712   cat conftest.err >&5
16713   echo "$as_me:16713: \$? = $ac_status" >&5
16714   (exit $ac_status); } >/dev/null; then
16715   if test -s conftest.err; then
16716     ac_cpp_err=$ac_c_preproc_warn_flag
16717   else
16718     ac_cpp_err=
16719   fi
16720 else
16721   ac_cpp_err=yes
16722 fi
16723 if test -z "$ac_cpp_err"; then
16724   eval "$as_ac_Header=yes"
16725 else
16726   echo "$as_me: failed program was:" >&5
16727   cat conftest.$ac_ext >&5
16728   eval "$as_ac_Header=no"
16729 fi
16730 rm -f conftest.err conftest.$ac_ext
16731 fi
16732 echo "$as_me:16732: result: `eval echo '${'$as_ac_Header'}'`" >&5
16733 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16734 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16735   cat >>confdefs.h <<EOF
16736 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16737 EOF
16738
16739 fi
16740 done
16741
16742 echo "$as_me:16742: checking for header declaring getopt variables" >&5
16743 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
16744 if test "${cf_cv_getopt_header+set}" = set; then
16745   echo $ECHO_N "(cached) $ECHO_C" >&6
16746 else
16747
16748 cf_cv_getopt_header=none
16749 for cf_header in stdio.h stdlib.h unistd.h getopt.h
16750 do
16751 cat >conftest.$ac_ext <<_ACEOF
16752 #line 16752 "configure"
16753 #include "confdefs.h"
16754
16755 #include <$cf_header>
16756 int
16757 main (void)
16758 {
16759 int x = optind; char *y = optarg
16760   ;
16761   return 0;
16762 }
16763 _ACEOF
16764 rm -f conftest.$ac_objext
16765 if { (eval echo "$as_me:16765: \"$ac_compile\"") >&5
16766   (eval $ac_compile) 2>&5
16767   ac_status=$?
16768   echo "$as_me:16768: \$? = $ac_status" >&5
16769   (exit $ac_status); } &&
16770          { ac_try='test -s conftest.$ac_objext'
16771   { (eval echo "$as_me:16771: \"$ac_try\"") >&5
16772   (eval $ac_try) 2>&5
16773   ac_status=$?
16774   echo "$as_me:16774: \$? = $ac_status" >&5
16775   (exit $ac_status); }; }; then
16776   cf_cv_getopt_header=$cf_header
16777  break
16778 else
16779   echo "$as_me: failed program was:" >&5
16780 cat conftest.$ac_ext >&5
16781 fi
16782 rm -f conftest.$ac_objext conftest.$ac_ext
16783 done
16784
16785 fi
16786 echo "$as_me:16786: result: $cf_cv_getopt_header" >&5
16787 echo "${ECHO_T}$cf_cv_getopt_header" >&6
16788 if test $cf_cv_getopt_header != none ; then
16789
16790 cat >>confdefs.h <<\EOF
16791 #define HAVE_GETOPT_HEADER 1
16792 EOF
16793
16794 fi
16795 if test $cf_cv_getopt_header = getopt.h ; then
16796
16797 cat >>confdefs.h <<\EOF
16798 #define NEED_GETOPT_H 1
16799 EOF
16800
16801 fi
16802
16803 # check for ISC (this may also define _POSIX_SOURCE)
16804 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
16805 if test "x$ISC" = xyes ; then
16806
16807 echo "$as_me:16807: checking for main in -lcposix" >&5
16808 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
16809 if test "${ac_cv_lib_cposix_main+set}" = set; then
16810   echo $ECHO_N "(cached) $ECHO_C" >&6
16811 else
16812   ac_check_lib_save_LIBS=$LIBS
16813 LIBS="-lcposix  $LIBS"
16814 cat >conftest.$ac_ext <<_ACEOF
16815 #line 16815 "configure"
16816 #include "confdefs.h"
16817
16818 int
16819 main (void)
16820 {
16821 main ();
16822   ;
16823   return 0;
16824 }
16825 _ACEOF
16826 rm -f conftest.$ac_objext conftest$ac_exeext
16827 if { (eval echo "$as_me:16827: \"$ac_link\"") >&5
16828   (eval $ac_link) 2>&5
16829   ac_status=$?
16830   echo "$as_me:16830: \$? = $ac_status" >&5
16831   (exit $ac_status); } &&
16832          { ac_try='test -s conftest$ac_exeext'
16833   { (eval echo "$as_me:16833: \"$ac_try\"") >&5
16834   (eval $ac_try) 2>&5
16835   ac_status=$?
16836   echo "$as_me:16836: \$? = $ac_status" >&5
16837   (exit $ac_status); }; }; then
16838   ac_cv_lib_cposix_main=yes
16839 else
16840   echo "$as_me: failed program was:" >&5
16841 cat conftest.$ac_ext >&5
16842 ac_cv_lib_cposix_main=no
16843 fi
16844 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16845 LIBS=$ac_check_lib_save_LIBS
16846 fi
16847 echo "$as_me:16847: result: $ac_cv_lib_cposix_main" >&5
16848 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
16849 if test $ac_cv_lib_cposix_main = yes; then
16850   cat >>confdefs.h <<EOF
16851 #define HAVE_LIBCPOSIX 1
16852 EOF
16853
16854   LIBS="-lcposix $LIBS"
16855
16856 fi
16857
16858         echo "$as_me:16858: checking for bzero in -linet" >&5
16859 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
16860 if test "${ac_cv_lib_inet_bzero+set}" = set; then
16861   echo $ECHO_N "(cached) $ECHO_C" >&6
16862 else
16863   ac_check_lib_save_LIBS=$LIBS
16864 LIBS="-linet  $LIBS"
16865 cat >conftest.$ac_ext <<_ACEOF
16866 #line 16866 "configure"
16867 #include "confdefs.h"
16868
16869 /* Override any gcc2 internal prototype to avoid an error.  */
16870 #ifdef __cplusplus
16871 extern "C"
16872 #endif
16873 /* We use char because int might match the return type of a gcc2
16874    builtin and then its argument prototype would still apply.  */
16875 char bzero ();
16876 int
16877 main (void)
16878 {
16879 bzero ();
16880   ;
16881   return 0;
16882 }
16883 _ACEOF
16884 rm -f conftest.$ac_objext conftest$ac_exeext
16885 if { (eval echo "$as_me:16885: \"$ac_link\"") >&5
16886   (eval $ac_link) 2>&5
16887   ac_status=$?
16888   echo "$as_me:16888: \$? = $ac_status" >&5
16889   (exit $ac_status); } &&
16890          { ac_try='test -s conftest$ac_exeext'
16891   { (eval echo "$as_me:16891: \"$ac_try\"") >&5
16892   (eval $ac_try) 2>&5
16893   ac_status=$?
16894   echo "$as_me:16894: \$? = $ac_status" >&5
16895   (exit $ac_status); }; }; then
16896   ac_cv_lib_inet_bzero=yes
16897 else
16898   echo "$as_me: failed program was:" >&5
16899 cat conftest.$ac_ext >&5
16900 ac_cv_lib_inet_bzero=no
16901 fi
16902 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16903 LIBS=$ac_check_lib_save_LIBS
16904 fi
16905 echo "$as_me:16905: result: $ac_cv_lib_inet_bzero" >&5
16906 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
16907 if test $ac_cv_lib_inet_bzero = yes; then
16908
16909 cf_add_libs="-linet"
16910 # Filter out duplicates - this happens with badly-designed ".pc" files...
16911 for cf_add_1lib in $LIBS
16912 do
16913         for cf_add_2lib in $cf_add_libs
16914         do
16915                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16916                 then
16917                         cf_add_1lib=
16918                         break
16919                 fi
16920         done
16921         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16922 done
16923 LIBS="$cf_add_libs"
16924
16925 fi
16926 fi
16927
16928 echo "$as_me:16928: checking if sys/time.h works with sys/select.h" >&5
16929 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
16930 if test "${cf_cv_sys_time_select+set}" = set; then
16931   echo $ECHO_N "(cached) $ECHO_C" >&6
16932 else
16933
16934 cat >conftest.$ac_ext <<_ACEOF
16935 #line 16935 "configure"
16936 #include "confdefs.h"
16937
16938 #include <sys/types.h>
16939 #ifdef HAVE_SYS_TIME_H
16940 #include <sys/time.h>
16941 #endif
16942 #ifdef HAVE_SYS_SELECT_H
16943 #include <sys/select.h>
16944 #endif
16945
16946 int
16947 main (void)
16948 {
16949
16950   ;
16951   return 0;
16952 }
16953 _ACEOF
16954 rm -f conftest.$ac_objext
16955 if { (eval echo "$as_me:16955: \"$ac_compile\"") >&5
16956   (eval $ac_compile) 2>&5
16957   ac_status=$?
16958   echo "$as_me:16958: \$? = $ac_status" >&5
16959   (exit $ac_status); } &&
16960          { ac_try='test -s conftest.$ac_objext'
16961   { (eval echo "$as_me:16961: \"$ac_try\"") >&5
16962   (eval $ac_try) 2>&5
16963   ac_status=$?
16964   echo "$as_me:16964: \$? = $ac_status" >&5
16965   (exit $ac_status); }; }; then
16966   cf_cv_sys_time_select=yes
16967 else
16968   echo "$as_me: failed program was:" >&5
16969 cat conftest.$ac_ext >&5
16970 cf_cv_sys_time_select=no
16971 fi
16972 rm -f conftest.$ac_objext conftest.$ac_ext
16973
16974 fi
16975
16976 echo "$as_me:16976: result: $cf_cv_sys_time_select" >&5
16977 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
16978 test "$cf_cv_sys_time_select" = yes &&
16979 cat >>confdefs.h <<\EOF
16980 #define HAVE_SYS_TIME_SELECT 1
16981 EOF
16982
16983 ###     checks for compiler characteristics
16984 ac_ext=c
16985 ac_cpp='$CPP $CPPFLAGS'
16986 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16987 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16988 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16989 ac_main_return=return
16990
16991 echo "$as_me:16991: checking for an ANSI C-conforming const" >&5
16992 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16993 if test "${ac_cv_c_const+set}" = set; then
16994   echo $ECHO_N "(cached) $ECHO_C" >&6
16995 else
16996   cat >conftest.$ac_ext <<_ACEOF
16997 #line 16997 "configure"
16998 #include "confdefs.h"
16999
17000 int
17001 main (void)
17002 {
17003 /* FIXME: Include the comments suggested by Paul. */
17004 #ifndef __cplusplus
17005   /* Ultrix mips cc rejects this.  */
17006   typedef int charset[2];
17007   const charset x;
17008   /* SunOS 4.1.1 cc rejects this.  */
17009   char const *const *ccp;
17010   char **p;
17011   /* NEC SVR4.0.2 mips cc rejects this.  */
17012   struct point {int x, y;};
17013   static struct point const zero = {0,0};
17014   /* AIX XL C 1.02.0.0 rejects this.
17015      It does not let you subtract one const X* pointer from another in
17016      an arm of an if-expression whose if-part is not a constant
17017      expression */
17018   const char *g = "string";
17019   ccp = &g + (g ? g-g : 0);
17020   /* HPUX 7.0 cc rejects these. */
17021   ++ccp;
17022   p = (char**) ccp;
17023   ccp = (char const *const *) p;
17024   { /* SCO 3.2v4 cc rejects this.  */
17025     char *t;
17026     char const *s = 0 ? (char *) 0 : (char const *) 0;
17027
17028     *t++ = 0;
17029   }
17030   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
17031     int x[] = {25, 17};
17032     const int *foo = &x[0];
17033     ++foo;
17034   }
17035   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17036     typedef const int *iptr;
17037     iptr p = 0;
17038     ++p;
17039   }
17040   { /* AIX XL C 1.02.0.0 rejects this saying
17041        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17042     struct s { int j; const int *ap[3]; };
17043     struct s *b; b->j = 5;
17044   }
17045   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17046     const int foo = 10;
17047   }
17048 #endif
17049
17050   ;
17051   return 0;
17052 }
17053 _ACEOF
17054 rm -f conftest.$ac_objext
17055 if { (eval echo "$as_me:17055: \"$ac_compile\"") >&5
17056   (eval $ac_compile) 2>&5
17057   ac_status=$?
17058   echo "$as_me:17058: \$? = $ac_status" >&5
17059   (exit $ac_status); } &&
17060          { ac_try='test -s conftest.$ac_objext'
17061   { (eval echo "$as_me:17061: \"$ac_try\"") >&5
17062   (eval $ac_try) 2>&5
17063   ac_status=$?
17064   echo "$as_me:17064: \$? = $ac_status" >&5
17065   (exit $ac_status); }; }; then
17066   ac_cv_c_const=yes
17067 else
17068   echo "$as_me: failed program was:" >&5
17069 cat conftest.$ac_ext >&5
17070 ac_cv_c_const=no
17071 fi
17072 rm -f conftest.$ac_objext conftest.$ac_ext
17073 fi
17074 echo "$as_me:17074: result: $ac_cv_c_const" >&5
17075 echo "${ECHO_T}$ac_cv_c_const" >&6
17076 if test $ac_cv_c_const = no; then
17077
17078 cat >>confdefs.h <<\EOF
17079 #define const
17080 EOF
17081
17082 fi
17083
17084 echo "$as_me:17084: checking for inline" >&5
17085 echo $ECHO_N "checking for inline... $ECHO_C" >&6
17086 if test "${ac_cv_c_inline+set}" = set; then
17087   echo $ECHO_N "(cached) $ECHO_C" >&6
17088 else
17089   ac_cv_c_inline=no
17090 for ac_kw in inline __inline__ __inline; do
17091   cat >conftest.$ac_ext <<_ACEOF
17092 #line 17092 "configure"
17093 #include "confdefs.h"
17094 #ifndef __cplusplus
17095 static $ac_kw int static_foo () {return 0; }
17096 $ac_kw int foo () {return 0; }
17097 #endif
17098
17099 _ACEOF
17100 rm -f conftest.$ac_objext
17101 if { (eval echo "$as_me:17101: \"$ac_compile\"") >&5
17102   (eval $ac_compile) 2>&5
17103   ac_status=$?
17104   echo "$as_me:17104: \$? = $ac_status" >&5
17105   (exit $ac_status); } &&
17106          { ac_try='test -s conftest.$ac_objext'
17107   { (eval echo "$as_me:17107: \"$ac_try\"") >&5
17108   (eval $ac_try) 2>&5
17109   ac_status=$?
17110   echo "$as_me:17110: \$? = $ac_status" >&5
17111   (exit $ac_status); }; }; then
17112   ac_cv_c_inline=$ac_kw; break
17113 else
17114   echo "$as_me: failed program was:" >&5
17115 cat conftest.$ac_ext >&5
17116 fi
17117 rm -f conftest.$ac_objext conftest.$ac_ext
17118 done
17119
17120 fi
17121 echo "$as_me:17121: result: $ac_cv_c_inline" >&5
17122 echo "${ECHO_T}$ac_cv_c_inline" >&6
17123 case $ac_cv_c_inline in
17124   inline | yes) ;;
17125   no)
17126 cat >>confdefs.h <<\EOF
17127 #define inline
17128 EOF
17129  ;;
17130   *)  cat >>confdefs.h <<EOF
17131 #define inline $ac_cv_c_inline
17132 EOF
17133  ;;
17134 esac
17135
17136 NCURSES_INLINE=
17137 if test "$ac_cv_c_inline" != no ; then
17138         NCURSES_INLINE=inline
17139         if test "$INTEL_COMPILER" = yes
17140         then
17141                 :
17142         elif test "$CLANG_COMPILER" = yes
17143         then
17144                 :
17145         elif test "$GCC" = yes
17146         then
17147                 echo "$as_me:17147: checking if $CC supports options to tune inlining" >&5
17148 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
17149 if test "${cf_cv_gcc_inline+set}" = set; then
17150   echo $ECHO_N "(cached) $ECHO_C" >&6
17151 else
17152
17153                 cf_save_CFLAGS=$CFLAGS
17154                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
17155                 cat >conftest.$ac_ext <<_ACEOF
17156 #line 17156 "configure"
17157 #include "confdefs.h"
17158 inline int foo(void) { return 1; }
17159 int
17160 main (void)
17161 {
17162 ${cf_cv_main_return:-return} foo()
17163   ;
17164   return 0;
17165 }
17166 _ACEOF
17167 rm -f conftest.$ac_objext
17168 if { (eval echo "$as_me:17168: \"$ac_compile\"") >&5
17169   (eval $ac_compile) 2>&5
17170   ac_status=$?
17171   echo "$as_me:17171: \$? = $ac_status" >&5
17172   (exit $ac_status); } &&
17173          { ac_try='test -s conftest.$ac_objext'
17174   { (eval echo "$as_me:17174: \"$ac_try\"") >&5
17175   (eval $ac_try) 2>&5
17176   ac_status=$?
17177   echo "$as_me:17177: \$? = $ac_status" >&5
17178   (exit $ac_status); }; }; then
17179   cf_cv_gcc_inline=yes
17180 else
17181   echo "$as_me: failed program was:" >&5
17182 cat conftest.$ac_ext >&5
17183 cf_cv_gcc_inline=no
17184 fi
17185 rm -f conftest.$ac_objext conftest.$ac_ext
17186                 CFLAGS=$cf_save_CFLAGS
17187
17188 fi
17189 echo "$as_me:17189: result: $cf_cv_gcc_inline" >&5
17190 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
17191                 if test "$cf_cv_gcc_inline" = yes ; then
17192
17193 cf_fix_cppflags=no
17194 cf_new_cflags=
17195 cf_new_cppflags=
17196 cf_new_extra_cppflags=
17197
17198 for cf_add_cflags in --param max-inline-insns-single=1200
17199 do
17200 case $cf_fix_cppflags in
17201 (no)
17202         case $cf_add_cflags in
17203         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17204                 case $cf_add_cflags in
17205                 (-D*)
17206                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17207
17208                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17209                                 && test -z "${cf_tst_cflags}" \
17210                                 && cf_fix_cppflags=yes
17211
17212                         if test $cf_fix_cppflags = yes ; then
17213
17214         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17215         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17216
17217                                 continue
17218                         elif test "${cf_tst_cflags}" = "\"'" ; then
17219
17220         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17221         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17222
17223                                 continue
17224                         fi
17225                         ;;
17226                 esac
17227                 case "$CPPFLAGS" in
17228                 (*$cf_add_cflags)
17229                         ;;
17230                 (*)
17231                         case $cf_add_cflags in
17232                         (-D*)
17233                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17234
17235 CPPFLAGS=`echo "$CPPFLAGS" | \
17236         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17237                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17238
17239                                 ;;
17240                         esac
17241
17242         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17243         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17244
17245                         ;;
17246                 esac
17247                 ;;
17248         (*)
17249
17250         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17251         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17252
17253                 ;;
17254         esac
17255         ;;
17256 (yes)
17257
17258         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17259         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17260
17261         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17262
17263         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17264                 && test -z "${cf_tst_cflags}" \
17265                 && cf_fix_cppflags=no
17266         ;;
17267 esac
17268 done
17269
17270 if test -n "$cf_new_cflags" ; then
17271
17272         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17273         CFLAGS="${CFLAGS}$cf_new_cflags"
17274
17275 fi
17276
17277 if test -n "$cf_new_cppflags" ; then
17278
17279         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17280         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17281
17282 fi
17283
17284 if test -n "$cf_new_extra_cppflags" ; then
17285
17286         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17287         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17288
17289 fi
17290
17291                 fi
17292         fi
17293 fi
17294
17295 echo "$as_me:17295: checking for signal global datatype" >&5
17296 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
17297 if test "${cf_cv_sig_atomic_t+set}" = set; then
17298   echo $ECHO_N "(cached) $ECHO_C" >&6
17299 else
17300
17301         for cf_type in \
17302                 "volatile sig_atomic_t" \
17303                 "sig_atomic_t" \
17304                 "int"
17305         do
17306         cat >conftest.$ac_ext <<_ACEOF
17307 #line 17307 "configure"
17308 #include "confdefs.h"
17309
17310 #include <sys/types.h>
17311 #include <signal.h>
17312 #include <stdio.h>
17313
17314 extern $cf_type x;
17315 $cf_type x;
17316 static void handler(int sig)
17317 {
17318         x = 5;
17319 }
17320 int
17321 main (void)
17322 {
17323 signal(SIGINT, handler);
17324                  x = 1
17325   ;
17326   return 0;
17327 }
17328 _ACEOF
17329 rm -f conftest.$ac_objext
17330 if { (eval echo "$as_me:17330: \"$ac_compile\"") >&5
17331   (eval $ac_compile) 2>&5
17332   ac_status=$?
17333   echo "$as_me:17333: \$? = $ac_status" >&5
17334   (exit $ac_status); } &&
17335          { ac_try='test -s conftest.$ac_objext'
17336   { (eval echo "$as_me:17336: \"$ac_try\"") >&5
17337   (eval $ac_try) 2>&5
17338   ac_status=$?
17339   echo "$as_me:17339: \$? = $ac_status" >&5
17340   (exit $ac_status); }; }; then
17341   cf_cv_sig_atomic_t=$cf_type
17342 else
17343   echo "$as_me: failed program was:" >&5
17344 cat conftest.$ac_ext >&5
17345 cf_cv_sig_atomic_t=no
17346 fi
17347 rm -f conftest.$ac_objext conftest.$ac_ext
17348                 test "$cf_cv_sig_atomic_t" != no && break
17349         done
17350
17351 fi
17352
17353 echo "$as_me:17353: result: $cf_cv_sig_atomic_t" >&5
17354 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
17355 test "$cf_cv_sig_atomic_t" != no &&
17356 cat >>confdefs.h <<EOF
17357 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
17358 EOF
17359
17360 if test $NCURSES_CHTYPE = auto ; then
17361
17362 echo "$as_me:17362: checking for type of chtype" >&5
17363 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
17364 if test "${cf_cv_typeof_chtype+set}" = set; then
17365   echo $ECHO_N "(cached) $ECHO_C" >&6
17366 else
17367
17368                 if test "$cross_compiling" = yes; then
17369   cf_cv_typeof_chtype=long
17370 else
17371   cat >conftest.$ac_ext <<_ACEOF
17372 #line 17372 "configure"
17373 #include "confdefs.h"
17374
17375 #define WANT_BITS 31
17376 #include <stdio.h>
17377 int main(void)
17378 {
17379         FILE *fp = fopen("cf_test.out", "w");
17380         if (fp != 0) {
17381                 char *result = "long";
17382                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
17383                         int n;
17384                         unsigned int x, y;
17385                         for (n = 0; n < WANT_BITS; n++) {
17386                                 x = (1 << n);
17387                                 y = (x >> n);
17388                                 if (y != 1 || x == 0) {
17389                                         x = 0;
17390                                         break;
17391                                 }
17392                         }
17393                         /*
17394                          * If x is nonzero, an int is big enough for the bits
17395                          * that we want.
17396                          */
17397                         result = (x != 0) ? "int" : "long";
17398                 }
17399                 fputs(result, fp);
17400                 fclose(fp);
17401         }
17402         ${cf_cv_main_return:-return}(0);
17403 }
17404
17405 _ACEOF
17406 rm -f conftest$ac_exeext
17407 if { (eval echo "$as_me:17407: \"$ac_link\"") >&5
17408   (eval $ac_link) 2>&5
17409   ac_status=$?
17410   echo "$as_me:17410: \$? = $ac_status" >&5
17411   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17412   { (eval echo "$as_me:17412: \"$ac_try\"") >&5
17413   (eval $ac_try) 2>&5
17414   ac_status=$?
17415   echo "$as_me:17415: \$? = $ac_status" >&5
17416   (exit $ac_status); }; }; then
17417   cf_cv_typeof_chtype=`cat cf_test.out`
17418 else
17419   echo "$as_me: program exited with status $ac_status" >&5
17420 echo "$as_me: failed program was:" >&5
17421 cat conftest.$ac_ext >&5
17422 cf_cv_typeof_chtype=long
17423 fi
17424 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17425 fi
17426                 rm -f cf_test.out
17427
17428 fi
17429
17430 echo "$as_me:17430: result: $cf_cv_typeof_chtype" >&5
17431 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
17432
17433 cat >>confdefs.h <<EOF
17434 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
17435 EOF
17436
17437 else
17438         cf_cv_typeof_chtype=$NCURSES_CHTYPE
17439 fi
17440 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
17441
17442 echo "$as_me:17442: checking if unsigned literals are legal" >&5
17443 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
17444 if test "${cf_cv_unsigned_literals+set}" = set; then
17445   echo $ECHO_N "(cached) $ECHO_C" >&6
17446 else
17447
17448         cat >conftest.$ac_ext <<_ACEOF
17449 #line 17449 "configure"
17450 #include "confdefs.h"
17451
17452 int
17453 main (void)
17454 {
17455 long x = 1L + 1UL + 1U + 1
17456   ;
17457   return 0;
17458 }
17459 _ACEOF
17460 rm -f conftest.$ac_objext
17461 if { (eval echo "$as_me:17461: \"$ac_compile\"") >&5
17462   (eval $ac_compile) 2>&5
17463   ac_status=$?
17464   echo "$as_me:17464: \$? = $ac_status" >&5
17465   (exit $ac_status); } &&
17466          { ac_try='test -s conftest.$ac_objext'
17467   { (eval echo "$as_me:17467: \"$ac_try\"") >&5
17468   (eval $ac_try) 2>&5
17469   ac_status=$?
17470   echo "$as_me:17470: \$? = $ac_status" >&5
17471   (exit $ac_status); }; }; then
17472   cf_cv_unsigned_literals=yes
17473 else
17474   echo "$as_me: failed program was:" >&5
17475 cat conftest.$ac_ext >&5
17476 cf_cv_unsigned_literals=no
17477 fi
17478 rm -f conftest.$ac_objext conftest.$ac_ext
17479
17480 fi
17481
17482 echo "$as_me:17482: result: $cf_cv_unsigned_literals" >&5
17483 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
17484
17485 cf_cv_1UL="1"
17486 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
17487 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
17488
17489 if test $NCURSES_MMASK_T = auto ; then
17490         cf_cv_typeof_mmask_t=long
17491 else
17492         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
17493 fi
17494 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
17495
17496 ###     Checks for external-data
17497
17498 echo "$as_me:17498: checking if external errno is declared" >&5
17499 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
17500 if test "${cf_cv_dcl_errno+set}" = set; then
17501   echo $ECHO_N "(cached) $ECHO_C" >&6
17502 else
17503
17504         cat >conftest.$ac_ext <<_ACEOF
17505 #line 17505 "configure"
17506 #include "confdefs.h"
17507
17508 #ifdef HAVE_STDLIB_H
17509 #include <stdlib.h>
17510 #endif
17511 #include <stdio.h>
17512 #include <sys/types.h>
17513 #include <errno.h>
17514 int
17515 main (void)
17516 {
17517 int x = (int) errno
17518   ;
17519   return 0;
17520 }
17521 _ACEOF
17522 rm -f conftest.$ac_objext
17523 if { (eval echo "$as_me:17523: \"$ac_compile\"") >&5
17524   (eval $ac_compile) 2>&5
17525   ac_status=$?
17526   echo "$as_me:17526: \$? = $ac_status" >&5
17527   (exit $ac_status); } &&
17528          { ac_try='test -s conftest.$ac_objext'
17529   { (eval echo "$as_me:17529: \"$ac_try\"") >&5
17530   (eval $ac_try) 2>&5
17531   ac_status=$?
17532   echo "$as_me:17532: \$? = $ac_status" >&5
17533   (exit $ac_status); }; }; then
17534   cf_cv_dcl_errno=yes
17535 else
17536   echo "$as_me: failed program was:" >&5
17537 cat conftest.$ac_ext >&5
17538 cf_cv_dcl_errno=no
17539 fi
17540 rm -f conftest.$ac_objext conftest.$ac_ext
17541
17542 fi
17543 echo "$as_me:17543: result: $cf_cv_dcl_errno" >&5
17544 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
17545
17546 if test "$cf_cv_dcl_errno" = no ; then
17547
17548 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17549
17550         cat >>confdefs.h <<EOF
17551 #define $cf_result 1
17552 EOF
17553
17554 fi
17555
17556 # It's possible (for near-UNIX clones) that the data doesn't exist
17557
17558 echo "$as_me:17558: checking if external errno exists" >&5
17559 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
17560 if test "${cf_cv_have_errno+set}" = set; then
17561   echo $ECHO_N "(cached) $ECHO_C" >&6
17562 else
17563
17564         cat >conftest.$ac_ext <<_ACEOF
17565 #line 17565 "configure"
17566 #include "confdefs.h"
17567
17568 #undef errno
17569 extern int errno;
17570
17571 int
17572 main (void)
17573 {
17574 errno = 2
17575   ;
17576   return 0;
17577 }
17578 _ACEOF
17579 rm -f conftest.$ac_objext conftest$ac_exeext
17580 if { (eval echo "$as_me:17580: \"$ac_link\"") >&5
17581   (eval $ac_link) 2>&5
17582   ac_status=$?
17583   echo "$as_me:17583: \$? = $ac_status" >&5
17584   (exit $ac_status); } &&
17585          { ac_try='test -s conftest$ac_exeext'
17586   { (eval echo "$as_me:17586: \"$ac_try\"") >&5
17587   (eval $ac_try) 2>&5
17588   ac_status=$?
17589   echo "$as_me:17589: \$? = $ac_status" >&5
17590   (exit $ac_status); }; }; then
17591   cf_cv_have_errno=yes
17592 else
17593   echo "$as_me: failed program was:" >&5
17594 cat conftest.$ac_ext >&5
17595 cf_cv_have_errno=no
17596 fi
17597 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17598
17599 fi
17600 echo "$as_me:17600: result: $cf_cv_have_errno" >&5
17601 echo "${ECHO_T}$cf_cv_have_errno" >&6
17602
17603 if test "$cf_cv_have_errno" = yes ; then
17604
17605 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17606
17607         cat >>confdefs.h <<EOF
17608 #define $cf_result 1
17609 EOF
17610
17611 fi
17612
17613 echo "$as_me:17613: checking if data-only library module links" >&5
17614 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
17615 if test "${cf_cv_link_dataonly+set}" = set; then
17616   echo $ECHO_N "(cached) $ECHO_C" >&6
17617 else
17618
17619         rm -f conftest.a
17620         cat >conftest.$ac_ext <<EOF
17621 #line 17621 "configure"
17622 int     testdata[3] = { 123, 456, 789 };
17623 EOF
17624         if { (eval echo "$as_me:17624: \"$ac_compile\"") >&5
17625   (eval $ac_compile) 2>&5
17626   ac_status=$?
17627   echo "$as_me:17627: \$? = $ac_status" >&5
17628   (exit $ac_status); } ; then
17629                 mv conftest.o data.o && \
17630                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
17631         fi
17632         rm -f conftest.$ac_ext data.o
17633         cat >conftest.$ac_ext <<EOF
17634 #line 17634 "configure"
17635 int     testfunc(void)
17636 {
17637 #if defined(NeXT)
17638         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
17639 #else
17640         extern int testdata[3];
17641         return testdata[0] == 123
17642            &&  testdata[1] == 456
17643            &&  testdata[2] == 789;
17644 #endif
17645 }
17646 EOF
17647         if { (eval echo "$as_me:17647: \"$ac_compile\"") >&5
17648   (eval $ac_compile) 2>&5
17649   ac_status=$?
17650   echo "$as_me:17650: \$? = $ac_status" >&5
17651   (exit $ac_status); }; then
17652                 mv conftest.o func.o && \
17653                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
17654         fi
17655         rm -f conftest.$ac_ext func.o
17656         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
17657         cf_saveLIBS="$LIBS"
17658         LIBS="conftest.a $LIBS"
17659         if test "$cross_compiling" = yes; then
17660   cf_cv_link_dataonly=unknown
17661 else
17662   cat >conftest.$ac_ext <<_ACEOF
17663 #line 17663 "configure"
17664 #include "confdefs.h"
17665
17666         int main(void)
17667         {
17668                 extern int testfunc();
17669                 ${cf_cv_main_return:-return} (!testfunc());
17670         }
17671
17672 _ACEOF
17673 rm -f conftest$ac_exeext
17674 if { (eval echo "$as_me:17674: \"$ac_link\"") >&5
17675   (eval $ac_link) 2>&5
17676   ac_status=$?
17677   echo "$as_me:17677: \$? = $ac_status" >&5
17678   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17679   { (eval echo "$as_me:17679: \"$ac_try\"") >&5
17680   (eval $ac_try) 2>&5
17681   ac_status=$?
17682   echo "$as_me:17682: \$? = $ac_status" >&5
17683   (exit $ac_status); }; }; then
17684   cf_cv_link_dataonly=yes
17685 else
17686   echo "$as_me: program exited with status $ac_status" >&5
17687 echo "$as_me: failed program was:" >&5
17688 cat conftest.$ac_ext >&5
17689 cf_cv_link_dataonly=no
17690 fi
17691 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17692 fi
17693         LIBS="$cf_saveLIBS"
17694
17695 fi
17696
17697 echo "$as_me:17697: result: $cf_cv_link_dataonly" >&5
17698 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
17699
17700 if test "$cf_cv_link_dataonly" = no ; then
17701
17702 cat >>confdefs.h <<\EOF
17703 #define BROKEN_LINKER 1
17704 EOF
17705
17706         BROKEN_LINKER=1
17707 fi
17708
17709 ###     Checks for library functions.
17710
17711 for ac_func in \
17712 getcwd \
17713 getegid \
17714 geteuid \
17715 getopt \
17716 getttynam \
17717 issetugid \
17718 poll \
17719 putenv \
17720 remove \
17721 select \
17722 setbuf \
17723 setbuffer \
17724 setenv \
17725 setvbuf \
17726 sigaction \
17727 sigvec \
17728 strdup \
17729 strstr \
17730 tcgetpgrp \
17731 tdestroy \
17732 times \
17733 tsearch \
17734 vsnprintf \
17735
17736 do
17737 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17738 echo "$as_me:17738: checking for $ac_func" >&5
17739 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17740 if eval "test \"\${$as_ac_var+set}\" = set"; then
17741   echo $ECHO_N "(cached) $ECHO_C" >&6
17742 else
17743   cat >conftest.$ac_ext <<_ACEOF
17744 #line 17744 "configure"
17745 #include "confdefs.h"
17746 /* System header to define __stub macros and hopefully few prototypes,
17747     which can conflict with char $ac_func (); below.  */
17748 #include <assert.h>
17749 /* Override any gcc2 internal prototype to avoid an error.  */
17750 #ifdef __cplusplus
17751 extern "C"
17752 #endif
17753 /* We use char because int might match the return type of a gcc2
17754    builtin and then its argument prototype would still apply.  */
17755 char $ac_func ();
17756 char (*f) ();
17757
17758 int
17759 main (void)
17760 {
17761 /* The GNU C library defines this for functions which it implements
17762     to always fail with ENOSYS.  Some functions are actually named
17763     something starting with __ and the normal name is an alias.  */
17764 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17765 choke me
17766 #else
17767 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17768 #endif
17769
17770   ;
17771   return 0;
17772 }
17773 _ACEOF
17774 rm -f conftest.$ac_objext conftest$ac_exeext
17775 if { (eval echo "$as_me:17775: \"$ac_link\"") >&5
17776   (eval $ac_link) 2>&5
17777   ac_status=$?
17778   echo "$as_me:17778: \$? = $ac_status" >&5
17779   (exit $ac_status); } &&
17780          { ac_try='test -s conftest$ac_exeext'
17781   { (eval echo "$as_me:17781: \"$ac_try\"") >&5
17782   (eval $ac_try) 2>&5
17783   ac_status=$?
17784   echo "$as_me:17784: \$? = $ac_status" >&5
17785   (exit $ac_status); }; }; then
17786   eval "$as_ac_var=yes"
17787 else
17788   echo "$as_me: failed program was:" >&5
17789 cat conftest.$ac_ext >&5
17790 eval "$as_ac_var=no"
17791 fi
17792 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17793 fi
17794 echo "$as_me:17794: result: `eval echo '${'$as_ac_var'}'`" >&5
17795 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17796 if test `eval echo '${'$as_ac_var'}'` = yes; then
17797   cat >>confdefs.h <<EOF
17798 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17799 EOF
17800
17801 fi
17802 done
17803
17804 if test "x$ac_cv_func_getopt" = xno && \
17805    test "x$cf_with_progs$cf_with_tests" != xnono; then
17806         { { echo "$as_me:17806: error: getopt is required for building programs" >&5
17807 echo "$as_me: error: getopt is required for building programs" >&2;}
17808    { (exit 1); exit 1; }; }
17809 fi
17810
17811 if test "x$with_safe_sprintf" = xyes
17812 then
17813         if test "x$ac_cv_func_vsnprintf" = xyes
17814         then
17815                 { echo "$as_me:17815: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
17816 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
17817         else
17818
17819 cat >>confdefs.h <<\EOF
17820 #define USE_SAFE_SPRINTF 1
17821 EOF
17822
17823         fi
17824 fi
17825
17826 if test "x$with_getcap" = "xyes" ; then
17827
17828 echo "$as_me:17828: checking for terminal-capability database functions" >&5
17829 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
17830 if test "${cf_cv_cgetent+set}" = set; then
17831   echo $ECHO_N "(cached) $ECHO_C" >&6
17832 else
17833
17834 cat >conftest.$ac_ext <<_ACEOF
17835 #line 17835 "configure"
17836 #include "confdefs.h"
17837
17838 #include <stdlib.h>
17839 int
17840 main (void)
17841 {
17842
17843         char temp[128];
17844         char *buf = temp;
17845         char *db_array = temp;
17846         cgetent(&buf, &db_array, "vt100");
17847         cgetcap(buf, "tc", '=');
17848         cgetmatch(buf, "tc");
17849
17850   ;
17851   return 0;
17852 }
17853 _ACEOF
17854 rm -f conftest.$ac_objext conftest$ac_exeext
17855 if { (eval echo "$as_me:17855: \"$ac_link\"") >&5
17856   (eval $ac_link) 2>&5
17857   ac_status=$?
17858   echo "$as_me:17858: \$? = $ac_status" >&5
17859   (exit $ac_status); } &&
17860          { ac_try='test -s conftest$ac_exeext'
17861   { (eval echo "$as_me:17861: \"$ac_try\"") >&5
17862   (eval $ac_try) 2>&5
17863   ac_status=$?
17864   echo "$as_me:17864: \$? = $ac_status" >&5
17865   (exit $ac_status); }; }; then
17866   cf_cv_cgetent=yes
17867 else
17868   echo "$as_me: failed program was:" >&5
17869 cat conftest.$ac_ext >&5
17870 cf_cv_cgetent=no
17871 fi
17872 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17873
17874 fi
17875 echo "$as_me:17875: result: $cf_cv_cgetent" >&5
17876 echo "${ECHO_T}$cf_cv_cgetent" >&6
17877
17878 if test "$cf_cv_cgetent" = yes
17879 then
17880
17881 cat >>confdefs.h <<\EOF
17882 #define HAVE_BSD_CGETENT 1
17883 EOF
17884
17885 echo "$as_me:17885: checking if cgetent uses const parameter" >&5
17886 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
17887 if test "${cf_cv_cgetent_const+set}" = set; then
17888   echo $ECHO_N "(cached) $ECHO_C" >&6
17889 else
17890
17891 cat >conftest.$ac_ext <<_ACEOF
17892 #line 17892 "configure"
17893 #include "confdefs.h"
17894
17895 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
17896 #include <stdlib.h>
17897 int
17898 main (void)
17899 {
17900
17901         char temp[128];
17902         char *buf = temp;
17903 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
17904         const char *db_array = temp;
17905         cgetent(&buf, &db_array, "vt100");
17906 #endif
17907         cgetcap(buf, "tc", '=');
17908         cgetmatch(buf, "tc");
17909
17910   ;
17911   return 0;
17912 }
17913 _ACEOF
17914 rm -f conftest.$ac_objext conftest$ac_exeext
17915 if { (eval echo "$as_me:17915: \"$ac_link\"") >&5
17916   (eval $ac_link) 2>&5
17917   ac_status=$?
17918   echo "$as_me:17918: \$? = $ac_status" >&5
17919   (exit $ac_status); } &&
17920          { ac_try='test -s conftest$ac_exeext'
17921   { (eval echo "$as_me:17921: \"$ac_try\"") >&5
17922   (eval $ac_try) 2>&5
17923   ac_status=$?
17924   echo "$as_me:17924: \$? = $ac_status" >&5
17925   (exit $ac_status); }; }; then
17926   cf_cv_cgetent_const=yes
17927 else
17928   echo "$as_me: failed program was:" >&5
17929 cat conftest.$ac_ext >&5
17930 cf_cv_cgetent_const=no
17931 fi
17932 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17933
17934 fi
17935 echo "$as_me:17935: result: $cf_cv_cgetent_const" >&5
17936 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
17937         if test "$cf_cv_cgetent_const" = yes
17938         then
17939
17940 cat >>confdefs.h <<EOF
17941 #define CGETENT_CONST const
17942 EOF
17943
17944         fi
17945 fi
17946
17947 fi
17948
17949 echo "$as_me:17949: checking for isascii" >&5
17950 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
17951 if test "${cf_cv_have_isascii+set}" = set; then
17952   echo $ECHO_N "(cached) $ECHO_C" >&6
17953 else
17954
17955         cat >conftest.$ac_ext <<_ACEOF
17956 #line 17956 "configure"
17957 #include "confdefs.h"
17958 #include <ctype.h>
17959 int
17960 main (void)
17961 {
17962 int x = isascii(' ')
17963   ;
17964   return 0;
17965 }
17966 _ACEOF
17967 rm -f conftest.$ac_objext conftest$ac_exeext
17968 if { (eval echo "$as_me:17968: \"$ac_link\"") >&5
17969   (eval $ac_link) 2>&5
17970   ac_status=$?
17971   echo "$as_me:17971: \$? = $ac_status" >&5
17972   (exit $ac_status); } &&
17973          { ac_try='test -s conftest$ac_exeext'
17974   { (eval echo "$as_me:17974: \"$ac_try\"") >&5
17975   (eval $ac_try) 2>&5
17976   ac_status=$?
17977   echo "$as_me:17977: \$? = $ac_status" >&5
17978   (exit $ac_status); }; }; then
17979   cf_cv_have_isascii=yes
17980 else
17981   echo "$as_me: failed program was:" >&5
17982 cat conftest.$ac_ext >&5
17983 cf_cv_have_isascii=no
17984 fi
17985 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17986
17987 fi
17988 echo "$as_me:17988: result: $cf_cv_have_isascii" >&5
17989 echo "${ECHO_T}$cf_cv_have_isascii" >&6
17990 test "$cf_cv_have_isascii" = yes &&
17991 cat >>confdefs.h <<\EOF
17992 #define HAVE_ISASCII 1
17993 EOF
17994
17995 if test "$ac_cv_func_sigaction" = yes; then
17996 echo "$as_me:17996: checking whether sigaction needs _POSIX_SOURCE" >&5
17997 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
17998 cat >conftest.$ac_ext <<_ACEOF
17999 #line 17999 "configure"
18000 #include "confdefs.h"
18001
18002 #include <sys/types.h>
18003 #include <signal.h>
18004 int
18005 main (void)
18006 {
18007 struct sigaction act
18008   ;
18009   return 0;
18010 }
18011 _ACEOF
18012 rm -f conftest.$ac_objext
18013 if { (eval echo "$as_me:18013: \"$ac_compile\"") >&5
18014   (eval $ac_compile) 2>&5
18015   ac_status=$?
18016   echo "$as_me:18016: \$? = $ac_status" >&5
18017   (exit $ac_status); } &&
18018          { ac_try='test -s conftest.$ac_objext'
18019   { (eval echo "$as_me:18019: \"$ac_try\"") >&5
18020   (eval $ac_try) 2>&5
18021   ac_status=$?
18022   echo "$as_me:18022: \$? = $ac_status" >&5
18023   (exit $ac_status); }; }; then
18024   sigact_bad=no
18025 else
18026   echo "$as_me: failed program was:" >&5
18027 cat conftest.$ac_ext >&5
18028
18029 cat >conftest.$ac_ext <<_ACEOF
18030 #line 18030 "configure"
18031 #include "confdefs.h"
18032
18033 #define _POSIX_SOURCE
18034 #include <sys/types.h>
18035 #include <signal.h>
18036 int
18037 main (void)
18038 {
18039 struct sigaction act
18040   ;
18041   return 0;
18042 }
18043 _ACEOF
18044 rm -f conftest.$ac_objext
18045 if { (eval echo "$as_me:18045: \"$ac_compile\"") >&5
18046   (eval $ac_compile) 2>&5
18047   ac_status=$?
18048   echo "$as_me:18048: \$? = $ac_status" >&5
18049   (exit $ac_status); } &&
18050          { ac_try='test -s conftest.$ac_objext'
18051   { (eval echo "$as_me:18051: \"$ac_try\"") >&5
18052   (eval $ac_try) 2>&5
18053   ac_status=$?
18054   echo "$as_me:18054: \$? = $ac_status" >&5
18055   (exit $ac_status); }; }; then
18056   sigact_bad=yes
18057
18058 cat >>confdefs.h <<\EOF
18059 #define _POSIX_SOURCE 1
18060 EOF
18061
18062 else
18063   echo "$as_me: failed program was:" >&5
18064 cat conftest.$ac_ext >&5
18065 sigact_bad=unknown
18066 fi
18067 rm -f conftest.$ac_objext conftest.$ac_ext
18068 fi
18069 rm -f conftest.$ac_objext conftest.$ac_ext
18070 echo "$as_me:18070: result: $sigact_bad" >&5
18071 echo "${ECHO_T}$sigact_bad" >&6
18072 fi
18073
18074 echo "$as_me:18074: checking if nanosleep really works" >&5
18075 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
18076 if test "${cf_cv_func_nanosleep+set}" = set; then
18077   echo $ECHO_N "(cached) $ECHO_C" >&6
18078 else
18079
18080 if test "$cross_compiling" = yes; then
18081   cf_cv_func_nanosleep=unknown
18082 else
18083   cat >conftest.$ac_ext <<_ACEOF
18084 #line 18084 "configure"
18085 #include "confdefs.h"
18086
18087 #include <stdio.h>
18088 #include <errno.h>
18089 #include <time.h>
18090
18091 #ifdef HAVE_SYS_TIME_H
18092 #include <sys/time.h>
18093 #endif
18094
18095 int main(void) {
18096         struct timespec ts1, ts2;
18097         int code;
18098         ts1.tv_sec  = 0;
18099         ts1.tv_nsec = 750000000;
18100         ts2.tv_sec  = 0;
18101         ts2.tv_nsec = 0;
18102         errno = 0;
18103         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
18104         ${cf_cv_main_return:-return}(code != 0);
18105 }
18106
18107 _ACEOF
18108 rm -f conftest$ac_exeext
18109 if { (eval echo "$as_me:18109: \"$ac_link\"") >&5
18110   (eval $ac_link) 2>&5
18111   ac_status=$?
18112   echo "$as_me:18112: \$? = $ac_status" >&5
18113   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18114   { (eval echo "$as_me:18114: \"$ac_try\"") >&5
18115   (eval $ac_try) 2>&5
18116   ac_status=$?
18117   echo "$as_me:18117: \$? = $ac_status" >&5
18118   (exit $ac_status); }; }; then
18119   cf_cv_func_nanosleep=yes
18120 else
18121   echo "$as_me: program exited with status $ac_status" >&5
18122 echo "$as_me: failed program was:" >&5
18123 cat conftest.$ac_ext >&5
18124 cf_cv_func_nanosleep=no
18125 fi
18126 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18127 fi
18128 fi
18129 echo "$as_me:18129: result: $cf_cv_func_nanosleep" >&5
18130 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
18131
18132 test "$cf_cv_func_nanosleep" = "yes" &&
18133 cat >>confdefs.h <<\EOF
18134 #define HAVE_NANOSLEEP 1
18135 EOF
18136
18137 for ac_header in \
18138 termio.h \
18139 termios.h \
18140 unistd.h \
18141 sys/ioctl.h \
18142 sys/termio.h \
18143
18144 do
18145 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18146 echo "$as_me:18146: checking for $ac_header" >&5
18147 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18148 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18149   echo $ECHO_N "(cached) $ECHO_C" >&6
18150 else
18151   cat >conftest.$ac_ext <<_ACEOF
18152 #line 18152 "configure"
18153 #include "confdefs.h"
18154 #include <$ac_header>
18155 _ACEOF
18156 if { (eval echo "$as_me:18156: \"$ac_cpp conftest.$ac_ext\"") >&5
18157   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18158   ac_status=$?
18159   egrep -v '^ *\+' conftest.er1 >conftest.err
18160   rm -f conftest.er1
18161   cat conftest.err >&5
18162   echo "$as_me:18162: \$? = $ac_status" >&5
18163   (exit $ac_status); } >/dev/null; then
18164   if test -s conftest.err; then
18165     ac_cpp_err=$ac_c_preproc_warn_flag
18166   else
18167     ac_cpp_err=
18168   fi
18169 else
18170   ac_cpp_err=yes
18171 fi
18172 if test -z "$ac_cpp_err"; then
18173   eval "$as_ac_Header=yes"
18174 else
18175   echo "$as_me: failed program was:" >&5
18176   cat conftest.$ac_ext >&5
18177   eval "$as_ac_Header=no"
18178 fi
18179 rm -f conftest.err conftest.$ac_ext
18180 fi
18181 echo "$as_me:18181: result: `eval echo '${'$as_ac_Header'}'`" >&5
18182 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18183 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18184   cat >>confdefs.h <<EOF
18185 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18186 EOF
18187
18188 fi
18189 done
18190
18191 if test "$ac_cv_header_termios_h" = yes ; then
18192         case "$CFLAGS $CPPFLAGS" in
18193         (*-D_POSIX_SOURCE*)
18194                 termios_bad=dunno ;;
18195         (*)     termios_bad=maybe ;;
18196         esac
18197         if test "$termios_bad" = maybe ; then
18198         echo "$as_me:18198: checking whether termios.h needs _POSIX_SOURCE" >&5
18199 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
18200         cat >conftest.$ac_ext <<_ACEOF
18201 #line 18201 "configure"
18202 #include "confdefs.h"
18203 #include <termios.h>
18204 int
18205 main (void)
18206 {
18207 struct termios foo; int x = foo.c_iflag
18208   ;
18209   return 0;
18210 }
18211 _ACEOF
18212 rm -f conftest.$ac_objext
18213 if { (eval echo "$as_me:18213: \"$ac_compile\"") >&5
18214   (eval $ac_compile) 2>&5
18215   ac_status=$?
18216   echo "$as_me:18216: \$? = $ac_status" >&5
18217   (exit $ac_status); } &&
18218          { ac_try='test -s conftest.$ac_objext'
18219   { (eval echo "$as_me:18219: \"$ac_try\"") >&5
18220   (eval $ac_try) 2>&5
18221   ac_status=$?
18222   echo "$as_me:18222: \$? = $ac_status" >&5
18223   (exit $ac_status); }; }; then
18224   termios_bad=no
18225 else
18226   echo "$as_me: failed program was:" >&5
18227 cat conftest.$ac_ext >&5
18228
18229                 cat >conftest.$ac_ext <<_ACEOF
18230 #line 18230 "configure"
18231 #include "confdefs.h"
18232
18233 #define _POSIX_SOURCE
18234 #include <termios.h>
18235 int
18236 main (void)
18237 {
18238 struct termios foo; int x = foo.c_iflag
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   termios_bad=unknown
18256 else
18257   echo "$as_me: failed program was:" >&5
18258 cat conftest.$ac_ext >&5
18259 termios_bad=yes
18260 cat >>confdefs.h <<\EOF
18261 #define _POSIX_SOURCE 1
18262 EOF
18263
18264 fi
18265 rm -f conftest.$ac_objext conftest.$ac_ext
18266
18267 fi
18268 rm -f conftest.$ac_objext conftest.$ac_ext
18269         echo "$as_me:18269: result: $termios_bad" >&5
18270 echo "${ECHO_T}$termios_bad" >&6
18271         fi
18272 fi
18273
18274 echo "$as_me:18274: checking for tcgetattr" >&5
18275 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
18276 if test "${cf_cv_have_tcgetattr+set}" = set; then
18277   echo $ECHO_N "(cached) $ECHO_C" >&6
18278 else
18279
18280 cat >conftest.$ac_ext <<_ACEOF
18281 #line 18281 "configure"
18282 #include "confdefs.h"
18283
18284 #include <sys/types.h>
18285 #ifdef HAVE_UNISTD_H
18286 #include <unistd.h>
18287 #endif
18288 #ifdef HAVE_TERMIOS_H
18289 #include <termios.h>
18290 #define TTY struct termios
18291 #else
18292 #ifdef HAVE_TERMIO_H
18293 #include <termio.h>
18294 #define TTY struct termio
18295 #endif
18296 #endif
18297
18298 int
18299 main (void)
18300 {
18301
18302 TTY foo;
18303 tcgetattr(1, &foo);
18304   ;
18305   return 0;
18306 }
18307 _ACEOF
18308 rm -f conftest.$ac_objext conftest$ac_exeext
18309 if { (eval echo "$as_me:18309: \"$ac_link\"") >&5
18310   (eval $ac_link) 2>&5
18311   ac_status=$?
18312   echo "$as_me:18312: \$? = $ac_status" >&5
18313   (exit $ac_status); } &&
18314          { ac_try='test -s conftest$ac_exeext'
18315   { (eval echo "$as_me:18315: \"$ac_try\"") >&5
18316   (eval $ac_try) 2>&5
18317   ac_status=$?
18318   echo "$as_me:18318: \$? = $ac_status" >&5
18319   (exit $ac_status); }; }; then
18320   cf_cv_have_tcgetattr=yes
18321 else
18322   echo "$as_me: failed program was:" >&5
18323 cat conftest.$ac_ext >&5
18324 cf_cv_have_tcgetattr=no
18325 fi
18326 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18327 fi
18328 echo "$as_me:18328: result: $cf_cv_have_tcgetattr" >&5
18329 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
18330 test "$cf_cv_have_tcgetattr" = yes &&
18331 cat >>confdefs.h <<\EOF
18332 #define HAVE_TCGETATTR 1
18333 EOF
18334
18335 echo "$as_me:18335: checking for vsscanf function or workaround" >&5
18336 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
18337 if test "${cf_cv_func_vsscanf+set}" = set; then
18338   echo $ECHO_N "(cached) $ECHO_C" >&6
18339 else
18340
18341 cat >conftest.$ac_ext <<_ACEOF
18342 #line 18342 "configure"
18343 #include "confdefs.h"
18344
18345 #include <stdarg.h>
18346 #include <stdio.h>
18347 int
18348 main (void)
18349 {
18350
18351         va_list ap;
18352         vsscanf("from", "%d", ap)
18353   ;
18354   return 0;
18355 }
18356 _ACEOF
18357 rm -f conftest.$ac_objext conftest$ac_exeext
18358 if { (eval echo "$as_me:18358: \"$ac_link\"") >&5
18359   (eval $ac_link) 2>&5
18360   ac_status=$?
18361   echo "$as_me:18361: \$? = $ac_status" >&5
18362   (exit $ac_status); } &&
18363          { ac_try='test -s conftest$ac_exeext'
18364   { (eval echo "$as_me:18364: \"$ac_try\"") >&5
18365   (eval $ac_try) 2>&5
18366   ac_status=$?
18367   echo "$as_me:18367: \$? = $ac_status" >&5
18368   (exit $ac_status); }; }; then
18369   cf_cv_func_vsscanf=vsscanf
18370 else
18371   echo "$as_me: failed program was:" >&5
18372 cat conftest.$ac_ext >&5
18373
18374 cat >conftest.$ac_ext <<_ACEOF
18375 #line 18375 "configure"
18376 #include "confdefs.h"
18377
18378 #include <stdarg.h>
18379 #include <stdio.h>
18380 int
18381 main (void)
18382 {
18383
18384         FILE strbuf;
18385         char *str = "from";
18386
18387         strbuf._flag = _IOREAD;
18388         strbuf._ptr = strbuf._base = (unsigned char *) str;
18389         strbuf._cnt = strlen(str);
18390         strbuf._file = _NFILE;
18391         return (vfscanf(&strbuf, "%d", ap))
18392   ;
18393   return 0;
18394 }
18395 _ACEOF
18396 rm -f conftest.$ac_objext conftest$ac_exeext
18397 if { (eval echo "$as_me:18397: \"$ac_link\"") >&5
18398   (eval $ac_link) 2>&5
18399   ac_status=$?
18400   echo "$as_me:18400: \$? = $ac_status" >&5
18401   (exit $ac_status); } &&
18402          { ac_try='test -s conftest$ac_exeext'
18403   { (eval echo "$as_me:18403: \"$ac_try\"") >&5
18404   (eval $ac_try) 2>&5
18405   ac_status=$?
18406   echo "$as_me:18406: \$? = $ac_status" >&5
18407   (exit $ac_status); }; }; then
18408   cf_cv_func_vsscanf=vfscanf
18409 else
18410   echo "$as_me: failed program was:" >&5
18411 cat conftest.$ac_ext >&5
18412
18413 cat >conftest.$ac_ext <<_ACEOF
18414 #line 18414 "configure"
18415 #include "confdefs.h"
18416
18417 #include <stdarg.h>
18418 #include <stdio.h>
18419 int
18420 main (void)
18421 {
18422
18423         FILE strbuf;
18424         char *str = "from";
18425
18426         strbuf._flag = _IOREAD;
18427         strbuf._ptr = strbuf._base = (unsigned char *) str;
18428         strbuf._cnt = strlen(str);
18429         strbuf._file = _NFILE;
18430         return (_doscan(&strbuf, "%d", ap))
18431   ;
18432   return 0;
18433 }
18434 _ACEOF
18435 rm -f conftest.$ac_objext 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); } &&
18441          { ac_try='test -s conftest$ac_exeext'
18442   { (eval echo "$as_me:18442: \"$ac_try\"") >&5
18443   (eval $ac_try) 2>&5
18444   ac_status=$?
18445   echo "$as_me:18445: \$? = $ac_status" >&5
18446   (exit $ac_status); }; }; then
18447   cf_cv_func_vsscanf=_doscan
18448 else
18449   echo "$as_me: failed program was:" >&5
18450 cat conftest.$ac_ext >&5
18451
18452 cf_cv_func_vsscanf=no
18453 fi
18454 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18455 fi
18456 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18457 fi
18458 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18459 fi
18460 echo "$as_me:18460: result: $cf_cv_func_vsscanf" >&5
18461 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
18462
18463 case $cf_cv_func_vsscanf in
18464 (vsscanf)
18465 cat >>confdefs.h <<\EOF
18466 #define HAVE_VSSCANF 1
18467 EOF
18468 ;;
18469 (vfscanf)
18470 cat >>confdefs.h <<\EOF
18471 #define HAVE_VFSCANF 1
18472 EOF
18473 ;;
18474 (_doscan)
18475 cat >>confdefs.h <<\EOF
18476 #define HAVE__DOSCAN 1
18477 EOF
18478 ;;
18479 esac
18480
18481 for ac_header in \
18482 unistd.h \
18483
18484 do
18485 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18486 echo "$as_me:18486: checking for $ac_header" >&5
18487 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18488 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18489   echo $ECHO_N "(cached) $ECHO_C" >&6
18490 else
18491   cat >conftest.$ac_ext <<_ACEOF
18492 #line 18492 "configure"
18493 #include "confdefs.h"
18494 #include <$ac_header>
18495 _ACEOF
18496 if { (eval echo "$as_me:18496: \"$ac_cpp conftest.$ac_ext\"") >&5
18497   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18498   ac_status=$?
18499   egrep -v '^ *\+' conftest.er1 >conftest.err
18500   rm -f conftest.er1
18501   cat conftest.err >&5
18502   echo "$as_me:18502: \$? = $ac_status" >&5
18503   (exit $ac_status); } >/dev/null; then
18504   if test -s conftest.err; then
18505     ac_cpp_err=$ac_c_preproc_warn_flag
18506   else
18507     ac_cpp_err=
18508   fi
18509 else
18510   ac_cpp_err=yes
18511 fi
18512 if test -z "$ac_cpp_err"; then
18513   eval "$as_ac_Header=yes"
18514 else
18515   echo "$as_me: failed program was:" >&5
18516   cat conftest.$ac_ext >&5
18517   eval "$as_ac_Header=no"
18518 fi
18519 rm -f conftest.err conftest.$ac_ext
18520 fi
18521 echo "$as_me:18521: result: `eval echo '${'$as_ac_Header'}'`" >&5
18522 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18523 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18524   cat >>confdefs.h <<EOF
18525 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18526 EOF
18527
18528 fi
18529 done
18530
18531 echo "$as_me:18531: checking for working mkstemp" >&5
18532 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
18533 if test "${cf_cv_func_mkstemp+set}" = set; then
18534   echo $ECHO_N "(cached) $ECHO_C" >&6
18535 else
18536
18537 rm -rf conftest*
18538 if test "$cross_compiling" = yes; then
18539   cf_cv_func_mkstemp=maybe
18540 else
18541   cat >conftest.$ac_ext <<_ACEOF
18542 #line 18542 "configure"
18543 #include "confdefs.h"
18544
18545 #include <sys/types.h>
18546 #ifdef HAVE_UNISTD_H
18547 #include <unistd.h>
18548 #endif
18549 #include <stdlib.h>
18550 #include <stdio.h>
18551 #include <string.h>
18552 #include <sys/stat.h>
18553 int main(void)
18554 {
18555         char *tmpl = "conftestXXXXXX";
18556         char name[2][80];
18557         int n;
18558         int result = 0;
18559         int fd;
18560         struct stat sb;
18561
18562         umask(077);
18563         for (n = 0; n < 2; ++n) {
18564                 strcpy(name[n], tmpl);
18565                 if ((fd = mkstemp(name[n])) >= 0) {
18566                         if (!strcmp(name[n], tmpl)
18567                          || stat(name[n], &sb) != 0
18568                          || (sb.st_mode & S_IFMT) != S_IFREG
18569                          || (sb.st_mode & 077) != 0) {
18570                                 result = 1;
18571                         }
18572                         close(fd);
18573                 }
18574         }
18575         if (result == 0
18576          && !strcmp(name[0], name[1]))
18577                 result = 1;
18578         ${cf_cv_main_return:-return}(result);
18579 }
18580
18581 _ACEOF
18582 rm -f conftest$ac_exeext
18583 if { (eval echo "$as_me:18583: \"$ac_link\"") >&5
18584   (eval $ac_link) 2>&5
18585   ac_status=$?
18586   echo "$as_me:18586: \$? = $ac_status" >&5
18587   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18588   { (eval echo "$as_me:18588: \"$ac_try\"") >&5
18589   (eval $ac_try) 2>&5
18590   ac_status=$?
18591   echo "$as_me:18591: \$? = $ac_status" >&5
18592   (exit $ac_status); }; }; then
18593   cf_cv_func_mkstemp=yes
18594
18595 else
18596   echo "$as_me: program exited with status $ac_status" >&5
18597 echo "$as_me: failed program was:" >&5
18598 cat conftest.$ac_ext >&5
18599 cf_cv_func_mkstemp=no
18600
18601 fi
18602 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18603 fi
18604
18605 fi
18606 echo "$as_me:18606: result: $cf_cv_func_mkstemp" >&5
18607 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
18608 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
18609         echo "$as_me:18609: checking for mkstemp" >&5
18610 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
18611 if test "${ac_cv_func_mkstemp+set}" = set; then
18612   echo $ECHO_N "(cached) $ECHO_C" >&6
18613 else
18614   cat >conftest.$ac_ext <<_ACEOF
18615 #line 18615 "configure"
18616 #include "confdefs.h"
18617 /* System header to define __stub macros and hopefully few prototypes,
18618     which can conflict with char mkstemp (); below.  */
18619 #include <assert.h>
18620 /* Override any gcc2 internal prototype to avoid an error.  */
18621 #ifdef __cplusplus
18622 extern "C"
18623 #endif
18624 /* We use char because int might match the return type of a gcc2
18625    builtin and then its argument prototype would still apply.  */
18626 char mkstemp ();
18627 char (*f) ();
18628
18629 int
18630 main (void)
18631 {
18632 /* The GNU C library defines this for functions which it implements
18633     to always fail with ENOSYS.  Some functions are actually named
18634     something starting with __ and the normal name is an alias.  */
18635 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
18636 choke me
18637 #else
18638 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18639 #endif
18640
18641   ;
18642   return 0;
18643 }
18644 _ACEOF
18645 rm -f conftest.$ac_objext conftest$ac_exeext
18646 if { (eval echo "$as_me:18646: \"$ac_link\"") >&5
18647   (eval $ac_link) 2>&5
18648   ac_status=$?
18649   echo "$as_me:18649: \$? = $ac_status" >&5
18650   (exit $ac_status); } &&
18651          { ac_try='test -s conftest$ac_exeext'
18652   { (eval echo "$as_me:18652: \"$ac_try\"") >&5
18653   (eval $ac_try) 2>&5
18654   ac_status=$?
18655   echo "$as_me:18655: \$? = $ac_status" >&5
18656   (exit $ac_status); }; }; then
18657   ac_cv_func_mkstemp=yes
18658 else
18659   echo "$as_me: failed program was:" >&5
18660 cat conftest.$ac_ext >&5
18661 ac_cv_func_mkstemp=no
18662 fi
18663 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18664 fi
18665 echo "$as_me:18665: result: $ac_cv_func_mkstemp" >&5
18666 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
18667
18668 fi
18669 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
18670
18671 cat >>confdefs.h <<\EOF
18672 #define HAVE_MKSTEMP 1
18673 EOF
18674
18675 fi
18676
18677 # setup for prototype of fallback for vsscanf()
18678
18679 if test "$cf_cv_func_vsscanf" = vsscanf ; then
18680         HAVE_VSSCANF=1
18681 else
18682         HAVE_VSSCANF=0
18683 fi
18684
18685 if test "x$cross_compiling" = xyes ; then
18686         { echo "$as_me:18686: WARNING: cross compiling: assume setvbuf params not reversed" >&5
18687 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
18688 else
18689         echo "$as_me:18689: checking whether setvbuf arguments are reversed" >&5
18690 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
18691 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
18692   echo $ECHO_N "(cached) $ECHO_C" >&6
18693 else
18694   if test "$cross_compiling" = yes; then
18695   { { echo "$as_me:18695: error: cannot run test program while cross compiling" >&5
18696 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
18697    { (exit 1); exit 1; }; }
18698 else
18699   cat >conftest.$ac_ext <<_ACEOF
18700 #line 18700 "configure"
18701 #include "confdefs.h"
18702 #include <stdio.h>
18703 /* If setvbuf has the reversed format, exit 0. */
18704 int
18705 main (void)
18706 {
18707   /* This call has the arguments reversed.
18708      A reversed system may check and see that the address of main
18709      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
18710   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
18711     $ac_main_return(1);
18712   putc('\r', stdout);
18713   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
18714 }
18715 _ACEOF
18716 rm -f conftest$ac_exeext
18717 if { (eval echo "$as_me:18717: \"$ac_link\"") >&5
18718   (eval $ac_link) 2>&5
18719   ac_status=$?
18720   echo "$as_me:18720: \$? = $ac_status" >&5
18721   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18722   { (eval echo "$as_me:18722: \"$ac_try\"") >&5
18723   (eval $ac_try) 2>&5
18724   ac_status=$?
18725   echo "$as_me:18725: \$? = $ac_status" >&5
18726   (exit $ac_status); }; }; then
18727   ac_cv_func_setvbuf_reversed=yes
18728 else
18729   echo "$as_me: program exited with status $ac_status" >&5
18730 echo "$as_me: failed program was:" >&5
18731 cat conftest.$ac_ext >&5
18732 ac_cv_func_setvbuf_reversed=no
18733 fi
18734 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18735 fi
18736 rm -f core core.* *.core
18737 fi
18738 echo "$as_me:18738: result: $ac_cv_func_setvbuf_reversed" >&5
18739 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
18740 if test $ac_cv_func_setvbuf_reversed = yes; then
18741
18742 cat >>confdefs.h <<\EOF
18743 #define SETVBUF_REVERSED 1
18744 EOF
18745
18746 fi
18747
18748 fi
18749 echo "$as_me:18749: checking for intptr_t" >&5
18750 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
18751 if test "${ac_cv_type_intptr_t+set}" = set; then
18752   echo $ECHO_N "(cached) $ECHO_C" >&6
18753 else
18754   cat >conftest.$ac_ext <<_ACEOF
18755 #line 18755 "configure"
18756 #include "confdefs.h"
18757 $ac_includes_default
18758 int
18759 main (void)
18760 {
18761 if ((intptr_t *) 0)
18762   return 0;
18763 if (sizeof (intptr_t))
18764   return 0;
18765   ;
18766   return 0;
18767 }
18768 _ACEOF
18769 rm -f conftest.$ac_objext
18770 if { (eval echo "$as_me:18770: \"$ac_compile\"") >&5
18771   (eval $ac_compile) 2>&5
18772   ac_status=$?
18773   echo "$as_me:18773: \$? = $ac_status" >&5
18774   (exit $ac_status); } &&
18775          { ac_try='test -s conftest.$ac_objext'
18776   { (eval echo "$as_me:18776: \"$ac_try\"") >&5
18777   (eval $ac_try) 2>&5
18778   ac_status=$?
18779   echo "$as_me:18779: \$? = $ac_status" >&5
18780   (exit $ac_status); }; }; then
18781   ac_cv_type_intptr_t=yes
18782 else
18783   echo "$as_me: failed program was:" >&5
18784 cat conftest.$ac_ext >&5
18785 ac_cv_type_intptr_t=no
18786 fi
18787 rm -f conftest.$ac_objext conftest.$ac_ext
18788 fi
18789 echo "$as_me:18789: result: $ac_cv_type_intptr_t" >&5
18790 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
18791 if test $ac_cv_type_intptr_t = yes; then
18792   :
18793 else
18794
18795 cat >>confdefs.h <<EOF
18796 #define intptr_t long
18797 EOF
18798
18799 fi
18800
18801 echo "$as_me:18801: checking for ssize_t" >&5
18802 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
18803 if test "${ac_cv_type_ssize_t+set}" = set; then
18804   echo $ECHO_N "(cached) $ECHO_C" >&6
18805 else
18806   cat >conftest.$ac_ext <<_ACEOF
18807 #line 18807 "configure"
18808 #include "confdefs.h"
18809 $ac_includes_default
18810 int
18811 main (void)
18812 {
18813 if ((ssize_t *) 0)
18814   return 0;
18815 if (sizeof (ssize_t))
18816   return 0;
18817   ;
18818   return 0;
18819 }
18820 _ACEOF
18821 rm -f conftest.$ac_objext
18822 if { (eval echo "$as_me:18822: \"$ac_compile\"") >&5
18823   (eval $ac_compile) 2>&5
18824   ac_status=$?
18825   echo "$as_me:18825: \$? = $ac_status" >&5
18826   (exit $ac_status); } &&
18827          { ac_try='test -s conftest.$ac_objext'
18828   { (eval echo "$as_me:18828: \"$ac_try\"") >&5
18829   (eval $ac_try) 2>&5
18830   ac_status=$?
18831   echo "$as_me:18831: \$? = $ac_status" >&5
18832   (exit $ac_status); }; }; then
18833   ac_cv_type_ssize_t=yes
18834 else
18835   echo "$as_me: failed program was:" >&5
18836 cat conftest.$ac_ext >&5
18837 ac_cv_type_ssize_t=no
18838 fi
18839 rm -f conftest.$ac_objext conftest.$ac_ext
18840 fi
18841 echo "$as_me:18841: result: $ac_cv_type_ssize_t" >&5
18842 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
18843 if test $ac_cv_type_ssize_t = yes; then
18844   :
18845 else
18846
18847 cat >>confdefs.h <<EOF
18848 #define ssize_t int
18849 EOF
18850
18851 fi
18852
18853 echo "$as_me:18853: checking for type sigaction_t" >&5
18854 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
18855 if test "${cf_cv_type_sigaction+set}" = set; then
18856   echo $ECHO_N "(cached) $ECHO_C" >&6
18857 else
18858
18859         cat >conftest.$ac_ext <<_ACEOF
18860 #line 18860 "configure"
18861 #include "confdefs.h"
18862
18863 #include <signal.h>
18864 int
18865 main (void)
18866 {
18867 sigaction_t x
18868   ;
18869   return 0;
18870 }
18871 _ACEOF
18872 rm -f conftest.$ac_objext
18873 if { (eval echo "$as_me:18873: \"$ac_compile\"") >&5
18874   (eval $ac_compile) 2>&5
18875   ac_status=$?
18876   echo "$as_me:18876: \$? = $ac_status" >&5
18877   (exit $ac_status); } &&
18878          { ac_try='test -s conftest.$ac_objext'
18879   { (eval echo "$as_me:18879: \"$ac_try\"") >&5
18880   (eval $ac_try) 2>&5
18881   ac_status=$?
18882   echo "$as_me:18882: \$? = $ac_status" >&5
18883   (exit $ac_status); }; }; then
18884   cf_cv_type_sigaction=yes
18885 else
18886   echo "$as_me: failed program was:" >&5
18887 cat conftest.$ac_ext >&5
18888 cf_cv_type_sigaction=no
18889 fi
18890 rm -f conftest.$ac_objext conftest.$ac_ext
18891 fi
18892
18893 echo "$as_me:18893: result: $cf_cv_type_sigaction" >&5
18894 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
18895 test "$cf_cv_type_sigaction" = yes &&
18896 cat >>confdefs.h <<\EOF
18897 #define HAVE_TYPE_SIGACTION 1
18898 EOF
18899
18900 echo "$as_me:18900: checking declaration of size-change" >&5
18901 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
18902 if test "${cf_cv_sizechange+set}" = set; then
18903   echo $ECHO_N "(cached) $ECHO_C" >&6
18904 else
18905
18906         cf_cv_sizechange=unknown
18907         cf_save_CPPFLAGS="$CPPFLAGS"
18908
18909 for cf_opts in "" "NEED_PTEM_H"
18910 do
18911
18912         CPPFLAGS="$cf_save_CPPFLAGS"
18913         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
18914         cat >conftest.$ac_ext <<_ACEOF
18915 #line 18915 "configure"
18916 #include "confdefs.h"
18917 #include <sys/types.h>
18918 #ifdef HAVE_TERMIOS_H
18919 #include <termios.h>
18920 #else
18921 #ifdef HAVE_TERMIO_H
18922 #include <termio.h>
18923 #endif
18924 #endif
18925
18926 #ifdef NEED_PTEM_H
18927 /* This is a workaround for SCO:  they neglected to define struct winsize in
18928  * termios.h -- it's only in termio.h and ptem.h
18929  */
18930 #include <sys/stream.h>
18931 #include <sys/ptem.h>
18932 #endif
18933
18934 #ifdef HAVE_SYS_IOCTL_H
18935 #include <sys/ioctl.h>
18936 #endif
18937
18938 int
18939 main (void)
18940 {
18941
18942 #ifdef TIOCGSIZE
18943         struct ttysize win;     /* SunOS 3.0... */
18944         int y = win.ts_lines;
18945         int x = win.ts_cols;
18946 #else
18947 #ifdef TIOCGWINSZ
18948         struct winsize win;     /* everything else */
18949         int y = win.ws_row;
18950         int x = win.ws_col;
18951 #else
18952         no TIOCGSIZE or TIOCGWINSZ
18953 #endif /* TIOCGWINSZ */
18954 #endif /* TIOCGSIZE */
18955
18956   ;
18957   return 0;
18958 }
18959 _ACEOF
18960 rm -f conftest.$ac_objext
18961 if { (eval echo "$as_me:18961: \"$ac_compile\"") >&5
18962   (eval $ac_compile) 2>&5
18963   ac_status=$?
18964   echo "$as_me:18964: \$? = $ac_status" >&5
18965   (exit $ac_status); } &&
18966          { ac_try='test -s conftest.$ac_objext'
18967   { (eval echo "$as_me:18967: \"$ac_try\"") >&5
18968   (eval $ac_try) 2>&5
18969   ac_status=$?
18970   echo "$as_me:18970: \$? = $ac_status" >&5
18971   (exit $ac_status); }; }; then
18972   cf_cv_sizechange=yes
18973 else
18974   echo "$as_me: failed program was:" >&5
18975 cat conftest.$ac_ext >&5
18976 cf_cv_sizechange=no
18977 fi
18978 rm -f conftest.$ac_objext conftest.$ac_ext
18979
18980         CPPFLAGS="$cf_save_CPPFLAGS"
18981         if test "$cf_cv_sizechange" = yes ; then
18982                 echo "size-change succeeded ($cf_opts)" >&5
18983                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
18984                 break
18985         fi
18986 done
18987
18988 fi
18989 echo "$as_me:18989: result: $cf_cv_sizechange" >&5
18990 echo "${ECHO_T}$cf_cv_sizechange" >&6
18991 if test "$cf_cv_sizechange" != no ; then
18992
18993 cat >>confdefs.h <<\EOF
18994 #define HAVE_SIZECHANGE 1
18995 EOF
18996
18997         case $cf_cv_sizechange in
18998         (NEED*)
18999                 cat >>confdefs.h <<EOF
19000 #define $cf_cv_sizechange  1
19001 EOF
19002
19003                 ;;
19004         esac
19005 fi
19006
19007 echo "$as_me:19007: checking for memmove" >&5
19008 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
19009 if test "${ac_cv_func_memmove+set}" = set; then
19010   echo $ECHO_N "(cached) $ECHO_C" >&6
19011 else
19012   cat >conftest.$ac_ext <<_ACEOF
19013 #line 19013 "configure"
19014 #include "confdefs.h"
19015 /* System header to define __stub macros and hopefully few prototypes,
19016     which can conflict with char memmove (); below.  */
19017 #include <assert.h>
19018 /* Override any gcc2 internal prototype to avoid an error.  */
19019 #ifdef __cplusplus
19020 extern "C"
19021 #endif
19022 /* We use char because int might match the return type of a gcc2
19023    builtin and then its argument prototype would still apply.  */
19024 char memmove ();
19025 char (*f) ();
19026
19027 int
19028 main (void)
19029 {
19030 /* The GNU C library defines this for functions which it implements
19031     to always fail with ENOSYS.  Some functions are actually named
19032     something starting with __ and the normal name is an alias.  */
19033 #if defined (__stub_memmove) || defined (__stub___memmove)
19034 choke me
19035 #else
19036 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19037 #endif
19038
19039   ;
19040   return 0;
19041 }
19042 _ACEOF
19043 rm -f conftest.$ac_objext conftest$ac_exeext
19044 if { (eval echo "$as_me:19044: \"$ac_link\"") >&5
19045   (eval $ac_link) 2>&5
19046   ac_status=$?
19047   echo "$as_me:19047: \$? = $ac_status" >&5
19048   (exit $ac_status); } &&
19049          { ac_try='test -s conftest$ac_exeext'
19050   { (eval echo "$as_me:19050: \"$ac_try\"") >&5
19051   (eval $ac_try) 2>&5
19052   ac_status=$?
19053   echo "$as_me:19053: \$? = $ac_status" >&5
19054   (exit $ac_status); }; }; then
19055   ac_cv_func_memmove=yes
19056 else
19057   echo "$as_me: failed program was:" >&5
19058 cat conftest.$ac_ext >&5
19059 ac_cv_func_memmove=no
19060 fi
19061 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19062 fi
19063 echo "$as_me:19063: result: $ac_cv_func_memmove" >&5
19064 echo "${ECHO_T}$ac_cv_func_memmove" >&6
19065 if test $ac_cv_func_memmove = yes; then
19066   :
19067 else
19068
19069 echo "$as_me:19069: checking for bcopy" >&5
19070 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
19071 if test "${ac_cv_func_bcopy+set}" = set; then
19072   echo $ECHO_N "(cached) $ECHO_C" >&6
19073 else
19074   cat >conftest.$ac_ext <<_ACEOF
19075 #line 19075 "configure"
19076 #include "confdefs.h"
19077 /* System header to define __stub macros and hopefully few prototypes,
19078     which can conflict with char bcopy (); below.  */
19079 #include <assert.h>
19080 /* Override any gcc2 internal prototype to avoid an error.  */
19081 #ifdef __cplusplus
19082 extern "C"
19083 #endif
19084 /* We use char because int might match the return type of a gcc2
19085    builtin and then its argument prototype would still apply.  */
19086 char bcopy ();
19087 char (*f) ();
19088
19089 int
19090 main (void)
19091 {
19092 /* The GNU C library defines this for functions which it implements
19093     to always fail with ENOSYS.  Some functions are actually named
19094     something starting with __ and the normal name is an alias.  */
19095 #if defined (__stub_bcopy) || defined (__stub___bcopy)
19096 choke me
19097 #else
19098 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19099 #endif
19100
19101   ;
19102   return 0;
19103 }
19104 _ACEOF
19105 rm -f conftest.$ac_objext conftest$ac_exeext
19106 if { (eval echo "$as_me:19106: \"$ac_link\"") >&5
19107   (eval $ac_link) 2>&5
19108   ac_status=$?
19109   echo "$as_me:19109: \$? = $ac_status" >&5
19110   (exit $ac_status); } &&
19111          { ac_try='test -s conftest$ac_exeext'
19112   { (eval echo "$as_me:19112: \"$ac_try\"") >&5
19113   (eval $ac_try) 2>&5
19114   ac_status=$?
19115   echo "$as_me:19115: \$? = $ac_status" >&5
19116   (exit $ac_status); }; }; then
19117   ac_cv_func_bcopy=yes
19118 else
19119   echo "$as_me: failed program was:" >&5
19120 cat conftest.$ac_ext >&5
19121 ac_cv_func_bcopy=no
19122 fi
19123 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19124 fi
19125 echo "$as_me:19125: result: $ac_cv_func_bcopy" >&5
19126 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
19127 if test $ac_cv_func_bcopy = yes; then
19128
19129         echo "$as_me:19129: checking if bcopy does overlapping moves" >&5
19130 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
19131 if test "${cf_cv_good_bcopy+set}" = set; then
19132   echo $ECHO_N "(cached) $ECHO_C" >&6
19133 else
19134
19135                 if test "$cross_compiling" = yes; then
19136   cf_cv_good_bcopy=unknown
19137 else
19138   cat >conftest.$ac_ext <<_ACEOF
19139 #line 19139 "configure"
19140 #include "confdefs.h"
19141
19142 int main(void) {
19143         static char data[] = "abcdefghijklmnopqrstuwwxyz";
19144         char temp[40];
19145         bcopy(data, temp, sizeof(data));
19146         bcopy(temp+10, temp, 15);
19147         bcopy(temp+5, temp+15, 10);
19148         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
19149 }
19150
19151 _ACEOF
19152 rm -f conftest$ac_exeext
19153 if { (eval echo "$as_me:19153: \"$ac_link\"") >&5
19154   (eval $ac_link) 2>&5
19155   ac_status=$?
19156   echo "$as_me:19156: \$? = $ac_status" >&5
19157   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19158   { (eval echo "$as_me:19158: \"$ac_try\"") >&5
19159   (eval $ac_try) 2>&5
19160   ac_status=$?
19161   echo "$as_me:19161: \$? = $ac_status" >&5
19162   (exit $ac_status); }; }; then
19163   cf_cv_good_bcopy=yes
19164 else
19165   echo "$as_me: program exited with status $ac_status" >&5
19166 echo "$as_me: failed program was:" >&5
19167 cat conftest.$ac_ext >&5
19168 cf_cv_good_bcopy=no
19169 fi
19170 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19171 fi
19172
19173 fi
19174 echo "$as_me:19174: result: $cf_cv_good_bcopy" >&5
19175 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
19176
19177 else
19178   cf_cv_good_bcopy=no
19179 fi
19180
19181         if test "$cf_cv_good_bcopy" = yes ; then
19182
19183 cat >>confdefs.h <<\EOF
19184 #define USE_OK_BCOPY 1
19185 EOF
19186
19187         else
19188
19189 cat >>confdefs.h <<\EOF
19190 #define USE_MY_MEMMOVE 1
19191 EOF
19192
19193         fi
19194
19195 fi
19196
19197 tty 2>&1 >/dev/null || {
19198 for ac_func in posix_openpt
19199 do
19200 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19201 echo "$as_me:19201: checking for $ac_func" >&5
19202 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19203 if eval "test \"\${$as_ac_var+set}\" = set"; then
19204   echo $ECHO_N "(cached) $ECHO_C" >&6
19205 else
19206   cat >conftest.$ac_ext <<_ACEOF
19207 #line 19207 "configure"
19208 #include "confdefs.h"
19209 /* System header to define __stub macros and hopefully few prototypes,
19210     which can conflict with char $ac_func (); below.  */
19211 #include <assert.h>
19212 /* Override any gcc2 internal prototype to avoid an error.  */
19213 #ifdef __cplusplus
19214 extern "C"
19215 #endif
19216 /* We use char because int might match the return type of a gcc2
19217    builtin and then its argument prototype would still apply.  */
19218 char $ac_func ();
19219 char (*f) ();
19220
19221 int
19222 main (void)
19223 {
19224 /* The GNU C library defines this for functions which it implements
19225     to always fail with ENOSYS.  Some functions are actually named
19226     something starting with __ and the normal name is an alias.  */
19227 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19228 choke me
19229 #else
19230 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19231 #endif
19232
19233   ;
19234   return 0;
19235 }
19236 _ACEOF
19237 rm -f conftest.$ac_objext conftest$ac_exeext
19238 if { (eval echo "$as_me:19238: \"$ac_link\"") >&5
19239   (eval $ac_link) 2>&5
19240   ac_status=$?
19241   echo "$as_me:19241: \$? = $ac_status" >&5
19242   (exit $ac_status); } &&
19243          { ac_try='test -s conftest$ac_exeext'
19244   { (eval echo "$as_me:19244: \"$ac_try\"") >&5
19245   (eval $ac_try) 2>&5
19246   ac_status=$?
19247   echo "$as_me:19247: \$? = $ac_status" >&5
19248   (exit $ac_status); }; }; then
19249   eval "$as_ac_var=yes"
19250 else
19251   echo "$as_me: failed program was:" >&5
19252 cat conftest.$ac_ext >&5
19253 eval "$as_ac_var=no"
19254 fi
19255 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19256 fi
19257 echo "$as_me:19257: result: `eval echo '${'$as_ac_var'}'`" >&5
19258 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19259 if test `eval echo '${'$as_ac_var'}'` = yes; then
19260   cat >>confdefs.h <<EOF
19261 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19262 EOF
19263
19264 fi
19265 done
19266  }
19267 echo "$as_me:19267: checking if poll really works" >&5
19268 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
19269 if test "${cf_cv_working_poll+set}" = set; then
19270   echo $ECHO_N "(cached) $ECHO_C" >&6
19271 else
19272
19273 if test "$cross_compiling" = yes; then
19274   cf_cv_working_poll=unknown
19275 else
19276   cat >conftest.$ac_ext <<_ACEOF
19277 #line 19277 "configure"
19278 #include "confdefs.h"
19279
19280 #include <stdlib.h>
19281 #include <stdio.h>
19282 #include <unistd.h>
19283 #include <fcntl.h>
19284 #ifdef HAVE_POLL_H
19285 #include <poll.h>
19286 #else
19287 #include <sys/poll.h>
19288 #endif
19289 int main(void) {
19290         struct pollfd myfds;
19291         int ret;
19292
19293         /* check for Darwin bug with respect to "devices" */
19294         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
19295         if (myfds.fd < 0)
19296                 myfds.fd = 0;
19297         myfds.events = POLLIN;
19298         myfds.revents = 0;
19299
19300         ret = poll(&myfds, 1, 100);
19301
19302         if (ret < 0 || (myfds.revents & POLLNVAL)) {
19303                 ret = -1;
19304         } else {
19305                 int fd = 0;
19306                 if (!isatty(fd)) {
19307                         fd = open("/dev/tty", 2);       /* O_RDWR */
19308                 }
19309 #ifdef HAVE_POSIX_OPENPT
19310                 if (fd < 0) {
19311                         fd = posix_openpt(O_RDWR);
19312                 }
19313 #endif
19314
19315                 if (fd >= 0) {
19316                         /* also check with standard input */
19317                         myfds.fd = fd;
19318                         myfds.events = POLLIN;
19319                         myfds.revents = 0;
19320                         ret = poll(&myfds, 1, 100);
19321                 } else {
19322                         ret = -1;
19323                 }
19324         }
19325         ${cf_cv_main_return:-return}(ret < 0);
19326 }
19327 _ACEOF
19328 rm -f conftest$ac_exeext
19329 if { (eval echo "$as_me:19329: \"$ac_link\"") >&5
19330   (eval $ac_link) 2>&5
19331   ac_status=$?
19332   echo "$as_me:19332: \$? = $ac_status" >&5
19333   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19334   { (eval echo "$as_me:19334: \"$ac_try\"") >&5
19335   (eval $ac_try) 2>&5
19336   ac_status=$?
19337   echo "$as_me:19337: \$? = $ac_status" >&5
19338   (exit $ac_status); }; }; then
19339   cf_cv_working_poll=yes
19340 else
19341   echo "$as_me: program exited with status $ac_status" >&5
19342 echo "$as_me: failed program was:" >&5
19343 cat conftest.$ac_ext >&5
19344 cf_cv_working_poll=no
19345 fi
19346 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19347 fi
19348 fi
19349 echo "$as_me:19349: result: $cf_cv_working_poll" >&5
19350 echo "${ECHO_T}$cf_cv_working_poll" >&6
19351 test "$cf_cv_working_poll" = "yes" &&
19352 cat >>confdefs.h <<\EOF
19353 #define HAVE_WORKING_POLL 1
19354 EOF
19355
19356 echo "$as_me:19356: checking for va_copy" >&5
19357 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
19358 if test "${cf_cv_have_va_copy+set}" = set; then
19359   echo $ECHO_N "(cached) $ECHO_C" >&6
19360 else
19361
19362 cat >conftest.$ac_ext <<_ACEOF
19363 #line 19363 "configure"
19364 #include "confdefs.h"
19365
19366 #include <stdarg.h>
19367
19368 int
19369 main (void)
19370 {
19371
19372         static va_list dst;
19373         static va_list src;
19374         va_copy(dst, src)
19375   ;
19376   return 0;
19377 }
19378 _ACEOF
19379 rm -f conftest.$ac_objext conftest$ac_exeext
19380 if { (eval echo "$as_me:19380: \"$ac_link\"") >&5
19381   (eval $ac_link) 2>&5
19382   ac_status=$?
19383   echo "$as_me:19383: \$? = $ac_status" >&5
19384   (exit $ac_status); } &&
19385          { ac_try='test -s conftest$ac_exeext'
19386   { (eval echo "$as_me:19386: \"$ac_try\"") >&5
19387   (eval $ac_try) 2>&5
19388   ac_status=$?
19389   echo "$as_me:19389: \$? = $ac_status" >&5
19390   (exit $ac_status); }; }; then
19391   cf_cv_have_va_copy=yes
19392 else
19393   echo "$as_me: failed program was:" >&5
19394 cat conftest.$ac_ext >&5
19395 cf_cv_have_va_copy=no
19396 fi
19397 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19398 fi
19399 echo "$as_me:19399: result: $cf_cv_have_va_copy" >&5
19400 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
19401
19402 test "$cf_cv_have_va_copy" = yes &&
19403 cat >>confdefs.h <<\EOF
19404 #define HAVE_VA_COPY 1
19405 EOF
19406
19407 echo "$as_me:19407: checking for __va_copy" >&5
19408 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
19409 if test "${cf_cv_have___va_copy+set}" = set; then
19410   echo $ECHO_N "(cached) $ECHO_C" >&6
19411 else
19412
19413 cat >conftest.$ac_ext <<_ACEOF
19414 #line 19414 "configure"
19415 #include "confdefs.h"
19416
19417 #include <stdarg.h>
19418
19419 int
19420 main (void)
19421 {
19422
19423         static va_list dst;
19424         static va_list src;
19425         __va_copy(dst, src)
19426   ;
19427   return 0;
19428 }
19429 _ACEOF
19430 rm -f conftest.$ac_objext conftest$ac_exeext
19431 if { (eval echo "$as_me:19431: \"$ac_link\"") >&5
19432   (eval $ac_link) 2>&5
19433   ac_status=$?
19434   echo "$as_me:19434: \$? = $ac_status" >&5
19435   (exit $ac_status); } &&
19436          { ac_try='test -s conftest$ac_exeext'
19437   { (eval echo "$as_me:19437: \"$ac_try\"") >&5
19438   (eval $ac_try) 2>&5
19439   ac_status=$?
19440   echo "$as_me:19440: \$? = $ac_status" >&5
19441   (exit $ac_status); }; }; then
19442   cf_cv_have___va_copy=yes
19443 else
19444   echo "$as_me: failed program was:" >&5
19445 cat conftest.$ac_ext >&5
19446 cf_cv_have___va_copy=no
19447 fi
19448 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19449 fi
19450 echo "$as_me:19450: result: $cf_cv_have___va_copy" >&5
19451 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
19452
19453 test "$cf_cv_have___va_copy" = yes &&
19454 cat >>confdefs.h <<\EOF
19455 #define HAVE___VA_COPY 1
19456 EOF
19457
19458 echo "$as_me:19458: checking for pid_t" >&5
19459 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
19460 if test "${ac_cv_type_pid_t+set}" = set; then
19461   echo $ECHO_N "(cached) $ECHO_C" >&6
19462 else
19463   cat >conftest.$ac_ext <<_ACEOF
19464 #line 19464 "configure"
19465 #include "confdefs.h"
19466 $ac_includes_default
19467 int
19468 main (void)
19469 {
19470 if ((pid_t *) 0)
19471   return 0;
19472 if (sizeof (pid_t))
19473   return 0;
19474   ;
19475   return 0;
19476 }
19477 _ACEOF
19478 rm -f conftest.$ac_objext
19479 if { (eval echo "$as_me:19479: \"$ac_compile\"") >&5
19480   (eval $ac_compile) 2>&5
19481   ac_status=$?
19482   echo "$as_me:19482: \$? = $ac_status" >&5
19483   (exit $ac_status); } &&
19484          { ac_try='test -s conftest.$ac_objext'
19485   { (eval echo "$as_me:19485: \"$ac_try\"") >&5
19486   (eval $ac_try) 2>&5
19487   ac_status=$?
19488   echo "$as_me:19488: \$? = $ac_status" >&5
19489   (exit $ac_status); }; }; then
19490   ac_cv_type_pid_t=yes
19491 else
19492   echo "$as_me: failed program was:" >&5
19493 cat conftest.$ac_ext >&5
19494 ac_cv_type_pid_t=no
19495 fi
19496 rm -f conftest.$ac_objext conftest.$ac_ext
19497 fi
19498 echo "$as_me:19498: result: $ac_cv_type_pid_t" >&5
19499 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
19500 if test $ac_cv_type_pid_t = yes; then
19501   :
19502 else
19503
19504 cat >>confdefs.h <<EOF
19505 #define pid_t int
19506 EOF
19507
19508 fi
19509
19510 for ac_header in unistd.h vfork.h
19511 do
19512 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19513 echo "$as_me:19513: checking for $ac_header" >&5
19514 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19515 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19516   echo $ECHO_N "(cached) $ECHO_C" >&6
19517 else
19518   cat >conftest.$ac_ext <<_ACEOF
19519 #line 19519 "configure"
19520 #include "confdefs.h"
19521 #include <$ac_header>
19522 _ACEOF
19523 if { (eval echo "$as_me:19523: \"$ac_cpp conftest.$ac_ext\"") >&5
19524   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19525   ac_status=$?
19526   egrep -v '^ *\+' conftest.er1 >conftest.err
19527   rm -f conftest.er1
19528   cat conftest.err >&5
19529   echo "$as_me:19529: \$? = $ac_status" >&5
19530   (exit $ac_status); } >/dev/null; then
19531   if test -s conftest.err; then
19532     ac_cpp_err=$ac_c_preproc_warn_flag
19533   else
19534     ac_cpp_err=
19535   fi
19536 else
19537   ac_cpp_err=yes
19538 fi
19539 if test -z "$ac_cpp_err"; then
19540   eval "$as_ac_Header=yes"
19541 else
19542   echo "$as_me: failed program was:" >&5
19543   cat conftest.$ac_ext >&5
19544   eval "$as_ac_Header=no"
19545 fi
19546 rm -f conftest.err conftest.$ac_ext
19547 fi
19548 echo "$as_me:19548: result: `eval echo '${'$as_ac_Header'}'`" >&5
19549 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19550 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19551   cat >>confdefs.h <<EOF
19552 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19553 EOF
19554
19555 fi
19556 done
19557
19558 for ac_func in fork vfork
19559 do
19560 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19561 echo "$as_me:19561: checking for $ac_func" >&5
19562 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19563 if eval "test \"\${$as_ac_var+set}\" = set"; then
19564   echo $ECHO_N "(cached) $ECHO_C" >&6
19565 else
19566   cat >conftest.$ac_ext <<_ACEOF
19567 #line 19567 "configure"
19568 #include "confdefs.h"
19569 /* System header to define __stub macros and hopefully few prototypes,
19570     which can conflict with char $ac_func (); below.  */
19571 #include <assert.h>
19572 /* Override any gcc2 internal prototype to avoid an error.  */
19573 #ifdef __cplusplus
19574 extern "C"
19575 #endif
19576 /* We use char because int might match the return type of a gcc2
19577    builtin and then its argument prototype would still apply.  */
19578 char $ac_func ();
19579 char (*f) ();
19580
19581 int
19582 main (void)
19583 {
19584 /* The GNU C library defines this for functions which it implements
19585     to always fail with ENOSYS.  Some functions are actually named
19586     something starting with __ and the normal name is an alias.  */
19587 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19588 choke me
19589 #else
19590 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19591 #endif
19592
19593   ;
19594   return 0;
19595 }
19596 _ACEOF
19597 rm -f conftest.$ac_objext conftest$ac_exeext
19598 if { (eval echo "$as_me:19598: \"$ac_link\"") >&5
19599   (eval $ac_link) 2>&5
19600   ac_status=$?
19601   echo "$as_me:19601: \$? = $ac_status" >&5
19602   (exit $ac_status); } &&
19603          { ac_try='test -s conftest$ac_exeext'
19604   { (eval echo "$as_me:19604: \"$ac_try\"") >&5
19605   (eval $ac_try) 2>&5
19606   ac_status=$?
19607   echo "$as_me:19607: \$? = $ac_status" >&5
19608   (exit $ac_status); }; }; then
19609   eval "$as_ac_var=yes"
19610 else
19611   echo "$as_me: failed program was:" >&5
19612 cat conftest.$ac_ext >&5
19613 eval "$as_ac_var=no"
19614 fi
19615 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19616 fi
19617 echo "$as_me:19617: result: `eval echo '${'$as_ac_var'}'`" >&5
19618 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19619 if test `eval echo '${'$as_ac_var'}'` = yes; then
19620   cat >>confdefs.h <<EOF
19621 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19622 EOF
19623
19624 fi
19625 done
19626
19627 ac_cv_func_fork_works=$ac_cv_func_fork
19628 if test "x$ac_cv_func_fork" = xyes; then
19629   echo "$as_me:19629: checking for working fork" >&5
19630 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
19631 if test "${ac_cv_func_fork_works+set}" = set; then
19632   echo $ECHO_N "(cached) $ECHO_C" >&6
19633 else
19634   if test "$cross_compiling" = yes; then
19635   ac_cv_func_fork_works=cross
19636 else
19637   cat >conftest.$ac_ext <<_ACEOF
19638 /* By Rüdiger Kuhlmann. */
19639       #include <sys/types.h>
19640       #if HAVE_UNISTD_H
19641       # include <unistd.h>
19642       #endif
19643       /* Some systems only have a dummy stub for fork() */
19644       int main (void)
19645       {
19646         if (fork() < 0)
19647           $ac_main_return (1);
19648         $ac_main_return (0);
19649       }
19650 _ACEOF
19651 rm -f conftest$ac_exeext
19652 if { (eval echo "$as_me:19652: \"$ac_link\"") >&5
19653   (eval $ac_link) 2>&5
19654   ac_status=$?
19655   echo "$as_me:19655: \$? = $ac_status" >&5
19656   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19657   { (eval echo "$as_me:19657: \"$ac_try\"") >&5
19658   (eval $ac_try) 2>&5
19659   ac_status=$?
19660   echo "$as_me:19660: \$? = $ac_status" >&5
19661   (exit $ac_status); }; }; then
19662   ac_cv_func_fork_works=yes
19663 else
19664   echo "$as_me: program exited with status $ac_status" >&5
19665 echo "$as_me: failed program was:" >&5
19666 cat conftest.$ac_ext >&5
19667 ac_cv_func_fork_works=no
19668 fi
19669 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19670 fi
19671 fi
19672 echo "$as_me:19672: result: $ac_cv_func_fork_works" >&5
19673 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
19674
19675 fi
19676 if test "x$ac_cv_func_fork_works" = xcross; then
19677   case $host in
19678     *-*-amigaos* | *-*-msdosdjgpp*)
19679       # Override, as these systems have only a dummy fork() stub
19680       ac_cv_func_fork_works=no
19681       ;;
19682     *)
19683       ac_cv_func_fork_works=yes
19684       ;;
19685   esac
19686   { echo "$as_me:19686: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
19687 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
19688 fi
19689 ac_cv_func_vfork_works=$ac_cv_func_vfork
19690 if test "x$ac_cv_func_vfork" = xyes; then
19691   echo "$as_me:19691: checking for working vfork" >&5
19692 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
19693 if test "${ac_cv_func_vfork_works+set}" = set; then
19694   echo $ECHO_N "(cached) $ECHO_C" >&6
19695 else
19696   if test "$cross_compiling" = yes; then
19697   ac_cv_func_vfork_works=cross
19698 else
19699   cat >conftest.$ac_ext <<_ACEOF
19700 #line 19700 "configure"
19701 #include "confdefs.h"
19702 /* Thanks to Paul Eggert for this test.  */
19703 #include <stdio.h>
19704 #include <sys/types.h>
19705 #include <sys/stat.h>
19706 #if HAVE_UNISTD_H
19707 # include <unistd.h>
19708 #endif
19709 #if HAVE_VFORK_H
19710 # include <vfork.h>
19711 #endif
19712 /* On some sparc systems, changes by the child to local and incoming
19713    argument registers are propagated back to the parent.  The compiler
19714    is told about this with #include <vfork.h>, but some compilers
19715    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
19716    static variable whose address is put into a register that is
19717    clobbered by the vfork.  */
19718 static
19719 #ifdef __cplusplus
19720 sparc_address_test (int arg)
19721 # else
19722 sparc_address_test (arg) int arg;
19723 #endif
19724 {
19725   static pid_t child;
19726   if (!child) {
19727     child = vfork ();
19728     if (child < 0) {
19729       perror ("vfork");
19730       _exit(2);
19731     }
19732     if (!child) {
19733       arg = getpid();
19734       write(-1, "", 0);
19735       _exit (arg);
19736     }
19737   }
19738 }
19739
19740 int
19741 main (void)
19742 {
19743   pid_t parent = getpid ();
19744   pid_t child;
19745
19746   sparc_address_test ();
19747
19748   child = vfork ();
19749
19750   if (child == 0) {
19751     /* Here is another test for sparc vfork register problems.  This
19752        test uses lots of local variables, at least as many local
19753        variables as main has allocated so far including compiler
19754        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
19755        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
19756        reuse the register of parent for one of the local variables,
19757        since it will think that parent can't possibly be used any more
19758        in this routine.  Assigning to the local variable will thus
19759        munge parent in the parent process.  */
19760     pid_t
19761       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
19762       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
19763     /* Convince the compiler that p..p7 are live; otherwise, it might
19764        use the same hardware register for all 8 local variables.  */
19765     if (p != p1 || p != p2 || p != p3 || p != p4
19766         || p != p5 || p != p6 || p != p7)
19767       _exit(1);
19768
19769     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
19770        from child file descriptors.  If the child closes a descriptor
19771        before it execs or exits, this munges the parent's descriptor
19772        as well.  Test for this by closing stdout in the child.  */
19773     _exit(close(fileno(stdout)) != 0);
19774   } else {
19775     int status;
19776     struct stat st;
19777
19778     while (wait(&status) != child)
19779       ;
19780     $ac_main_return(
19781          /* Was there some problem with vforking?  */
19782          child < 0
19783
19784          /* Did the child fail?  (This shouldn't happen.)  */
19785          || status
19786
19787          /* Did the vfork/compiler bug occur?  */
19788          || parent != getpid()
19789
19790          /* Did the file descriptor bug occur?  */
19791          || fstat(fileno(stdout), &st) != 0
19792          );
19793   }
19794 }
19795 _ACEOF
19796 rm -f conftest$ac_exeext
19797 if { (eval echo "$as_me:19797: \"$ac_link\"") >&5
19798   (eval $ac_link) 2>&5
19799   ac_status=$?
19800   echo "$as_me:19800: \$? = $ac_status" >&5
19801   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19802   { (eval echo "$as_me:19802: \"$ac_try\"") >&5
19803   (eval $ac_try) 2>&5
19804   ac_status=$?
19805   echo "$as_me:19805: \$? = $ac_status" >&5
19806   (exit $ac_status); }; }; then
19807   ac_cv_func_vfork_works=yes
19808 else
19809   echo "$as_me: program exited with status $ac_status" >&5
19810 echo "$as_me: failed program was:" >&5
19811 cat conftest.$ac_ext >&5
19812 ac_cv_func_vfork_works=no
19813 fi
19814 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19815 fi
19816 fi
19817 echo "$as_me:19817: result: $ac_cv_func_vfork_works" >&5
19818 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
19819
19820 fi;
19821 if test "x$ac_cv_func_fork_works" = xcross; then
19822   ac_cv_func_vfork_works=ac_cv_func_vfork
19823   { echo "$as_me:19823: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
19824 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
19825 fi
19826
19827 if test "x$ac_cv_func_vfork_works" = xyes; then
19828
19829 cat >>confdefs.h <<\EOF
19830 #define HAVE_WORKING_VFORK 1
19831 EOF
19832
19833 else
19834
19835 cat >>confdefs.h <<\EOF
19836 #define vfork fork
19837 EOF
19838
19839 fi
19840 if test "x$ac_cv_func_fork_works" = xyes; then
19841
19842 cat >>confdefs.h <<\EOF
19843 #define HAVE_WORKING_FORK 1
19844 EOF
19845
19846 fi
19847
19848 # special check for test/ditto.c
19849
19850 echo "$as_me:19850: checking for openpty in -lutil" >&5
19851 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19852 if test "${ac_cv_lib_util_openpty+set}" = set; then
19853   echo $ECHO_N "(cached) $ECHO_C" >&6
19854 else
19855   ac_check_lib_save_LIBS=$LIBS
19856 LIBS="-lutil  $LIBS"
19857 cat >conftest.$ac_ext <<_ACEOF
19858 #line 19858 "configure"
19859 #include "confdefs.h"
19860
19861 /* Override any gcc2 internal prototype to avoid an error.  */
19862 #ifdef __cplusplus
19863 extern "C"
19864 #endif
19865 /* We use char because int might match the return type of a gcc2
19866    builtin and then its argument prototype would still apply.  */
19867 char openpty ();
19868 int
19869 main (void)
19870 {
19871 openpty ();
19872   ;
19873   return 0;
19874 }
19875 _ACEOF
19876 rm -f conftest.$ac_objext conftest$ac_exeext
19877 if { (eval echo "$as_me:19877: \"$ac_link\"") >&5
19878   (eval $ac_link) 2>&5
19879   ac_status=$?
19880   echo "$as_me:19880: \$? = $ac_status" >&5
19881   (exit $ac_status); } &&
19882          { ac_try='test -s conftest$ac_exeext'
19883   { (eval echo "$as_me:19883: \"$ac_try\"") >&5
19884   (eval $ac_try) 2>&5
19885   ac_status=$?
19886   echo "$as_me:19886: \$? = $ac_status" >&5
19887   (exit $ac_status); }; }; then
19888   ac_cv_lib_util_openpty=yes
19889 else
19890   echo "$as_me: failed program was:" >&5
19891 cat conftest.$ac_ext >&5
19892 ac_cv_lib_util_openpty=no
19893 fi
19894 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19895 LIBS=$ac_check_lib_save_LIBS
19896 fi
19897 echo "$as_me:19897: result: $ac_cv_lib_util_openpty" >&5
19898 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
19899 if test $ac_cv_lib_util_openpty = yes; then
19900   cf_cv_lib_util=yes
19901 else
19902   cf_cv_lib_util=no
19903 fi
19904
19905 echo "$as_me:19905: checking for openpty header" >&5
19906 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
19907 if test "${cf_cv_func_openpty+set}" = set; then
19908   echo $ECHO_N "(cached) $ECHO_C" >&6
19909 else
19910
19911         cf_save_LIBS="$LIBS"
19912         test $cf_cv_lib_util = yes && {
19913 cf_add_libs="-lutil"
19914 # Filter out duplicates - this happens with badly-designed ".pc" files...
19915 for cf_add_1lib in $LIBS
19916 do
19917         for cf_add_2lib in $cf_add_libs
19918         do
19919                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19920                 then
19921                         cf_add_1lib=
19922                         break
19923                 fi
19924         done
19925         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19926 done
19927 LIBS="$cf_add_libs"
19928  }
19929         for cf_header in pty.h libutil.h util.h
19930         do
19931         cat >conftest.$ac_ext <<_ACEOF
19932 #line 19932 "configure"
19933 #include "confdefs.h"
19934
19935 #include <$cf_header>
19936
19937 int
19938 main (void)
19939 {
19940
19941         int x = openpty((int *)0, (int *)0, (char *)0,
19942                                    (struct termios *)0, (struct winsize *)0);
19943
19944   ;
19945   return 0;
19946 }
19947 _ACEOF
19948 rm -f conftest.$ac_objext conftest$ac_exeext
19949 if { (eval echo "$as_me:19949: \"$ac_link\"") >&5
19950   (eval $ac_link) 2>&5
19951   ac_status=$?
19952   echo "$as_me:19952: \$? = $ac_status" >&5
19953   (exit $ac_status); } &&
19954          { ac_try='test -s conftest$ac_exeext'
19955   { (eval echo "$as_me:19955: \"$ac_try\"") >&5
19956   (eval $ac_try) 2>&5
19957   ac_status=$?
19958   echo "$as_me:19958: \$? = $ac_status" >&5
19959   (exit $ac_status); }; }; then
19960
19961                 cf_cv_func_openpty=$cf_header
19962                 break
19963
19964 else
19965   echo "$as_me: failed program was:" >&5
19966 cat conftest.$ac_ext >&5
19967
19968                 cf_cv_func_openpty=no
19969
19970 fi
19971 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19972         done
19973         LIBS="$cf_save_LIBS"
19974
19975 fi
19976 echo "$as_me:19976: result: $cf_cv_func_openpty" >&5
19977 echo "${ECHO_T}$cf_cv_func_openpty" >&6
19978
19979 if test "$cf_cv_func_openpty" != no ; then
19980
19981 cat >>confdefs.h <<EOF
19982 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
19983 EOF
19984
19985 cat >>confdefs.h <<\EOF
19986 #define USE_XTERM_PTY 1
19987 EOF
19988
19989         if test "x$cf_cv_lib_util" = xyes ; then
19990
19991 cf_add_libs="-lutil"
19992 # Filter out duplicates - this happens with badly-designed ".pc" files...
19993 for cf_add_1lib in $TEST_LIBS
19994 do
19995         for cf_add_2lib in $cf_add_libs
19996         do
19997                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19998                 then
19999                         cf_add_1lib=
20000                         break
20001                 fi
20002         done
20003         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20004 done
20005 TEST_LIBS="$cf_add_libs"
20006
20007         fi
20008 fi
20009
20010 if test "$with_hashed_db" != no ; then
20011
20012 cat >>confdefs.h <<\EOF
20013 #define USE_HASHED_DB 1
20014 EOF
20015
20016 case $with_hashed_db in
20017 (yes|*able*)
20018         ;;
20019 (*)
20020         if test -d "$with_hashed_db" ; then
20021
20022 if test -n "$with_hashed_db/include" ; then
20023   for cf_add_incdir in $with_hashed_db/include
20024   do
20025         while test $cf_add_incdir != /usr/include
20026         do
20027           if test -d $cf_add_incdir
20028           then
20029                 cf_have_incdir=no
20030                 if test -n "$CFLAGS$CPPFLAGS" ; then
20031                   # a loop is needed to ensure we can add subdirs of existing dirs
20032                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
20033                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
20034                           cf_have_incdir=yes; break
20035                         fi
20036                   done
20037                 fi
20038
20039                 if test "$cf_have_incdir" = no ; then
20040                   if test "$cf_add_incdir" = /usr/local/include ; then
20041                         if test "$GCC" = yes
20042                         then
20043                           cf_save_CPPFLAGS=$CPPFLAGS
20044                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
20045                           cat >conftest.$ac_ext <<_ACEOF
20046 #line 20046 "configure"
20047 #include "confdefs.h"
20048 #include <stdio.h>
20049 int
20050 main (void)
20051 {
20052 printf("Hello")
20053   ;
20054   return 0;
20055 }
20056 _ACEOF
20057 rm -f conftest.$ac_objext
20058 if { (eval echo "$as_me:20058: \"$ac_compile\"") >&5
20059   (eval $ac_compile) 2>&5
20060   ac_status=$?
20061   echo "$as_me:20061: \$? = $ac_status" >&5
20062   (exit $ac_status); } &&
20063          { ac_try='test -s conftest.$ac_objext'
20064   { (eval echo "$as_me:20064: \"$ac_try\"") >&5
20065   (eval $ac_try) 2>&5
20066   ac_status=$?
20067   echo "$as_me:20067: \$? = $ac_status" >&5
20068   (exit $ac_status); }; }; then
20069   :
20070 else
20071   echo "$as_me: failed program was:" >&5
20072 cat conftest.$ac_ext >&5
20073 cf_have_incdir=yes
20074 fi
20075 rm -f conftest.$ac_objext conftest.$ac_ext
20076                           CPPFLAGS=$cf_save_CPPFLAGS
20077                         fi
20078                   fi
20079                 fi
20080
20081                 if test "$cf_have_incdir" = no ; then
20082                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
20083
20084 echo "${as_me:-configure}:20084: testing adding $cf_add_incdir to include-path ..." 1>&5
20085
20086                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
20087
20088                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
20089                   test "$cf_top_incdir" = "$cf_add_incdir" && break
20090                   cf_add_incdir="$cf_top_incdir"
20091                 else
20092                   break
20093                 fi
20094           else
20095                 break
20096           fi
20097         done
20098   done
20099 fi
20100
20101 if test -n "$with_hashed_db/lib" ; then
20102         for cf_add_libdir in $with_hashed_db/lib
20103         do
20104                 if test $cf_add_libdir = /usr/lib ; then
20105                         :
20106                 elif test -d $cf_add_libdir
20107                 then
20108                         cf_have_libdir=no
20109                         if test -n "$LDFLAGS$LIBS" ; then
20110                                 # a loop is needed to ensure we can add subdirs of existing dirs
20111                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
20112                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
20113                                                 cf_have_libdir=yes; break
20114                                         fi
20115                                 done
20116                         fi
20117                         if test "$cf_have_libdir" = no ; then
20118                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
20119
20120 echo "${as_me:-configure}:20120: testing adding $cf_add_libdir to library-path ..." 1>&5
20121
20122                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
20123                         fi
20124                 fi
20125         done
20126 fi
20127
20128         else
20129                 case "$with_hashed_db" in
20130                 (./*|../*|/*)
20131                         { echo "$as_me:20131: WARNING: no such directory $with_hashed_db" >&5
20132 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
20133                         ;;
20134                 (*)
20135
20136 cf_search=
20137
20138 test "x$prefix" != "xNONE" && \
20139 test -d "$prefix" && \
20140  {
20141         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
20142         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
20143         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
20144         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
20145         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
20146         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
20147 }
20148
20149 for cf_subdir_prefix in \
20150         /usr \
20151         /usr/local \
20152         /usr/pkg \
20153         /opt \
20154         /opt/local \
20155         $HOME
20156 do
20157
20158 test "x$cf_subdir_prefix" != "x$prefix" && \
20159 test -d "$cf_subdir_prefix" && \
20160 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
20161         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
20162         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
20163         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
20164         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
20165         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
20166         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"
20167 }
20168
20169 done
20170
20171         for cf_item in $cf_search
20172         do
20173                 case $cf_item in
20174                 (*/$with_hashed_db)
20175
20176 if test -n "$cf_item" ; then
20177   for cf_add_incdir in $cf_item
20178   do
20179         while test $cf_add_incdir != /usr/include
20180         do
20181           if test -d $cf_add_incdir
20182           then
20183                 cf_have_incdir=no
20184                 if test -n "$CFLAGS$CPPFLAGS" ; then
20185                   # a loop is needed to ensure we can add subdirs of existing dirs
20186                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
20187                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
20188                           cf_have_incdir=yes; break
20189                         fi
20190                   done
20191                 fi
20192
20193                 if test "$cf_have_incdir" = no ; then
20194                   if test "$cf_add_incdir" = /usr/local/include ; then
20195                         if test "$GCC" = yes
20196                         then
20197                           cf_save_CPPFLAGS=$CPPFLAGS
20198                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
20199                           cat >conftest.$ac_ext <<_ACEOF
20200 #line 20200 "configure"
20201 #include "confdefs.h"
20202 #include <stdio.h>
20203 int
20204 main (void)
20205 {
20206 printf("Hello")
20207   ;
20208   return 0;
20209 }
20210 _ACEOF
20211 rm -f conftest.$ac_objext
20212 if { (eval echo "$as_me:20212: \"$ac_compile\"") >&5
20213   (eval $ac_compile) 2>&5
20214   ac_status=$?
20215   echo "$as_me:20215: \$? = $ac_status" >&5
20216   (exit $ac_status); } &&
20217          { ac_try='test -s conftest.$ac_objext'
20218   { (eval echo "$as_me:20218: \"$ac_try\"") >&5
20219   (eval $ac_try) 2>&5
20220   ac_status=$?
20221   echo "$as_me:20221: \$? = $ac_status" >&5
20222   (exit $ac_status); }; }; then
20223   :
20224 else
20225   echo "$as_me: failed program was:" >&5
20226 cat conftest.$ac_ext >&5
20227 cf_have_incdir=yes
20228 fi
20229 rm -f conftest.$ac_objext conftest.$ac_ext
20230                           CPPFLAGS=$cf_save_CPPFLAGS
20231                         fi
20232                   fi
20233                 fi
20234
20235                 if test "$cf_have_incdir" = no ; then
20236                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
20237
20238 echo "${as_me:-configure}:20238: testing adding $cf_add_incdir to include-path ..." 1>&5
20239
20240                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
20241
20242                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
20243                   test "$cf_top_incdir" = "$cf_add_incdir" && break
20244                   cf_add_incdir="$cf_top_incdir"
20245                 else
20246                   break
20247                 fi
20248           else
20249                 break
20250           fi
20251         done
20252   done
20253 fi
20254
20255                         ;;
20256                 esac
20257         done
20258
20259 cf_search=
20260
20261 test "x$prefix" != "xNONE" && \
20262 test -d "$prefix" && \
20263  {
20264         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
20265         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
20266         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
20267         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
20268         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
20269         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
20270 }
20271
20272 for cf_subdir_prefix in \
20273         /usr \
20274         /usr/local \
20275         /usr/pkg \
20276         /opt \
20277         /opt/local \
20278         $HOME
20279 do
20280
20281 test "x$cf_subdir_prefix" != "x$prefix" && \
20282 test -d "$cf_subdir_prefix" && \
20283 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
20284         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
20285         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
20286         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
20287         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
20288         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
20289         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"
20290 }
20291
20292 done
20293
20294         for cf_item in $cf_search
20295         do
20296                 case $cf_item in
20297                 (*/$with_hashed_db)
20298
20299 if test -n "$cf_item" ; then
20300         for cf_add_libdir in $cf_item
20301         do
20302                 if test $cf_add_libdir = /usr/lib ; then
20303                         :
20304                 elif test -d $cf_add_libdir
20305                 then
20306                         cf_have_libdir=no
20307                         if test -n "$LDFLAGS$LIBS" ; then
20308                                 # a loop is needed to ensure we can add subdirs of existing dirs
20309                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
20310                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
20311                                                 cf_have_libdir=yes; break
20312                                         fi
20313                                 done
20314                         fi
20315                         if test "$cf_have_libdir" = no ; then
20316                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
20317
20318 echo "${as_me:-configure}:20318: testing adding $cf_add_libdir to library-path ..." 1>&5
20319
20320                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
20321                         fi
20322                 fi
20323         done
20324 fi
20325
20326                         ;;
20327                 esac
20328         done
20329
20330                         ;;
20331                 esac
20332         fi
20333 esac
20334
20335 echo "$as_me:20335: checking for db.h" >&5
20336 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
20337 if test "${ac_cv_header_db_h+set}" = set; then
20338   echo $ECHO_N "(cached) $ECHO_C" >&6
20339 else
20340   cat >conftest.$ac_ext <<_ACEOF
20341 #line 20341 "configure"
20342 #include "confdefs.h"
20343 #include <db.h>
20344 _ACEOF
20345 if { (eval echo "$as_me:20345: \"$ac_cpp conftest.$ac_ext\"") >&5
20346   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20347   ac_status=$?
20348   egrep -v '^ *\+' conftest.er1 >conftest.err
20349   rm -f conftest.er1
20350   cat conftest.err >&5
20351   echo "$as_me:20351: \$? = $ac_status" >&5
20352   (exit $ac_status); } >/dev/null; then
20353   if test -s conftest.err; then
20354     ac_cpp_err=$ac_c_preproc_warn_flag
20355   else
20356     ac_cpp_err=
20357   fi
20358 else
20359   ac_cpp_err=yes
20360 fi
20361 if test -z "$ac_cpp_err"; then
20362   ac_cv_header_db_h=yes
20363 else
20364   echo "$as_me: failed program was:" >&5
20365   cat conftest.$ac_ext >&5
20366   ac_cv_header_db_h=no
20367 fi
20368 rm -f conftest.err conftest.$ac_ext
20369 fi
20370 echo "$as_me:20370: result: $ac_cv_header_db_h" >&5
20371 echo "${ECHO_T}$ac_cv_header_db_h" >&6
20372 if test $ac_cv_header_db_h = yes; then
20373
20374 echo "$as_me:20374: checking for version of db" >&5
20375 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
20376 if test "${cf_cv_hashed_db_version+set}" = set; then
20377   echo $ECHO_N "(cached) $ECHO_C" >&6
20378 else
20379
20380 cf_cv_hashed_db_version=unknown
20381
20382 for cf_db_version in 1 2 3 4 5 6
20383 do
20384
20385 echo "${as_me:-configure}:20385: testing checking for db version $cf_db_version ..." 1>&5
20386
20387         cat >conftest.$ac_ext <<_ACEOF
20388 #line 20388 "configure"
20389 #include "confdefs.h"
20390
20391 $ac_includes_default
20392 #include <db.h>
20393
20394 #ifdef DB_VERSION_MAJOR
20395         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
20396 #if $cf_db_version == DB_VERSION_MAJOR
20397         /* ok */
20398 #else
20399         make an error
20400 #endif
20401 #else
20402 #if $cf_db_version == 1
20403         /* ok: assuming this is DB 1.8.5 */
20404 #else
20405         make an error
20406 #endif
20407 #endif
20408
20409 int
20410 main (void)
20411 {
20412 DBT *foo = 0
20413   ;
20414   return 0;
20415 }
20416 _ACEOF
20417 rm -f conftest.$ac_objext
20418 if { (eval echo "$as_me:20418: \"$ac_compile\"") >&5
20419   (eval $ac_compile) 2>&5
20420   ac_status=$?
20421   echo "$as_me:20421: \$? = $ac_status" >&5
20422   (exit $ac_status); } &&
20423          { ac_try='test -s conftest.$ac_objext'
20424   { (eval echo "$as_me:20424: \"$ac_try\"") >&5
20425   (eval $ac_try) 2>&5
20426   ac_status=$?
20427   echo "$as_me:20427: \$? = $ac_status" >&5
20428   (exit $ac_status); }; }; then
20429
20430         cf_cv_hashed_db_version=$cf_db_version
20431         break
20432
20433 else
20434   echo "$as_me: failed program was:" >&5
20435 cat conftest.$ac_ext >&5
20436 fi
20437 rm -f conftest.$ac_objext conftest.$ac_ext
20438 done
20439
20440 fi
20441 echo "$as_me:20441: result: $cf_cv_hashed_db_version" >&5
20442 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
20443
20444 if test "$cf_cv_hashed_db_version" = unknown ; then
20445         { { echo "$as_me:20445: error: Cannot determine version of db" >&5
20446 echo "$as_me: error: Cannot determine version of db" >&2;}
20447    { (exit 1); exit 1; }; }
20448 else
20449
20450 echo "$as_me:20450: checking for db libraries" >&5
20451 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
20452 if test "${cf_cv_hashed_db_libs+set}" = set; then
20453   echo $ECHO_N "(cached) $ECHO_C" >&6
20454 else
20455
20456 cf_cv_hashed_db_libs=unknown
20457 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
20458 do
20459         cf_save_libs="$LIBS"
20460         if test -n "$cf_db_libs"; then
20461
20462 cf_add_libs="-l$cf_db_libs"
20463 # Filter out duplicates - this happens with badly-designed ".pc" files...
20464 for cf_add_1lib in $LIBS
20465 do
20466         for cf_add_2lib in $cf_add_libs
20467         do
20468                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20469                 then
20470                         cf_add_1lib=
20471                         break
20472                 fi
20473         done
20474         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20475 done
20476 LIBS="$cf_add_libs"
20477
20478         fi
20479
20480 echo "${as_me:-configure}:20480: testing checking for library "$cf_db_libs" ..." 1>&5
20481
20482         cat >conftest.$ac_ext <<_ACEOF
20483 #line 20483 "configure"
20484 #include "confdefs.h"
20485
20486 $ac_includes_default
20487 #include <db.h>
20488
20489 int
20490 main (void)
20491 {
20492
20493         char *path = "/tmp/foo";
20494 #ifdef DB_VERSION_MAJOR
20495 #if DB_VERSION_MAJOR >= 4
20496         DB *result = 0;
20497         db_create(&result, NULL, 0);
20498         result->open(result,
20499                 NULL,
20500                 path,
20501                 path,
20502                 DB_HASH,
20503                 DB_CREATE,
20504                 0644);
20505 #elif DB_VERSION_MAJOR >= 3
20506         DB *result = 0;
20507         db_create(&result, NULL, 0);
20508         result->open(result,
20509                 path,
20510                 path,
20511                 DB_HASH,
20512                 DB_CREATE,
20513                 0644);
20514 #elif DB_VERSION_MAJOR >= 2
20515         DB *result = 0;
20516         db_open(path,
20517                 DB_HASH,
20518                 DB_CREATE,
20519                 0644,
20520                 (DB_ENV *) 0,
20521                 (DB_INFO *) 0,
20522                 &result);
20523 #endif /* DB_VERSION_MAJOR */
20524 #else
20525         DB *result = dbopen(path,
20526                      2,
20527                      0644,
20528                      DB_HASH,
20529                      0);
20530 #endif
20531         ${cf_cv_main_return:-return}(result != 0)
20532
20533   ;
20534   return 0;
20535 }
20536 _ACEOF
20537 rm -f conftest.$ac_objext conftest$ac_exeext
20538 if { (eval echo "$as_me:20538: \"$ac_link\"") >&5
20539   (eval $ac_link) 2>&5
20540   ac_status=$?
20541   echo "$as_me:20541: \$? = $ac_status" >&5
20542   (exit $ac_status); } &&
20543          { ac_try='test -s conftest$ac_exeext'
20544   { (eval echo "$as_me:20544: \"$ac_try\"") >&5
20545   (eval $ac_try) 2>&5
20546   ac_status=$?
20547   echo "$as_me:20547: \$? = $ac_status" >&5
20548   (exit $ac_status); }; }; then
20549
20550         if test -n "$cf_db_libs" ; then
20551                 cf_cv_hashed_db_libs=$cf_db_libs
20552         else
20553                 cf_cv_hashed_db_libs=default
20554         fi
20555         LIBS="$cf_save_libs"
20556         break
20557
20558 else
20559   echo "$as_me: failed program was:" >&5
20560 cat conftest.$ac_ext >&5
20561 fi
20562 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20563         LIBS="$cf_save_libs"
20564 done
20565
20566 fi
20567 echo "$as_me:20567: result: $cf_cv_hashed_db_libs" >&5
20568 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
20569
20570         if test "$cf_cv_hashed_db_libs" = unknown ; then
20571                 { { echo "$as_me:20571: error: Cannot determine library for db" >&5
20572 echo "$as_me: error: Cannot determine library for db" >&2;}
20573    { (exit 1); exit 1; }; }
20574         elif test "$cf_cv_hashed_db_libs" != default ; then
20575
20576 cf_add_libs="-l$cf_cv_hashed_db_libs"
20577 # Filter out duplicates - this happens with badly-designed ".pc" files...
20578 for cf_add_1lib in $LIBS
20579 do
20580         for cf_add_2lib in $cf_add_libs
20581         do
20582                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20583                 then
20584                         cf_add_1lib=
20585                         break
20586                 fi
20587         done
20588         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20589 done
20590 LIBS="$cf_add_libs"
20591
20592         fi
20593 fi
20594
20595 else
20596
20597         { { echo "$as_me:20597: error: Cannot find db.h" >&5
20598 echo "$as_me: error: Cannot find db.h" >&2;}
20599    { (exit 1); exit 1; }; }
20600
20601 fi
20602
20603 fi
20604
20605 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
20606         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
20607         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
20608 fi
20609
20610 # Just in case, check if the C compiler has a bool type.
20611
20612 echo "$as_me:20612: checking if we should include stdbool.h" >&5
20613 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20614
20615 if test "${cf_cv_header_stdbool_h+set}" = set; then
20616   echo $ECHO_N "(cached) $ECHO_C" >&6
20617 else
20618
20619         cat >conftest.$ac_ext <<_ACEOF
20620 #line 20620 "configure"
20621 #include "confdefs.h"
20622
20623 int
20624 main (void)
20625 {
20626 bool foo = false
20627   ;
20628   return 0;
20629 }
20630 _ACEOF
20631 rm -f conftest.$ac_objext
20632 if { (eval echo "$as_me:20632: \"$ac_compile\"") >&5
20633   (eval $ac_compile) 2>&5
20634   ac_status=$?
20635   echo "$as_me:20635: \$? = $ac_status" >&5
20636   (exit $ac_status); } &&
20637          { ac_try='test -s conftest.$ac_objext'
20638   { (eval echo "$as_me:20638: \"$ac_try\"") >&5
20639   (eval $ac_try) 2>&5
20640   ac_status=$?
20641   echo "$as_me:20641: \$? = $ac_status" >&5
20642   (exit $ac_status); }; }; then
20643   cf_cv_header_stdbool_h=0
20644 else
20645   echo "$as_me: failed program was:" >&5
20646 cat conftest.$ac_ext >&5
20647 cat >conftest.$ac_ext <<_ACEOF
20648 #line 20648 "configure"
20649 #include "confdefs.h"
20650
20651 #ifndef __BEOS__
20652 #include <stdbool.h>
20653 #endif
20654
20655 int
20656 main (void)
20657 {
20658 bool foo = false
20659   ;
20660   return 0;
20661 }
20662 _ACEOF
20663 rm -f conftest.$ac_objext
20664 if { (eval echo "$as_me:20664: \"$ac_compile\"") >&5
20665   (eval $ac_compile) 2>&5
20666   ac_status=$?
20667   echo "$as_me:20667: \$? = $ac_status" >&5
20668   (exit $ac_status); } &&
20669          { ac_try='test -s conftest.$ac_objext'
20670   { (eval echo "$as_me:20670: \"$ac_try\"") >&5
20671   (eval $ac_try) 2>&5
20672   ac_status=$?
20673   echo "$as_me:20673: \$? = $ac_status" >&5
20674   (exit $ac_status); }; }; then
20675   cf_cv_header_stdbool_h=1
20676 else
20677   echo "$as_me: failed program was:" >&5
20678 cat conftest.$ac_ext >&5
20679 cf_cv_header_stdbool_h=0
20680 fi
20681 rm -f conftest.$ac_objext conftest.$ac_ext
20682 fi
20683 rm -f conftest.$ac_objext conftest.$ac_ext
20684 fi
20685
20686 if test "$cf_cv_header_stdbool_h" = 1
20687 then    echo "$as_me:20687: result: yes" >&5
20688 echo "${ECHO_T}yes" >&6
20689 else    echo "$as_me:20689: result: no" >&5
20690 echo "${ECHO_T}no" >&6
20691 fi
20692
20693 echo "$as_me:20693: checking for builtin bool type" >&5
20694 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20695
20696 if test "${cf_cv_cc_bool_type+set}" = set; then
20697   echo $ECHO_N "(cached) $ECHO_C" >&6
20698 else
20699
20700         cat >conftest.$ac_ext <<_ACEOF
20701 #line 20701 "configure"
20702 #include "confdefs.h"
20703
20704 #include <stdio.h>
20705 #include <sys/types.h>
20706
20707 int
20708 main (void)
20709 {
20710 bool x = false
20711   ;
20712   return 0;
20713 }
20714 _ACEOF
20715 rm -f conftest.$ac_objext
20716 if { (eval echo "$as_me:20716: \"$ac_compile\"") >&5
20717   (eval $ac_compile) 2>&5
20718   ac_status=$?
20719   echo "$as_me:20719: \$? = $ac_status" >&5
20720   (exit $ac_status); } &&
20721          { ac_try='test -s conftest.$ac_objext'
20722   { (eval echo "$as_me:20722: \"$ac_try\"") >&5
20723   (eval $ac_try) 2>&5
20724   ac_status=$?
20725   echo "$as_me:20725: \$? = $ac_status" >&5
20726   (exit $ac_status); }; }; then
20727   cf_cv_cc_bool_type=1
20728 else
20729   echo "$as_me: failed program was:" >&5
20730 cat conftest.$ac_ext >&5
20731 cf_cv_cc_bool_type=0
20732 fi
20733 rm -f conftest.$ac_objext conftest.$ac_ext
20734
20735 fi
20736
20737 if test "$cf_cv_cc_bool_type" = 1
20738 then    echo "$as_me:20738: result: yes" >&5
20739 echo "${ECHO_T}yes" >&6
20740 else    echo "$as_me:20740: result: no" >&5
20741 echo "${ECHO_T}no" >&6
20742 fi
20743
20744 # Check for C++ compiler characteristics (and ensure that it's there!)
20745 if test -n "$CXX" ; then
20746         ac_ext=cc
20747 ac_cpp='$CXXCPP $CPPFLAGS'
20748 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20749 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20750 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20751 ac_main_return=return
20752
20753 if test -n "$GXX" ; then
20754
20755         cf_save="$LIBS"
20756         LIBS="$LIBS $CXXLIBS"
20757         echo "$as_me:20757: checking if we already have C++ library" >&5
20758 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
20759         cat >conftest.$ac_ext <<_ACEOF
20760 #line 20760 "configure"
20761 #include "confdefs.h"
20762
20763                         #include <iostream>
20764 int
20765 main (void)
20766 {
20767
20768                         std::cout << "Hello World!" << std::endl;
20769   ;
20770   return 0;
20771 }
20772 _ACEOF
20773 rm -f conftest.$ac_objext conftest$ac_exeext
20774 if { (eval echo "$as_me:20774: \"$ac_link\"") >&5
20775   (eval $ac_link) 2>&5
20776   ac_status=$?
20777   echo "$as_me:20777: \$? = $ac_status" >&5
20778   (exit $ac_status); } &&
20779          { ac_try='test -s conftest$ac_exeext'
20780   { (eval echo "$as_me:20780: \"$ac_try\"") >&5
20781   (eval $ac_try) 2>&5
20782   ac_status=$?
20783   echo "$as_me:20783: \$? = $ac_status" >&5
20784   (exit $ac_status); }; }; then
20785   cf_have_libstdcpp=yes
20786 else
20787   echo "$as_me: failed program was:" >&5
20788 cat conftest.$ac_ext >&5
20789 cf_have_libstdcpp=no
20790 fi
20791 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20792         echo "$as_me:20792: result: $cf_have_libstdcpp" >&5
20793 echo "${ECHO_T}$cf_have_libstdcpp" >&6
20794         LIBS="$cf_save"
20795
20796         if test $cf_have_libstdcpp != yes
20797         then
20798                 case $cf_cv_system_name in
20799                 (os2*)
20800                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
20801                                 cf_stdcpp_libname=stdcpp
20802                         else
20803                                 cf_stdcpp_libname=stdc++
20804                         fi
20805                         ;;
20806                 (*)
20807                         cf_stdcpp_libname=stdc++
20808                         ;;
20809                 esac
20810
20811                 echo "$as_me:20811: checking for library $cf_stdcpp_libname" >&5
20812 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
20813 if test "${cf_cv_libstdcpp+set}" = set; then
20814   echo $ECHO_N "(cached) $ECHO_C" >&6
20815 else
20816
20817                         cf_save="$LIBS"
20818                         LIBS="$LIBS $CXXLIBS"
20819
20820 cf_add_libs="-l$cf_stdcpp_libname"
20821 # Filter out duplicates - this happens with badly-designed ".pc" files...
20822 for cf_add_1lib in $LIBS
20823 do
20824         for cf_add_2lib in $cf_add_libs
20825         do
20826                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20827                 then
20828                         cf_add_1lib=
20829                         break
20830                 fi
20831         done
20832         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20833 done
20834 LIBS="$cf_add_libs"
20835
20836                 cat >conftest.$ac_ext <<_ACEOF
20837 #line 20837 "configure"
20838 #include "confdefs.h"
20839
20840                                 #include <iostream>
20841 int
20842 main (void)
20843 {
20844
20845                                 std::cout << "Hello World!" << std::endl;
20846   ;
20847   return 0;
20848 }
20849 _ACEOF
20850 rm -f conftest.$ac_objext conftest$ac_exeext
20851 if { (eval echo "$as_me:20851: \"$ac_link\"") >&5
20852   (eval $ac_link) 2>&5
20853   ac_status=$?
20854   echo "$as_me:20854: \$? = $ac_status" >&5
20855   (exit $ac_status); } &&
20856          { ac_try='test -s conftest$ac_exeext'
20857   { (eval echo "$as_me:20857: \"$ac_try\"") >&5
20858   (eval $ac_try) 2>&5
20859   ac_status=$?
20860   echo "$as_me:20860: \$? = $ac_status" >&5
20861   (exit $ac_status); }; }; then
20862   cf_cv_libstdcpp=yes
20863 else
20864   echo "$as_me: failed program was:" >&5
20865 cat conftest.$ac_ext >&5
20866 cf_cv_libstdcpp=no
20867 fi
20868 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20869                         LIBS="$cf_save"
20870
20871 fi
20872 echo "$as_me:20872: result: $cf_cv_libstdcpp" >&5
20873 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
20874                 test "$cf_cv_libstdcpp" = yes && {
20875 cf_add_libs="-l$cf_stdcpp_libname"
20876 # Filter out duplicates - this happens with badly-designed ".pc" files...
20877 for cf_add_1lib in $CXXLIBS
20878 do
20879         for cf_add_2lib in $cf_add_libs
20880         do
20881                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20882                 then
20883                         cf_add_1lib=
20884                         break
20885                 fi
20886         done
20887         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20888 done
20889 CXXLIBS="$cf_add_libs"
20890  }
20891         fi
20892 fi
20893
20894         echo "$as_me:20894: checking whether $CXX understands -c and -o together" >&5
20895 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
20896 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
20897   echo $ECHO_N "(cached) $ECHO_C" >&6
20898 else
20899
20900 cat > conftest.$ac_ext <<CF_EOF
20901 int main(void)
20902 {
20903         ${cf_cv_main_return:-return}(0);
20904 }
20905 CF_EOF
20906 # We do the test twice because some compilers refuse to overwrite an
20907 # existing .o file with -o, though they will create one.
20908 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
20909 if { (eval echo "$as_me:20909: \"$ac_try\"") >&5
20910   (eval $ac_try) 2>&5
20911   ac_status=$?
20912   echo "$as_me:20912: \$? = $ac_status" >&5
20913   (exit $ac_status); } &&
20914   test -f conftest2.$ac_objext && { (eval echo "$as_me:20914: \"$ac_try\"") >&5
20915   (eval $ac_try) 2>&5
20916   ac_status=$?
20917   echo "$as_me:20917: \$? = $ac_status" >&5
20918   (exit $ac_status); };
20919 then
20920   eval cf_cv_prog_CXX_c_o=yes
20921 else
20922   eval cf_cv_prog_CXX_c_o=no
20923 fi
20924 rm -rf conftest*
20925
20926 fi
20927 if test $cf_cv_prog_CXX_c_o = yes; then
20928   echo "$as_me:20928: result: yes" >&5
20929 echo "${ECHO_T}yes" >&6
20930 else
20931   echo "$as_me:20931: result: no" >&5
20932 echo "${ECHO_T}no" >&6
20933 fi
20934
20935         case $GXX_VERSION in
20936         (1*|2.0-6*)
20937                 cf_cxx_library=yes
20938                 ;;
20939         (*-2.7*|2.7*)
20940
20941 cf_cxx_library=unknown
20942 case $cf_cv_system_name in
20943 (os2*)
20944         cf_gpp_libname=gpp
20945         ;;
20946 (*)
20947         cf_gpp_libname=g++
20948         ;;
20949 esac
20950 if test "$GXX" = yes; then
20951         echo "$as_me:20951: checking for lib$cf_gpp_libname" >&5
20952 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
20953         cf_save="$LIBS"
20954
20955 cf_add_libs="-l$cf_gpp_libname"
20956 # Filter out duplicates - this happens with badly-designed ".pc" files...
20957 for cf_add_1lib in $LIBS
20958 do
20959         for cf_add_2lib in $cf_add_libs
20960         do
20961                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
20962                 then
20963                         cf_add_1lib=
20964                         break
20965                 fi
20966         done
20967         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20968 done
20969 LIBS="$cf_add_libs"
20970
20971         cat >conftest.$ac_ext <<_ACEOF
20972 #line 20972 "configure"
20973 #include "confdefs.h"
20974
20975 #include <$cf_gpp_libname/builtin.h>
20976
20977 int
20978 main (void)
20979 {
20980 two_arg_error_handler_t foo2 = lib_error_handler
20981   ;
20982   return 0;
20983 }
20984 _ACEOF
20985 rm -f conftest.$ac_objext conftest$ac_exeext
20986 if { (eval echo "$as_me:20986: \"$ac_link\"") >&5
20987   (eval $ac_link) 2>&5
20988   ac_status=$?
20989   echo "$as_me:20989: \$? = $ac_status" >&5
20990   (exit $ac_status); } &&
20991          { ac_try='test -s conftest$ac_exeext'
20992   { (eval echo "$as_me:20992: \"$ac_try\"") >&5
20993   (eval $ac_try) 2>&5
20994   ac_status=$?
20995   echo "$as_me:20995: \$? = $ac_status" >&5
20996   (exit $ac_status); }; }; then
20997   cf_cxx_library=yes
20998
20999 cf_add_libs="-l$cf_gpp_libname"
21000 # Filter out duplicates - this happens with badly-designed ".pc" files...
21001 for cf_add_1lib in $CXXLIBS
21002 do
21003         for cf_add_2lib in $cf_add_libs
21004         do
21005                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21006                 then
21007                         cf_add_1lib=
21008                         break
21009                 fi
21010         done
21011         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21012 done
21013 CXXLIBS="$cf_add_libs"
21014
21015          if test "$cf_gpp_libname" = cpp ; then
21016
21017 cat >>confdefs.h <<\EOF
21018 #define HAVE_GPP_BUILTIN_H 1
21019 EOF
21020
21021          else
21022
21023 cat >>confdefs.h <<\EOF
21024 #define HAVE_GXX_BUILTIN_H 1
21025 EOF
21026
21027          fi
21028 else
21029   echo "$as_me: failed program was:" >&5
21030 cat conftest.$ac_ext >&5
21031 cat >conftest.$ac_ext <<_ACEOF
21032 #line 21032 "configure"
21033 #include "confdefs.h"
21034
21035 #include <builtin.h>
21036
21037 int
21038 main (void)
21039 {
21040 two_arg_error_handler_t foo2 = lib_error_handler
21041   ;
21042   return 0;
21043 }
21044 _ACEOF
21045 rm -f conftest.$ac_objext conftest$ac_exeext
21046 if { (eval echo "$as_me:21046: \"$ac_link\"") >&5
21047   (eval $ac_link) 2>&5
21048   ac_status=$?
21049   echo "$as_me:21049: \$? = $ac_status" >&5
21050   (exit $ac_status); } &&
21051          { ac_try='test -s conftest$ac_exeext'
21052   { (eval echo "$as_me:21052: \"$ac_try\"") >&5
21053   (eval $ac_try) 2>&5
21054   ac_status=$?
21055   echo "$as_me:21055: \$? = $ac_status" >&5
21056   (exit $ac_status); }; }; then
21057   cf_cxx_library=yes
21058
21059 cf_add_libs="-l$cf_gpp_libname"
21060 # Filter out duplicates - this happens with badly-designed ".pc" files...
21061 for cf_add_1lib in $CXXLIBS
21062 do
21063         for cf_add_2lib in $cf_add_libs
21064         do
21065                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21066                 then
21067                         cf_add_1lib=
21068                         break
21069                 fi
21070         done
21071         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21072 done
21073 CXXLIBS="$cf_add_libs"
21074
21075 cat >>confdefs.h <<\EOF
21076 #define HAVE_BUILTIN_H 1
21077 EOF
21078
21079 else
21080   echo "$as_me: failed program was:" >&5
21081 cat conftest.$ac_ext >&5
21082 cf_cxx_library=no
21083 fi
21084 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21085 fi
21086 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21087         LIBS="$cf_save"
21088         echo "$as_me:21088: result: $cf_cxx_library" >&5
21089 echo "${ECHO_T}$cf_cxx_library" >&6
21090 fi
21091
21092                 ;;
21093         (*)
21094                 cf_cxx_library=no
21095                 ;;
21096         esac
21097
21098         ac_ext=cc
21099 ac_cpp='$CXXCPP $CPPFLAGS'
21100 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21101 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21102 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21103 ac_main_return=return
21104 echo "$as_me:21104: checking how to run the C++ preprocessor" >&5
21105 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
21106 if test -z "$CXXCPP"; then
21107   if test "${ac_cv_prog_CXXCPP+set}" = set; then
21108   echo $ECHO_N "(cached) $ECHO_C" >&6
21109 else
21110       # Double quotes because CXXCPP needs to be expanded
21111     for CXXCPP in "$CXX -E" "/lib/cpp"
21112     do
21113       ac_preproc_ok=false
21114 for ac_cxx_preproc_warn_flag in '' yes
21115 do
21116   # Use a header file that comes with gcc, so configuring glibc
21117   # with a fresh cross-compiler works.
21118   # On the NeXT, cc -E runs the code through the compiler's parser,
21119   # not just through cpp. "Syntax error" is here to catch this case.
21120   cat >conftest.$ac_ext <<_ACEOF
21121 #line 21121 "configure"
21122 #include "confdefs.h"
21123 #include <assert.h>
21124                      Syntax error
21125 _ACEOF
21126 if { (eval echo "$as_me:21126: \"$ac_cpp conftest.$ac_ext\"") >&5
21127   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21128   ac_status=$?
21129   egrep -v '^ *\+' conftest.er1 >conftest.err
21130   rm -f conftest.er1
21131   cat conftest.err >&5
21132   echo "$as_me:21132: \$? = $ac_status" >&5
21133   (exit $ac_status); } >/dev/null; then
21134   if test -s conftest.err; then
21135     ac_cpp_err=$ac_cxx_preproc_warn_flag
21136   else
21137     ac_cpp_err=
21138   fi
21139 else
21140   ac_cpp_err=yes
21141 fi
21142 if test -z "$ac_cpp_err"; then
21143   :
21144 else
21145   echo "$as_me: failed program was:" >&5
21146   cat conftest.$ac_ext >&5
21147   # Broken: fails on valid input.
21148 continue
21149 fi
21150 rm -f conftest.err conftest.$ac_ext
21151
21152   # OK, works on sane cases.  Now check whether non-existent headers
21153   # can be detected and how.
21154   cat >conftest.$ac_ext <<_ACEOF
21155 #line 21155 "configure"
21156 #include "confdefs.h"
21157 #include <ac_nonexistent.h>
21158 _ACEOF
21159 if { (eval echo "$as_me:21159: \"$ac_cpp conftest.$ac_ext\"") >&5
21160   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21161   ac_status=$?
21162   egrep -v '^ *\+' conftest.er1 >conftest.err
21163   rm -f conftest.er1
21164   cat conftest.err >&5
21165   echo "$as_me:21165: \$? = $ac_status" >&5
21166   (exit $ac_status); } >/dev/null; then
21167   if test -s conftest.err; then
21168     ac_cpp_err=$ac_cxx_preproc_warn_flag
21169   else
21170     ac_cpp_err=
21171   fi
21172 else
21173   ac_cpp_err=yes
21174 fi
21175 if test -z "$ac_cpp_err"; then
21176   # Broken: success on invalid input.
21177 continue
21178 else
21179   echo "$as_me: failed program was:" >&5
21180   cat conftest.$ac_ext >&5
21181   # Passes both tests.
21182 ac_preproc_ok=:
21183 break
21184 fi
21185 rm -f conftest.err conftest.$ac_ext
21186
21187 done
21188 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
21189 rm -f conftest.err conftest.$ac_ext
21190 if $ac_preproc_ok; then
21191   break
21192 fi
21193
21194     done
21195     ac_cv_prog_CXXCPP=$CXXCPP
21196
21197 fi
21198   CXXCPP=$ac_cv_prog_CXXCPP
21199 else
21200   ac_cv_prog_CXXCPP=$CXXCPP
21201 fi
21202 echo "$as_me:21202: result: $CXXCPP" >&5
21203 echo "${ECHO_T}$CXXCPP" >&6
21204 ac_preproc_ok=false
21205 for ac_cxx_preproc_warn_flag in '' yes
21206 do
21207   # Use a header file that comes with gcc, so configuring glibc
21208   # with a fresh cross-compiler works.
21209   # On the NeXT, cc -E runs the code through the compiler's parser,
21210   # not just through cpp. "Syntax error" is here to catch this case.
21211   cat >conftest.$ac_ext <<_ACEOF
21212 #line 21212 "configure"
21213 #include "confdefs.h"
21214 #include <assert.h>
21215                      Syntax error
21216 _ACEOF
21217 if { (eval echo "$as_me:21217: \"$ac_cpp conftest.$ac_ext\"") >&5
21218   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21219   ac_status=$?
21220   egrep -v '^ *\+' conftest.er1 >conftest.err
21221   rm -f conftest.er1
21222   cat conftest.err >&5
21223   echo "$as_me:21223: \$? = $ac_status" >&5
21224   (exit $ac_status); } >/dev/null; then
21225   if test -s conftest.err; then
21226     ac_cpp_err=$ac_cxx_preproc_warn_flag
21227   else
21228     ac_cpp_err=
21229   fi
21230 else
21231   ac_cpp_err=yes
21232 fi
21233 if test -z "$ac_cpp_err"; then
21234   :
21235 else
21236   echo "$as_me: failed program was:" >&5
21237   cat conftest.$ac_ext >&5
21238   # Broken: fails on valid input.
21239 continue
21240 fi
21241 rm -f conftest.err conftest.$ac_ext
21242
21243   # OK, works on sane cases.  Now check whether non-existent headers
21244   # can be detected and how.
21245   cat >conftest.$ac_ext <<_ACEOF
21246 #line 21246 "configure"
21247 #include "confdefs.h"
21248 #include <ac_nonexistent.h>
21249 _ACEOF
21250 if { (eval echo "$as_me:21250: \"$ac_cpp conftest.$ac_ext\"") >&5
21251   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21252   ac_status=$?
21253   egrep -v '^ *\+' conftest.er1 >conftest.err
21254   rm -f conftest.er1
21255   cat conftest.err >&5
21256   echo "$as_me:21256: \$? = $ac_status" >&5
21257   (exit $ac_status); } >/dev/null; then
21258   if test -s conftest.err; then
21259     ac_cpp_err=$ac_cxx_preproc_warn_flag
21260   else
21261     ac_cpp_err=
21262   fi
21263 else
21264   ac_cpp_err=yes
21265 fi
21266 if test -z "$ac_cpp_err"; then
21267   # Broken: success on invalid input.
21268 continue
21269 else
21270   echo "$as_me: failed program was:" >&5
21271   cat conftest.$ac_ext >&5
21272   # Passes both tests.
21273 ac_preproc_ok=:
21274 break
21275 fi
21276 rm -f conftest.err conftest.$ac_ext
21277
21278 done
21279 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
21280 rm -f conftest.err conftest.$ac_ext
21281 if $ac_preproc_ok; then
21282   :
21283 else
21284   { { echo "$as_me:21284: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
21285 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
21286    { (exit 1); exit 1; }; }
21287 fi
21288
21289 ac_ext=cc
21290 ac_cpp='$CXXCPP $CPPFLAGS'
21291 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21292 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21293 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21294 ac_main_return=return
21295
21296 for ac_header in typeinfo
21297 do
21298 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21299 echo "$as_me:21299: checking for $ac_header" >&5
21300 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21301 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21302   echo $ECHO_N "(cached) $ECHO_C" >&6
21303 else
21304   cat >conftest.$ac_ext <<_ACEOF
21305 #line 21305 "configure"
21306 #include "confdefs.h"
21307 #include <$ac_header>
21308 _ACEOF
21309 if { (eval echo "$as_me:21309: \"$ac_cpp conftest.$ac_ext\"") >&5
21310   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21311   ac_status=$?
21312   egrep -v '^ *\+' conftest.er1 >conftest.err
21313   rm -f conftest.er1
21314   cat conftest.err >&5
21315   echo "$as_me:21315: \$? = $ac_status" >&5
21316   (exit $ac_status); } >/dev/null; then
21317   if test -s conftest.err; then
21318     ac_cpp_err=$ac_cxx_preproc_warn_flag
21319   else
21320     ac_cpp_err=
21321   fi
21322 else
21323   ac_cpp_err=yes
21324 fi
21325 if test -z "$ac_cpp_err"; then
21326   eval "$as_ac_Header=yes"
21327 else
21328   echo "$as_me: failed program was:" >&5
21329   cat conftest.$ac_ext >&5
21330   eval "$as_ac_Header=no"
21331 fi
21332 rm -f conftest.err conftest.$ac_ext
21333 fi
21334 echo "$as_me:21334: result: `eval echo '${'$as_ac_Header'}'`" >&5
21335 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21336 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21337   cat >>confdefs.h <<EOF
21338 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21339 EOF
21340
21341 fi
21342 done
21343
21344 for ac_header in iostream
21345 do
21346 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21347 echo "$as_me:21347: checking for $ac_header" >&5
21348 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21349 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21350   echo $ECHO_N "(cached) $ECHO_C" >&6
21351 else
21352   cat >conftest.$ac_ext <<_ACEOF
21353 #line 21353 "configure"
21354 #include "confdefs.h"
21355 #include <$ac_header>
21356 _ACEOF
21357 if { (eval echo "$as_me:21357: \"$ac_cpp conftest.$ac_ext\"") >&5
21358   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21359   ac_status=$?
21360   egrep -v '^ *\+' conftest.er1 >conftest.err
21361   rm -f conftest.er1
21362   cat conftest.err >&5
21363   echo "$as_me:21363: \$? = $ac_status" >&5
21364   (exit $ac_status); } >/dev/null; then
21365   if test -s conftest.err; then
21366     ac_cpp_err=$ac_cxx_preproc_warn_flag
21367   else
21368     ac_cpp_err=
21369   fi
21370 else
21371   ac_cpp_err=yes
21372 fi
21373 if test -z "$ac_cpp_err"; then
21374   eval "$as_ac_Header=yes"
21375 else
21376   echo "$as_me: failed program was:" >&5
21377   cat conftest.$ac_ext >&5
21378   eval "$as_ac_Header=no"
21379 fi
21380 rm -f conftest.err conftest.$ac_ext
21381 fi
21382 echo "$as_me:21382: result: `eval echo '${'$as_ac_Header'}'`" >&5
21383 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21384 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21385   cat >>confdefs.h <<EOF
21386 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21387 EOF
21388
21389 fi
21390 done
21391
21392 if test x"$ac_cv_header_iostream" = xyes ; then
21393         echo "$as_me:21393: checking if iostream uses std-namespace" >&5
21394 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
21395         cat >conftest.$ac_ext <<_ACEOF
21396 #line 21396 "configure"
21397 #include "confdefs.h"
21398
21399 #include <iostream>
21400 using std::endl;
21401 using std::cerr;
21402 int
21403 main (void)
21404 {
21405
21406 cerr << "testing" << endl;
21407
21408   ;
21409   return 0;
21410 }
21411 _ACEOF
21412 rm -f conftest.$ac_objext
21413 if { (eval echo "$as_me:21413: \"$ac_compile\"") >&5
21414   (eval $ac_compile) 2>&5
21415   ac_status=$?
21416   echo "$as_me:21416: \$? = $ac_status" >&5
21417   (exit $ac_status); } &&
21418          { ac_try='test -s conftest.$ac_objext'
21419   { (eval echo "$as_me:21419: \"$ac_try\"") >&5
21420   (eval $ac_try) 2>&5
21421   ac_status=$?
21422   echo "$as_me:21422: \$? = $ac_status" >&5
21423   (exit $ac_status); }; }; then
21424   cf_iostream_namespace=yes
21425 else
21426   echo "$as_me: failed program was:" >&5
21427 cat conftest.$ac_ext >&5
21428 cf_iostream_namespace=no
21429 fi
21430 rm -f conftest.$ac_objext conftest.$ac_ext
21431         echo "$as_me:21431: result: $cf_iostream_namespace" >&5
21432 echo "${ECHO_T}$cf_iostream_namespace" >&6
21433         if test "$cf_iostream_namespace" = yes ; then
21434
21435 cat >>confdefs.h <<\EOF
21436 #define IOSTREAM_NAMESPACE 1
21437 EOF
21438
21439         fi
21440 fi
21441
21442 echo "$as_me:21442: checking if we should include stdbool.h" >&5
21443 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
21444
21445 if test "${cf_cv_header_stdbool_h+set}" = set; then
21446   echo $ECHO_N "(cached) $ECHO_C" >&6
21447 else
21448
21449         cat >conftest.$ac_ext <<_ACEOF
21450 #line 21450 "configure"
21451 #include "confdefs.h"
21452
21453 int
21454 main (void)
21455 {
21456 bool foo = false
21457   ;
21458   return 0;
21459 }
21460 _ACEOF
21461 rm -f conftest.$ac_objext
21462 if { (eval echo "$as_me:21462: \"$ac_compile\"") >&5
21463   (eval $ac_compile) 2>&5
21464   ac_status=$?
21465   echo "$as_me:21465: \$? = $ac_status" >&5
21466   (exit $ac_status); } &&
21467          { ac_try='test -s conftest.$ac_objext'
21468   { (eval echo "$as_me:21468: \"$ac_try\"") >&5
21469   (eval $ac_try) 2>&5
21470   ac_status=$?
21471   echo "$as_me:21471: \$? = $ac_status" >&5
21472   (exit $ac_status); }; }; then
21473   cf_cv_header_stdbool_h=0
21474 else
21475   echo "$as_me: failed program was:" >&5
21476 cat conftest.$ac_ext >&5
21477 cat >conftest.$ac_ext <<_ACEOF
21478 #line 21478 "configure"
21479 #include "confdefs.h"
21480
21481 #ifndef __BEOS__
21482 #include <stdbool.h>
21483 #endif
21484
21485 int
21486 main (void)
21487 {
21488 bool foo = false
21489   ;
21490   return 0;
21491 }
21492 _ACEOF
21493 rm -f conftest.$ac_objext
21494 if { (eval echo "$as_me:21494: \"$ac_compile\"") >&5
21495   (eval $ac_compile) 2>&5
21496   ac_status=$?
21497   echo "$as_me:21497: \$? = $ac_status" >&5
21498   (exit $ac_status); } &&
21499          { ac_try='test -s conftest.$ac_objext'
21500   { (eval echo "$as_me:21500: \"$ac_try\"") >&5
21501   (eval $ac_try) 2>&5
21502   ac_status=$?
21503   echo "$as_me:21503: \$? = $ac_status" >&5
21504   (exit $ac_status); }; }; then
21505   cf_cv_header_stdbool_h=1
21506 else
21507   echo "$as_me: failed program was:" >&5
21508 cat conftest.$ac_ext >&5
21509 cf_cv_header_stdbool_h=0
21510 fi
21511 rm -f conftest.$ac_objext conftest.$ac_ext
21512 fi
21513 rm -f conftest.$ac_objext conftest.$ac_ext
21514 fi
21515
21516 if test "$cf_cv_header_stdbool_h" = 1
21517 then    echo "$as_me:21517: result: yes" >&5
21518 echo "${ECHO_T}yes" >&6
21519 else    echo "$as_me:21519: result: no" >&5
21520 echo "${ECHO_T}no" >&6
21521 fi
21522
21523 echo "$as_me:21523: checking for builtin bool type" >&5
21524 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
21525
21526 if test "${cf_cv_builtin_bool+set}" = set; then
21527   echo $ECHO_N "(cached) $ECHO_C" >&6
21528 else
21529
21530         cat >conftest.$ac_ext <<_ACEOF
21531 #line 21531 "configure"
21532 #include "confdefs.h"
21533
21534 #include <stdio.h>
21535 #include <sys/types.h>
21536
21537 int
21538 main (void)
21539 {
21540 bool x = false
21541   ;
21542   return 0;
21543 }
21544 _ACEOF
21545 rm -f conftest.$ac_objext
21546 if { (eval echo "$as_me:21546: \"$ac_compile\"") >&5
21547   (eval $ac_compile) 2>&5
21548   ac_status=$?
21549   echo "$as_me:21549: \$? = $ac_status" >&5
21550   (exit $ac_status); } &&
21551          { ac_try='test -s conftest.$ac_objext'
21552   { (eval echo "$as_me:21552: \"$ac_try\"") >&5
21553   (eval $ac_try) 2>&5
21554   ac_status=$?
21555   echo "$as_me:21555: \$? = $ac_status" >&5
21556   (exit $ac_status); }; }; then
21557   cf_cv_builtin_bool=1
21558 else
21559   echo "$as_me: failed program was:" >&5
21560 cat conftest.$ac_ext >&5
21561 cf_cv_builtin_bool=0
21562 fi
21563 rm -f conftest.$ac_objext conftest.$ac_ext
21564
21565 fi
21566
21567 if test "$cf_cv_builtin_bool" = 1
21568 then    echo "$as_me:21568: result: yes" >&5
21569 echo "${ECHO_T}yes" >&6
21570 else    echo "$as_me:21570: result: no" >&5
21571 echo "${ECHO_T}no" >&6
21572 fi
21573
21574 echo "$as_me:21574: checking for size of bool" >&5
21575 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21576 if test "${cf_cv_type_of_bool+set}" = set; then
21577   echo $ECHO_N "(cached) $ECHO_C" >&6
21578 else
21579
21580         rm -f cf_test.out
21581         if test "$cross_compiling" = yes; then
21582   cf_cv_type_of_bool=unknown
21583 else
21584   cat >conftest.$ac_ext <<_ACEOF
21585 #line 21585 "configure"
21586 #include "confdefs.h"
21587
21588 #include <stdlib.h>
21589 #include <stdio.h>
21590
21591 #if defined(__cplusplus)
21592
21593 #ifdef HAVE_GXX_BUILTIN_H
21594 #include <g++/builtin.h>
21595 #elif HAVE_GPP_BUILTIN_H
21596 #include <gpp/builtin.h>
21597 #elif HAVE_BUILTIN_H
21598 #include <builtin.h>
21599 #endif
21600
21601 #else
21602
21603 #if $cf_cv_header_stdbool_h
21604 #include <stdbool.h>
21605 #endif
21606
21607 #endif
21608
21609 int main(void)
21610 {
21611         FILE *fp = fopen("cf_test.out", "w");
21612         if (fp != 0) {
21613                 bool x = true;
21614                 if ((bool)(-x) >= 0)
21615                         fputs("unsigned ", fp);
21616                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21617                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21618                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21619                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21620                 fclose(fp);
21621         }
21622         ${cf_cv_main_return:-return}(0);
21623 }
21624
21625 _ACEOF
21626 rm -f conftest$ac_exeext
21627 if { (eval echo "$as_me:21627: \"$ac_link\"") >&5
21628   (eval $ac_link) 2>&5
21629   ac_status=$?
21630   echo "$as_me:21630: \$? = $ac_status" >&5
21631   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21632   { (eval echo "$as_me:21632: \"$ac_try\"") >&5
21633   (eval $ac_try) 2>&5
21634   ac_status=$?
21635   echo "$as_me:21635: \$? = $ac_status" >&5
21636   (exit $ac_status); }; }; then
21637   cf_cv_type_of_bool=`cat cf_test.out`
21638                  if test -z "$cf_cv_type_of_bool"; then
21639                    cf_cv_type_of_bool=unknown
21640                  fi
21641 else
21642   echo "$as_me: program exited with status $ac_status" >&5
21643 echo "$as_me: failed program was:" >&5
21644 cat conftest.$ac_ext >&5
21645 cf_cv_type_of_bool=unknown
21646 fi
21647 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21648 fi
21649
21650 fi
21651
21652         rm -f cf_test.out
21653 echo "$as_me:21653: result: $cf_cv_type_of_bool" >&5
21654 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
21655 if test "$cf_cv_type_of_bool" = unknown ; then
21656         case .$NCURSES_BOOL in
21657         (.auto|.) NCURSES_BOOL=unsigned;;
21658         esac
21659         { echo "$as_me:21659: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
21660 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
21661         cf_cv_type_of_bool=$NCURSES_BOOL
21662 fi
21663
21664 echo "$as_me:21664: checking for special defines needed for etip.h" >&5
21665 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
21666 cf_save_CXXFLAGS="$CXXFLAGS"
21667 cf_result="none"
21668
21669 # etip.h includes ncurses.h which includes ncurses_dll.h
21670 # But ncurses_dll.h is generated - fix here.
21671 test -d include || mkdir include
21672 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
21673
21674 for cf_math in "" MATH_H
21675 do
21676 for cf_excp in "" MATH_EXCEPTION
21677 do
21678         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
21679         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
21680         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
21681 cat >conftest.$ac_ext <<_ACEOF
21682 #line 21682 "configure"
21683 #include "confdefs.h"
21684
21685 #include <etip.h.in>
21686
21687 int
21688 main (void)
21689 {
21690
21691   ;
21692   return 0;
21693 }
21694 _ACEOF
21695 rm -f conftest.$ac_objext
21696 if { (eval echo "$as_me:21696: \"$ac_compile\"") >&5
21697   (eval $ac_compile) 2>&5
21698   ac_status=$?
21699   echo "$as_me:21699: \$? = $ac_status" >&5
21700   (exit $ac_status); } &&
21701          { ac_try='test -s conftest.$ac_objext'
21702   { (eval echo "$as_me:21702: \"$ac_try\"") >&5
21703   (eval $ac_try) 2>&5
21704   ac_status=$?
21705   echo "$as_me:21705: \$? = $ac_status" >&5
21706   (exit $ac_status); }; }; then
21707
21708         test -n "$cf_math" && cat >>confdefs.h <<EOF
21709 #define ETIP_NEEDS_${cf_math} 1
21710 EOF
21711
21712         test -n "$cf_excp" && cat >>confdefs.h <<EOF
21713 #define ETIP_NEEDS_${cf_excp} 1
21714 EOF
21715
21716         cf_result="$cf_math $cf_excp"
21717         break 2
21718
21719 else
21720   echo "$as_me: failed program was:" >&5
21721 cat conftest.$ac_ext >&5
21722 fi
21723 rm -f conftest.$ac_objext conftest.$ac_ext
21724 done
21725 done
21726 echo "$as_me:21726: result: $cf_result" >&5
21727 echo "${ECHO_T}$cf_result" >&6
21728 CXXFLAGS="$cf_save_CXXFLAGS"
21729
21730 if test -n "$CXX"; then
21731 echo "$as_me:21731: checking if $CXX accepts parameter initialization" >&5
21732 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
21733 if test "${cf_cv_cpp_param_init+set}" = set; then
21734   echo $ECHO_N "(cached) $ECHO_C" >&6
21735 else
21736
21737         ac_ext=cc
21738 ac_cpp='$CXXCPP $CPPFLAGS'
21739 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21740 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21741 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21742 ac_main_return=return
21743
21744         if test "$cross_compiling" = yes; then
21745   cf_cv_cpp_param_init=unknown
21746 else
21747   cat >conftest.$ac_ext <<_ACEOF
21748 #line 21748 "configure"
21749 #include "confdefs.h"
21750
21751 class TEST {
21752 private:
21753         int value;
21754 public:
21755         TEST(int x = 1);
21756         ~TEST();
21757 };
21758
21759 TEST::TEST(int x = 1)   // some compilers do not like second initializer
21760 {
21761         value = x;
21762 }
21763 int main(void) { }
21764
21765 _ACEOF
21766 rm -f conftest$ac_exeext
21767 if { (eval echo "$as_me:21767: \"$ac_link\"") >&5
21768   (eval $ac_link) 2>&5
21769   ac_status=$?
21770   echo "$as_me:21770: \$? = $ac_status" >&5
21771   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21772   { (eval echo "$as_me:21772: \"$ac_try\"") >&5
21773   (eval $ac_try) 2>&5
21774   ac_status=$?
21775   echo "$as_me:21775: \$? = $ac_status" >&5
21776   (exit $ac_status); }; }; then
21777   cf_cv_cpp_param_init=yes
21778 else
21779   echo "$as_me: program exited with status $ac_status" >&5
21780 echo "$as_me: failed program was:" >&5
21781 cat conftest.$ac_ext >&5
21782 cf_cv_cpp_param_init=no
21783 fi
21784 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21785 fi
21786         ac_ext=cc
21787 ac_cpp='$CXXCPP $CPPFLAGS'
21788 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21789 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21790 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21791 ac_main_return=return
21792
21793 fi
21794 echo "$as_me:21794: result: $cf_cv_cpp_param_init" >&5
21795 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
21796 fi
21797 test "$cf_cv_cpp_param_init" = yes &&
21798 cat >>confdefs.h <<\EOF
21799 #define CPP_HAS_PARAM_INIT 1
21800 EOF
21801
21802 if test -n "$CXX"; then
21803
21804 echo "$as_me:21804: checking if $CXX accepts static_cast" >&5
21805 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
21806 if test "${cf_cv_cpp_static_cast+set}" = set; then
21807   echo $ECHO_N "(cached) $ECHO_C" >&6
21808 else
21809
21810         ac_ext=cc
21811 ac_cpp='$CXXCPP $CPPFLAGS'
21812 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21813 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21814 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21815 ac_main_return=return
21816
21817         cat >conftest.$ac_ext <<_ACEOF
21818 #line 21818 "configure"
21819 #include "confdefs.h"
21820
21821 class NCursesPanel
21822 {
21823 public:
21824   NCursesPanel(int nlines,
21825                int ncols,
21826                int begin_y = 0,
21827                int begin_x = 0)
21828   {
21829   }
21830   NCursesPanel();
21831   ~NCursesPanel();
21832 };
21833
21834 template<class T> class NCursesUserPanel : public NCursesPanel
21835 {
21836 public:
21837   NCursesUserPanel (int nlines,
21838                     int ncols,
21839                     int begin_y = 0,
21840                     int begin_x = 0,
21841                     const T* p_UserData = static_cast<T*>(0))
21842     : NCursesPanel (nlines, ncols, begin_y, begin_x)
21843   {
21844   };
21845   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
21846   {
21847   };
21848
21849   virtual ~NCursesUserPanel() {};
21850 };
21851
21852 int
21853 main (void)
21854 {
21855
21856         const char* p_UserData = static_cast<char*>(0)
21857   ;
21858   return 0;
21859 }
21860 _ACEOF
21861 rm -f conftest.$ac_objext
21862 if { (eval echo "$as_me:21862: \"$ac_compile\"") >&5
21863   (eval $ac_compile) 2>&5
21864   ac_status=$?
21865   echo "$as_me:21865: \$? = $ac_status" >&5
21866   (exit $ac_status); } &&
21867          { ac_try='test -s conftest.$ac_objext'
21868   { (eval echo "$as_me:21868: \"$ac_try\"") >&5
21869   (eval $ac_try) 2>&5
21870   ac_status=$?
21871   echo "$as_me:21871: \$? = $ac_status" >&5
21872   (exit $ac_status); }; }; then
21873   cf_cv_cpp_static_cast=yes
21874 else
21875   echo "$as_me: failed program was:" >&5
21876 cat conftest.$ac_ext >&5
21877 cf_cv_cpp_static_cast=no
21878 fi
21879 rm -f conftest.$ac_objext conftest.$ac_ext
21880
21881         ac_ext=cc
21882 ac_cpp='$CXXCPP $CPPFLAGS'
21883 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21884 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21885 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21886 ac_main_return=return
21887
21888 fi
21889 echo "$as_me:21889: result: $cf_cv_cpp_static_cast" >&5
21890 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
21891
21892 fi
21893
21894 test "$cf_cv_cpp_static_cast" = yes &&
21895 cat >>confdefs.h <<\EOF
21896 #define CPP_HAS_STATIC_CAST 1
21897 EOF
21898
21899         CXX_AR='$(AR)'
21900         CXX_ARFLAGS='$(ARFLAGS)'
21901         case $cf_cv_system_name in
21902         (irix*)
21903             if test "$GXX" != yes ; then
21904                 CXX_AR='$(CXX)'
21905                 CXX_ARFLAGS='-ar -o'
21906             fi
21907             ;;
21908         (sco3.2v5*)
21909             CXXLDFLAGS="-u main"
21910             ;;
21911         (solaris2*)
21912             if test "$GXX" != yes ; then
21913                 CXX_AR='$(CXX)'
21914                 CXX_ARFLAGS='-xar -o'
21915             fi
21916             ;;
21917         esac
21918
21919 else
21920         cf_cxx_library=no
21921         cf_cv_builtin_bool=1
21922
21923         # Just because we are not configuring against C++ right now does not
21924         # mean that a user will not want to use C++.  Some distributors disable
21925         # the C++ portion of this configuration as a shortcut (or just to avoid
21926         # compiling the demo in the c++ directory).  So we need a reasonable
21927         # default for the 'bool' type.
21928         #
21929         # Caveat: since the storage of the bool type is not standardized, it
21930         # may change.
21931
21932         if test "$NCURSES_BOOL" != auto ; then
21933                 cf_cv_type_of_bool=$NCURSES_BOOL
21934                 cf_cv_header_stdbool_h=0
21935         else
21936                 if test "$cf_cv_header_stdbool_h" = 1 ; then
21937
21938 echo "$as_me:21938: checking for size of bool" >&5
21939 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
21940 if test "${cf_cv_type_of_bool+set}" = set; then
21941   echo $ECHO_N "(cached) $ECHO_C" >&6
21942 else
21943
21944         rm -f cf_test.out
21945         if test "$cross_compiling" = yes; then
21946   cf_cv_type_of_bool=unknown
21947 else
21948   cat >conftest.$ac_ext <<_ACEOF
21949 #line 21949 "configure"
21950 #include "confdefs.h"
21951
21952 #include <stdlib.h>
21953 #include <stdio.h>
21954
21955 #if defined(__cplusplus)
21956
21957 #ifdef HAVE_GXX_BUILTIN_H
21958 #include <g++/builtin.h>
21959 #elif HAVE_GPP_BUILTIN_H
21960 #include <gpp/builtin.h>
21961 #elif HAVE_BUILTIN_H
21962 #include <builtin.h>
21963 #endif
21964
21965 #else
21966
21967 #if $cf_cv_header_stdbool_h
21968 #include <stdbool.h>
21969 #endif
21970
21971 #endif
21972
21973 int main(void)
21974 {
21975         FILE *fp = fopen("cf_test.out", "w");
21976         if (fp != 0) {
21977                 bool x = true;
21978                 if ((bool)(-x) >= 0)
21979                         fputs("unsigned ", fp);
21980                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
21981                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
21982                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
21983                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
21984                 fclose(fp);
21985         }
21986         ${cf_cv_main_return:-return}(0);
21987 }
21988
21989 _ACEOF
21990 rm -f conftest$ac_exeext
21991 if { (eval echo "$as_me:21991: \"$ac_link\"") >&5
21992   (eval $ac_link) 2>&5
21993   ac_status=$?
21994   echo "$as_me:21994: \$? = $ac_status" >&5
21995   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21996   { (eval echo "$as_me:21996: \"$ac_try\"") >&5
21997   (eval $ac_try) 2>&5
21998   ac_status=$?
21999   echo "$as_me:21999: \$? = $ac_status" >&5
22000   (exit $ac_status); }; }; then
22001   cf_cv_type_of_bool=`cat cf_test.out`
22002                  if test -z "$cf_cv_type_of_bool"; then
22003                    cf_cv_type_of_bool=unknown
22004                  fi
22005 else
22006   echo "$as_me: program exited with status $ac_status" >&5
22007 echo "$as_me: failed program was:" >&5
22008 cat conftest.$ac_ext >&5
22009 cf_cv_type_of_bool=unknown
22010 fi
22011 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22012 fi
22013
22014 fi
22015
22016         rm -f cf_test.out
22017 echo "$as_me:22017: result: $cf_cv_type_of_bool" >&5
22018 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22019 if test "$cf_cv_type_of_bool" = unknown ; then
22020         case .$NCURSES_BOOL in
22021         (.auto|.) NCURSES_BOOL=unsigned;;
22022         esac
22023         { echo "$as_me:22023: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
22024 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
22025         cf_cv_type_of_bool=$NCURSES_BOOL
22026 fi
22027
22028                 else
22029                         echo "$as_me:22029: checking for fallback type of bool" >&5
22030 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
22031                         case "$host_cpu" in
22032                         (i?86)  cf_cv_type_of_bool=char ;;
22033                         (*)     cf_cv_type_of_bool=int  ;;
22034                         esac
22035                         echo "$as_me:22035: result: $cf_cv_type_of_bool" >&5
22036 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22037                 fi
22038         fi
22039 fi
22040
22041 # If the C compiler did not declare bool, and we did not determine that the C++
22042 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
22043 # ncurses library use the same type as C++ bool.  Note that this allows one to
22044 # specify the type of bool in a configure-script option and postpone
22045 # integration with the C++ compiler provided that the types are compatible.
22046 USE_CXX_BOOL=1
22047 if test $cf_cv_cc_bool_type = 1
22048 then
22049         # oops: C has a bool.  Unlikely, but C++ could differ.
22050         USE_CXX_BOOL=0
22051 elif test $cf_cv_builtin_bool = 0
22052 then
22053         # C++ has no bool
22054         USE_CXX_BOOL=0
22055 else
22056         # this is the normal case
22057         USE_CXX_BOOL='defined(__cplusplus)'
22058 fi
22059
22060 if test -f "${srcdir}/Ada95/Makefile.in" ; then
22061
22062         if test "$cf_with_ada" != "no" ; then
22063                 if test "$with_libtool" != "no"; then
22064                         { echo "$as_me:22064: WARNING: libtool does not support Ada - disabling feature" >&5
22065 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
22066                         cf_with_ada=no
22067                 fi
22068         fi
22069
22070         if test "$cf_with_ada" != "no" ; then
22071
22072 cf_ada_make=gnatmake
22073 cf_ada_config="#"
22074 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
22075 set dummy $cf_ada_make; ac_word=$2
22076 echo "$as_me:22076: checking for $ac_word" >&5
22077 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22078 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
22079   echo $ECHO_N "(cached) $ECHO_C" >&6
22080 else
22081   if test -n "$gnatmake_exists"; then
22082   ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
22083 else
22084   ac_save_IFS=$IFS; IFS=$ac_path_separator
22085 ac_dummy="$PATH"
22086 for ac_dir in $ac_dummy; do
22087   IFS=$ac_save_IFS
22088   test -z "$ac_dir" && ac_dir=.
22089   $as_executable_p "$ac_dir/$ac_word" || continue
22090 ac_cv_prog_gnatmake_exists="yes"
22091 echo "$as_me:22091: found $ac_dir/$ac_word" >&5
22092 break
22093 done
22094
22095   test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
22096 fi
22097 fi
22098 gnatmake_exists=$ac_cv_prog_gnatmake_exists
22099 if test -n "$gnatmake_exists"; then
22100   echo "$as_me:22100: result: $gnatmake_exists" >&5
22101 echo "${ECHO_T}$gnatmake_exists" >&6
22102 else
22103   echo "$as_me:22103: result: no" >&5
22104 echo "${ECHO_T}no" >&6
22105 fi
22106
22107 if test "$ac_cv_prog_gnatmake_exists" = no; then
22108         cf_ada_make=
22109         cf_cv_prog_gnat_correct=no
22110 else
22111         # Extract the first word of "gprconfig", so it can be a program name with args.
22112 set dummy gprconfig; ac_word=$2
22113 echo "$as_me:22113: checking for $ac_word" >&5
22114 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22115 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
22116   echo $ECHO_N "(cached) $ECHO_C" >&6
22117 else
22118   if test -n "$gprconfig_exists"; then
22119   ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
22120 else
22121   ac_save_IFS=$IFS; IFS=$ac_path_separator
22122 ac_dummy="$PATH"
22123 for ac_dir in $ac_dummy; do
22124   IFS=$ac_save_IFS
22125   test -z "$ac_dir" && ac_dir=.
22126   $as_executable_p "$ac_dir/$ac_word" || continue
22127 ac_cv_prog_gprconfig_exists="yes"
22128 echo "$as_me:22128: found $ac_dir/$ac_word" >&5
22129 break
22130 done
22131
22132   test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
22133 fi
22134 fi
22135 gprconfig_exists=$ac_cv_prog_gprconfig_exists
22136 if test -n "$gprconfig_exists"; then
22137   echo "$as_me:22137: result: $gprconfig_exists" >&5
22138 echo "${ECHO_T}$gprconfig_exists" >&6
22139 else
22140   echo "$as_me:22140: result: no" >&5
22141 echo "${ECHO_T}no" >&6
22142 fi
22143
22144         if test "$ac_cv_prog_gprconfig_exists" = yes
22145         then
22146                 rm -rf conftest* *~conftest*
22147                 if mkdir conftest.src
22148                 then
22149                         cf_ada_config=""
22150                         cd conftest.src
22151                         for cf_gprconfig in Ada C
22152                         do
22153                                 echo "$as_me:22153: checking for gprconfig name for $cf_gprconfig" >&5
22154 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
22155                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
22156                                 if test -n "$cf_gprconfig_value"
22157                                 then
22158                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
22159                                         echo "$as_me:22159: result: $cf_gprconfig_value" >&5
22160 echo "${ECHO_T}$cf_gprconfig_value" >&6
22161                                 else
22162                                         echo "$as_me:22162: result: missing" >&5
22163 echo "${ECHO_T}missing" >&6
22164                                         cf_ada_config="#"
22165                                         break
22166                                 fi
22167                         done
22168                         cd ..
22169                         rm -rf conftest* *~conftest*
22170                 fi
22171         else
22172                 # gprconfig is newer than gnatmake; we can continue...
22173                 cf_ada_config="##"
22174         fi
22175         if test "x$cf_ada_config" != "x#"
22176         then
22177
22178 echo "$as_me:22178: checking for gnat version" >&5
22179 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
22180 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
22181         grep '[0-9].[0-9][0-9]*' |\
22182         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
22183 echo "$as_me:22183: result: $cf_gnat_version" >&5
22184 echo "${ECHO_T}$cf_gnat_version" >&6
22185
22186 case $cf_gnat_version in
22187 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
22188         cf_cv_prog_gnat_correct=yes
22189         ;;
22190 (*)
22191         { echo "$as_me:22191: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
22192 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
22193         cf_cv_prog_gnat_correct=no
22194         ;;
22195 esac
22196
22197                 # Extract the first word of "m4", so it can be a program name with args.
22198 set dummy m4; ac_word=$2
22199 echo "$as_me:22199: checking for $ac_word" >&5
22200 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22201 if test "${ac_cv_prog_M4_exists+set}" = set; then
22202   echo $ECHO_N "(cached) $ECHO_C" >&6
22203 else
22204   if test -n "$M4_exists"; then
22205   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
22206 else
22207   ac_save_IFS=$IFS; IFS=$ac_path_separator
22208 ac_dummy="$PATH"
22209 for ac_dir in $ac_dummy; do
22210   IFS=$ac_save_IFS
22211   test -z "$ac_dir" && ac_dir=.
22212   $as_executable_p "$ac_dir/$ac_word" || continue
22213 ac_cv_prog_M4_exists="yes"
22214 echo "$as_me:22214: found $ac_dir/$ac_word" >&5
22215 break
22216 done
22217
22218   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
22219 fi
22220 fi
22221 M4_exists=$ac_cv_prog_M4_exists
22222 if test -n "$M4_exists"; then
22223   echo "$as_me:22223: result: $M4_exists" >&5
22224 echo "${ECHO_T}$M4_exists" >&6
22225 else
22226   echo "$as_me:22226: result: no" >&5
22227 echo "${ECHO_T}no" >&6
22228 fi
22229
22230                 if test "$ac_cv_prog_M4_exists" = no; then
22231                         cf_cv_prog_gnat_correct=no
22232                         echo Ada95 binding required program m4 not found. Ada95 binding disabled.
22233                 fi
22234                 if test "$cf_cv_prog_gnat_correct" = yes; then
22235                         echo "$as_me:22235: checking if GNAT works" >&5
22236 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
22237
22238 rm -rf conftest* *~conftest*
22239 cat >>conftest.ads <<CF_EOF
22240 procedure conftest;
22241 CF_EOF
22242 cat >>conftest.adb <<CF_EOF
22243 with Text_IO;
22244 with GNAT.OS_Lib;
22245 procedure conftest is
22246 begin
22247    Text_IO.Put ("Hello World");
22248    Text_IO.New_Line;
22249    GNAT.OS_Lib.OS_Exit (0);
22250 end conftest;
22251 CF_EOF
22252 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
22253    if ( ./conftest 1>&5 2>&1 ) ; then
22254       cf_cv_prog_gnat_correct=yes
22255    else
22256       cf_cv_prog_gnat_correct=no
22257    fi
22258 else
22259    cf_cv_prog_gnat_correct=no
22260 fi
22261 rm -rf conftest* *~conftest*
22262
22263                         echo "$as_me:22263: result: $cf_cv_prog_gnat_correct" >&5
22264 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
22265                 fi
22266         else
22267                 cf_cv_prog_gnat_correct=no
22268         fi
22269 fi
22270
22271                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
22272
22273         ADAFLAGS="$ADAFLAGS -gnatpn"
22274
22275         echo "$as_me:22275: checking optimization options for ADAFLAGS" >&5
22276 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
22277         case "$CFLAGS" in
22278         (*-g*)
22279
22280         ADAFLAGS="$ADAFLAGS -g"
22281
22282                 ;;
22283         esac
22284         case "$CFLAGS" in
22285         (*-O*)
22286                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
22287
22288         ADAFLAGS="$ADAFLAGS $cf_O_flag"
22289
22290                 ;;
22291         esac
22292         echo "$as_me:22292: result: $ADAFLAGS" >&5
22293 echo "${ECHO_T}$ADAFLAGS" >&6
22294
22295 echo "$as_me:22295: checking if GNATPREP supports -T option" >&5
22296 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
22297 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
22298   echo $ECHO_N "(cached) $ECHO_C" >&6
22299 else
22300
22301 cf_cv_gnatprep_opt_t=no
22302 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
22303
22304 fi
22305 echo "$as_me:22305: result: $cf_cv_gnatprep_opt_t" >&5
22306 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
22307 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
22308
22309 echo "$as_me:22309: checking if GNAT supports generics" >&5
22310 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
22311 case $cf_gnat_version in
22312 (3.[1-9]*|[4-9].*)
22313         cf_gnat_generics=yes
22314         ;;
22315 (*)
22316         cf_gnat_generics=no
22317         ;;
22318 esac
22319 echo "$as_me:22319: result: $cf_gnat_generics" >&5
22320 echo "${ECHO_T}$cf_gnat_generics" >&6
22321
22322 if test "$cf_gnat_generics" = yes
22323 then
22324         cf_compile_generics=generics
22325         cf_generic_objects="\${GENOBJS}"
22326 else
22327         cf_compile_generics=
22328         cf_generic_objects=
22329 fi
22330
22331 echo "$as_me:22331: checking if GNAT supports SIGINT" >&5
22332 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
22333 if test "${cf_cv_gnat_sigint+set}" = set; then
22334   echo $ECHO_N "(cached) $ECHO_C" >&6
22335 else
22336
22337 rm -rf conftest* *~conftest*
22338 cat >>conftest.ads <<CF_EOF
22339 with Ada.Interrupts.Names;
22340
22341 package ConfTest is
22342
22343    pragma Warnings (Off);  --  the next pragma exists since 3.11p
22344    pragma Unreserve_All_Interrupts;
22345    pragma Warnings (On);
22346
22347    protected Process is
22348       procedure Stop;
22349       function Continue return Boolean;
22350       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
22351    private
22352       Done : Boolean := False;
22353    end Process;
22354
22355 end ConfTest;
22356 CF_EOF
22357 cat >>conftest.adb <<CF_EOF
22358 package body ConfTest is
22359    protected body Process is
22360       procedure Stop is
22361       begin
22362          Done := True;
22363       end Stop;
22364       function Continue return Boolean is
22365       begin
22366          return not Done;
22367       end Continue;
22368    end Process;
22369 end ConfTest;
22370 CF_EOF
22371 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
22372       cf_cv_gnat_sigint=yes
22373 else
22374    cf_cv_gnat_sigint=no
22375 fi
22376 rm -rf conftest* *~conftest*
22377
22378 fi
22379 echo "$as_me:22379: result: $cf_cv_gnat_sigint" >&5
22380 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
22381
22382 if test $cf_cv_gnat_sigint = yes ; then
22383         USE_GNAT_SIGINT=""
22384 else
22385         USE_GNAT_SIGINT="#"
22386 fi
22387
22388 cf_gnat_libraries=no
22389 cf_gnat_projects=no
22390
22391 if test "$enable_gnat_projects" != no ; then
22392 echo "$as_me:22392: checking if GNAT supports project files" >&5
22393 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
22394 case $cf_gnat_version in
22395 (3.[0-9]*)
22396         ;;
22397 (*)
22398         case $cf_cv_system_name in
22399         (cygwin*|msys*)
22400                 ;;
22401         (*)
22402                 rm -rf conftest* *~conftest*
22403                 if mkdir conftest.src conftest.bin conftest.lib
22404                 then
22405                         cd conftest.src
22406                         rm -rf conftest* *~conftest*
22407                         cat >>library.gpr <<CF_EOF
22408 project Library is
22409   Kind := External ("LIB_KIND");
22410   for Library_Name use "ConfTest";
22411   for Object_Dir use ".";
22412   for Library_ALI_Dir use External("LIBRARY_DIR");
22413   for Library_Version use External ("SONAME");
22414   for Library_Kind use Kind;
22415   for Library_Dir use External("BUILD_DIR");
22416   Source_Dir := External ("SOURCE_DIR");
22417   for Source_Dirs use (Source_Dir);
22418 end Library;
22419 CF_EOF
22420                         cat >>confpackage.ads <<CF_EOF
22421 package ConfPackage is
22422    procedure conftest;
22423 end ConfPackage;
22424 CF_EOF
22425                         cat >>confpackage.adb <<CF_EOF
22426 with Text_IO;
22427 package body ConfPackage is
22428    procedure conftest is
22429    begin
22430       Text_IO.Put ("Hello World");
22431       Text_IO.New_Line;
22432    end conftest;
22433 end ConfPackage;
22434 CF_EOF
22435                         if ( $cf_ada_make $ADAFLAGS \
22436                                         -Plibrary.gpr \
22437                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
22438                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
22439                                         -XSOURCE_DIR=`pwd` \
22440                                         -XSONAME=libConfTest.so.1 \
22441                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
22442                                 cf_gnat_projects=yes
22443                         fi
22444                         cd ..
22445                 fi
22446                 if test -f conftest.lib/confpackage.ali
22447                 then
22448                         cf_gnat_libraries=yes
22449                 fi
22450                 rm -rf conftest* *~conftest*
22451                 ;;
22452         esac
22453         ;;
22454 esac
22455 echo "$as_me:22455: result: $cf_gnat_projects" >&5
22456 echo "${ECHO_T}$cf_gnat_projects" >&6
22457 fi # enable_gnat_projects
22458
22459 if test $cf_gnat_projects = yes
22460 then
22461         echo "$as_me:22461: checking if GNAT supports libraries" >&5
22462 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
22463         echo "$as_me:22463: result: $cf_gnat_libraries" >&5
22464 echo "${ECHO_T}$cf_gnat_libraries" >&6
22465 fi
22466
22467 if test "$cf_gnat_projects" = yes
22468 then
22469         USE_OLD_MAKERULES="#"
22470         USE_GNAT_PROJECTS=""
22471 else
22472         USE_OLD_MAKERULES=""
22473         USE_GNAT_PROJECTS="#"
22474 fi
22475
22476 if test "$cf_gnat_libraries" = yes
22477 then
22478         USE_GNAT_LIBRARIES=""
22479 else
22480         USE_GNAT_LIBRARIES="#"
22481 fi
22482
22483 echo "$as_me:22483: checking for ada-compiler" >&5
22484 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
22485
22486 # Check whether --with-ada-compiler or --without-ada-compiler was given.
22487 if test "${with_ada_compiler+set}" = set; then
22488   withval="$with_ada_compiler"
22489   cf_ada_compiler=$withval
22490 else
22491   cf_ada_compiler=gnatmake
22492 fi;
22493
22494 echo "$as_me:22494: result: $cf_ada_compiler" >&5
22495 echo "${ECHO_T}$cf_ada_compiler" >&6
22496
22497                         cf_ada_package=terminal_interface
22498
22499 echo "$as_me:22499: checking for ada-include" >&5
22500 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
22501
22502 # Check whether --with-ada-include or --without-ada-include was given.
22503 if test "${with_ada_include+set}" = set; then
22504   withval="$with_ada_include"
22505
22506 else
22507   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
22508 fi; if test -n "$prefix/share/ada/adainclude" ; then
22509
22510 if test "x$prefix" != xNONE; then
22511         cf_path_syntax="$prefix"
22512 else
22513         cf_path_syntax="$ac_default_prefix"
22514 fi
22515
22516 case ".$withval" in
22517 (.\$\(*\)*|.\'*\'*)
22518         ;;
22519 (..|./*|.\\*)
22520         ;;
22521 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22522         ;;
22523 (.\${*prefix}*|.\${*dir}*)
22524         eval withval="$withval"
22525         case ".$withval" in
22526         (.NONE/*)
22527                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22528                 ;;
22529         esac
22530         ;;
22531 (.no|.NONE/*)
22532         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22533         ;;
22534 (*)
22535         { { echo "$as_me:22535: error: expected a pathname, not \"$withval\"" >&5
22536 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
22537    { (exit 1); exit 1; }; }
22538         ;;
22539 esac
22540
22541 fi
22542 eval ADA_INCLUDE="$withval"
22543
22544 echo "$as_me:22544: result: $ADA_INCLUDE" >&5
22545 echo "${ECHO_T}$ADA_INCLUDE" >&6
22546
22547 echo "$as_me:22547: checking for ada-objects" >&5
22548 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
22549
22550 # Check whether --with-ada-objects or --without-ada-objects was given.
22551 if test "${with_ada_objects+set}" = set; then
22552   withval="$with_ada_objects"
22553
22554 else
22555   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
22556 fi; if test -n "$prefix/lib/ada/adalib" ; then
22557
22558 if test "x$prefix" != xNONE; then
22559         cf_path_syntax="$prefix"
22560 else
22561         cf_path_syntax="$ac_default_prefix"
22562 fi
22563
22564 case ".$withval" in
22565 (.\$\(*\)*|.\'*\'*)
22566         ;;
22567 (..|./*|.\\*)
22568         ;;
22569 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
22570         ;;
22571 (.\${*prefix}*|.\${*dir}*)
22572         eval withval="$withval"
22573         case ".$withval" in
22574         (.NONE/*)
22575                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22576                 ;;
22577         esac
22578         ;;
22579 (.no|.NONE/*)
22580         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
22581         ;;
22582 (*)
22583         { { echo "$as_me:22583: error: expected a pathname, not \"$withval\"" >&5
22584 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
22585    { (exit 1); exit 1; }; }
22586         ;;
22587 esac
22588
22589 fi
22590 eval ADA_OBJECTS="$withval"
22591
22592 echo "$as_me:22592: result: $ADA_OBJECTS" >&5
22593 echo "${ECHO_T}$ADA_OBJECTS" >&6
22594
22595 echo "$as_me:22595: checking if an Ada95 shared-library should be built" >&5
22596 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
22597
22598 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
22599 if test "${with_ada_sharedlib+set}" = set; then
22600   withval="$with_ada_sharedlib"
22601   with_ada_sharedlib=$withval
22602 else
22603   with_ada_sharedlib=no
22604 fi;
22605 echo "$as_me:22605: result: $with_ada_sharedlib" >&5
22606 echo "${ECHO_T}$with_ada_sharedlib" >&6
22607
22608 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
22609 MAKE_ADA_SHAREDLIB="#"
22610
22611 if test "x$with_ada_sharedlib" != xno
22612 then
22613         MAKE_ADA_SHAREDLIB=
22614         if test "x$with_ada_sharedlib" != xyes
22615         then
22616                 ADA_SHAREDLIB="$with_ada_sharedlib"
22617         fi
22618 fi
22619
22620                 fi
22621         fi
22622 else
22623         cf_with_ada=no
22624 fi
22625
22626 # do this "late" to avoid conflict with header-checks
22627 if test "x$with_widec" = xyes ; then
22628         echo "$as_me:22628: checking for wchar_t" >&5
22629 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
22630 if test "${ac_cv_type_wchar_t+set}" = set; then
22631   echo $ECHO_N "(cached) $ECHO_C" >&6
22632 else
22633   cat >conftest.$ac_ext <<_ACEOF
22634 #line 22634 "configure"
22635 #include "confdefs.h"
22636 $ac_includes_default
22637 int
22638 main (void)
22639 {
22640 if ((wchar_t *) 0)
22641   return 0;
22642 if (sizeof (wchar_t))
22643   return 0;
22644   ;
22645   return 0;
22646 }
22647 _ACEOF
22648 rm -f conftest.$ac_objext
22649 if { (eval echo "$as_me:22649: \"$ac_compile\"") >&5
22650   (eval $ac_compile) 2>&5
22651   ac_status=$?
22652   echo "$as_me:22652: \$? = $ac_status" >&5
22653   (exit $ac_status); } &&
22654          { ac_try='test -s conftest.$ac_objext'
22655   { (eval echo "$as_me:22655: \"$ac_try\"") >&5
22656   (eval $ac_try) 2>&5
22657   ac_status=$?
22658   echo "$as_me:22658: \$? = $ac_status" >&5
22659   (exit $ac_status); }; }; then
22660   ac_cv_type_wchar_t=yes
22661 else
22662   echo "$as_me: failed program was:" >&5
22663 cat conftest.$ac_ext >&5
22664 ac_cv_type_wchar_t=no
22665 fi
22666 rm -f conftest.$ac_objext conftest.$ac_ext
22667 fi
22668 echo "$as_me:22668: result: $ac_cv_type_wchar_t" >&5
22669 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
22670
22671 echo "$as_me:22671: checking size of wchar_t" >&5
22672 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
22673 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22674   echo $ECHO_N "(cached) $ECHO_C" >&6
22675 else
22676   if test "$ac_cv_type_wchar_t" = yes; then
22677   if test "$cross_compiling" = yes; then
22678   # Depending upon the size, compute the lo and hi bounds.
22679 cat >conftest.$ac_ext <<_ACEOF
22680 #line 22680 "configure"
22681 #include "confdefs.h"
22682 $ac_includes_default
22683 int
22684 main (void)
22685 {
22686 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
22687   ;
22688   return 0;
22689 }
22690 _ACEOF
22691 rm -f conftest.$ac_objext
22692 if { (eval echo "$as_me:22692: \"$ac_compile\"") >&5
22693   (eval $ac_compile) 2>&5
22694   ac_status=$?
22695   echo "$as_me:22695: \$? = $ac_status" >&5
22696   (exit $ac_status); } &&
22697          { ac_try='test -s conftest.$ac_objext'
22698   { (eval echo "$as_me:22698: \"$ac_try\"") >&5
22699   (eval $ac_try) 2>&5
22700   ac_status=$?
22701   echo "$as_me:22701: \$? = $ac_status" >&5
22702   (exit $ac_status); }; }; then
22703   ac_lo=0 ac_mid=0
22704   while :; do
22705     cat >conftest.$ac_ext <<_ACEOF
22706 #line 22706 "configure"
22707 #include "confdefs.h"
22708 $ac_includes_default
22709 int
22710 main (void)
22711 {
22712 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22713   ;
22714   return 0;
22715 }
22716 _ACEOF
22717 rm -f conftest.$ac_objext
22718 if { (eval echo "$as_me:22718: \"$ac_compile\"") >&5
22719   (eval $ac_compile) 2>&5
22720   ac_status=$?
22721   echo "$as_me:22721: \$? = $ac_status" >&5
22722   (exit $ac_status); } &&
22723          { ac_try='test -s conftest.$ac_objext'
22724   { (eval echo "$as_me:22724: \"$ac_try\"") >&5
22725   (eval $ac_try) 2>&5
22726   ac_status=$?
22727   echo "$as_me:22727: \$? = $ac_status" >&5
22728   (exit $ac_status); }; }; then
22729   ac_hi=$ac_mid; break
22730 else
22731   echo "$as_me: failed program was:" >&5
22732 cat conftest.$ac_ext >&5
22733 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
22734 fi
22735 rm -f conftest.$ac_objext conftest.$ac_ext
22736   done
22737 else
22738   echo "$as_me: failed program was:" >&5
22739 cat conftest.$ac_ext >&5
22740 ac_hi=-1 ac_mid=-1
22741   while :; do
22742     cat >conftest.$ac_ext <<_ACEOF
22743 #line 22743 "configure"
22744 #include "confdefs.h"
22745 $ac_includes_default
22746 int
22747 main (void)
22748 {
22749 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
22750   ;
22751   return 0;
22752 }
22753 _ACEOF
22754 rm -f conftest.$ac_objext
22755 if { (eval echo "$as_me:22755: \"$ac_compile\"") >&5
22756   (eval $ac_compile) 2>&5
22757   ac_status=$?
22758   echo "$as_me:22758: \$? = $ac_status" >&5
22759   (exit $ac_status); } &&
22760          { ac_try='test -s conftest.$ac_objext'
22761   { (eval echo "$as_me:22761: \"$ac_try\"") >&5
22762   (eval $ac_try) 2>&5
22763   ac_status=$?
22764   echo "$as_me:22764: \$? = $ac_status" >&5
22765   (exit $ac_status); }; }; then
22766   ac_lo=$ac_mid; break
22767 else
22768   echo "$as_me: failed program was:" >&5
22769 cat conftest.$ac_ext >&5
22770 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
22771 fi
22772 rm -f conftest.$ac_objext conftest.$ac_ext
22773   done
22774 fi
22775 rm -f conftest.$ac_objext conftest.$ac_ext
22776 # Binary search between lo and hi bounds.
22777 while test "x$ac_lo" != "x$ac_hi"; do
22778   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22779   cat >conftest.$ac_ext <<_ACEOF
22780 #line 22780 "configure"
22781 #include "confdefs.h"
22782 $ac_includes_default
22783 int
22784 main (void)
22785 {
22786 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
22787   ;
22788   return 0;
22789 }
22790 _ACEOF
22791 rm -f conftest.$ac_objext
22792 if { (eval echo "$as_me:22792: \"$ac_compile\"") >&5
22793   (eval $ac_compile) 2>&5
22794   ac_status=$?
22795   echo "$as_me:22795: \$? = $ac_status" >&5
22796   (exit $ac_status); } &&
22797          { ac_try='test -s conftest.$ac_objext'
22798   { (eval echo "$as_me:22798: \"$ac_try\"") >&5
22799   (eval $ac_try) 2>&5
22800   ac_status=$?
22801   echo "$as_me:22801: \$? = $ac_status" >&5
22802   (exit $ac_status); }; }; then
22803   ac_hi=$ac_mid
22804 else
22805   echo "$as_me: failed program was:" >&5
22806 cat conftest.$ac_ext >&5
22807 ac_lo=`expr $ac_mid + 1`
22808 fi
22809 rm -f conftest.$ac_objext conftest.$ac_ext
22810 done
22811 ac_cv_sizeof_wchar_t=$ac_lo
22812 else
22813   if test "$cross_compiling" = yes; then
22814   { { echo "$as_me:22814: error: cannot run test program while cross compiling" >&5
22815 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22816    { (exit 1); exit 1; }; }
22817 else
22818   cat >conftest.$ac_ext <<_ACEOF
22819 #line 22819 "configure"
22820 #include "confdefs.h"
22821 $ac_includes_default
22822 int
22823 main (void)
22824 {
22825 FILE *f = fopen ("conftest.val", "w");
22826 if (!f)
22827   $ac_main_return (1);
22828 fprintf (f, "%d", (sizeof (wchar_t)));
22829 fclose (f);
22830   ;
22831   return 0;
22832 }
22833 _ACEOF
22834 rm -f conftest$ac_exeext
22835 if { (eval echo "$as_me:22835: \"$ac_link\"") >&5
22836   (eval $ac_link) 2>&5
22837   ac_status=$?
22838   echo "$as_me:22838: \$? = $ac_status" >&5
22839   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22840   { (eval echo "$as_me:22840: \"$ac_try\"") >&5
22841   (eval $ac_try) 2>&5
22842   ac_status=$?
22843   echo "$as_me:22843: \$? = $ac_status" >&5
22844   (exit $ac_status); }; }; then
22845   ac_cv_sizeof_wchar_t=`cat conftest.val`
22846 else
22847   echo "$as_me: program exited with status $ac_status" >&5
22848 echo "$as_me: failed program was:" >&5
22849 cat conftest.$ac_ext >&5
22850 fi
22851 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22852 fi
22853 fi
22854 rm -f conftest.val
22855 else
22856   ac_cv_sizeof_wchar_t=0
22857 fi
22858 fi
22859 echo "$as_me:22859: result: $ac_cv_sizeof_wchar_t" >&5
22860 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
22861 cat >>confdefs.h <<EOF
22862 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22863 EOF
22864
22865 fi
22866
22867 ### Construct the ncurses library-subsets, if any, from this set of keywords:
22868 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
22869 ###
22870 ### ticlib modules may be a separate library, otherwise contained in termlib.
22871 ### termlib modules may be a separate library, otherwise contained in ncurses.
22872 ###
22873 ### The of "+" or " " between the tokens controls the way the script
22874 ### chooses to split module lists into libraries.
22875 ###
22876 ### (see CF_LIB_RULES).
22877 echo "$as_me:22877: checking for library subsets" >&5
22878 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
22879 LIB_SUBSETS=
22880
22881 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
22882         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
22883         if test "$with_ticlib" != no ; then
22884                 LIB_SUBSETS="${LIB_SUBSETS} "
22885         else
22886                 LIB_SUBSETS="${LIB_SUBSETS}+"
22887         fi
22888 fi
22889
22890 LIB_SUBSETS="${LIB_SUBSETS}termlib"
22891 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
22892
22893 if test "$with_termlib" != no ; then
22894         LIB_SUBSETS="${LIB_SUBSETS} "
22895 else
22896         LIB_SUBSETS="${LIB_SUBSETS}+"
22897 fi
22898
22899 LIB_SUBSETS="${LIB_SUBSETS}base"
22900
22901 # Most term-driver calls are to tinfo, but some like init_pair are to the
22902 # base library (so it resides in base).
22903 if test "$with_term_driver" != no ; then
22904         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
22905         case $cf_cv_system_name in
22906         (*mingw32*|*mingw64*)
22907                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
22908                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
22909                 ;;
22910         (*)
22911                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
22912                 ;;
22913         esac
22914 fi
22915
22916 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
22917 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
22918
22919 echo "$as_me:22919: result: $LIB_SUBSETS" >&5
22920 echo "${ECHO_T}$LIB_SUBSETS" >&6
22921
22922 ### Construct the list of include-directories to be generated
22923
22924 if test "$srcdir" != "."; then
22925         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
22926 fi
22927 CPPFLAGS="-I../include $CPPFLAGS"
22928 if test "$srcdir" != "."; then
22929         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
22930 fi
22931 CPPFLAGS="-I. $CPPFLAGS"
22932
22933 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
22934 if test "$srcdir" != "."; then
22935         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
22936 fi
22937 if test "$GCC" != yes; then
22938         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22939 elif test "$includedir" != "/usr/include"; then
22940         if test "$includedir" = '${prefix}/include' ; then
22941                 if test x$prefix != x/usr ; then
22942                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22943                 fi
22944         else
22945                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
22946         fi
22947 fi
22948
22949 ### Build up pieces for makefile rules
22950 echo "$as_me:22950: checking default library suffix" >&5
22951 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
22952
22953         case $DFT_LWR_MODEL in
22954         (libtool) DFT_ARG_SUFFIX=''   ;;
22955         (normal)  DFT_ARG_SUFFIX=''   ;;
22956         (debug)   DFT_ARG_SUFFIX='_g' ;;
22957         (profile) DFT_ARG_SUFFIX='_p' ;;
22958         (shared)  DFT_ARG_SUFFIX=''   ;;
22959         esac
22960         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
22961 echo "$as_me:22961: result: $DFT_ARG_SUFFIX" >&5
22962 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
22963
22964 echo "$as_me:22964: checking default library-dependency suffix" >&5
22965 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
22966
22967         case X$DFT_LWR_MODEL in
22968         (Xlibtool)
22969                 DFT_LIB_SUFFIX='.la'
22970                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22971                 ;;
22972         (Xdebug)
22973                 DFT_LIB_SUFFIX='_g.a'
22974                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22975                 ;;
22976         (Xprofile)
22977                 DFT_LIB_SUFFIX='_p.a'
22978                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22979                 ;;
22980         (Xshared)
22981                 case $cf_cv_system_name in
22982                 (aix[5-7]*)
22983                         DFT_LIB_SUFFIX='.so'
22984                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22985                         ;;
22986                 (cygwin*|msys*|mingw*)
22987                         DFT_LIB_SUFFIX='.dll'
22988                         DFT_DEP_SUFFIX='.dll.a'
22989                         ;;
22990                 (darwin*)
22991                         DFT_LIB_SUFFIX='.dylib'
22992                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22993                         ;;
22994                 (hpux*)
22995                         case $target in
22996                         (ia64*)
22997                                 DFT_LIB_SUFFIX='.so'
22998                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
22999                                 ;;
23000                         (*)
23001                                 DFT_LIB_SUFFIX='.sl'
23002                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23003                                 ;;
23004                         esac
23005                         ;;
23006                 (*)
23007                         DFT_LIB_SUFFIX='.so'
23008                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23009                         ;;
23010                 esac
23011                 ;;
23012         (*)
23013                 DFT_LIB_SUFFIX='.a'
23014                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
23015                 ;;
23016         esac
23017         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23018         then
23019                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
23020                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
23021         fi
23022 echo "$as_me:23022: result: $DFT_DEP_SUFFIX" >&5
23023 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
23024
23025 echo "$as_me:23025: checking default object directory" >&5
23026 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
23027
23028         case $DFT_LWR_MODEL in
23029         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
23030         (normal)  DFT_OBJ_SUBDIR='objects' ;;
23031         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
23032         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
23033         (shared)
23034                 case $cf_cv_system_name in
23035                 (cygwin|msys)
23036                         DFT_OBJ_SUBDIR='objects' ;;
23037                 (*)
23038                         DFT_OBJ_SUBDIR='obj_s' ;;
23039                 esac
23040         esac
23041 echo "$as_me:23041: result: $DFT_OBJ_SUBDIR" >&5
23042 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
23043
23044 if test "x$cf_with_cxx" = xyes ; then
23045 echo "$as_me:23045: checking c++ library-dependency suffix" >&5
23046 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
23047 if test "$with_libtool" != "no"; then
23048         # libtool thinks it can make c++ shared libraries (perhaps only g++)
23049         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
23050 elif test "$with_shared_cxx" != "no"; then
23051         # also for g++ users...
23052         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
23053 else
23054         # we normally make a static library because C/C++ library rules differ
23055
23056         case Xnormal in
23057         (Xlibtool)
23058                 CXX_LIB_SUFFIX='.la'
23059                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23060                 ;;
23061         (Xdebug)
23062                 CXX_LIB_SUFFIX='_g.a'
23063                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23064                 ;;
23065         (Xprofile)
23066                 CXX_LIB_SUFFIX='_p.a'
23067                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23068                 ;;
23069         (Xshared)
23070                 case $cf_cv_system_name in
23071                 (aix[5-7]*)
23072                         CXX_LIB_SUFFIX='.so'
23073                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23074                         ;;
23075                 (cygwin*|msys*|mingw*)
23076                         CXX_LIB_SUFFIX='.dll'
23077                         CXX_DEP_SUFFIX='.dll.a'
23078                         ;;
23079                 (darwin*)
23080                         CXX_LIB_SUFFIX='.dylib'
23081                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23082                         ;;
23083                 (hpux*)
23084                         case $target in
23085                         (ia64*)
23086                                 CXX_LIB_SUFFIX='.so'
23087                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23088                                 ;;
23089                         (*)
23090                                 CXX_LIB_SUFFIX='.sl'
23091                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23092                                 ;;
23093                         esac
23094                         ;;
23095                 (*)
23096                         CXX_LIB_SUFFIX='.so'
23097                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23098                         ;;
23099                 esac
23100                 ;;
23101         (*)
23102                 CXX_LIB_SUFFIX='.a'
23103                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
23104                 ;;
23105         esac
23106         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23107         then
23108                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
23109                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
23110         fi
23111
23112 fi
23113 echo "$as_me:23113: result: $CXX_LIB_SUFFIX" >&5
23114 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
23115
23116 fi
23117
23118 # do not want -ldl in build except as needed for -lncurses dependency
23119 if test "x$with_dlsym" = xyes ; then
23120 if test $DFT_LWR_MODEL = shared || \
23121    test $DFT_LWR_MODEL = libtool ; then
23122
23123 # remove dl library from $LIBS
23124 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
23125
23126 fi
23127 fi
23128 ### Set up low-level terminfo dependencies for makefiles.
23129
23130 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
23131 # do not need libdl
23132 TICS_LIST=
23133 if test "x$with_dlsym" = xyes ; then
23134
23135 # remove dl library from $SHLIB_LIST
23136 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
23137
23138 fi
23139
23140 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
23141 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
23142 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
23143 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
23144 then
23145         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
23146 fi
23147
23148 if test "$with_ticlib" != no ; then
23149
23150         if test "x$with_ticlib" != xyes ; then
23151                 TICS_NAME=$with_ticlib
23152                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
23153                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
23154                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
23155                 TICS_LIB_SUFFIX="${with_ticlib}"
23156         else
23157                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
23158                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
23159                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
23160                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
23161         fi
23162         TICS_LDFLAGS="-L${LIB_DIR}"
23163         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
23164 else
23165         TICS_SUFFIX=${DFT_LIB_SUFFIX}
23166         TICS_LDFLAGS="-L${LIB_DIR}"
23167         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
23168 fi
23169
23170 if test "$with_termlib" != no ; then
23171
23172         if test "x$with_termlib" != xyes ; then
23173                 TINFO_NAME=$with_termlib
23174                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
23175                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
23176                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
23177                 TINFO_LIB_SUFFIX="${with_termlib}"
23178         else
23179                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
23180                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
23181                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
23182                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
23183         fi
23184
23185         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
23186         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
23187         if test "$DFT_LWR_MODEL" = "libtool"; then
23188                 TEST_ARGS="${TEST_DEPS}"
23189                 TEST_ARG2="${TEST_DEP2}"
23190                 TINFO_LDFLAGS="-L${LIB_DIR}"
23191                 TINFO_LIBS="$TEST_ARGS"
23192                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
23193                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
23194         else
23195                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
23196                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
23197                 if test "x$with_term_driver" != xno ; then
23198                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
23199                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
23200                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
23201                 else
23202                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
23203                         TINFO_LIBS="$TEST_ARGS"
23204                 fi
23205                 TINFO_LDFLAGS="-L${LIB_DIR}"
23206                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
23207         fi
23208 else
23209         # the next lines are needed for linking libtic over libncurses
23210         TINFO_NAME=${LIB_NAME}
23211         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
23212         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
23213         if test "x$with_tic_depends" = xyes ; then
23214                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
23215         else
23216                 TICS_LIST="$SHLIB_LIST"
23217         fi
23218
23219         TINFO_LDFLAGS="-L${LIB_DIR}"
23220         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
23221 fi
23222
23223 if test "$DFT_LWR_MODEL" = shared ; then
23224         case $cf_cv_system_name in
23225         (cygwin*|msys*)
23226                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
23227                 TINFO_SUFFIX=.dll
23228                 ;;
23229         esac
23230 fi
23231
23232 if test "x$with_dlsym" = xyes ; then
23233
23234 # remove dl library from $TICS_LIST
23235 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
23236
23237 fi
23238
23239 if test "$DFT_LWR_MODEL" = "libtool"; then
23240         OBJEXT=lo
23241 fi
23242
23243 # needed for Ada95
23244 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
23245
23246 case $DFT_LWR_MODEL in
23247 (normal|debug|profile)
23248
23249 if test "$GCC" = yes ; then
23250         case $cf_cv_system_name in
23251         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
23252                 LDFLAGS_STATIC=
23253                 LDFLAGS_SHARED=
23254                 ;;
23255         (*)     # normally, except when broken
23256                 LDFLAGS_STATIC=-static
23257                 LDFLAGS_SHARED=-dynamic
23258                 ;;
23259         esac
23260 else
23261         case $cf_cv_system_name in
23262         (aix[4-7]*)     # from ld manpage
23263                 LDFLAGS_STATIC=-bstatic
23264                 LDFLAGS_SHARED=-bdynamic
23265                 ;;
23266         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
23267                 # We could also use just "archive" and "shared".
23268                 LDFLAGS_STATIC=-Wl,-a,archive_shared
23269                 LDFLAGS_SHARED=-Wl,-a,shared_archive
23270                 ;;
23271         (irix*)         # from ld manpage IRIX64
23272                 LDFLAGS_STATIC=-Bstatic
23273                 LDFLAGS_SHARED=-Bdynamic
23274                 ;;
23275         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
23276                 # alternative "-oldstyle_liblookup" (not in cc manpage)
23277                 LDFLAGS_STATIC=-noso
23278                 LDFLAGS_SHARED=-so_archive
23279                 ;;
23280         (solaris2*)
23281                 LDFLAGS_STATIC=-Bstatic
23282                 LDFLAGS_SHARED=-Bdynamic
23283                 ;;
23284         esac
23285 fi
23286
23287 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
23288 then
23289         echo "$as_me:23289: checking if linker supports switching between static/dynamic" >&5
23290 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
23291
23292         rm -f libconftest.a
23293         cat >conftest.$ac_ext <<EOF
23294 #line 23294 "configure"
23295 #include <stdio.h>
23296 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
23297 EOF
23298         if { (eval echo "$as_me:23298: \"$ac_compile\"") >&5
23299   (eval $ac_compile) 2>&5
23300   ac_status=$?
23301   echo "$as_me:23301: \$? = $ac_status" >&5
23302   (exit $ac_status); } ; then
23303                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
23304                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
23305         fi
23306         rm -f conftest.*
23307
23308         cf_save_LIBS="$LIBS"
23309
23310         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
23311         cat >conftest.$ac_ext <<_ACEOF
23312 #line 23312 "configure"
23313 #include "confdefs.h"
23314
23315 #line 23315 "configure"
23316 #include <stdio.h>
23317 int cf_ldflags_static(FILE *fp);
23318
23319 int
23320 main (void)
23321 {
23322
23323         return cf_ldflags_static(stdin);
23324
23325   ;
23326   return 0;
23327 }
23328 _ACEOF
23329 rm -f conftest.$ac_objext conftest$ac_exeext
23330 if { (eval echo "$as_me:23330: \"$ac_link\"") >&5
23331   (eval $ac_link) 2>&5
23332   ac_status=$?
23333   echo "$as_me:23333: \$? = $ac_status" >&5
23334   (exit $ac_status); } &&
23335          { ac_try='test -s conftest$ac_exeext'
23336   { (eval echo "$as_me:23336: \"$ac_try\"") >&5
23337   (eval $ac_try) 2>&5
23338   ac_status=$?
23339   echo "$as_me:23339: \$? = $ac_status" >&5
23340   (exit $ac_status); }; }; then
23341
23342         # some linkers simply ignore the -dynamic
23343         case x`file conftest$ac_exeext 2>/dev/null` in
23344         (*static*)
23345                 cf_ldflags_static=no
23346                 ;;
23347         (*)
23348                 cf_ldflags_static=yes
23349                 ;;
23350         esac
23351
23352 else
23353   echo "$as_me: failed program was:" >&5
23354 cat conftest.$ac_ext >&5
23355 cf_ldflags_static=no
23356 fi
23357 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23358
23359         rm -f libconftest.*
23360         LIBS="$cf_save_LIBS"
23361
23362         echo "$as_me:23362: result: $cf_ldflags_static" >&5
23363 echo "${ECHO_T}$cf_ldflags_static" >&6
23364
23365         if test $cf_ldflags_static != yes
23366         then
23367                 LDFLAGS_STATIC=
23368                 LDFLAGS_SHARED=
23369         fi
23370 else
23371         LDFLAGS_STATIC=
23372         LDFLAGS_SHARED=
23373 fi
23374
23375         ;;
23376 esac
23377
23378 echo "$as_me:23378: checking where we will install curses.h" >&5
23379 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
23380
23381 includesubdir=
23382 if test "$with_overwrite" = no && \
23383  ( test "x$includedir" = 'x${prefix}/include' || \
23384    test "x$includedir" = "x${prefix}/include" )
23385 then
23386         includesubdir="/ncurses${USE_LIB_SUFFIX}"
23387 fi
23388 echo "$as_me:23388: result: ${includedir}${includesubdir}" >&5
23389 echo "${ECHO_T}${includedir}${includesubdir}" >&6
23390
23391 ### Resolve a conflict between normal and wide-curses by forcing applications
23392 ### that will need libutf8 to add it to their configure script.
23393 if test "$with_overwrite" != no ; then
23394 if test "$NCURSES_LIBUTF8" = 1 ; then
23395         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
23396         { echo "$as_me:23396: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
23397 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
23398 fi
23399 fi
23400 WITH_OVERWRITE=$with_overwrite
23401
23402 # used to separate tack out of the tree
23403 NCURSES_TREE=
23404
23405 ### predefined stuff for the test programs
23406
23407 cat >>confdefs.h <<\EOF
23408 #define HAVE_SLK_COLOR 1
23409 EOF
23410
23411 ### Construct the list of subdirectories for which we'll customize makefiles
23412 ### with the appropriate compile-rules.
23413
23414 echo "$as_me:23414: checking for src modules" >&5
23415 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
23416
23417 # dependencies and linker-arguments for test-programs
23418 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
23419 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
23420 if test "$DFT_LWR_MODEL" = "libtool"; then
23421         TEST_ARGS="${TEST_DEPS}"
23422         TEST_ARG2="${TEST_DEP2}"
23423 else
23424         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
23425         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
23426 fi
23427
23428 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
23429 cf_cv_src_modules=
23430 for cf_dir in $modules_to_build
23431 do
23432         if test -f $srcdir/$cf_dir/modules; then
23433
23434                 # We may/may not have tack in the distribution, though the
23435                 # makefile is.
23436                 if test $cf_dir = tack ; then
23437                         if test "x$cf_with_tack" != "xyes"; then
23438                                 continue
23439                         fi
23440                 fi
23441
23442                 if test -z "$cf_cv_src_modules"; then
23443                         cf_cv_src_modules=$cf_dir
23444                 else
23445                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
23446                 fi
23447
23448                 # Make the ncurses_cfg.h file record the library interface files as
23449                 # well.  These are header files that are the same name as their
23450                 # directory.  Ncurses is the only library that does not follow
23451                 # that pattern.
23452                 if test $cf_dir = tack ; then
23453                         continue
23454                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
23455
23456 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23457
23458                         cat >>confdefs.h <<EOF
23459 #define HAVE_${cf_have_include}_H 1
23460 EOF
23461
23462                         cat >>confdefs.h <<EOF
23463 #define HAVE_LIB${cf_have_include} 1
23464 EOF
23465
23466                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
23467                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
23468                         if test "$DFT_LWR_MODEL" = "libtool"; then
23469                                 TEST_ARGS="${TEST_DEPS}"
23470                                 TEST_ARG2="${TEST_DEP2}"
23471                         else
23472                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
23473                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
23474                         fi
23475                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
23476                 fi
23477         fi
23478 done
23479 echo "$as_me:23479: result: $cf_cv_src_modules" >&5
23480 echo "${ECHO_T}$cf_cv_src_modules" >&6
23481
23482 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
23483 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
23484
23485 SRC_SUBDIRS=
23486 if test "x$cf_with_manpages" != xno ; then
23487         SRC_SUBDIRS="$SRC_SUBDIRS man"
23488 fi
23489 SRC_SUBDIRS="$SRC_SUBDIRS include"
23490 for cf_dir in $cf_cv_src_modules
23491 do
23492         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
23493 done
23494 if test "x$cf_with_tests" != "xno" ; then
23495         SRC_SUBDIRS="$SRC_SUBDIRS test"
23496 fi
23497 # always make this, to install the ncurses-config script
23498 SRC_SUBDIRS="$SRC_SUBDIRS misc"
23499 if test "$cf_with_cxx_binding" != no; then
23500         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
23501         SRC_SUBDIRS="$SRC_SUBDIRS c++"
23502 fi
23503
23504 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
23505 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
23506
23507 ADA_SUBDIRS=
23508 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
23509         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
23510         ADA_SUBDIRS="gen src"
23511         if test "x$cf_with_tests" != "xno" ; then
23512                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
23513         fi
23514 fi
23515
23516 SUB_MAKEFILES=
23517 for cf_dir in $SRC_SUBDIRS
23518 do
23519         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
23520 done
23521
23522 if test -n "$ADA_SUBDIRS"; then
23523         for cf_dir in $ADA_SUBDIRS
23524         do
23525                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
23526         done
23527
23528 fi
23529
23530 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23531    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
23532    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
23533 fi
23534
23535 DIRS_TO_MAKE="lib"
23536 for cf_item in $cf_list_models
23537 do
23538
23539         case $cf_item in
23540         (libtool) cf_subdir='obj_lo'  ;;
23541         (normal)  cf_subdir='objects' ;;
23542         (debug)   cf_subdir='obj_g' ;;
23543         (profile) cf_subdir='obj_p' ;;
23544         (shared)
23545                 case $cf_cv_system_name in
23546                 (cygwin|msys)
23547                         cf_subdir='objects' ;;
23548                 (*)
23549                         cf_subdir='obj_s' ;;
23550                 esac
23551         esac
23552
23553         for cf_item2 in $DIRS_TO_MAKE
23554         do
23555                 test $cf_item2 = $cf_subdir && break
23556         done
23557         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
23558 done
23559 for cf_dir in $DIRS_TO_MAKE
23560 do
23561         test ! -d $cf_dir && mkdir $cf_dir
23562 done
23563
23564 # symbols that differ when compiling Ada95 by itself.
23565 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
23566
23567 # values to use as strings
23568
23569 cat >>confdefs.h <<EOF
23570 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
23571 EOF
23572
23573 cat >>confdefs.h <<EOF
23574 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
23575 EOF
23576
23577 ### Now that we're done running tests, add the compiler-warnings, if any
23578
23579 cf_fix_cppflags=no
23580 cf_new_cflags=
23581 cf_new_cppflags=
23582 cf_new_extra_cppflags=
23583
23584 for cf_add_cflags in $EXTRA_CFLAGS
23585 do
23586 case $cf_fix_cppflags in
23587 (no)
23588         case $cf_add_cflags in
23589         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23590                 case $cf_add_cflags in
23591                 (-D*)
23592                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23593
23594                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23595                                 && test -z "${cf_tst_cflags}" \
23596                                 && cf_fix_cppflags=yes
23597
23598                         if test $cf_fix_cppflags = yes ; then
23599
23600         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23601         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23602
23603                                 continue
23604                         elif test "${cf_tst_cflags}" = "\"'" ; then
23605
23606         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23607         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23608
23609                                 continue
23610                         fi
23611                         ;;
23612                 esac
23613                 case "$CPPFLAGS" in
23614                 (*$cf_add_cflags)
23615                         ;;
23616                 (*)
23617                         case $cf_add_cflags in
23618                         (-D*)
23619                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23620
23621 CPPFLAGS=`echo "$CPPFLAGS" | \
23622         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
23623                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
23624
23625                                 ;;
23626                         esac
23627
23628         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23629         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23630
23631                         ;;
23632                 esac
23633                 ;;
23634         (*)
23635
23636         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23637         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23638
23639                 ;;
23640         esac
23641         ;;
23642 (yes)
23643
23644         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23645         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23646
23647         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
23648
23649         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23650                 && test -z "${cf_tst_cflags}" \
23651                 && cf_fix_cppflags=no
23652         ;;
23653 esac
23654 done
23655
23656 if test -n "$cf_new_cflags" ; then
23657
23658         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23659         CFLAGS="${CFLAGS}$cf_new_cflags"
23660
23661 fi
23662
23663 if test -n "$cf_new_cppflags" ; then
23664
23665         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23666         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23667
23668 fi
23669
23670 if test -n "$cf_new_extra_cppflags" ; then
23671
23672         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23673         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23674
23675 fi
23676
23677 ### Define substitutions for header files to avoid name-pollution
23678
23679 if test "x$cf_cv_have_tcgetattr" = xyes ; then
23680         HAVE_TCGETATTR=1
23681 else
23682         HAVE_TCGETATTR=0
23683 fi
23684
23685 if test "x$ac_cv_header_stdint_h" = xyes ; then
23686         HAVE_STDINT_H=1
23687 else
23688         HAVE_STDINT_H=0
23689 fi
23690
23691 if test "x$ac_cv_header_termio_h" = xyes ; then
23692         HAVE_TERMIO_H=1
23693 else
23694         HAVE_TERMIO_H=0
23695 fi
23696
23697 if test "x$ac_cv_header_termios_h" = xyes ; then
23698         HAVE_TERMIOS_H=1
23699 else
23700         HAVE_TERMIOS_H=0
23701 fi
23702
23703 ################################################################################
23704 test "x$use_database" = xyes && \
23705 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
23706
23707 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
23708 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
23709
23710 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
23711 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
23712 fi
23713
23714 # Extract the first word of "tic", so it can be a program name with args.
23715 set dummy tic; ac_word=$2
23716 echo "$as_me:23716: checking for $ac_word" >&5
23717 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23718 if test "${ac_cv_path_TIC_PATH+set}" = set; then
23719   echo $ECHO_N "(cached) $ECHO_C" >&6
23720 else
23721   case $TIC_PATH in
23722   [\\/]* | ?:[\\/]*)
23723   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
23724   ;;
23725   *)
23726   ac_save_IFS=$IFS; IFS=$ac_path_separator
23727 ac_dummy="$PATH:/usr/local/ncurses/bin"
23728 for ac_dir in $ac_dummy; do
23729   IFS=$ac_save_IFS
23730   test -z "$ac_dir" && ac_dir=.
23731   if $as_executable_p "$ac_dir/$ac_word"; then
23732    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
23733    echo "$as_me:23733: found $ac_dir/$ac_word" >&5
23734    break
23735 fi
23736 done
23737
23738   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
23739   ;;
23740 esac
23741 fi
23742 TIC_PATH=$ac_cv_path_TIC_PATH
23743
23744 if test -n "$TIC_PATH"; then
23745   echo "$as_me:23745: result: $TIC_PATH" >&5
23746 echo "${ECHO_T}$TIC_PATH" >&6
23747 else
23748   echo "$as_me:23748: result: no" >&5
23749 echo "${ECHO_T}no" >&6
23750 fi
23751
23752 if test -n "$FALLBACK_LIST"
23753 then
23754         if test "$TIC_PATH" = unknown
23755         then
23756                 { echo "$as_me:23756: WARNING: no tic program found for fallbacks" >&5
23757 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
23758         fi
23759 fi
23760
23761 if test "x$cf_with_tests" != xno ; then
23762         MAKE_TESTS=
23763 else
23764         MAKE_TESTS="#"
23765 fi
23766
23767 ADAHTML_DIR=../../doc/html/ada
23768
23769 # these could be configurable, but are not currently
23770 PANEL_NAME=panel
23771 MENU_NAME=menu
23772 FORM_NAME=form
23773 CXX_NAME=ncurses++
23774
23775 # workaround for OS/2 (20151017)
23776 case $cf_cv_system_name in
23777 (os2*)
23778         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
23779         ;;
23780 (*)
23781         LIBTOOL_OPTS_CXX=
23782         ;;
23783 esac
23784
23785 # workaround for g++ versus Solaris (20131116)
23786 case $cf_cv_system_name in
23787 (solaris2*)
23788         case "x$CPPFLAGS" in
23789         (*-D_XOPEN_SOURCE_EXTENDED*)
23790                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
23791
23792 echo "${as_me:-configure}:23792: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
23793
23794                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
23795                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
23796                 ;;
23797         esac
23798         ;;
23799 esac
23800
23801 # Help to automatically enable the extended curses features when using either
23802 # the *-config or the ".pc" files by adding defines.
23803 echo "$as_me:23803: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
23804 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
23805 PKG_CFLAGS=
23806 for cf_loop1 in $CPPFLAGS_after_XOPEN
23807 do
23808         cf_found=no
23809         for cf_loop2 in $CPPFLAGS_before_XOPEN
23810         do
23811                 if test "x$cf_loop1" = "x$cf_loop2"
23812                 then
23813                         cf_found=yes
23814                         break
23815                 fi
23816         done
23817         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
23818 done
23819 echo "$as_me:23819: result: $PKG_CFLAGS" >&5
23820 echo "${ECHO_T}$PKG_CFLAGS" >&6
23821
23822 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
23823 case "x$NCURSES_OSPEED" in
23824 (*short*)
23825         cf_compatible=1
23826         ;;
23827 (*)
23828         cf_compatible=0
23829         ;;
23830 esac
23831
23832 cat >>confdefs.h <<EOF
23833 #define NCURSES_OSPEED_COMPAT $cf_compatible
23834 EOF
23835
23836 case "x$cf_cv_typeof_chtype" in
23837 (xshort|xint|xlong)
23838         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
23839         ;;
23840 esac
23841
23842 case "x$cf_cv_typeof_mmask_t" in
23843 (xshort|xint|xlong)
23844         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
23845         ;;
23846 esac
23847
23848 # substitute into misc/Makefile to suppress
23849 # (un)install.data from the
23850 # (un)install rules.
23851 if test "x$cf_with_db_install" = "xno"; then
23852         MISC_INSTALL_DATA=
23853         MISC_UNINSTALL_DATA=
23854 else
23855         MISC_INSTALL_DATA=install.data
23856         MISC_UNINSTALL_DATA=uninstall.data
23857 fi
23858
23859 SUB_SCRIPTS=
23860
23861 if test -n "$PACKAGE"
23862 then
23863         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
23864         export PACKAGE
23865         echo "package: $PACKAGE"
23866 fi
23867
23868 UNALTERED_SYMS=
23869 cf_filter_syms=no
23870
23871 if test -n "$RESULTING_SYMS"
23872 then
23873         cf_filter_syms=$cf_dft_filter_syms
23874         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
23875
23876 echo "${as_me:-configure}:23876: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
23877
23878 fi
23879
23880 if test "x$WILDCARD_SYMS" = xno
23881 then
23882         cf_filter_syms=yes
23883 fi
23884
23885 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
23886
23887 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
23888 if test $cf_filter_syms = yes
23889 then
23890         RESULTING_SYMS=resulting.map
23891 fi
23892
23893 if test "x$cross_compiling" = xyes ; then
23894         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
23895         CHECK_BUILD="#"
23896 else
23897         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
23898         CHECK_BUILD=
23899 fi
23900
23901 cat >>confdefs.h <<\EOF
23902 #define HAVE_CURSES_DATA_BOOLNAMES 1
23903 EOF
23904
23905 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"
23906 ac_config_commands="$ac_config_commands default"
23907 cat >confcache <<\_ACEOF
23908 # This file is a shell script that caches the results of configure
23909 # tests run on this system so they can be shared between configure
23910 # scripts and configure runs, see configure's option --config-cache.
23911 # It is not useful on other systems.  If it contains results you don't
23912 # want to keep, you may remove or edit it.
23913 #
23914 # config.status only pays attention to the cache file if you give it
23915 # the --recheck option to rerun configure.
23916 #
23917 # `ac_cv_env_foo' variables (set or unset) will be overriden when
23918 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23919 # following values.
23920
23921 _ACEOF
23922
23923 # The following way of writing the cache mishandles newlines in values,
23924 # but we know of no workaround that is simple, portable, and efficient.
23925 # So, don't put newlines in cache variables' values.
23926 # Ultrix sh set writes to stderr and can't be redirected directly,
23927 # and sets the high bit in the cache file unless we assign to the vars.
23928 {
23929   (set) 2>&1 |
23930     case `(ac_space=' '; set | grep ac_space) 2>&1` in
23931     *ac_space=\ *)
23932       # `set' does not quote correctly, so add quotes (double-quote
23933       # substitution turns \\\\ into \\, and sed turns \\ into \).
23934       sed -n \
23935         "s/'/'\\\\''/g;
23936           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23937       ;;
23938     *)
23939       # `set' quotes correctly as required by POSIX, so do not add quotes.
23940       sed -n \
23941         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23942       ;;
23943     esac;
23944 } |
23945   sed '
23946      t clear
23947      : clear
23948      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23949      t end
23950      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23951      : end' >>confcache
23952 if cmp -s $cache_file confcache; then :; else
23953   if test -w $cache_file; then
23954     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23955     cat confcache >$cache_file
23956   else
23957     echo "not updating unwritable cache $cache_file"
23958   fi
23959 fi
23960 rm -f confcache
23961
23962 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23963 # Let make expand exec_prefix.
23964 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23965
23966 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23967 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23968 # trailing colons and then remove the whole line if VPATH becomes empty
23969 # (actually we leave an empty line to preserve line numbers).
23970 if test "x$srcdir" = x.; then
23971   ac_vpsub='/^[         ]*VPATH[        ]*=/{
23972 s/:*\$(srcdir):*/:/;
23973 s/:*\${srcdir}:*/:/;
23974 s/:*@srcdir@:*/:/;
23975 s/^\([^=]*=[    ]*\):*/\1/;
23976 s/:*$//;
23977 s/^[^=]*=[      ]*$//;
23978 }'
23979 fi
23980
23981 DEFS=-DHAVE_CONFIG_H
23982
23983 : ${CONFIG_STATUS=./config.status}
23984 ac_clean_files_save=$ac_clean_files
23985 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23986 { echo "$as_me:23986: creating $CONFIG_STATUS" >&5
23987 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23988 cat >$CONFIG_STATUS <<_ACEOF
23989 #! $SHELL
23990 # Generated automatically by configure.
23991 # Run this file to recreate the current configuration.
23992 # Compiler output produced by configure, useful for debugging
23993 # configure, is in config.log if it exists.
23994
23995 debug=false
23996 SHELL=\${CONFIG_SHELL-$SHELL}
23997 ac_cs_invocation="\$0 \$@"
23998
23999 _ACEOF
24000
24001 cat >>$CONFIG_STATUS <<\_ACEOF
24002 # Be Bourne compatible
24003 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24004   emulate sh
24005   NULLCMD=:
24006 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24007   set -o posix
24008 fi
24009
24010 # Name of the executable.
24011 as_me=`echo "$0" |sed 's,.*[\\/],,'`
24012
24013 if expr a : '\(a\)' >/dev/null 2>&1; then
24014   as_expr=expr
24015 else
24016   as_expr=false
24017 fi
24018
24019 rm -f conf$$ conf$$.exe conf$$.file
24020 echo >conf$$.file
24021 if ln -s conf$$.file conf$$ 2>/dev/null; then
24022   # We could just check for DJGPP; but this test a) works b) is more generic
24023   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
24024   if test -f conf$$.exe; then
24025     # Don't use ln at all; we don't have any links
24026     as_ln_s='cp -p'
24027   else
24028     as_ln_s='ln -s'
24029   fi
24030 elif ln conf$$.file conf$$ 2>/dev/null; then
24031   as_ln_s=ln
24032 else
24033   as_ln_s='cp -p'
24034 fi
24035 rm -f conf$$ conf$$.exe conf$$.file
24036
24037 as_executable_p="test -f"
24038
24039 # Support unset when possible.
24040 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
24041   as_unset=unset
24042 else
24043   as_unset=false
24044 fi
24045
24046 # NLS nuisances.
24047 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
24048 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
24049 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
24050 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
24051 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
24052 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
24053 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
24054 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
24055
24056 # IFS
24057 # We need space, tab and new line, in precisely that order.
24058 as_nl='
24059 '
24060 IFS="   $as_nl"
24061
24062 # CDPATH.
24063 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
24064
24065 exec 6>&1
24066
24067 _ACEOF
24068
24069 # Files that config.status was made for.
24070 if test -n "$ac_config_files"; then
24071   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
24072 fi
24073
24074 if test -n "$ac_config_headers"; then
24075   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
24076 fi
24077
24078 if test -n "$ac_config_links"; then
24079   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
24080 fi
24081
24082 if test -n "$ac_config_commands"; then
24083   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
24084 fi
24085
24086 cat >>$CONFIG_STATUS <<\EOF
24087
24088 ac_cs_usage="\
24089 \`$as_me' instantiates files from templates according to the
24090 current configuration.
24091
24092 Usage: $0 [OPTIONS] [FILE]...
24093
24094   -h, --help       print this help, then exit
24095   -V, --version    print version number, then exit
24096   -d, --debug      don't remove temporary files
24097       --recheck    update $as_me by reconfiguring in the same conditions
24098   --file=FILE[:TEMPLATE]
24099                    instantiate the configuration file FILE
24100   --header=FILE[:TEMPLATE]
24101                    instantiate the configuration header FILE
24102
24103 Configuration files:
24104 $config_files
24105
24106 Configuration headers:
24107 $config_headers
24108
24109 Configuration commands:
24110 $config_commands
24111
24112 Report bugs to <dickey@invisible-island.net>."
24113 EOF
24114
24115 cat >>$CONFIG_STATUS <<EOF
24116 ac_cs_version="\\
24117 config.status
24118 configured by $0, generated by GNU Autoconf 2.52.20170501,
24119   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
24120
24121 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
24122 Free Software Foundation, Inc.
24123 This config.status script is free software; the Free Software Foundation
24124 gives unlimited permission to copy, distribute and modify it."
24125 srcdir=$srcdir
24126 INSTALL="$INSTALL"
24127 EOF
24128
24129 cat >>$CONFIG_STATUS <<\EOF
24130 # If no file are specified by the user, then we need to provide default
24131 # value.  By we need to know if files were specified by the user.
24132 ac_need_defaults=:
24133 while test $# != 0
24134 do
24135   case $1 in
24136   --*=*)
24137     ac_option=`expr "x$1" : 'x\([^=]*\)='`
24138     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
24139     shift
24140     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
24141     shift
24142     ;;
24143   -*);;
24144   *) # This is not an option, so the user has probably given explicit
24145      # arguments.
24146      ac_need_defaults=false;;
24147   esac
24148
24149   case $1 in
24150   # Handling of the options.
24151 EOF
24152 cat >>$CONFIG_STATUS <<EOF
24153   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24154     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
24155     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
24156 EOF
24157 cat >>$CONFIG_STATUS <<\EOF
24158   --version | --vers* | -V )
24159     echo "$ac_cs_version"; exit 0 ;;
24160   --he | --h)
24161     # Conflict between --help and --header
24162     { { echo "$as_me:24162: error: ambiguous option: $1
24163 Try \`$0 --help' for more information." >&5
24164 echo "$as_me: error: ambiguous option: $1
24165 Try \`$0 --help' for more information." >&2;}
24166    { (exit 1); exit 1; }; };;
24167   --help | --hel | -h )
24168     echo "$ac_cs_usage"; exit 0 ;;
24169   --debug | --d* | -d )
24170     debug=: ;;
24171   --file | --fil | --fi | --f )
24172     shift
24173     CONFIG_FILES="$CONFIG_FILES $1"
24174     ac_need_defaults=false;;
24175   --header | --heade | --head | --hea )
24176     shift
24177     CONFIG_HEADERS="$CONFIG_HEADERS $1"
24178     ac_need_defaults=false;;
24179
24180   # This is an error.
24181   -*) { { echo "$as_me:24181: error: unrecognized option: $1
24182 Try \`$0 --help' for more information." >&5
24183 echo "$as_me: error: unrecognized option: $1
24184 Try \`$0 --help' for more information." >&2;}
24185    { (exit 1); exit 1; }; } ;;
24186
24187   *) ac_config_targets="$ac_config_targets $1" ;;
24188
24189   esac
24190   shift
24191 done
24192
24193 exec 5>>config.log
24194 cat >&5 << _ACEOF
24195
24196 ## ----------------------- ##
24197 ## Running config.status.  ##
24198 ## ----------------------- ##
24199
24200 This file was extended by $as_me 2.52.20170501, executed with
24201   CONFIG_FILES    = $CONFIG_FILES
24202   CONFIG_HEADERS  = $CONFIG_HEADERS
24203   CONFIG_LINKS    = $CONFIG_LINKS
24204   CONFIG_COMMANDS = $CONFIG_COMMANDS
24205   > $ac_cs_invocation
24206 on `(hostname || uname -n) 2>/dev/null | sed 1q`
24207
24208 _ACEOF
24209 EOF
24210
24211 cat >>$CONFIG_STATUS <<EOF
24212 #
24213 # INIT-COMMANDS section.
24214 #
24215
24216 ### Special initialization commands, used to pass information from the
24217 ### configuration-run into config.status
24218
24219 AWK="$AWK"
24220 ALTERNATE_SYMS="$ALTERNATE_SYMS"
24221 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
24222 DFT_LWR_MODEL="$DFT_LWR_MODEL"
24223 ECHO_LD="$ECHO_LD"
24224 EXTRA_SUFFIX="$EXTRA_SUFFIX"
24225 LDCONFIG="$LDCONFIG"
24226 LIBTOOL_VERSION="$LIBTOOL_VERSION"
24227 LIB_NAME="$LIB_NAME"
24228 LIB_PREFIX="$LIB_PREFIX"
24229 LIB_SUBSETS="$LIB_SUBSETS"
24230 LIB_SUFFIX="$LIB_SUFFIX"
24231 LIB_TRACING="$LIB_TRACING"
24232 LN_S="$LN_S"
24233 MAKE_TERMINFO="$MAKE_TERMINFO"
24234 NCURSES_MAJOR="$NCURSES_MAJOR"
24235 NCURSES_MINOR="$NCURSES_MINOR"
24236 NCURSES_OSPEED="$NCURSES_OSPEED"
24237 NCURSES_PATCH="$NCURSES_PATCH"
24238 SRC_SUBDIRS="$SRC_SUBDIRS"
24239 TERMINFO="$TERMINFO"
24240 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
24241 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
24242 TICS_NAME="$TICS_NAME"
24243 TICS_SUFFIX="$TICS_SUFFIX"
24244 TIC_PATH="$TIC_PATH"
24245 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
24246 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
24247 TINFO_NAME="$TINFO_NAME"
24248 TINFO_SUFFIX="$TINFO_SUFFIX"
24249 UNALTERED_SYMS="$UNALTERED_SYMS"
24250 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
24251 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
24252 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
24253 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
24254 WILDCARD_SYMS="$WILDCARD_SYMS"
24255 WITH_CURSES_H="$with_curses_h"
24256 WITH_ECHO="${enable_echo:=yes}"
24257 WITH_OVERWRITE="$with_overwrite"
24258 cf_LIST_MODELS="$cf_list_models"
24259 cf_cv_abi_version="$cf_cv_abi_version"
24260 cf_cv_do_relink="$cf_cv_do_relink"
24261 cf_cv_do_symlinks="$cf_cv_do_symlinks"
24262 cf_cv_enable_lp64="$cf_cv_enable_lp64"
24263 cf_cv_enable_opaque="$cf_cv_enable_opaque"
24264 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
24265 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
24266 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
24267 cf_cv_rel_version="$cf_cv_rel_version"
24268 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
24269 cf_cv_shared_soname='$cf_cv_shared_soname'
24270 cf_cv_shlib_version="$cf_cv_shlib_version"
24271 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
24272 cf_cv_system_name="$cf_cv_system_name"
24273 cf_cv_term_driver="$with_term_driver"
24274 cf_with_ada="$cf_with_ada"
24275 cf_with_cxx_binding="$cf_with_cxx_binding"
24276 cf_with_db_install="$cf_with_db_install"
24277 cf_with_manpages="$cf_with_manpages"
24278 cf_with_tests="$cf_with_tests"
24279 host="$host"
24280 target="$target"
24281 with_shared_cxx="$with_shared_cxx"
24282
24283 EOF
24284
24285 cat >>$CONFIG_STATUS <<\EOF
24286 for ac_config_target in $ac_config_targets
24287 do
24288   case "$ac_config_target" in
24289   # Handling of arguments.
24290   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
24291   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
24292   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
24293   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
24294   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
24295   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
24296   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
24297   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24298   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24299   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
24300   *) { { echo "$as_me:24300: error: invalid argument: $ac_config_target" >&5
24301 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24302    { (exit 1); exit 1; }; };;
24303   esac
24304 done
24305
24306 # If the user did not use the arguments to specify the items to instantiate,
24307 # then the envvar interface is used.  Set only those that are not.
24308 # We use the long form for the default assignment because of an extremely
24309 # bizarre bug on SunOS 4.1.3.
24310 if $ac_need_defaults; then
24311   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24312   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24313   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
24314 fi
24315
24316 # Create a temporary directory, and hook for its removal unless debugging.
24317 $debug ||
24318 {
24319   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
24320   trap '{ (exit 1); exit 1; }' 1 2 13 15
24321 }
24322
24323 # Create a (secure) tmp directory for tmp files.
24324 : ${TMPDIR=/tmp}
24325 {
24326   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
24327   test -n "$tmp" && test -d "$tmp"
24328 }  ||
24329 {
24330   tmp=$TMPDIR/cs$$-$RANDOM
24331   (umask 077 && mkdir $tmp)
24332 } ||
24333 {
24334    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
24335    { (exit 1); exit 1; }
24336 }
24337
24338 EOF
24339
24340 cat >>$CONFIG_STATUS <<EOF
24341
24342 #
24343 # CONFIG_FILES section.
24344 #
24345
24346 # No need to generate the scripts if there are no CONFIG_FILES.
24347 # This happens for instance when ./config.status config.h
24348 if test -n "\$CONFIG_FILES"; then
24349   # Protect against being on the right side of a sed subst in config.status.
24350   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
24351    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
24352 s,@SHELL@,$SHELL,;t t
24353 s,@exec_prefix@,$exec_prefix,;t t
24354 s,@prefix@,$prefix,;t t
24355 s,@program_transform_name@,$program_transform_name,;t t
24356 s,@bindir@,$bindir,;t t
24357 s,@sbindir@,$sbindir,;t t
24358 s,@libexecdir@,$libexecdir,;t t
24359 s,@datarootdir@,$datarootdir,;t t
24360 s,@datadir@,$datadir,;t t
24361 s,@sysconfdir@,$sysconfdir,;t t
24362 s,@sharedstatedir@,$sharedstatedir,;t t
24363 s,@localstatedir@,$localstatedir,;t t
24364 s,@libdir@,$libdir,;t t
24365 s,@includedir@,$includedir,;t t
24366 s,@oldincludedir@,$oldincludedir,;t t
24367 s,@infodir@,$infodir,;t t
24368 s,@mandir@,$mandir,;t t
24369 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
24370 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
24371 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
24372 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
24373 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
24374 s,@build_alias@,$build_alias,;t t
24375 s,@host_alias@,$host_alias,;t t
24376 s,@target_alias@,$target_alias,;t t
24377 s,@ECHO_C@,$ECHO_C,;t t
24378 s,@ECHO_N@,$ECHO_N,;t t
24379 s,@ECHO_T@,$ECHO_T,;t t
24380 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
24381 s,@DEFS@,$DEFS,;t t
24382 s,@LIBS@,$LIBS,;t t
24383 s,@top_builddir@,$top_builddir,;t t
24384 s,@EGREP@,$EGREP,;t t
24385 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
24386 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
24387 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
24388 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
24389 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
24390 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
24391 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
24392 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
24393 s,@VERSION@,$VERSION,;t t
24394 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
24395 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
24396 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
24397 s,@PACKAGE@,$PACKAGE,;t t
24398 s,@build@,$build,;t t
24399 s,@build_cpu@,$build_cpu,;t t
24400 s,@build_vendor@,$build_vendor,;t t
24401 s,@build_os@,$build_os,;t t
24402 s,@host@,$host,;t t
24403 s,@host_cpu@,$host_cpu,;t t
24404 s,@host_vendor@,$host_vendor,;t t
24405 s,@host_os@,$host_os,;t t
24406 s,@target@,$target,;t t
24407 s,@target_cpu@,$target_cpu,;t t
24408 s,@target_vendor@,$target_vendor,;t t
24409 s,@target_os@,$target_os,;t t
24410 s,@CC@,$CC,;t t
24411 s,@CFLAGS@,$CFLAGS,;t t
24412 s,@LDFLAGS@,$LDFLAGS,;t t
24413 s,@CPPFLAGS@,$CPPFLAGS,;t t
24414 s,@ac_ct_CC@,$ac_ct_CC,;t t
24415 s,@EXEEXT@,$EXEEXT,;t t
24416 s,@OBJEXT@,$OBJEXT,;t t
24417 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
24418 s,@CPP@,$CPP,;t t
24419 s,@LDCONFIG@,$LDCONFIG,;t t
24420 s,@CXX@,$CXX,;t t
24421 s,@CXXFLAGS@,$CXXFLAGS,;t t
24422 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
24423 s,@AWK@,$AWK,;t t
24424 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
24425 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
24426 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
24427 s,@LINT@,$LINT,;t t
24428 s,@LINT_OPTS@,$LINT_OPTS,;t t
24429 s,@LN_S@,$LN_S,;t t
24430 s,@cf_config_suffix@,$cf_config_suffix,;t t
24431 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
24432 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
24433 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
24434 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
24435 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
24436 s,@SET_MAKE@,$SET_MAKE,;t t
24437 s,@CTAGS@,$CTAGS,;t t
24438 s,@ETAGS@,$ETAGS,;t t
24439 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
24440 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
24441 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
24442 s,@RANLIB@,$RANLIB,;t t
24443 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
24444 s,@LD@,$LD,;t t
24445 s,@ac_ct_LD@,$ac_ct_LD,;t t
24446 s,@AR@,$AR,;t t
24447 s,@ac_ct_AR@,$ac_ct_AR,;t t
24448 s,@NM@,$NM,;t t
24449 s,@ac_ct_NM@,$ac_ct_NM,;t t
24450 s,@ARFLAGS@,$ARFLAGS,;t t
24451 s,@DESTDIR@,$DESTDIR,;t t
24452 s,@BUILD_CC@,$BUILD_CC,;t t
24453 s,@BUILD_CPP@,$BUILD_CPP,;t t
24454 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
24455 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
24456 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
24457 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
24458 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
24459 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
24460 s,@cf_list_models@,$cf_list_models,;t t
24461 s,@ABI_VERSION@,$ABI_VERSION,;t t
24462 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
24463 s,@LIBTOOL@,$LIBTOOL,;t t
24464 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
24465 s,@LT_UNDEF@,$LT_UNDEF,;t t
24466 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
24467 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
24468 s,@LIB_CREATE@,$LIB_CREATE,;t t
24469 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
24470 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
24471 s,@LIB_PREP@,$LIB_PREP,;t t
24472 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
24473 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
24474 s,@LIB_LINK@,$LIB_LINK,;t t
24475 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
24476 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
24477 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
24478 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
24479 s,@TICS_NAME@,$TICS_NAME,;t t
24480 s,@TINFO_NAME@,$TINFO_NAME,;t t
24481 s,@LIB_NAME@,$LIB_NAME,;t t
24482 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
24483 s,@CC_G_OPT@,$CC_G_OPT,;t t
24484 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
24485 s,@LD_MODEL@,$LD_MODEL,;t t
24486 s,@shlibdir@,$shlibdir,;t t
24487 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
24488 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
24489 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
24490 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
24491 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
24492 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
24493 s,@LINK_PROGS@,$LINK_PROGS,;t t
24494 s,@LINK_TESTS@,$LINK_TESTS,;t t
24495 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
24496 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
24497 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
24498 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
24499 s,@RPATH_LIST@,$RPATH_LIST,;t t
24500 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
24501 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
24502 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
24503 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
24504 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
24505 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
24506 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
24507 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
24508 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
24509 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
24510 s,@XTERM_KBS@,$XTERM_KBS,;t t
24511 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
24512 s,@TERMINFO@,$TERMINFO,;t t
24513 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
24514 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
24515 s,@TERMPATH@,$TERMPATH,;t t
24516 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
24517 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
24518 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
24519 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
24520 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
24521 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
24522 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
24523 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
24524 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
24525 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
24526 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
24527 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
24528 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
24529 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
24530 s,@RGB_PATH@,$RGB_PATH,;t t
24531 s,@no_x11_rgb@,$no_x11_rgb,;t t
24532 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
24533 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
24534 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
24535 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
24536 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
24537 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
24538 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
24539 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
24540 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
24541 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
24542 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
24543 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
24544 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
24545 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
24546 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
24547 s,@PTHREAD@,$PTHREAD,;t t
24548 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
24549 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
24550 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
24551 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
24552 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
24553 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
24554 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
24555 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
24556 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
24557 s,@ECHO_LT@,$ECHO_LT,;t t
24558 s,@ECHO_LD@,$ECHO_LD,;t t
24559 s,@RULE_CC@,$RULE_CC,;t t
24560 s,@SHOW_CC@,$SHOW_CC,;t t
24561 s,@ECHO_CC@,$ECHO_CC,;t t
24562 s,@ECHO_LINK@,$ECHO_LINK,;t t
24563 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
24564 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
24565 s,@ADAFLAGS@,$ADAFLAGS,;t t
24566 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
24567 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
24568 s,@ADA_TRACE@,$ADA_TRACE,;t t
24569 s,@MATH_LIB@,$MATH_LIB,;t t
24570 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
24571 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
24572 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
24573 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
24574 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
24575 s,@TEST_LIBS@,$TEST_LIBS,;t t
24576 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
24577 s,@CXXCPP@,$CXXCPP,;t t
24578 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
24579 s,@CXX_AR@,$CXX_AR,;t t
24580 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
24581 s,@CXXLIBS@,$CXXLIBS,;t t
24582 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
24583 s,@gnatmake_exists@,$gnatmake_exists,;t t
24584 s,@gprconfig_exists@,$gprconfig_exists,;t t
24585 s,@M4_exists@,$M4_exists,;t t
24586 s,@cf_ada_make@,$cf_ada_make,;t t
24587 s,@cf_ada_config@,$cf_ada_config,;t t
24588 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
24589 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
24590 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
24591 s,@cf_compile_generics@,$cf_compile_generics,;t t
24592 s,@cf_generic_objects@,$cf_generic_objects,;t t
24593 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
24594 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
24595 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
24596 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
24597 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
24598 s,@cf_ada_package@,$cf_ada_package,;t t
24599 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
24600 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
24601 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
24602 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
24603 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
24604 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
24605 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
24606 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
24607 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
24608 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
24609 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
24610 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
24611 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
24612 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
24613 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
24614 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
24615 s,@TICS_LIBS@,$TICS_LIBS,;t t
24616 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
24617 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
24618 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
24619 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
24620 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
24621 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
24622 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
24623 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
24624 s,@includesubdir@,$includesubdir,;t t
24625 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
24626 s,@TICS_LIST@,$TICS_LIST,;t t
24627 s,@TINFO_LIST@,$TINFO_LIST,;t t
24628 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
24629 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
24630 s,@TEST_ARGS@,$TEST_ARGS,;t t
24631 s,@TEST_DEPS@,$TEST_DEPS,;t t
24632 s,@TEST_ARG2@,$TEST_ARG2,;t t
24633 s,@TEST_DEP2@,$TEST_DEP2,;t t
24634 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
24635 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
24636 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
24637 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
24638 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
24639 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
24640 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
24641 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
24642 s,@cross_compiling@,$cross_compiling,;t t
24643 s,@TIC_PATH@,$TIC_PATH,;t t
24644 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
24645 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
24646 s,@PANEL_NAME@,$PANEL_NAME,;t t
24647 s,@MENU_NAME@,$MENU_NAME,;t t
24648 s,@FORM_NAME@,$FORM_NAME,;t t
24649 s,@CXX_NAME@,$CXX_NAME,;t t
24650 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
24651 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
24652 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
24653 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
24654 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
24655 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
24656 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
24657 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
24658 CEOF
24659
24660 EOF
24661
24662   cat >>$CONFIG_STATUS <<\EOF
24663   # Split the substitutions into bite-sized pieces for seds with
24664   # small command number limits, like on Digital OSF/1 and HP-UX.
24665   ac_max_sed_lines=48
24666   ac_sed_frag=1 # Number of current file.
24667   ac_beg=1 # First line for current file.
24668   ac_end=$ac_max_sed_lines # Line after last line for current file.
24669   ac_more_lines=:
24670   ac_sed_cmds=
24671   while $ac_more_lines; do
24672     if test $ac_beg -gt 1; then
24673       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24674     else
24675       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
24676     fi
24677     if test ! -s $tmp/subs.frag; then
24678       ac_more_lines=false
24679     else
24680       # The purpose of the label and of the branching condition is to
24681       # speed up the sed processing (if there are no `@' at all, there
24682       # is no need to browse any of the substitutions).
24683       # These are the two extra sed commands mentioned above.
24684       (echo ':t
24685   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
24686       # It is possible to make a multiline substitution using escaped newlines.
24687       # Ensure that we do not split the substitution between script fragments.
24688       ac_BEG=$ac_end
24689       ac_END=`expr $ac_end + $ac_max_sed_lines`
24690       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
24691       if test -s $tmp/subs.next; then
24692         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
24693         if test ! -s $tmp/subs.edit; then
24694           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
24695           if test ! -s $tmp/subs.edit; then
24696             if test $ac_beg -gt 1; then
24697               ac_end=`expr $ac_end - 1`
24698               continue
24699             fi
24700           fi
24701         fi
24702       fi
24703
24704       if test -z "$ac_sed_cmds"; then
24705         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
24706       else
24707         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
24708       fi
24709       ac_sed_frag=`expr $ac_sed_frag + 1`
24710       ac_beg=$ac_end
24711       ac_end=`expr $ac_end + $ac_max_sed_lines`
24712     fi
24713   done
24714   if test -z "$ac_sed_cmds"; then
24715     ac_sed_cmds=cat
24716   fi
24717 fi # test -n "$CONFIG_FILES"
24718
24719 EOF
24720 cat >>$CONFIG_STATUS <<\EOF
24721 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
24722   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24723   case $ac_file in
24724   - | *:- | *:-:* ) # input from stdin
24725         cat >$tmp/stdin
24726         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24727         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24728   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24729         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24730   * )   ac_file_in=$ac_file.in ;;
24731   esac
24732
24733   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
24734   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24735          X"$ac_file" : 'X\(//\)[^/]' \| \
24736          X"$ac_file" : 'X\(//\)$' \| \
24737          X"$ac_file" : 'X\(/\)' \| \
24738          .     : '\(.\)' 2>/dev/null ||
24739 echo X"$ac_file" |
24740     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24741           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24742           /^X\(\/\/\)$/{ s//\1/; q; }
24743           /^X\(\/\).*/{ s//\1/; q; }
24744           s/.*/./; q'`
24745   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24746     { case "$ac_dir" in
24747   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24748   *)                      as_incr_dir=.;;
24749 esac
24750 as_dummy="$ac_dir"
24751 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24752   case $as_mkdir_dir in
24753     # Skip DOS drivespec
24754     ?:) as_incr_dir=$as_mkdir_dir ;;
24755     *)
24756       as_incr_dir=$as_incr_dir/$as_mkdir_dir
24757       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24758     ;;
24759   esac
24760 done; }
24761
24762     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
24763     # A "../" for each directory in $ac_dir_suffix.
24764     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
24765   else
24766     ac_dir_suffix= ac_dots=
24767   fi
24768
24769   case $srcdir in
24770   .)  ac_srcdir=.
24771       if test -z "$ac_dots"; then
24772          ac_top_srcdir=.
24773       else
24774          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
24775       fi ;;
24776   [\\/]* | ?:[\\/]* )
24777       ac_srcdir=$srcdir$ac_dir_suffix;
24778       ac_top_srcdir=$srcdir ;;
24779   *) # Relative path.
24780     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
24781     ac_top_srcdir=$ac_dots$srcdir ;;
24782   esac
24783
24784   case $INSTALL in
24785   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
24786   *) ac_INSTALL=$ac_dots$INSTALL ;;
24787   esac
24788
24789   if test x"$ac_file" != x-; then
24790     { echo "$as_me:24790: creating $ac_file" >&5
24791 echo "$as_me: creating $ac_file" >&6;}
24792     rm -f "$ac_file"
24793   fi
24794   # Let's still pretend it is `configure' which instantiates (i.e., don't
24795   # use $as_me), people would be surprised to read:
24796   #    /* config.h.  Generated automatically by config.status.  */
24797   configure_input="Generated automatically from `echo $ac_file_in |
24798                                                  sed 's,.*/,,'` by configure."
24799
24800   # First look for the input files in the build tree, otherwise in the
24801   # src tree.
24802   ac_file_inputs=`IFS=:
24803     for f in $ac_file_in; do
24804       case $f in
24805       -) echo $tmp/stdin ;;
24806       [\\/$]*)
24807          # Absolute (can't be DOS-style, as IFS=:)
24808          test -f "$f" || { { echo "$as_me:24808: error: cannot find input file: $f" >&5
24809 echo "$as_me: error: cannot find input file: $f" >&2;}
24810    { (exit 1); exit 1; }; }
24811          echo $f;;
24812       *) # Relative
24813          if test -f "$f"; then
24814            # Build tree
24815            echo $f
24816          elif test -f "$srcdir/$f"; then
24817            # Source tree
24818            echo $srcdir/$f
24819          else
24820            # /dev/null tree
24821            { { echo "$as_me:24821: error: cannot find input file: $f" >&5
24822 echo "$as_me: error: cannot find input file: $f" >&2;}
24823    { (exit 1); exit 1; }; }
24824          fi;;
24825       esac
24826     done` || { (exit 1); exit 1; }
24827 EOF
24828 cat >>$CONFIG_STATUS <<\EOF
24829   ac_warn_datarootdir=no
24830   if test x"$ac_file" != x-; then
24831     for ac_item in $ac_file_inputs
24832     do
24833       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
24834       if test -n "$ac_seen"; then
24835         ac_used=`grep '@datarootdir@' $ac_item`
24836         if test -z "$ac_used"; then
24837           { echo "$as_me:24837: WARNING: datarootdir was used implicitly but not set:
24838 $ac_seen" >&5
24839 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
24840 $ac_seen" >&2;}
24841           ac_warn_datarootdir=yes
24842         fi
24843       fi
24844       ac_seen=`grep '${datarootdir}' $ac_item`
24845       if test -n "$ac_seen"; then
24846         { echo "$as_me:24846: WARNING: datarootdir was used explicitly but not set:
24847 $ac_seen" >&5
24848 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
24849 $ac_seen" >&2;}
24850         ac_warn_datarootdir=yes
24851       fi
24852     done
24853   fi
24854
24855 if test "x$ac_warn_datarootdir" = xyes; then
24856   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
24857 fi
24858
24859 EOF
24860 cat >>$CONFIG_STATUS <<EOF
24861   sed "$ac_vpsub
24862 $extrasub
24863 EOF
24864 cat >>$CONFIG_STATUS <<\EOF
24865 :t
24866 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24867 s,@configure_input@,$configure_input,;t t
24868 s,@srcdir@,$ac_srcdir,;t t
24869 s,@top_srcdir@,$ac_top_srcdir,;t t
24870 s,@INSTALL@,$ac_INSTALL,;t t
24871 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
24872   rm -f $tmp/stdin
24873   if test x"$ac_file" != x-; then
24874     cp $tmp/out $ac_file
24875
24876     for ac_name in prefix exec_prefix datarootdir
24877     do
24878         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
24879         if test -n "$ac_seen"; then
24880             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
24881             if test -z "$ac_init"; then
24882               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
24883               { echo "$as_me:24883: WARNING: Variable $ac_name is used but was not set:
24884 $ac_seen" >&5
24885 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
24886 $ac_seen" >&2;}
24887             fi
24888         fi
24889     done
24890     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
24891     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
24892     if test -s $tmp/out; then
24893       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
24894       { echo "$as_me:24894: WARNING: Some variables may not be substituted:
24895 $ac_seen" >&5
24896 echo "$as_me: WARNING: Some variables may not be substituted:
24897 $ac_seen" >&2;}
24898     fi
24899   else
24900     cat $tmp/out
24901   fi
24902   rm -f $tmp/out
24903
24904 done
24905 EOF
24906 cat >>$CONFIG_STATUS <<\EOF
24907
24908 #
24909 # CONFIG_HEADER section.
24910 #
24911
24912 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24913 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24914 #
24915 # ac_d sets the value in "#define NAME VALUE" lines.
24916 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24917 ac_dB='[        ].*$,\1#\2'
24918 ac_dC=' '
24919 ac_dD=',;t'
24920 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24921 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24922 ac_iB='\([      ]\),\1#\2define\3'
24923 ac_iC=' '
24924 ac_iD='\4,;t'
24925 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24926 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24927 ac_uB='$,\1#\2define\3'
24928 ac_uC=' '
24929 ac_uD=',;t'
24930
24931 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24932   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24933   case $ac_file in
24934   - | *:- | *:-:* ) # input from stdin
24935         cat >$tmp/stdin
24936         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24937         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24938   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24939         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24940   * )   ac_file_in=$ac_file.in ;;
24941   esac
24942
24943   test x"$ac_file" != x- && { echo "$as_me:24943: creating $ac_file" >&5
24944 echo "$as_me: creating $ac_file" >&6;}
24945
24946   # First look for the input files in the build tree, otherwise in the
24947   # src tree.
24948   ac_file_inputs=`IFS=:
24949     for f in $ac_file_in; do
24950       case $f in
24951       -) echo $tmp/stdin ;;
24952       [\\/$]*)
24953          # Absolute (can't be DOS-style, as IFS=:)
24954          test -f "$f" || { { echo "$as_me:24954: error: cannot find input file: $f" >&5
24955 echo "$as_me: error: cannot find input file: $f" >&2;}
24956    { (exit 1); exit 1; }; }
24957          echo $f;;
24958       *) # Relative
24959          if test -f "$f"; then
24960            # Build tree
24961            echo $f
24962          elif test -f "$srcdir/$f"; then
24963            # Source tree
24964            echo $srcdir/$f
24965          else
24966            # /dev/null tree
24967            { { echo "$as_me:24967: error: cannot find input file: $f" >&5
24968 echo "$as_me: error: cannot find input file: $f" >&2;}
24969    { (exit 1); exit 1; }; }
24970          fi;;
24971       esac
24972     done` || { (exit 1); exit 1; }
24973   # Remove the trailing spaces.
24974   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
24975
24976 EOF
24977
24978 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
24979 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
24980 # be either 'cat' or 'sort'.
24981 cat confdefs.h | uniq >conftest.vals
24982
24983 # Break up conftest.vals because some shells have a limit on
24984 # the size of here documents, and old seds have small limits too.
24985
24986 rm -f conftest.tail
24987 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
24988 while grep . conftest.vals >/dev/null
24989 do
24990   # Write chunks of a limited-size here document to conftest.frag.
24991   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
24992   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
24993   echo 'CEOF' >> $CONFIG_STATUS
24994   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24995   rm -f conftest.vals
24996   mv conftest.tail conftest.vals
24997 done
24998 rm -f conftest.vals
24999
25000 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
25001 # marker @DEFS@.
25002 echo '  cat >> conftest.edit <<CEOF
25003 /@DEFS@/r conftest.frag
25004 /@DEFS@/d
25005 CEOF
25006 sed -f conftest.edit $tmp/in > $tmp/out
25007 rm -f $tmp/in
25008 mv $tmp/out $tmp/in
25009 rm -f conftest.edit conftest.frag
25010 ' >> $CONFIG_STATUS
25011
25012 cat >>$CONFIG_STATUS <<\EOF
25013   # Let's still pretend it is `configure' which instantiates (i.e., don't
25014   # use $as_me), people would be surprised to read:
25015   #    /* config.h.  Generated automatically by config.status.  */
25016   if test x"$ac_file" = x-; then
25017     echo "/* Generated automatically by configure.  */" >$tmp/config.h
25018   else
25019     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
25020   fi
25021   cat $tmp/in >>$tmp/config.h
25022   rm -f $tmp/in
25023   if test x"$ac_file" != x-; then
25024     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
25025       { echo "$as_me:25025: $ac_file is unchanged" >&5
25026 echo "$as_me: $ac_file is unchanged" >&6;}
25027     else
25028       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25029          X"$ac_file" : 'X\(//\)[^/]' \| \
25030          X"$ac_file" : 'X\(//\)$' \| \
25031          X"$ac_file" : 'X\(/\)' \| \
25032          .     : '\(.\)' 2>/dev/null ||
25033 echo X"$ac_file" |
25034     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25035           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25036           /^X\(\/\/\)$/{ s//\1/; q; }
25037           /^X\(\/\).*/{ s//\1/; q; }
25038           s/.*/./; q'`
25039       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25040         { case "$ac_dir" in
25041   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25042   *)                      as_incr_dir=.;;
25043 esac
25044 as_dummy="$ac_dir"
25045 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25046   case $as_mkdir_dir in
25047     # Skip DOS drivespec
25048     ?:) as_incr_dir=$as_mkdir_dir ;;
25049     *)
25050       as_incr_dir=$as_incr_dir/$as_mkdir_dir
25051       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25052     ;;
25053   esac
25054 done; }
25055
25056       fi
25057       rm -f $ac_file
25058       mv $tmp/config.h $ac_file
25059     fi
25060   else
25061     cat $tmp/config.h
25062     rm -f $tmp/config.h
25063   fi
25064 done
25065 EOF
25066 cat >>$CONFIG_STATUS <<\EOF
25067 #
25068 # CONFIG_COMMANDS section.
25069 #
25070 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
25071   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
25072   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
25073
25074   case $ac_dest in
25075     default )
25076 if test "x$cf_with_tests" != xno ; then
25077
25078 for cf_dir in test
25079 do
25080         if test ! -d $srcdir/$cf_dir; then
25081                 continue
25082         elif test -f $srcdir/$cf_dir/programs; then
25083                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
25084         fi
25085 done
25086
25087 fi
25088
25089 cf_prefix=$LIB_PREFIX
25090
25091 case $cf_cv_shlib_version in
25092 (cygdll|msysdll|mingw)
25093         TINFO_NAME=$TINFO_ARG_SUFFIX
25094         TINFO_SUFFIX=.dll
25095         ;;
25096 esac
25097
25098 if test -n "$TINFO_SUFFIX" ; then
25099         case $TINFO_SUFFIX in
25100         (tw*)
25101                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
25102                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
25103                 ;;
25104         (t*)
25105                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
25106                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
25107                 ;;
25108         (w*)
25109                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
25110                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
25111                 ;;
25112         esac
25113 fi
25114
25115 for cf_dir in $SRC_SUBDIRS
25116 do
25117         if test ! -d $srcdir/$cf_dir ; then
25118                 continue
25119         elif test -f $srcdir/$cf_dir/modules; then
25120
25121                 SHARED_LIB=
25122                 Libs_To_Make=
25123                 cf_awk_program=
25124                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
25125                 then
25126                         cf_awk_program="$cf_awk_program\
25127 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
25128 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
25129 "
25130                 fi
25131
25132                 if test "x$WILDCARD_SYMS" = xno
25133                 then
25134                         cf_awk_program="$cf_awk_program\
25135 /[      ]_\\*;/ { skip=1; next; }\
25136 "
25137                 fi
25138
25139                 if test "x$cf_awk_program" != "x"
25140                 then
25141                         cat >>$cf_dir/Makefile <<CF_EOF
25142
25143 # Generated by CF_LIB_RULES
25144 resulting.map: $UNALTERED_SYMS
25145         $AWK 'BEGIN { skip = 1; last=""; } \
25146 $cf_awk_program \
25147 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
25148  skip = 0; last = \$\$0; } \
25149 END { print last; }' < $UNALTERED_SYMS >\$@
25150
25151 distclean::
25152         rm -f resulting.map
25153 CF_EOF
25154                 fi
25155
25156                 for cf_item in $cf_LIST_MODELS
25157                 do
25158
25159         case X$cf_item in
25160         (Xlibtool)
25161                 cf_suffix='.la'
25162                 cf_depsuf=$cf_suffix
25163                 ;;
25164         (Xdebug)
25165                 cf_suffix='_g.a'
25166                 cf_depsuf=$cf_suffix
25167                 ;;
25168         (Xprofile)
25169                 cf_suffix='_p.a'
25170                 cf_depsuf=$cf_suffix
25171                 ;;
25172         (Xshared)
25173                 case $cf_cv_system_name in
25174                 (aix[5-7]*)
25175                         cf_suffix='.so'
25176                         cf_depsuf=$cf_suffix
25177                         ;;
25178                 (cygwin*|msys*|mingw*)
25179                         cf_suffix='.dll'
25180                         cf_depsuf='.dll.a'
25181                         ;;
25182                 (darwin*)
25183                         cf_suffix='.dylib'
25184                         cf_depsuf=$cf_suffix
25185                         ;;
25186                 (hpux*)
25187                         case $target in
25188                         (ia64*)
25189                                 cf_suffix='.so'
25190                                 cf_depsuf=$cf_suffix
25191                                 ;;
25192                         (*)
25193                                 cf_suffix='.sl'
25194                                 cf_depsuf=$cf_suffix
25195                                 ;;
25196                         esac
25197                         ;;
25198                 (*)
25199                         cf_suffix='.so'
25200                         cf_depsuf=$cf_suffix
25201                         ;;
25202                 esac
25203                 ;;
25204         (*)
25205                 cf_suffix='.a'
25206                 cf_depsuf=$cf_suffix
25207                 ;;
25208         esac
25209         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25210         then
25211                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
25212                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
25213         fi
25214
25215                         cf_libname=$cf_dir
25216                         test "$cf_dir" = c++ && cf_libname=ncurses++
25217                         if test $cf_item = shared ; then
25218                                 if test -n "${LIB_SUFFIX}"
25219                                 then
25220                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
25221                                 else
25222                                         cf_shared_suffix="$cf_suffix"
25223                                 fi
25224                                 if test "$cf_cv_do_symlinks" = yes ; then
25225                                         cf_version_name=
25226
25227                                         case "$cf_cv_shlib_version" in
25228                                         (rel)
25229                                                 cf_version_name=REL_VERSION
25230                                                 ;;
25231                                         (abi)
25232                                                 cf_version_name=ABI_VERSION
25233                                                 ;;
25234                                         esac
25235
25236                                         if test -n "$cf_version_name"
25237                                         then
25238                                                 case "$cf_cv_system_name" in
25239                                                 (darwin*)
25240                                                         # "w", etc?
25241                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
25242                                                         ;;
25243                                                 (*)
25244                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
25245                                                         ;;
25246                                                 esac
25247                                         fi
25248                                         if test -n "${USE_LIB_SUFFIX}"
25249                                         then
25250                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
25251                                         else
25252                                                 cf_shared_suffix="$cf_suffix"
25253                                         fi
25254                                 fi
25255                                 # cygwin needs import library, and has unique naming convention
25256                                 # use autodetected ${cf_prefix} for import lib and static lib, but
25257                                 # use 'cyg' prefix for shared lib.
25258                                 case $cf_cv_shlib_version in
25259                                 (cygdll)
25260                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
25261                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
25262                                         ;;
25263                                 (msysdll)
25264                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
25265                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
25266                                         ;;
25267                                 (mingw)
25268                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
25269                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
25270                                         ;;
25271                                 (*)
25272                                         cf_add_lib=
25273                                         ;;
25274                                 esac
25275                                 if test -n "$cf_add_lib"
25276                                 then
25277                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
25278                                         continue
25279                                 fi
25280                         fi
25281                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
25282                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
25283                 done
25284
25285                 if test $cf_dir = ncurses ; then
25286                         cf_subsets="$LIB_SUBSETS"
25287                         cf_r_parts="$cf_subsets"
25288                         cf_liblist="$Libs_To_Make"
25289
25290                         while test -n "$cf_r_parts"
25291                         do
25292                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
25293                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
25294                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
25295                                         cf_add_lib=
25296                                         case $cf_l_parts in
25297                                         (*termlib*)
25298                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
25299                                                 ;;
25300                                         (*ticlib*)
25301                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
25302                                                 ;;
25303                                         (*)
25304                                                 break
25305                                                 ;;
25306                                         esac
25307                                         if test -n "$cf_add_lib"; then
25308                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
25309                                         fi
25310                                 else
25311                                         break
25312                                 fi
25313                         done
25314                 else
25315                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
25316                 fi
25317
25318                 if test $cf_dir = c++; then
25319                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
25320                                 cf_list=
25321                                 for cf_item in $Libs_To_Make
25322                                 do
25323                                         case $cf_item in
25324                                         (*.a)
25325                                                 ;;
25326                                         (*)
25327                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
25328                                                 ;;
25329                                         esac
25330                                         for cf_test in $cf_list
25331                                         do
25332                                                 if test "$cf_test" = "$cf_item"
25333                                                 then
25334                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
25335                                                         cf_item=
25336                                                         break
25337                                                 fi
25338                                         done
25339                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
25340                                 done
25341                                 Libs_To_Make="$cf_list"
25342                         fi
25343                 fi
25344
25345                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
25346                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
25347                         $cf_dir/Makefile >$cf_dir/Makefile.out
25348                 mv $cf_dir/Makefile.out $cf_dir/Makefile
25349
25350                 $AWK -f $srcdir/mk-0th.awk \
25351                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
25352                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25353
25354                 for cf_subset in $cf_subsets
25355                 do
25356                         cf_subdirs=
25357                         for cf_item in $cf_LIST_MODELS
25358                         do
25359
25360                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
25361
25362 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25363
25364                         CXX_MODEL=$cf_ITEM
25365                         if test "$CXX_MODEL" = SHARED; then
25366                                 case $cf_cv_shlib_version in
25367                                 (cygdll|msysdll|mingw)
25368                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
25369
25370 echo "${as_me:-configure}:25370: testing overriding CXX_MODEL to SHARED ..." 1>&5
25371
25372                                         with_shared_cxx=yes
25373                                         ;;
25374                                 (*)
25375                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
25376                                         ;;
25377                                 esac
25378                         fi
25379
25380         case X$cf_item in
25381         (Xlibtool)
25382                 cf_suffix='.la'
25383                 cf_depsuf=$cf_suffix
25384                 ;;
25385         (Xdebug)
25386                 cf_suffix='_g.a'
25387                 cf_depsuf=$cf_suffix
25388                 ;;
25389         (Xprofile)
25390                 cf_suffix='_p.a'
25391                 cf_depsuf=$cf_suffix
25392                 ;;
25393         (Xshared)
25394                 case $cf_cv_system_name in
25395                 (aix[5-7]*)
25396                         cf_suffix='.so'
25397                         cf_depsuf=$cf_suffix
25398                         ;;
25399                 (cygwin*|msys*|mingw*)
25400                         cf_suffix='.dll'
25401                         cf_depsuf='.dll.a'
25402                         ;;
25403                 (darwin*)
25404                         cf_suffix='.dylib'
25405                         cf_depsuf=$cf_suffix
25406                         ;;
25407                 (hpux*)
25408                         case $target in
25409                         (ia64*)
25410                                 cf_suffix='.so'
25411                                 cf_depsuf=$cf_suffix
25412                                 ;;
25413                         (*)
25414                                 cf_suffix='.sl'
25415                                 cf_depsuf=$cf_suffix
25416                                 ;;
25417                         esac
25418                         ;;
25419                 (*)
25420                         cf_suffix='.so'
25421                         cf_depsuf=$cf_suffix
25422                         ;;
25423                 esac
25424                 ;;
25425         (*)
25426                 cf_suffix='.a'
25427                 cf_depsuf=$cf_suffix
25428                 ;;
25429         esac
25430         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25431         then
25432                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
25433                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
25434         fi
25435
25436         case $cf_item in
25437         (libtool) cf_subdir='obj_lo'  ;;
25438         (normal)  cf_subdir='objects' ;;
25439         (debug)   cf_subdir='obj_g' ;;
25440         (profile) cf_subdir='obj_p' ;;
25441         (shared)
25442                 case $cf_cv_system_name in
25443                 (cygwin|msys)
25444                         cf_subdir='objects' ;;
25445                 (*)
25446                         cf_subdir='obj_s' ;;
25447                 esac
25448         esac
25449
25450                         # Test for case where we build libtinfo with a different name.
25451                         cf_libname=$cf_dir
25452                         if test $cf_dir = ncurses ; then
25453                                 case $cf_subset in
25454                                 (*base*)
25455                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
25456                                         ;;
25457                                 (*termlib*)
25458                                         cf_libname=$TINFO_LIB_SUFFIX
25459                                         ;;
25460                                 (ticlib*)
25461                                         cf_libname=$TICS_LIB_SUFFIX
25462                                         ;;
25463                                 esac
25464                         elif test $cf_dir = c++ ; then
25465                                 cf_libname=ncurses++$USE_LIB_SUFFIX
25466                         else
25467                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
25468                         fi
25469                         if test -n "${USE_ARG_SUFFIX}" ; then
25470                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
25471                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
25472                         fi
25473
25474                         # These dependencies really are for development, not
25475                         # builds, but they are useful in porting, too.
25476                         cf_depend="../include/ncurses_cfg.h"
25477                         if test "$srcdir" = "."; then
25478                                 cf_reldir="."
25479                         else
25480                                 cf_reldir="\${srcdir}"
25481                         fi
25482
25483                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
25484                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
25485                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
25486                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
25487                         fi
25488
25489                         cf_dir_suffix=
25490                         old_cf_suffix="$cf_suffix"
25491                         if test "$cf_cv_shlib_version_infix" = yes ; then
25492                         if test -n "$USE_LIB_SUFFIX" ; then
25493                                 case $USE_LIB_SUFFIX in
25494                                 (tw*)
25495                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
25496                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
25497                                         cf_dir_suffix=tw$EXTRA_SUFFIX
25498                                         ;;
25499                                 (t*)
25500                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
25501                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
25502                                         cf_dir_suffix=t$EXTRA_SUFFIX
25503                                         ;;
25504                                 (w*)
25505                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
25506                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
25507                                         cf_dir_suffix=w$EXTRA_SUFFIX
25508                                         ;;
25509                                 (*)
25510                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
25511                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
25512                                         cf_dir_suffix=$EXTRA_SUFFIX
25513                                         ;;
25514                                 esac
25515                         fi
25516                         fi
25517
25518                         $AWK -f $srcdir/mk-1st.awk \
25519                                 name=${cf_libname}${cf_dir_suffix} \
25520                                 traces=$LIB_TRACING \
25521                                 MODEL=$cf_ITEM \
25522                                 CXX_MODEL=$CXX_MODEL \
25523                                 model=$cf_subdir \
25524                                 prefix=$cf_prefix \
25525                                 suffix=$cf_suffix \
25526                                 subset=$cf_subset \
25527                                 driver=$cf_cv_term_driver \
25528                                 SymLink="$LN_S" \
25529                                 TermlibRoot=$TINFO_NAME \
25530                                 TermlibSuffix=$TINFO_SUFFIX \
25531                                 ShlibVer=$cf_cv_shlib_version \
25532                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
25533                                 ReLink=${cf_cv_do_relink:-no} \
25534                                 DoLinks=$cf_cv_do_symlinks \
25535                                 rmSoLocs=$cf_cv_rm_so_locs \
25536                                 ldconfig="$LDCONFIG" \
25537                                 overwrite=$WITH_OVERWRITE \
25538                                 depend="$cf_depend" \
25539                                 host="$host" \
25540                                 libtool_version="$LIBTOOL_VERSION" \
25541                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25542
25543                         cf_suffix="$old_cf_suffix"
25544
25545                         for cf_subdir2 in $cf_subdirs lib
25546                         do
25547                                 test $cf_subdir = $cf_subdir2 && break
25548                         done
25549                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
25550                         $AWK -f $srcdir/mk-2nd.awk \
25551                                 name=$cf_dir \
25552                                 traces=$LIB_TRACING \
25553                                 MODEL=$cf_ITEM \
25554                                 model=$cf_subdir \
25555                                 subset=$cf_subset \
25556                                 srcdir=$srcdir \
25557                                 echo=$WITH_ECHO \
25558                                 crenames=$cf_cv_prog_CC_c_o \
25559                                 cxxrenames=$cf_cv_prog_CXX_c_o \
25560                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
25561                         cf_subdirs="$cf_subdirs $cf_subdir"
25562                         done
25563                 done
25564         fi
25565
25566         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
25567 done
25568
25569 for cf_dir in $SRC_SUBDIRS
25570 do
25571         if test ! -d $srcdir/$cf_dir ; then
25572                 continue
25573         fi
25574
25575         if test -f $cf_dir/Makefile ; then
25576                 case "$cf_dir" in
25577                 (Ada95)
25578                         echo 'libs \' >> Makefile
25579                         echo 'install.libs \' >> Makefile
25580                         echo 'uninstall.libs ::' >> Makefile
25581                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
25582                         ;;
25583                 esac
25584         fi
25585
25586         if test -f $srcdir/$cf_dir/modules; then
25587                 echo >> Makefile
25588                 if test -f $srcdir/$cf_dir/headers; then
25589 cat >> Makefile <<CF_EOF
25590 install.includes \\
25591 uninstall.includes \\
25592 CF_EOF
25593                 fi
25594 if test "$cf_dir" != "c++" ; then
25595 echo 'lint \' >> Makefile
25596 fi
25597 cat >> Makefile <<CF_EOF
25598 libs \\
25599 lintlib \\
25600 install.libs \\
25601 uninstall.libs \\
25602 install.$cf_dir \\
25603 uninstall.$cf_dir ::
25604         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
25605 CF_EOF
25606         elif test -f $srcdir/$cf_dir/headers; then
25607 cat >> Makefile <<CF_EOF
25608
25609 libs \\
25610 install.libs \\
25611 uninstall.libs \\
25612 install.includes \\
25613 uninstall.includes ::
25614         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
25615 CF_EOF
25616 fi
25617 done
25618
25619 if test "x$cf_with_db_install" = xyes; then
25620 cat >> Makefile <<CF_EOF
25621
25622 install.libs uninstall.libs \\
25623 install.data uninstall.data ::
25624 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
25625 CF_EOF
25626 else
25627 cat >> Makefile <<CF_EOF
25628
25629 install.libs uninstall.libs ::
25630         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
25631 CF_EOF
25632 fi
25633
25634 if test "x$cf_with_manpages" = xyes; then
25635 cat >> Makefile <<CF_EOF
25636
25637 install.man \\
25638 uninstall.man ::
25639         cd man && \${MAKE} \${TOP_MFLAGS} \$@
25640 CF_EOF
25641 fi
25642
25643 cat >> Makefile <<CF_EOF
25644
25645 distclean ::
25646         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
25647         rm -f headers.sh headers.sed mk_shared_lib.sh
25648         rm -f edit_man.* man_alias.*
25649         rm -rf \${DIRS_TO_MAKE}
25650 CF_EOF
25651
25652 # Special case: tack's manpage lives in its own directory.
25653 if test "x$cf_with_manpages" = xyes; then
25654 if test "x$cf_with_tack" = "xyes"; then
25655 cat >> Makefile <<CF_EOF
25656
25657 install.man \\
25658 uninstall.man ::
25659         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
25660 CF_EOF
25661 fi
25662 fi
25663
25664 rm -f headers.sed headers.sh
25665
25666 echo creating headers.sh
25667 cat >headers.sh <<CF_EOF
25668 #! $SHELL
25669 # This shell script is generated by the 'configure' script.  It is invoked in a
25670 # subdirectory of the build tree.  It generates a sed-script in the parent
25671 # directory that is used to adjust includes for header files that reside in a
25672 # subdirectory of /usr/include, etc.
25673 PRG=""
25674 while test \$# != 3
25675 do
25676 PRG="\$PRG \$1"; shift
25677 done
25678 DST=\$1
25679 REF=\$2
25680 SRC=\$3
25681 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
25682 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
25683 echo installing \$SRC in \$DST
25684 CF_EOF
25685
25686 if test $WITH_CURSES_H = yes; then
25687         cat >>headers.sh <<CF_EOF
25688 case \$DST in
25689 (/*/include/*)
25690         END=\`basename \$DST\`
25691         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
25692         do
25693                 NAME=\`basename \$i\`
25694                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
25695         done
25696         ;;
25697 (*)
25698         echo "" >> \$TMPSED
25699         ;;
25700 esac
25701 CF_EOF
25702
25703 else
25704         cat >>headers.sh <<CF_EOF
25705 case \$DST in
25706 (/*/include/*)
25707         END=\`basename \$DST\`
25708         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
25709         do
25710                 NAME=\`basename \$i\`
25711                 if test "\$NAME" = "curses.h"
25712                 then
25713                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
25714                         NAME=ncurses.h
25715                 fi
25716                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
25717         done
25718         ;;
25719 (*)
25720         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
25721         ;;
25722 esac
25723 CF_EOF
25724 fi
25725 cat >>headers.sh <<CF_EOF
25726 rm -f \$TMPSRC
25727 sed -f \$TMPSED \$SRC > \$TMPSRC
25728 NAME=\`basename \$SRC\`
25729 CF_EOF
25730 if test $WITH_CURSES_H != yes; then
25731         cat >>headers.sh <<CF_EOF
25732 test "\$NAME" = "curses.h" && NAME=ncurses.h
25733 CF_EOF
25734 fi
25735 cat >>headers.sh <<CF_EOF
25736 # Just in case someone gzip'd manpages, remove the conflicting copy.
25737 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
25738
25739 eval \$PRG \$TMPSRC \$DST/\$NAME
25740 rm -f \$TMPSRC \$TMPSED
25741 CF_EOF
25742
25743 chmod 0755 headers.sh
25744
25745 for cf_dir in $SRC_SUBDIRS
25746 do
25747         if test ! -d $srcdir/$cf_dir ; then
25748                 continue
25749         fi
25750
25751         if test -f $srcdir/$cf_dir/headers; then
25752                 $AWK -f $srcdir/mk-hdr.awk \
25753                         subset="$LIB_SUBSETS" \
25754                         compat="$WITH_CURSES_H" \
25755                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
25756         fi
25757
25758         if test -f $srcdir/$cf_dir/modules; then
25759                 if test "$cf_dir" != "c++" ; then
25760                         cat >>$cf_dir/Makefile <<"CF_EOF"
25761 depend : ${AUTO_SRC}
25762         makedepend -- ${CPPFLAGS} -- ${C_SRC}
25763
25764 # DO NOT DELETE THIS LINE -- make depend depends on it.
25765 CF_EOF
25766                 fi
25767         fi
25768 done
25769
25770 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
25771 if test -z "$USE_OLD_MAKERULES" ; then
25772         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
25773 fi
25774 fi
25775  ;;
25776   esac
25777 done
25778 EOF
25779
25780 cat >>$CONFIG_STATUS <<\EOF
25781
25782 { (exit 0); exit 0; }
25783 EOF
25784 chmod +x $CONFIG_STATUS
25785 ac_clean_files=$ac_clean_files_save
25786
25787 # configure is writing to config.log, and then calls config.status.
25788 # config.status does its own redirection, appending to config.log.
25789 # Unfortunately, on DOS this fails, as config.log is still kept open
25790 # by configure, so config.status won't be able to write to it; its
25791 # output is simply discarded.  So we exec the FD to /dev/null,
25792 # effectively closing config.log, so it can be properly (re)opened and
25793 # appended to by config.status.  When coming back to configure, we
25794 # need to make the FD available again.
25795 if test "$no_create" != yes; then
25796   ac_cs_success=:
25797   exec 5>/dev/null
25798   $SHELL $CONFIG_STATUS || ac_cs_success=false
25799   exec 5>>config.log
25800   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25801   # would make configure fail if this is the last instruction.
25802   $ac_cs_success || { (exit 1); exit 1; }
25803 fi
25804 ${MAKE:-make} preinstall